PyInstallerInterface/PyInstallerConfigDialog.py

Thu, 27 May 2021 20:28:55 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 27 May 2021 20:28:55 +0200
branch
eric7
changeset 38
fc9ef9dcd51a
parent 35
PyInstaller/PyInstallerConfigDialog.py@d9b3cadaf707
child 43
01ce3d6f7a07
permissions
-rw-r--r--

Ported the plug-in to PyQt6 for eric7.

3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
34
784d24a61fdf Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 28
diff changeset
3 # Copyright (c) 2018 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
4 #
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
5
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing PyInstallerConfigDialog.
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
10 import copy
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
11
38
fc9ef9dcd51a Ported the plug-in to PyQt6 for eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 35
diff changeset
12 from PyQt6.QtCore import pyqtSlot
fc9ef9dcd51a Ported the plug-in to PyQt6 for eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 35
diff changeset
13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
38
fc9ef9dcd51a Ported the plug-in to PyQt6 for eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 35
diff changeset
15 from EricWidgets.EricPathPicker import EricPathPickerModes
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 from .Ui_PyInstallerConfigDialog import Ui_PyInstallerConfigDialog
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 import Globals
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 class PyInstallerConfigDialog(QDialog, Ui_PyInstallerConfigDialog):
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
24 Class implementing a dialog to enter the parameters for pyinstaller
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
25 and pyi-makespec.
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 """
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 def __init__(self, project, executables, params=None, mode="installer",
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 parent=None):
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 Constructor
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 @param project reference to the project object
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 @type Project.Project
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 @param executables names of the pyinstaller executables
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 @type list of str
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 @param params parameters to set in the dialog
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 @type dict
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 @param mode mode of the dialog
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 @type str (one of 'installer' or 'spec')
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 @param parent reference to the parent widget
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 @type QWidget
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 """
35
d9b3cadaf707 Implemented some code simplifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 34
diff changeset
43 super().__init__(parent)
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 self.setupUi(self)
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
46 self.__project = project
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
47 self.__mode = mode
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
48
38
fc9ef9dcd51a Ported the plug-in to PyQt6 for eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 35
diff changeset
49 self.inputFilePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE)
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
50 self.inputFilePicker.setDefaultDirectory(
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
51 self.__project.getProjectPath())
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
52 if self.__mode == "installer":
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
53 self.inputFilePicker.setFilters(self.tr(
28
3c8dbc198753 Removed support for Python2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 27
diff changeset
54 "Python Files (*.py *.py3);;"
3c8dbc198753 Removed support for Python2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 27
diff changeset
55 "Python GUI Files (*.pyw *.pyw3);;"
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
56 "Spec Files (*.spec);;"
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
57 "All Files (*)"
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
58 ))
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
59 elif self.__mode == "spec":
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
60 self.inputFilePicker.setFilters(self.tr(
28
3c8dbc198753 Removed support for Python2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 27
diff changeset
61 "Python Files (*.py *.py3);;"
3c8dbc198753 Removed support for Python2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 27
diff changeset
62 "Python GUI Files (*.pyw *.pyw3);;"
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
63 "All Files (*)"
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
64 ))
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 self.executableCombo.addItems(executables)
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
68 if not bool(project.getMainScript()):
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 # no main script defined
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
70 self.selectedScriptButton.setChecked(True)
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 self.mainScriptButton.setEnabled(False)
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72
38
fc9ef9dcd51a Ported the plug-in to PyQt6 for eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 35
diff changeset
73 self.iconFilePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE)
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
74 self.iconFilePicker.setDefaultDirectory(
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
75 self.__project.getProjectPath())
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 if Globals.isMacPlatform():
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 self.iconFilePicker.setFilters(self.tr(
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 "Icon Files (*.icns);;"
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 "All Files (*)"
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 ))
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 elif Globals.isWindowsPlatform():
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 self.iconFilePicker.setFilters(self.tr(
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 "Icon Files (*.ico);;"
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 "Executable Files (*.exe);;"
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 "All Files (*)"
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 ))
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
88 # disable platform specific tabs
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.tabWidget.setTabEnabled(
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
90 self.tabWidget.indexOf(self.windowsMacTab),
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 Globals.isMacPlatform() or Globals.isWindowsPlatform())
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 self.tabWidget.setTabEnabled(
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
93 self.tabWidget.indexOf(self.macTab),
3
eb2d30b4d34e Continued implementing the PyInstaller interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 Globals.isMacPlatform())
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
95
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
96 self.__initializeDefaults()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
97
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
98 # get a copy of the defaults to store the user settings
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
99 self.__parameters = copy.deepcopy(self.__defaults)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
100
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
101 # combine it with the values of params
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
102 if params is not None:
20
a7ac91a1a57e Adjusted the code style checking parameters and fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6
diff changeset
103 self.__parameters.update(params)
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
104
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
105 # initialize general tab
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
106 if mode == "installer" and bool(self.__parameters["pyinstaller"]):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
107 self.executableCombo.setCurrentIndex(
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
108 self.executableCombo.findText(
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
109 self.__parameters["pyinstaller"]))
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
110 elif mode == "spec" and bool(self.__parameters["pyi-makespec"]):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
111 self.executableCombo.setCurrentIndex(
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
112 self.executableCombo.findText(
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
113 self.__parameters["pyi-makespec"]))
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
114 if self.__parameters["mainscript"]:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
115 self.mainScriptButton.setChecked(True)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
116 else:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
117 self.selectedScriptButton.setChecked(True)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
118 self.inputFilePicker.setText(self.__parameters["inputFile"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
119 if self.__parameters["oneDirectory"]:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
120 self.oneDirButton.setChecked(True)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
121 else:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
122 self.oneFileButton.setChecked(True)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
123 self.nameEdit.setText(self.__parameters["name"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
124 self.keyEdit.setText(self.__parameters["encryptionKey"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
125 self.cleanCheckBox.setChecked(self.__parameters["cleanBeforeBuilding"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
126
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
127 # initialize Windows and macOS tab
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
128 if self.__parameters["consoleApplication"]:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
129 self.consoleButton.setChecked(True)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
130 else:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
131 self.windowedButton.setChecked(True)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
132 self.iconFilePicker.setText(self.__parameters["iconFile"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
133 self.iconIdEdit.setText(self.__parameters["iconId"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
134
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
135 # initialize maxOS specific tab
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
136 self.bundleIdentifierEdit.setText(
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
137 self.__parameters["bundleIdentifier"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
138
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
139 self.__updateOkButton()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
140
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
141 msh = self.minimumSizeHint()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
142 self.resize(max(self.width(), msh.width()), msh.height())
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
143
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
144 def __initializeDefaults(self):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
145 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
146 Private method to set the default values.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
147
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
148 These are needed later on to generate the command line parameters.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
149 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
150 self.__defaults = {
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
151 # general options
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
152 "pyinstaller": "",
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
153 "pyi-makespec": "",
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
154 "mainscript": bool(self.__project.getMainScript()),
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
155 "inputFile": "",
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
156 "oneDirectory": True,
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
157 "name": "",
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
158 "encryptionKey": "",
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
159 "cleanBeforeBuilding": False,
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
160
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
161 # Windows and macOS options
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
162 "consoleApplication": True,
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
163 "iconFile": "",
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
164 "iconId": "",
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
165
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
166 # macOS specific options
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
167 "bundleIdentifier": "",
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
168 }
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
169
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
170 def generateParameters(self):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
171 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
172 Public method that generates the command line parameters.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
173
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
174 It generates a list of strings to be used to set the QProcess arguments
5
8c92d66d20e4 Continued implementing the PyInstaller interface (implemented the execution dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
175 for the pyinstaller/pyi-makespec call and a list containing the non
8c92d66d20e4 Continued implementing the PyInstaller interface (implemented the execution dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
176 default parameters. The second list can be passed back upon object
8c92d66d20e4 Continued implementing the PyInstaller interface (implemented the execution dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
177 generation to overwrite the default settings.
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
178
5
8c92d66d20e4 Continued implementing the PyInstaller interface (implemented the execution dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
179 @return a tuple of the command line parameters, non default parameters
8c92d66d20e4 Continued implementing the PyInstaller interface (implemented the execution dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
180 and the script path
8c92d66d20e4 Continued implementing the PyInstaller interface (implemented the execution dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
181 @rtype tuple of (list of str, dict, str)
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
182 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
183 parms = {}
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
184 args = []
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
185
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
186 # 1. the program name
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
187 if self.__mode == "installer":
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
188 args.append(self.__parameters["pyinstaller"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
189 parms["pyinstaller"] = self.__parameters["pyinstaller"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
190 elif self.__mode == "spec":
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
191 args.append(self.__parameters["pyi-makespec"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
192 parms["pyi-makespec"] = self.__parameters["pyi-makespec"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
193
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
194 # 2. the commandline options
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
195 # 2.1 general options, input
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
196 if not self.__parameters["mainscript"]:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
197 parms["mainscript"] = False
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
198 parms["inputFile"] = self.__parameters["inputFile"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
199
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
200 runWithSpec = self.__parameters["inputFile"].endswith(".spec")
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
201 if not runWithSpec:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
202 # 2.2 general options, part 1
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
203 if not self.__parameters["oneDirectory"]:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
204 parms["oneDirectory"] = self.__parameters["oneDirectory"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
205 args.append("--onefile")
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
206 if self.__parameters["name"] != self.__defaults["name"]:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
207 parms["name"] = self.__parameters["name"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
208 args.append("--name")
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
209 args.append(self.__parameters["name"])
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
210 if (
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
211 self.__parameters["encryptionKey"] !=
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
212 self.__defaults["encryptionKey"]
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
213 ):
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
214 parms["encryptionKey"] = self.__parameters["encryptionKey"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
215 args.append("--key")
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
216 args.append(self.__parameters["encryptionKey"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
217
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
218 # 2.3 Windows and macOS options
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
219 if (
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
220 self.__parameters["consoleApplication"] !=
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
221 self.__defaults["consoleApplication"]
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
222 ):
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
223 parms["consoleApplication"] = (
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
224 self.__parameters["consoleApplication"]
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
225 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
226 args.append("--windowed")
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
227 if self.__parameters["iconFile"] != self.__defaults["iconFile"]:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
228 parms["iconFile"] = self.__parameters["iconFile"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
229 parms["iconId"] = self.__parameters["iconId"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
230 args.append("--icon")
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
231 if self.__parameters["iconFile"].endswith(".exe"):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
232 if bool(self.__parameters["iconId"]):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
233 iconId = self.__parameters["iconId"]
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
234 else:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
235 iconId = "0"
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
236 args.append("{0},{1}".format(
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
237 self.__parameters["iconFile"], iconId))
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
238 else:
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
239 args.append(self.__parameters["iconFile"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
240
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
241 # 2.4 macOS specific options
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
242 if (
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
243 self.__parameters["bundleIdentifier"] !=
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
244 self.__defaults["bundleIdentifier"]
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
245 ):
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
246 parms["bundleIdentifier"] = (
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
247 self.__parameters["bundleIdentifier"]
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
248 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
249 args.append("--osx-bundle-identifier")
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
250 args.append(self.__parameters["bundleIdentifier"])
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
251
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
252 # 2.5 general options, part 2
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
253 if (
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
254 self.__parameters["cleanBeforeBuilding"] !=
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
255 self.__defaults["cleanBeforeBuilding"]
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
256 ):
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
257 parms["cleanBeforeBuilding"] = (
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
258 self.__parameters["cleanBeforeBuilding"]
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
259 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
260 args.append("--clean")
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
261
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
262 # 3. always add these arguments
6
0f0f1598fc4a Continued implementing the PyInstaller interface (implemented the pyi-makespec function).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5
diff changeset
263 if self.__mode == "installer":
0f0f1598fc4a Continued implementing the PyInstaller interface (implemented the pyi-makespec function).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5
diff changeset
264 args.append("--noconfirm") # don't ask the user
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
265
5
8c92d66d20e4 Continued implementing the PyInstaller interface (implemented the execution dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
266 # determine the script to be processed
35
d9b3cadaf707 Implemented some code simplifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 34
diff changeset
267 script = (
d9b3cadaf707 Implemented some code simplifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 34
diff changeset
268 self.__project.getMainScript()
d9b3cadaf707 Implemented some code simplifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 34
diff changeset
269 if self.__parameters["mainscript"] else
d9b3cadaf707 Implemented some code simplifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 34
diff changeset
270 self.__parameters["inputFile"]
d9b3cadaf707 Implemented some code simplifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 34
diff changeset
271 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
272
5
8c92d66d20e4 Continued implementing the PyInstaller interface (implemented the execution dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
273 return args, parms, script
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
274
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
275 def accept(self):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
276 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
277 Public method called by the Ok button.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
278
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
279 It saves the values in the parameters dictionary.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
280 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
281 # get data of general tab
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
282 if self.__mode == "installer":
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
283 self.__parameters["pyinstaller"] = (
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
284 self.executableCombo.currentText()
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
285 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
286 elif self.__mode == "spec":
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
287 self.__parameters["pyi-makespec"] = (
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
288 self.executableCombo.currentText()
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
289 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
290 self.__parameters["mainscript"] = self.mainScriptButton.isChecked()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
291 self.__parameters["inputFile"] = self.inputFilePicker.text()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
292 self.__parameters["oneDirectory"] = self.oneDirButton.isChecked()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
293 self.__parameters["name"] = self.nameEdit.text()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
294 self.__parameters["encryptionKey"] = self.keyEdit.text()
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
295 self.__parameters["cleanBeforeBuilding"] = (
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
296 self.cleanCheckBox.isChecked()
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
297 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
298
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
299 # get data of Windows and macOS tab
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
300 self.__parameters["consoleApplication"] = (
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
301 self.consoleButton.isChecked()
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
302 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
303 self.__parameters["iconFile"] = self.iconFilePicker.text()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
304 self.__parameters["iconId"] = self.iconIdEdit.text()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
305
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
306 # get data of macOS specific tab
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
307 self.__parameters["bundleIdentifier"] = (
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
308 self.bundleIdentifierEdit.text()
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
309 )
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
310
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
311 # call the accept slot of the base class
35
d9b3cadaf707 Implemented some code simplifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 34
diff changeset
312 super().accept()
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
313
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
314 def __updateOkButton(self):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
315 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
316 Private method to update the enabled state of the OK button.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
317 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
318 enable = True
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
319
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
320 # If not to be run with the project main script, a script or
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
321 # spec file must be selected.
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
322 if (
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
323 self.selectedScriptButton.isChecked() and
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
324 not bool(self.inputFilePicker.text())
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
325 ):
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
326 enable = False
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
327
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
328 # If the icon shall be picked from a .exe file, an icon ID
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
329 # must be entered (Windows only).
27
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
330 if (
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
331 self.iconFilePicker.text().endswith(".exe") and
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
332 not bool(self.iconIdEdit.text())
25ff8953e335 Added code to search the executable in virtual environment as well on Windows platforms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
333 ):
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
334 enable = False
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
335
38
fc9ef9dcd51a Ported the plug-in to PyQt6 for eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 35
diff changeset
336 self.buttonBox.button(
fc9ef9dcd51a Ported the plug-in to PyQt6 for eric7.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 35
diff changeset
337 QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
4
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
338
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
339 @pyqtSlot(bool)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
340 def on_selectedScriptButton_toggled(self, checked):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
341 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
342 Private slot to handle changes of the radio button state.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
343
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
344 @param checked state of the radio button
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
345 @type bool
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
346 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
347 self.__updateOkButton()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
348
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
349 @pyqtSlot(str)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
350 def on_inputFilePicker_textChanged(self, txt):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
351 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
352 Private slot to handle changes of the input file.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
353
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
354 @param txt text of the file edit
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
355 @type str
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
356 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
357 self.__updateOkButton()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
358
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
359 @pyqtSlot(str)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
360 def on_iconFilePicker_textChanged(self, txt):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
361 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
362 Private slot to handle changes of the icon file.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
363
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
364 @param txt text of the file edit
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
365 @type str
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
366 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
367 self.iconIdEdit.setEnabled(txt.endswith(".exe"))
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
368 self.__updateOkButton()
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
369
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
370 @pyqtSlot(str)
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
371 def on_iconIdEdit_textChanged(self, txt):
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
372 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
373 Private slot to handle changes of the icon ID.
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
374
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
375 @param txt iconID
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
376 @type str
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
377 """
52f0572b5908 Continued implementing the PyInstaller interface (finished the config dialog).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3
diff changeset
378 self.__updateOkButton()

eric ide

mercurial