From ef9269bd62f31e39d39cc59cd34354b53eae6661 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 20 Oct 2021 10:16:36 +1100 Subject: Thumbnails: refactor extraction to use one code-path for all platforms Thumbnail extraction now shares code between Linux/Windows, allowing thumbnails from Zstd compressed blend files to be extracted. The main logic is placed in blendthumb_extract.cc and is built as static library. For windows there is DLL which is registered during blender install and which then reads and generates thumbnails. For other platforms there is blender-thumbnailer executable file which takes blend file as an input and generates PNG file. As a result Python script blender-thumbnailer.py is no longer needed. The thumbnail extractor shares the same code-path as Blenders file reading, so there is no need to duplicate any file reading logic. This means reading compressed blend files is supported (broken since the recent move Zstd compression - D5799). This resolves T63736. Contributors: - @alausic original patch. - @LazyDodo windows fixes/support. - @campbellbarton general fixes/update. - @lukasstockner97 Zstd support. Reviewed By: sybren, mont29, LazyDodo, campbellbarton Ref D6408 --- source/creator/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/creator') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 47fb2642da1..45bfc3d6bdb 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -516,8 +516,7 @@ if(UNIX AND NOT APPLE) ) install( - PROGRAMS - ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py + TARGETS blender-thumbnailer DESTINATION "." ) @@ -560,7 +559,7 @@ if(UNIX AND NOT APPLE) DESTINATION share/icons/hicolor/symbolic/apps ) install( - PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py + TARGETS blender-thumbnailer DESTINATION bin ) set(BLENDER_TEXT_FILES_DESTINATION share/doc/blender) -- cgit v1.2.3