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! --- SConstruct | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 583cc0b144b..954422e0b3d 100644 --- a/SConstruct +++ b/SConstruct @@ -153,13 +153,11 @@ if cc: if cxx: env['CXX'] = cxx -if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32': - if bitness == 64: - platform = 'win64-vc' - else: - platform = 'win32-vc' -elif env['CC'] in ['gcc'] and sys.platform=='win32': - platform = 'win32-mingw' +if sys.platform=='win32': + if env['CC'] in ['cl', 'cl.exe']: + platform = 'win64-vc' if bitness == 64 else 'win32-vc' + elif env['CC'] in ['gcc']: + platform = 'win32-mingw' env.SConscriptChdir(0) @@ -197,6 +195,10 @@ else: opts = btools.read_opts(env, optfiles, B.arguments) opts.Update(env) +if sys.platform=='win32': + if bitness==64: + env.Append(CFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally + if not env['BF_FANCY']: B.bc.disable() @@ -641,6 +643,16 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'): '${BF_FFMPEG_LIBPATH}/avdevice-52.dll', '${BF_FFMPEG_LIBPATH}/avutil-50.dll', '${BF_FFMPEG_LIBPATH}/swscale-0.dll'] + + # Since the thumb handler is loaded by Explorer, architecture is + # strict: the x86 build fails on x64 Windows. We need to ship + # both builds in x86 packages. + if bitness == 32: + dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll') + dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll') + + dllsources.append('#source/icons/blender.exe.manifest') + windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources) allinstall += windlls -- cgit v1.2.3