diff --git a/builders/windows-builder.py b/builders/windows-builder.py index 7fac2fa..064749d 100644 --- a/builders/windows-builder.py +++ b/builders/windows-builder.py @@ -268,7 +268,7 @@ class WindowsBuilder(Builder): """ 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.') def setup_system_paths(self): @@ -289,8 +289,6 @@ class WindowsBuilder(Builder): self.helpfile_path = os.path.join(self.manual_build_path, 'htmlhelp') self.winres_path = os.path.join(self.branch_path, 'resources', 'windows') 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): """ @@ -334,7 +332,7 @@ class WindowsBuilder(Builder): self._build_pptviewlib() self._create_innosetup_file() 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()