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

Make portable argument a flag

This commit is contained in:
Raoul Snyman 2016-12-07 19:08:40 +02:00
parent aa3c2d2f13
commit dc3f564082

View File

@ -268,7 +268,7 @@ class WindowsBuilder(Builder):
""" """
Add extra arguments to the command line argument parser Add extra arguments to the command line argument parser
""" """
parser.add_argument('--portable', metavar='PATH', default=None, parser.add_argument('--portable', metavar='PATH', action='store_true', default=False,
help='Specify the path to build the portable installation.') help='Specify the path to build the portable installation.')
def setup_system_paths(self): def setup_system_paths(self):
@ -289,8 +289,6 @@ class WindowsBuilder(Builder):
self.helpfile_path = os.path.join(self.manual_build_path, 'htmlhelp') self.helpfile_path = os.path.join(self.manual_build_path, 'htmlhelp')
self.winres_path = os.path.join(self.branch_path, 'resources', 'windows') self.winres_path = os.path.join(self.branch_path, 'resources', 'windows')
self.pptviewlib_path = os.path.join(self.source_path, 'plugins', 'presentations', 'lib', 'pptviewlib') self.pptviewlib_path = os.path.join(self.source_path, 'plugins', 'presentations', 'lib', 'pptviewlib')
if self.args.portable:
self.portable_dest_path = os.path.abspath(self.args.portable)
def copy_extra_files(self): def copy_extra_files(self):
""" """
@ -334,7 +332,7 @@ class WindowsBuilder(Builder):
self._build_pptviewlib() self._build_pptviewlib()
self._create_innosetup_file() self._create_innosetup_file()
self._run_innosetup() self._run_innosetup()
if self.portable_dest_path and os.path.exists(self.portable_dest_path): if self.args.portable and os.path.exists(self.portable_dest_path):
self._run_portableapp_builder() self._run_portableapp_builder()