forked from bartvdbraak/blender
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:
parent
702defaa81
commit
2cd4fca2ef
@ -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")
|
||||
|
@ -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(
|
||||
|
@ -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)
|
||||
|
@ -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__
|
||||
|
Loading…
Reference in New Issue
Block a user