diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-07-14 21:29:53 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-07-14 21:29:53 +0400 |
commit | fa46278e347ca173e9e6d6b734a59c268f4fc9d0 (patch) | |
tree | a14148822e60cb1f8f36dba0481b830cb9675db1 /source/creator | |
parent | 470a5017fb80f21bac08373e4b5816c92d42990a (diff) | |
parent | 4da4943b5ce9514e9fb3d9458f3e52d6b0d310ca (diff) |
merge from trunk 38379
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 51 | ||||
-rw-r--r-- | source/creator/creator.c | 24 |
2 files changed, 53 insertions, 22 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 910baff6b8a..3ad0ec8efa4 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -231,7 +231,17 @@ else() set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}) endif() -# install target + +# ----------------------------------------------------------------------------- +# Install Targets + +set(BLENDER_TEXT_FILES + ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt + ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt + ${CMAKE_SOURCE_DIR}/release/text/copyright.txt + ${CMAKE_SOURCE_DIR}/release/text/readme.html +) + if(UNIX AND NOT APPLE) if(WITH_INSTALL_PORTABLE) @@ -274,9 +284,8 @@ if(UNIX AND NOT APPLE) ) install( - DIRECTORY ${CMAKE_SOURCE_DIR}/release/text + FILES ${BLENDER_TEXT_FILES} DESTINATION ${TARGETDIR} - PATTERN ".svn" EXCLUDE ) else() @@ -332,27 +341,26 @@ if(UNIX AND NOT APPLE) DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1 ) install( - DIRECTORY ${CMAKE_SOURCE_DIR}/release/text + FILES ${BLENDER_TEXT_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender - PATTERN ".svn" EXCLUDE ) endif() install( FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf - DESTINATION ${TARGETDIR_VER}/config + DESTINATION ${TARGETDIR_VER} ) if(WITH_INTERNATIONAL) install( FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages - DESTINATION ${TARGETDIR_VER}/config + DESTINATION ${TARGETDIR_VER} ) install( DIRECTORY - ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale - ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts + ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale + ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts DESTINATION ${TARGETDIR_VER}/datafiles PATTERN ".svn" EXCLUDE ) @@ -411,25 +419,24 @@ elseif(WIN32) ) install( # same as linux!, deduplicate - DIRECTORY ${CMAKE_SOURCE_DIR}/release/text + FILES ${BLENDER_TEXT_FILES} DESTINATION ${TARGETDIR} - PATTERN ".svn" EXCLUDE ) install( # same as linux!, deduplicate FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf - DESTINATION ${TARGETDIR_VER}/config + DESTINATION ${TARGETDIR_VER} ) if(WITH_INTERNATIONAL) # same as linux!, deduplicate install( FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages - DESTINATION ${TARGETDIR_VER}/config + DESTINATION ${TARGETDIR_VER} ) install( DIRECTORY - ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale - ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts + ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale + ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts DESTINATION ${TARGETDIR_VER}/datafiles PATTERN ".svn" EXCLUDE ) @@ -634,9 +641,9 @@ elseif(APPLE) endmacro() # install release and app files - install_dir( - ${CMAKE_SOURCE_DIR}/release/text/ - \${TARGETDIR} + install( + FILES ${BLENDER_TEXT_FILES} + DESTINATION ${TARGETDIR} ) install( @@ -651,7 +658,7 @@ elseif(APPLE) install( FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf - DESTINATION ${TARGETDIR_VER}/datafiles + DESTINATION ${TARGETDIR_VER} ) # localization @@ -703,6 +710,12 @@ elseif(APPLE) endif() endif() +unset(BLENDER_TEXT_FILES) + + +# ----------------------------------------------------------------------------- +# Setup link libs + add_dependencies(blender makesdna) get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS) diff --git a/source/creator/creator.c b/source/creator/creator.c index 8b405d2d4b8..fddd6d286db 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -64,6 +64,7 @@ #include "BLI_threads.h" #include "BLI_scanfill.h" // for BLI_setErrorCallBack, TODO, move elsewhere #include "BLI_utildefines.h" +#include "BLI_callbacks.h" #include "DNA_ID.h" #include "DNA_scene_types.h" @@ -767,7 +768,9 @@ static int render_frame(int argc, const char **argv, void *data) frame = MIN2(MAXFRAME, MAX2(MINAFRAME, frame)); - RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, frame, frame, scene->r.frame_step, &reports); + RE_SetReports(re, &reports); + RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, frame, frame, scene->r.frame_step); + RE_SetReports(re, NULL); return 1; } else { printf("\nError: frame number must follow '-f / --render-frame'.\n"); @@ -788,7 +791,9 @@ static int render_animation(int UNUSED(argc), const char **UNUSED(argv), void *d Render *re= RE_NewRender(scene->id.name); ReportList reports; BKE_reports_init(&reports, RPT_PRINT); - RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports); + RE_SetReports(re, &reports); + RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, scene->r.sfra, scene->r.efra, scene->r.frame_step); + RE_SetReports(re, NULL); } else { printf("\nError: no blend loaded. cannot use '-a'.\n"); } @@ -990,6 +995,7 @@ static int load_file(int UNUSED(argc), const char **argv, void *data) #ifdef WITH_PYTHON /* run any texts that were loaded in and flagged as modules */ BPY_driver_reset(); + BPY_app_handlers_reset(); BPY_modules_load_user(C); #endif @@ -1128,7 +1134,8 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) #ifdef WITH_PYTHON_MODULE /* allow python module to call main */ -#define main main_python +#define main main_python_enter +static void *evil_C= NULL; #endif int main(int argc, const char **argv) @@ -1139,6 +1146,7 @@ int main(int argc, const char **argv) #ifdef WITH_PYTHON_MODULE #undef main + evil_C= C; #endif #ifdef WITH_BINRELOC @@ -1199,6 +1207,8 @@ int main(int argc, const char **argv) IMB_init(); + BLI_cb_init(); + #ifdef WITH_GAMEENGINE syshandle = SYS_GetSystem(); #else @@ -1305,6 +1315,14 @@ int main(int argc, const char **argv) return 0; } /* end of int main(argc,argv) */ +#ifdef WITH_PYTHON_MODULE +void main_python_exit(void) +{ + WM_exit((bContext *)evil_C); + evil_C= NULL; +} +#endif + static void error_cb(const char *err) { |