diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-10-28 22:03:47 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2021-10-28 22:13:47 +0300 |
commit | 690300eb4acd01ecada000c5ce6162c2437f9f6b (patch) | |
tree | 66081a38155050b9530c9fb59422c4336fc0ea91 /source/blender/blenlib | |
parent | db8be0cdfbaf9346af931a56da8df92f84845db3 (diff) |
Fix install paths for blender thumbnailer when not building a portable install
When doing a non portable build of blender, the executable
blender-thumbnailer would be installed in two locations:
/usr/bin/
/usr/
While cleaning up, also make the blender thumbnailer dll optional on
windows to bring the logic in line with what it is on linux and mac.
Reviewed By: Campbell Barton, Ray molenkamp
Differential Revision: http://developer.blender.org/D13014
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/winstuff.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 72087a12767..7db984aef5c 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -367,6 +367,10 @@ if(WITH_GMP) endif() if(WIN32) + if (WITH_BLENDER_THUMBNAILER) + # Needed for querying the thumbnailer .dll in winstuff.c + add_definitions(-DWITH_BLENDER_THUMBNAILER) + endif() list(APPEND INC ../../../intern/utfconv ) diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index d5c9c5cd5e6..3001b25bc1e 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -172,12 +172,14 @@ bool BLI_windows_register_blend_extension(const bool background) return false; } +# ifdef WITH_BLENDER_THUMBNAILER BLI_windows_get_executable_dir(InstallDir); GetSystemDirectory(SysDir, FILE_MAXDIR); ThumbHandlerDLL = "BlendThumb.dll"; snprintf( RegCmd, MAX_PATH * 2, "%s\\regsvr32 /s \"%s\\%s\"", SysDir, InstallDir, ThumbHandlerDLL); system(RegCmd); +# endif RegCloseKey(root); printf("success (%s)\n", usr_mode ? "user" : "system"); |