Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Want <cwant@ualberta.ca>2007-01-23 23:08:23 +0300
committerChris Want <cwant@ualberta.ca>2007-01-23 23:08:23 +0300
commit2cd4fca2ef2d1670804f98dd232a86025aac8eb6 (patch)
tree6cb511796cd064e8a1b44cc6dd7d968afebf6b53
parent702defaa81cc2d9b1614c480cda389f8671d8074 (diff)
I need to use the 64-bit Linux blender, but I don't want to accidentally
commit creator.c, so if this file is compiled and the macro YESIAMSTUPID is defined, the executable will run, with a mean warning printed to stdout. Enable in cmake by setting YESIAMSTUPID to On, or with make by putting "export NAN_YESIAMSTUPID=true" in user-def.mk.
-rw-r--r--CMakeLists.txt1
-rw-r--r--source/creator/CMakeLists.txt4
-rw-r--r--source/creator/Makefile4
-rw-r--r--source/creator/creator.c9
4 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 180e3edd468..121dbd2814e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,7 @@ OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF)
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" OFF)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
+OPTION(YESIAMSTUPID "Enable execution on 64-bit platforms" OFF)
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 08dbba4988a..938fb2804bd 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -47,6 +47,10 @@ IF(WITH_QUICKTIME)
ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
+IF(YESIAMSTUPID)
+ ADD_DEFINITIONS(-DYESIAMSTUPID)
+ENDIF(YESIAMSTUPID)
+
MESSAGE(STATUS "Configuring blender")
ADD_CUSTOM_COMMAND(
diff --git a/source/creator/Makefile b/source/creator/Makefile
index 1074adf9b2b..f68855af96f 100644
--- a/source/creator/Makefile
+++ b/source/creator/Makefile
@@ -63,4 +63,8 @@ ifeq ($(WITH_QUICKTIME), true)
CPPFLAGS += -I$(NAN_QUICKTIME)/include -DWITH_QUICKTIME
endif
+ifeq ($(NAN_YESIAMSTUPID), true)
+ CPPFLAGS += -DYESIAMSTUPID
+endif
+
CPPFLAGS += -I$(OPENGL_HEADERS)
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 37df17e3bad..25d3c9ce88b 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -235,6 +235,7 @@ int main(int argc, char **argv)
int audio = 0;
#endif
+#ifndef YESIAMSTUPID
/* temporary: prevent people to make/use 64 bits versions without them knowing it might be
risky. I don't know for sure yet if we get problems, but I rather not get the burden of
having to fix all faulty saved 64 bits files (ton) */
@@ -242,6 +243,14 @@ int main(int argc, char **argv)
printf("64 bits compiles will give incorrectly saved .blend files. Do not use it. For testing purposes please remove this line from creator.c\n");
exit(0);
}
+#else
+ if(sizeof(void *)==8) {
+ printf("64 bits compiles will give incorrectly saved .blend files. Do not use it.\n\n"
+ "*** If you continue to run this executable, you really are quite stupid ***\n\n");
+
+ }
+
+#endif
setCallbacks();
#ifdef __APPLE__