target.command('./waf install')
def package_windows(target):
- 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.environment_prefix, 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])
+ for installer in ('all', 'player'):
+ name1 = '%s.%s.nsi' % (installer, target.bits)
+ name2 = '%s2.%s.nsi' % (installer, target.bits)
+ shutil.copyfile('build/platform/windows/%s' % name1, 'build/platform/windows/%s' % name2)
+ target.command('sed -i "s~%%resources%%~%s/platform/windows~g" build/platform/windows/%s' % (os.getcwd(), name2))
+ target.command('sed -i "s~%%graphics%%~%s/graphics~g" build/platform/windows/%s' % (os.getcwd(), name2))
+ target.command('sed -i "s~%%static_deps%%~%s~g" build/platform/windows/%s' % (target.windows_prefix, name2))
+ target.command('sed -i "s~%%cdist_deps%%~%s~g" build/platform/windows/%s' % (target.directory, name2))
+ target.command('sed -i "s~%%mingw%%~%s~g" build/platform/windows/%s' % (target.environment_prefix, name2))
+ target.command('sed -i "s~%%binaries%%~%s/build~g" build/platform/windows/%s' % (os.getcwd(), name2))
+ target.command('sed -i "s~%%bits%%~32~g" build/platform/windows/%s' % name2)
+ target.command('makensis build/platform/windows/%s' % name2)
+ return [os.path.abspath(exe) for exe in glob.glob('build/platform/windows/*%s*.exe' % target.bits)]
def package_debian(target, cpu, version, options):
make_control(target.version, target.bits, 'debian/control', target.debug, options['gui'])
from __future__ import print_function
import os
-def write_installer(tools, bits, dcpomatic_version, debug):
+def write_installer(tools, bits, nsi_prefix, extra_name, dcpomatic_version, debug):
def name_with_underscore(name):
return '' if name == 'main' else '_%s' % name
def name_with_space(name):
return '' if name == 'main' else ' %s' % name
+ if extra_name is not None:
+ extra_name = ' %s' % extra_name
+ else:
+ extra_name = ''
+
# It would be nice to use exist_ok here but it requires quite a new python
try:
os.makedirs('build/platform/windows')
except:
pass
- filename = 'build/platform/windows/installer.%d.nsi' % bits
+ filename = 'build/platform/windows/%s.%d.nsi' % (nsi_prefix, bits)
f = open(filename, 'w')
print('!include "MUI2.nsh"', file=f)
print('RequestExecutionLevel admin', file=f)
- outfile = 'DCP-o-matic '
+ outfile = 'DCP-o-matic%s ' % extra_name
if debug:
outfile += 'Debug '
outfile += '%s %d-bit Installer.exe' % (dcpomatic_version, bits)
('editor', 'Editor'),
('map', 'Map'),
('disk', 'Disk Writer'),
+ ('server', 'Encode Server'),
+ ('server_cli', 'Encode Server CLI'),
]
for bits in (32, 64):
- write_installer(all_tools, bits, bld.env.VERSION, bld.env.DEBUG)
+ write_installer(all_tools, bits, "all", None, bld.env.VERSION, bld.env.DEBUG)
+ write_installer([('player', 'Player')], bits, "player", "Player", bld.env.VERSION, bld.env.DEBUG)