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.
This commit is contained in:
Chris Want 2007-01-23 20:08:23 +00:00
parent 702defaa81
commit 2cd4fca2ef
4 changed files with 18 additions and 0 deletions

@ -66,6 +66,7 @@ OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF)
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" 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_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) 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) IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE") MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")

@ -47,6 +47,10 @@ IF(WITH_QUICKTIME)
ADD_DEFINITIONS(-DWITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME) ENDIF(WITH_QUICKTIME)
IF(YESIAMSTUPID)
ADD_DEFINITIONS(-DYESIAMSTUPID)
ENDIF(YESIAMSTUPID)
MESSAGE(STATUS "Configuring blender") MESSAGE(STATUS "Configuring blender")
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(

@ -63,4 +63,8 @@ ifeq ($(WITH_QUICKTIME), true)
CPPFLAGS += -I$(NAN_QUICKTIME)/include -DWITH_QUICKTIME CPPFLAGS += -I$(NAN_QUICKTIME)/include -DWITH_QUICKTIME
endif endif
ifeq ($(NAN_YESIAMSTUPID), true)
CPPFLAGS += -DYESIAMSTUPID
endif
CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I$(OPENGL_HEADERS)

@ -235,6 +235,7 @@ int main(int argc, char **argv)
int audio = 0; int audio = 0;
#endif #endif
#ifndef YESIAMSTUPID
/* temporary: prevent people to make/use 64 bits versions without them knowing it might be /* 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 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) */ 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"); 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); 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(); setCallbacks();
#ifdef __APPLE__ #ifdef __APPLE__