diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 26 |
1 files changed, 19 insertions, 7 deletions
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 |