diff options
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 24 | ||||
-rw-r--r-- | source/creator/creator.c | 10 |
2 files changed, 30 insertions, 4 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 99c7dba9305..b25cac7bf78 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -101,6 +101,17 @@ set(SRC ) if(WIN32 AND NOT UNIX) + string(SUBSTRING ${BLENDER_VERSION} 0 1 bver1) + string(SUBSTRING ${BLENDER_VERSION} 2 1 bver2) + string(SUBSTRING ${BLENDER_VERSION} 3 1 bver3) + add_definitions( + -DBLEN_VER_RC_STR="${BLENDER_VERSION}" + -DBLEN_VER_RC_1=${bver1} + -DBLEN_VER_RC_2=${bver2} + -DBLEN_VER_RC_3=${bver3} + -DBLEN_VER_RC_4=0 + ) + list(APPEND SRC ../icons/winblender.rc ) @@ -536,6 +547,19 @@ elseif(WIN32) ) endif() endif() + + add_custom_command(TARGET blender + POST_BUILD + MAIN_DEPENDENCY blender + COMMAND copy /Y \"${LIBDIR}\\thumbhandler\\lib\\BlendThumb64.dll\" \"${TARGETDIR}\\\" + ) + if(NOT CMAKE_CL_64) + add_custom_command(TARGET blender + POST_BUILD + MAIN_DEPENDENCY blender + COMMAND copy /Y \"${LIBDIR}\\thumbhandler\\lib\\BlendThumb.dll\" \"${TARGETDIR}\\\" + ) + endif() elseif(APPLE) set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app) diff --git a/source/creator/creator.c b/source/creator/creator.c index 2480f8b544b..1db143cdd20 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -287,6 +287,7 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) #ifdef WIN32 BLI_argsPrintArgDoc(ba, "-R"); + BLI_argsPrintArgDoc(ba, "-r"); #endif BLI_argsPrintArgDoc(ba, "--version"); @@ -486,12 +487,12 @@ static int without_borders(int UNUSED(argc), const char **UNUSED(argv), void *UN static int register_extension(int UNUSED(argc), const char **UNUSED(argv), void *data) { #ifdef WIN32 - char *path = BLI_argsArgv(data)[0]; - RegisterBlendExtension(path); + if (data) + G.background = 1; + RegisterBlendExtension(); #else (void)data; /* unused */ #endif - return 0; } @@ -1094,7 +1095,8 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) BLI_argsAdd(ba, 2, "-p", "--window-geometry", "<sx> <sy> <w> <h>\n\tOpen with lower left corner at <sx>, <sy> and width and height as <w>, <h>", prefsize, NULL); BLI_argsAdd(ba, 2, "-w", "--window-border", "\n\tForce opening with borders (default)", with_borders, NULL); BLI_argsAdd(ba, 2, "-W", "--window-borderless", "\n\tForce opening without borders", without_borders, NULL); - BLI_argsAdd(ba, 2, "-R", NULL, "\n\tRegister .blend extension (windows only)", register_extension, ba); + BLI_argsAdd(ba, 2, "-R", NULL, "\n\tRegister .blend extension, then exit (Windows only)", register_extension, NULL); + BLI_argsAdd(ba, 2, "-r", NULL, "\n\tSilently register .blend extension, then exit (Windows only)", register_extension, ba); /* third pass: disabling things and forcing settings */ BLI_argsAddCase(ba, 3, "-nojoystick", 1, NULL, 0, "\n\tDisable joystick support", no_joystick, syshandle); |