diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-18 22:21:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-18 23:19:59 +0100 |
| commit | a9cb50c60a4d38d537daad96dfd9c73bcdc6c40a (patch) | |
| tree | 7d30e63235108dc574b8740c3f779da1257e92c7 | |
| parent | 97eee0f320826b5cbf95e7e71609a6d0d6867aa9 (diff) | |
Fix special cscript build for Windows XP.
| -rw-r--r-- | cscript | 22 | ||||
| -rw-r--r-- | platform/windows/wscript | 32 |
2 files changed, 37 insertions, 17 deletions
@@ -265,15 +265,19 @@ def build(target, options): target.command('./waf install') def package_windows(target): - shutil.copyfile('build/platform/windows/installer.%s.nsi' % target.bits, 'build/platform/windows/installer2.%s.nsi' % target.bits) - target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) - target.command('sed -i "s~%%graphics%%~%s/graphics~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) - target.command('sed -i "s~%%static_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.windows_prefix, target.bits)) - target.command('sed -i "s~%%cdist_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.directory, target.bits)) - target.command('sed -i "s~%%mingw%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.mingw_path, target.bits)) - target.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), target.bits)) - target.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % target.bits) - target.command('makensis build/platform/windows/installer2.%s.nsi' % target.bits) + identifier = '' + if target.version is not None: + identifier = '%s.' % target.version + identifier += '%d' % target.bits + shutil.copyfile('build/platform/windows/installer.%s.nsi' % identifier, 'build/platform/windows/installer2.%s.nsi' % identifier) + target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), identifier)) + target.command('sed -i "s~%%graphics%%~%s/graphics~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), identifier)) + target.command('sed -i "s~%%static_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.windows_prefix, identifier)) + target.command('sed -i "s~%%cdist_deps%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.directory, identifier)) + target.command('sed -i "s~%%mingw%%~%s~g" build/platform/windows/installer2.%s.nsi' % (target.mingw_path, identifier)) + target.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/installer2.%s.nsi' % (os.getcwd(), identifier)) + target.command('sed -i "s~%%bits%%~32~g" build/platform/windows/installer2.%s.nsi' % identifier) + target.command('makensis build/platform/windows/installer2.%s.nsi' % identifier) return os.path.abspath(glob.glob('build/platform/windows/*%s*.exe' % target.bits)[0]) def package_debian(target, cpu, version): diff --git a/platform/windows/wscript b/platform/windows/wscript index 54d53eff5..cc90cf55d 100644 --- a/platform/windows/wscript +++ b/platform/windows/wscript @@ -1,13 +1,18 @@ from __future__ import print_function import os -def write_installer(bits, version, debug): +def write_installer(bits, windows_version, dcpomatic_version, debug): try: os.makedirs('build/platform/windows') except: pass - f = open('build/platform/windows/installer.%d.nsi' % bits, 'w') + filename = 'build/platform/windows/installer.' + if windows_version is not None: + filename += 'xp.' + filename += '%d.nsi' % bits + + f = open(filename, 'w') print('!include "MUI2.nsh"', file=f) if bits == 64: print('!include "x64.nsh"', file=f) @@ -19,10 +24,15 @@ def write_installer(bits, version, debug): print('RequestExecutionLevel admin', file=f) + outfile = 'DCP-o-matic ' if debug: - print('outFile "DCP-o-matic Debug %s %d-bit Installer.exe"' % (version, bits), file=f) - else: - print('outFile "DCP-o-matic %s %d-bit Installer.exe"' % (version, bits), file=f) + outfile += 'Debug ' + outfile += '%s %d-bit ' % (dcpomatic_version, bits) + if windows_version is 'xp': + outfile += 'XP ' + outfile += 'Installer.exe' + + print('outFile "%s"' % outfile, file=f) print(""" !define MUI_ICON "%graphics%/dcpomatic2.ico" @@ -134,13 +144,17 @@ File "%cdist_deps%/bin/avdevice-57.dll" File "%cdist_deps%/bin/postproc-54.dll" File "%cdist_deps%/bin/swresample-2.dll" File "%cdist_deps%/bin/dcp-1.0.dll" -File "%cdist_deps%/bin/libopenjp2.dll" File "%cdist_deps%/bin/swscale-4.dll" File "%cdist_deps%/bin/cxml-0.dll" File "%cdist_deps%/bin/sub-1.0.dll" File "%cdist_deps%/bin/ffprobe.exe" """, file=f) + if windows_version == 'xp': + print('File "%cdist_deps%/bin/libopenjpeg-1.dll"', file=f) + else: + print('File "%cdist_deps%/bin/libopenjp2.dll"', file=f) + if debug: print('File "%resources%/gdb_script"', file=f) print('File "%resources%/debug.bat"', file=f) @@ -355,5 +369,7 @@ DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\U def build(bld): - write_installer(32, bld.env.VERSION, bld.env.DEBUG) - write_installer(64, bld.env.VERSION, bld.env.DEBUG) + write_installer(32, None, bld.env.VERSION, bld.env.DEBUG) + write_installer(64, None, bld.env.VERSION, bld.env.DEBUG) + write_installer(32, 'xp', bld.env.VERSION, bld.env.DEBUG) + write_installer(64, 'xp', bld.env.VERSION, bld.env.DEBUG) |
