diff options
author | Ray Molenkamp <github@lazydodo.com> | 2021-05-27 05:02:35 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2021-05-27 05:02:35 +0300 |
commit | f3944cf503966a93a124e389d9232d7f833c0077 (patch) | |
tree | dca5e410eedcb5fa947cdbc948d41a7ebd00f060 /source/creator/CMakeLists.txt | |
parent | 6fc9ec92574ef55f76eca367565b8b184466b0e8 (diff) |
Win: Add launcher to hide the console window flash
This patch fixes a long-standing complaint from users:
the console window shortly flashing when they start
blender.
This is done by adding a new executable called
blender-launcher.exe which starts blender.exe while
hiding the console.
Any command line parameters given to blender-launcher
will be passed on to blender.exe so it'll be a drop
in replacement.
Starting blender.exe on its own will still function as
a proper console app so no changes required here for
users that use blender for batch processing.
Notable changes:
Registering blender (-R switch) will now register
blender-launcher as the preferred executable.
This patch updates the installer and updates the
shortcuts to start blender-launcher.exe rather
than blender.exe
Differential Revision: https://developer.blender.org/D11094
Reviewed by: brecht, harley
Diffstat (limited to 'source/creator/CMakeLists.txt')
-rw-r--r-- | source/creator/CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index c2893317924..baea3ad1f9b 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -285,6 +285,15 @@ if(WITH_PYTHON_MODULE) else() add_executable(blender ${EXETYPE} ${SRC}) + if(WIN32) + add_executable(blender-launcher WIN32 + blender-launcher.c + ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.rc + ${CMAKE_BINARY_DIR}/blender.exe.manifest + ) + target_compile_definitions (blender-launcher PRIVATE -D_UNICODE -DUNICODE) + target_link_libraries(blender-launcher Pathcch.lib) + endif() endif() if(WITH_BUILDINFO) @@ -1212,7 +1221,7 @@ endif() if(WIN32 AND NOT WITH_PYTHON_MODULE) install( - TARGETS blender + TARGETS blender blender-launcher COMPONENT Blender DESTINATION "." ) |