1
0
mirror of https://gitlab.com/openlp/packaging.git synced 2024-12-22 04:52:50 +00:00

Try to get the portable filename right

This commit is contained in:
Raoul Snyman 2016-12-10 23:12:38 +02:00
parent 4ad35f87c5
commit a2c416b09b

View File

@ -185,7 +185,7 @@ class WindowsBuilder(Builder):
with open(os.path.join(config_dir, 'appinfo.ini.default'), 'r') as input_file, \
open(os.path.join(self.portable_dest_path, 'App', 'Appinfo', 'appinfo.ini'), 'w') as output_file:
content = input_file.read()
content = content.replace('%(display_version)s', self.version)
content = content.replace('%(display_version)s', self.portable_version)
content = content.replace('%(package_version)s', self.portable_version)
output_file.write(content)
@ -225,11 +225,10 @@ class WindowsBuilder(Builder):
self._print_verbose('... Building PortableApps Installer')
self._run_command([self.portableinstaller_exe, self.portable_dest_path],
'Error running PortableApps Installer')
portable_app = os.path.abspath(os.path.join(self.portable_dest_path, '..',
'OpenLPPortable_%s.paf.exe' % self.portable_version))
portable_app = os.path.join(self.portable_dest_path, 'OpenLPPortable_%s.paf.exe' % self.portable_version)
self._print_verbose('... Portable Build: {}'.format(portable_app))
if os.path.exists(portable_app):
move(portable_app, os.path.abspath(os.path.join(self.dist_path, '..')))
move(portable_app, os.path.join(self.dist_path, 'OpenLPPortable_%s.paf.exe' % self.portable_version))
self._print('PortableApp build complete')
else:
raise Exception('PortableApp failed to build')