From e4e78d475457ad86f5f29a0ccbd0090c2ba6b1d6 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Tue, 29 Mar 2011 13:00:03 +0000 Subject: Apply [#26044] Windows thumbnails and improved filetype registration submitted by Tom Edwards Fix [#25473] 64bit Windows installer for version 2.56 is not working patch submitted by Caleb (Dobz) The thumbnail patch adds a thumb handler DLL that adds .blend thumbnail support in Windows Explorer. A -r option is added to do registration in background. The patch also improves icon building and metadata for blender.exe. Caleb fixes and cleans up our installer to an acceptable state. The patch uses the new -r option to do the .blend extension and thumbnailer registration. Thanks to both Caleb and Tom for their efforts! --- source/icons/SConscript | 13 +++++++---- source/icons/blender.exe.manifest | 10 ++++++++ source/icons/linuxcrossblender.rcscons | 2 -- source/icons/winblender.rc | 42 ++++++++++++++++++++++++++++++++-- source/icons/winblender.rcscons | 2 -- 5 files changed, 58 insertions(+), 11 deletions(-) create mode 100644 source/icons/blender.exe.manifest delete mode 100644 source/icons/linuxcrossblender.rcscons delete mode 100644 source/icons/winblender.rcscons (limited to 'source/icons') diff --git a/source/icons/SConscript b/source/icons/SConscript index ca6308781e9..4bb27a7d4fb 100644 --- a/source/icons/SConscript +++ b/source/icons/SConscript @@ -1,9 +1,12 @@ #!/usr/bin/python Import ('env') +import btools -if env['OURPLATFORM'] == 'linuxcross': - source = 'linuxcrossblender.rcscons' -else: - source = 'winblender.rcscons' +env['RCFLAGS'].append("-DWINDRES") +env['RCFLAGS'].append("-DBLEN_VER_RC_STR_M=" + btools.VERSION) +env['RCFLAGS'].append("-DBLEN_VER_RC_1=" + btools.VERSION[0]) +env['RCFLAGS'].append("-DBLEN_VER_RC_2=" + btools.VERSION[2]) +env['RCFLAGS'].append("-DBLEN_VER_RC_3=" + btools.VERSION[3]) +env['RCFLAGS'].append("-DBLEN_VER_RC_4=0") -env.BlenderRes('winresource', source, ['core'], priority=[95]) +env.BlenderRes('winresource', 'winblender.rc', ['core'], priority=[95]) diff --git a/source/icons/blender.exe.manifest b/source/icons/blender.exe.manifest new file mode 100644 index 00000000000..bc13bf4c586 --- /dev/null +++ b/source/icons/blender.exe.manifest @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/source/icons/linuxcrossblender.rcscons b/source/icons/linuxcrossblender.rcscons deleted file mode 100644 index cf3083aa472..00000000000 --- a/source/icons/linuxcrossblender.rcscons +++ /dev/null @@ -1,2 +0,0 @@ -APPICON ICON "source/icons/winblender.ico" -BLENDERFILE ICON "source/icons/winblenderfile.ico" diff --git a/source/icons/winblender.rc b/source/icons/winblender.rc index 77e62111d2d..244c2cb2e2c 100644 --- a/source/icons/winblender.rc +++ b/source/icons/winblender.rc @@ -1,2 +1,40 @@ -APPICON ICON "winblender.ico" -BLENDERFILE ICON "winblenderfile.ico" +#define BLENDERFILE 1 +#define IDR_VERSION1 1 + +#ifdef WINDRES + #include "winresrc.h" + #define IDC_STATIC (-1) + #define STRINGIFY_(x) #x + #define STRINGIFY(x) STRINGIFY_(x) + #define BLEN_VER_RC_STR STRINGIFY(BLEN_VER_RC_STR_M) + 1 RT_MANIFEST "blender.exe.manifest" +#endif + +APPICON ICON DISCARDABLE "winblender.ico" +BLENDERFILE ICON DISCARDABLE "winblenderfile.ico" + +IDR_VERSION1 VERSIONINFO +FILEVERSION BLEN_VER_RC_1, BLEN_VER_RC_2, BLEN_VER_RC_3, BLEN_VER_RC_4 +PRODUCTVERSION BLEN_VER_RC_1, BLEN_VER_RC_2, BLEN_VER_RC_3, BLEN_VER_RC_4 +FILEOS 0x00000004 +FILETYPE 0x00000001 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "04090000" + BEGIN + VALUE "FileVersion", BLEN_VER_RC_STR + VALUE "ProductVersion", BLEN_VER_RC_STR + VALUE "CompanyName", "Blender Foundation" + VALUE "FileDescription", "Blender" + VALUE "LegalCopyright", "GPLv2 (Blender Foundation)" + VALUE "OriginalFilename", "blender.exe" + VALUE "ProductName", "Blender" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x0000 + END +END + diff --git a/source/icons/winblender.rcscons b/source/icons/winblender.rcscons deleted file mode 100644 index 97579f1ffe0..00000000000 --- a/source/icons/winblender.rcscons +++ /dev/null @@ -1,2 +0,0 @@ -APPICON ICON "source\\icons\\winblender.ico" -BLENDERFILE ICON "source\\icons\\winblenderfile.ico" -- cgit v1.2.3