dont build blender/kernel if the game engines disabled.
This commit is contained in:
@@ -25,9 +25,9 @@
|
|||||||
# ***** END GPL LICENSE BLOCK *****
|
# ***** END GPL LICENSE BLOCK *****
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(blender)
|
ADD_SUBDIRECTORY(blender)
|
||||||
ADD_SUBDIRECTORY(kernel)
|
|
||||||
|
|
||||||
IF(WITH_GAMEENGINE)
|
IF(WITH_GAMEENGINE)
|
||||||
|
ADD_SUBDIRECTORY(kernel)
|
||||||
ADD_SUBDIRECTORY(gameengine)
|
ADD_SUBDIRECTORY(gameengine)
|
||||||
ENDIF(WITH_GAMEENGINE)
|
ENDIF(WITH_GAMEENGINE)
|
||||||
|
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
Import ('env')
|
Import ('env')
|
||||||
|
|
||||||
SConscript(['blender/SConscript',
|
SConscript(['blender/SConscript', 'creator/SConscript'])
|
||||||
'kernel/SConscript',
|
|
||||||
'creator/SConscript'])
|
|
||||||
if env['WITH_BF_GAMEENGINE']:
|
if env['WITH_BF_GAMEENGINE']:
|
||||||
SConscript (['gameengine/SConscript'])
|
SConscript (['kernel/SConscript', 'gameengine/SConscript'])
|
||||||
|
|
||||||
if env['WITH_BF_PLAYER']:
|
if env['WITH_BF_PLAYER']:
|
||||||
SConscript (['blenderplayer/bad_level_call_stubs/SConscript'])
|
SConscript (['blenderplayer/bad_level_call_stubs/SConscript'])
|
||||||
|
@@ -90,6 +90,10 @@ ELSE(WITH_PYTHON)
|
|||||||
ADD_DEFINITIONS(-DDISABLE_PYTHON)
|
ADD_DEFINITIONS(-DDISABLE_PYTHON)
|
||||||
ENDIF(WITH_PYTHON)
|
ENDIF(WITH_PYTHON)
|
||||||
|
|
||||||
|
IF(WITH_GAMEENGINE)
|
||||||
|
ADD_DEFINITIONS(-DGAMEBLENDER)
|
||||||
|
ENDIF(WITH_GAMEENGINE)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
LIST(APPEND INC ${PTHREADS_INC})
|
LIST(APPEND INC ${PTHREADS_INC})
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
@@ -65,7 +65,9 @@
|
|||||||
#include "BPY_extern.h"
|
#include "BPY_extern.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GAMEBLENDER == 1
|
||||||
#include "SYS_System.h"
|
#include "SYS_System.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "RNA_define.h"
|
#include "RNA_define.h"
|
||||||
|
|
||||||
@@ -432,9 +434,9 @@ void WM_exit(bContext *C)
|
|||||||
wm_ghost_exit();
|
wm_ghost_exit();
|
||||||
|
|
||||||
CTX_free(C);
|
CTX_free(C);
|
||||||
|
#if GAMEBLENDER == 1
|
||||||
SYS_DeleteSystem(SYS_GetSystem());
|
SYS_DeleteSystem(SYS_GetSystem());
|
||||||
|
#endif
|
||||||
if(MEM_get_memory_blocks_in_use()!=0) {
|
if(MEM_get_memory_blocks_in_use()!=0) {
|
||||||
printf("Error Totblock: %d\n", MEM_get_memory_blocks_in_use());
|
printf("Error Totblock: %d\n", MEM_get_memory_blocks_in_use());
|
||||||
MEM_printmemlist();
|
MEM_printmemlist();
|
||||||
|
@@ -78,6 +78,10 @@ ELSE(WITH_PYTHON)
|
|||||||
ADD_DEFINITIONS(-DDISABLE_PYTHON)
|
ADD_DEFINITIONS(-DDISABLE_PYTHON)
|
||||||
ENDIF(WITH_PYTHON)
|
ENDIF(WITH_PYTHON)
|
||||||
|
|
||||||
|
IF(WITH_GAMEENGINE)
|
||||||
|
ADD_DEFINITIONS(-DGAMEBLENDER)
|
||||||
|
ENDIF(WITH_GAMEENGINE)
|
||||||
|
|
||||||
IF(NOT WITH_SDL)
|
IF(NOT WITH_SDL)
|
||||||
ADD_DEFINITIONS(-DDISABLE_SDL)
|
ADD_DEFINITIONS(-DDISABLE_SDL)
|
||||||
ENDIF(NOT WITH_SDL)
|
ENDIF(NOT WITH_SDL)
|
||||||
|
@@ -97,7 +97,11 @@
|
|||||||
#include "GPU_extensions.h"
|
#include "GPU_extensions.h"
|
||||||
|
|
||||||
/* for passing information between creator and gameengine */
|
/* for passing information between creator and gameengine */
|
||||||
|
#if GAMEBLENDER == 1
|
||||||
#include "SYS_System.h"
|
#include "SYS_System.h"
|
||||||
|
#else /* dummy */
|
||||||
|
#define SYS_SystemHandle int
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
@@ -444,6 +448,9 @@ static int register_extension(int UNUSED(argc), char **UNUSED(argv), void *data)
|
|||||||
|
|
||||||
static int no_joystick(int UNUSED(argc), char **UNUSED(argv), void *data)
|
static int no_joystick(int UNUSED(argc), char **UNUSED(argv), void *data)
|
||||||
{
|
{
|
||||||
|
#if GAMEBLENDER != 1
|
||||||
|
(void)data;
|
||||||
|
#else
|
||||||
SYS_SystemHandle *syshandle = data;
|
SYS_SystemHandle *syshandle = data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -452,6 +459,7 @@ static int no_joystick(int UNUSED(argc), char **UNUSED(argv), void *data)
|
|||||||
*/
|
*/
|
||||||
SYS_WriteCommandLineInt(*syshandle, "nojoystick",1);
|
SYS_WriteCommandLineInt(*syshandle, "nojoystick",1);
|
||||||
if (G.f & G_DEBUG) printf("disabling nojoystick\n");
|
if (G.f & G_DEBUG) printf("disabling nojoystick\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -633,8 +641,13 @@ static int set_extension(int argc, char **argv, void *data)
|
|||||||
|
|
||||||
static int set_ge_parameters(int argc, char **argv, void *data)
|
static int set_ge_parameters(int argc, char **argv, void *data)
|
||||||
{
|
{
|
||||||
SYS_SystemHandle syshandle = *(SYS_SystemHandle*)data;
|
|
||||||
int a = 0;
|
int a = 0;
|
||||||
|
#if GAMEBLENDER == 1
|
||||||
|
SYS_SystemHandle syshandle = *(SYS_SystemHandle*)data;
|
||||||
|
#else
|
||||||
|
(void)data;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
gameengine parameters are automaticly put into system
|
gameengine parameters are automaticly put into system
|
||||||
-g [paramname = value]
|
-g [paramname = value]
|
||||||
@@ -655,7 +668,9 @@ example:
|
|||||||
{
|
{
|
||||||
a++;
|
a++;
|
||||||
/* assignment */
|
/* assignment */
|
||||||
|
#if GAMEBLENDER == 1
|
||||||
SYS_WriteCommandLineString(syshandle,paramname,argv[a]);
|
SYS_WriteCommandLineString(syshandle,paramname,argv[a]);
|
||||||
|
#endif
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
printf("error: argument assignment (%s) without value.\n",paramname);
|
printf("error: argument assignment (%s) without value.\n",paramname);
|
||||||
@@ -664,8 +679,9 @@ example:
|
|||||||
/* name arg eaten */
|
/* name arg eaten */
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
#if GAMEBLENDER == 1
|
||||||
SYS_WriteCommandLineInt(syshandle,argv[a],1);
|
SYS_WriteCommandLineInt(syshandle,argv[a],1);
|
||||||
|
#endif
|
||||||
/* doMipMap */
|
/* doMipMap */
|
||||||
if (!strcmp(argv[a],"nomipmap"))
|
if (!strcmp(argv[a],"nomipmap"))
|
||||||
{
|
{
|
||||||
@@ -1077,8 +1093,12 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
IMB_init();
|
IMB_init();
|
||||||
|
|
||||||
|
#if GAMEBLENDER == 1
|
||||||
syshandle = SYS_GetSystem();
|
syshandle = SYS_GetSystem();
|
||||||
GEN_init_messaging_system();
|
GEN_init_messaging_system();
|
||||||
|
#else
|
||||||
|
syshandle= 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* first test for background */
|
/* first test for background */
|
||||||
ba = BLI_argsInit(argc, argv); /* skip binary path */
|
ba = BLI_argsInit(argc, argv); /* skip binary path */
|
||||||
|
Reference in New Issue
Block a user