38 @param mode mode of the dialog |
38 @param mode mode of the dialog |
39 @type str (one of 'installer' or 'spec') |
39 @type str (one of 'installer' or 'spec') |
40 @param parent reference to the parent widget |
40 @param parent reference to the parent widget |
41 @type QWidget |
41 @type QWidget |
42 """ |
42 """ |
43 super(PyInstallerConfigDialog, self).__init__(parent) |
43 super().__init__(parent) |
44 self.setupUi(self) |
44 self.setupUi(self) |
45 |
45 |
46 self.__project = project |
46 self.__project = project |
47 self.__mode = mode |
47 self.__mode = mode |
48 |
48 |
262 # 3. always add these arguments |
262 # 3. always add these arguments |
263 if self.__mode == "installer": |
263 if self.__mode == "installer": |
264 args.append("--noconfirm") # don't ask the user |
264 args.append("--noconfirm") # don't ask the user |
265 |
265 |
266 # determine the script to be processed |
266 # determine the script to be processed |
267 if self.__parameters["mainscript"]: |
267 script = ( |
268 script = self.__project.getMainScript() |
268 self.__project.getMainScript() |
269 else: |
269 if self.__parameters["mainscript"] else |
270 script = self.__parameters["inputFile"] |
270 self.__parameters["inputFile"] |
|
271 ) |
271 |
272 |
272 return args, parms, script |
273 return args, parms, script |
273 |
274 |
274 def accept(self): |
275 def accept(self): |
275 """ |
276 """ |
306 self.__parameters["bundleIdentifier"] = ( |
307 self.__parameters["bundleIdentifier"] = ( |
307 self.bundleIdentifierEdit.text() |
308 self.bundleIdentifierEdit.text() |
308 ) |
309 ) |
309 |
310 |
310 # call the accept slot of the base class |
311 # call the accept slot of the base class |
311 super(PyInstallerConfigDialog, self).accept() |
312 super().accept() |
312 |
313 |
313 def __updateOkButton(self): |
314 def __updateOkButton(self): |
314 """ |
315 """ |
315 Private method to update the enabled state of the OK button. |
316 Private method to update the enabled state of the OK button. |
316 """ |
317 """ |