Wed, 30 Dec 2020 11:00:05 +0100
Updated copyright for 2021.
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
7923
91e843545d9a
Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7836
diff
changeset
|
3 | # Copyright (c) 2020 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
4 | # |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
5 | |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing a dialog to show information about the installation. |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
10 | import json |
7810
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
11 | import os |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
12 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | from PyQt5.QtCore import pyqtSlot |
7810
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
14 | from PyQt5.QtWidgets import QDialog, QDialogButtonBox |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | from E5Gui import E5MessageBox |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | from .Ui_InstallInfoDialog import Ui_InstallInfoDialog |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | import Globals |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | import UI.PixmapCache |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | class InstallInfoDialog(QDialog, Ui_InstallInfoDialog): |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | """ |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
26 | Class implementing a dialog to show information about the installation. |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | def __init__(self, parent=None): |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | Constructor |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | @param parent reference to the parent widget |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | @type QWidget |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
35 | super(InstallInfoDialog, self).__init__(parent) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
36 | self.setupUi(self) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | |
7810
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
38 | self.__deleteButton = self.buttonBox.addButton( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
39 | self.tr("Delete Info"), QDialogButtonBox.ActionRole) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
40 | self.__deleteButton.clicked.connect(self.on_deleteButton_clicked) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
41 | self.__updateButton = self.buttonBox.addButton( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
42 | self.tr("Upgrade Instructions"), QDialogButtonBox.ActionRole) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
43 | self.__updateButton.clicked.connect(self.on_updateButton_clicked) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
44 | |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
45 | self.__edited = False |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
46 | self.__loaded = True |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
47 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | self.editButton.setIcon(UI.PixmapCache.getIcon("infoEdit")) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | self.saveButton.setIcon(UI.PixmapCache.getIcon("fileSave")) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
50 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
51 | infoFileName = Globals.getInstallInfoFilePath() |
7810
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
52 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
53 | self.__deleteButton.setEnabled(os.path.exists(infoFileName)) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
54 | |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
55 | try: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
56 | with open(infoFileName, "r") as infoFile: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
57 | self.__info = json.load(infoFile) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
58 | |
7808
da107cd00f63
Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7807
diff
changeset
|
59 | if Globals.isWindowsPlatform(): |
da107cd00f63
Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7807
diff
changeset
|
60 | self.sudoLabel1.setText(self.tr("Installed as Administrator:")) |
da107cd00f63
Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7807
diff
changeset
|
61 | else: |
da107cd00f63
Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7807
diff
changeset
|
62 | self.sudoLabel1.setText(self.tr("Installed with sudo:")) |
da107cd00f63
Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7807
diff
changeset
|
63 | self.sudoLabel2.setText( |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
64 | self.tr("Yes") if self.__info["sudo"] else self.tr("No")) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
65 | self.userLabel.setText(self.__info["user"]) |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
66 | self.installedFromEdit.setText(self.__info["install_cwd"]) |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
67 | self.interpreteEdit.setText(self.__info["exe"]) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
68 | self.commandEdit.setText(self.__info["argv"]) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
69 | self.installPathEdit.setText(self.__info["eric"]) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
70 | self.virtenvLabel.setText( |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
71 | self.tr("Yes") if self.__info["virtualenv"] else self.tr("No")) |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
72 | self.remarksEdit.setPlainText(self.__info["remarks"]) |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
73 | if self.__info["pip"]: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
74 | self.pipLabel.setText(self.tr( |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
75 | "'eric-ide' was installed from PyPI using the pip" |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
76 | " command.")) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
77 | else: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
78 | self.pipLabel.hide() |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
79 | if self.__info["guessed"]: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
80 | self.guessLabel.setText(self.tr( |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
81 | "The information shown in this dialog was guessed at" |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
82 | " the first start of eric.")) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
83 | else: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
84 | self.guessLabel.hide() |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
85 | if self.__info["edited"]: |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
86 | self.userProvidedLabel.setText(self.tr( |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
87 | "The installation information was provided by the user." |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
88 | )) |
7808
da107cd00f63
Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7807
diff
changeset
|
89 | else: |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
90 | self.userProvidedLabel.hide() |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
91 | if self.__info["installed_on"]: |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
92 | self.installDateTimeLabel.setText( |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
93 | self.__info["installed_on"] if self.__info["installed_on"] |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
94 | else self.tr("unknown")) |
7810
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
95 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
96 | self.__updateButton.setEnabled(bool(self.__info["exe"])) |
7836
2f0d208b8137
Changed code to not use the OSError aliases (IOError, EnvironmentError, socket.error and select.error) anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7810
diff
changeset
|
97 | except OSError as err: |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
98 | E5MessageBox.critical( |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
99 | self, |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
100 | self.tr("Load Install Information"), |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
101 | self.tr("<p>The file containing the install information could" |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
102 | " not be read.</p><p>Reason: {0}</p>""") |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
103 | .format(str(err)) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
104 | ) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
105 | self.__loaded = False |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
106 | self.__info = {} |
7810
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
107 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
108 | self.__updateButton.setEnabled(False) |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
109 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
110 | def wasLoaded(self): |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
111 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
112 | Public method to check, if the install data was loaded. |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
113 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
114 | @return flag indicating the data was loaded |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
115 | @rtype bool |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
116 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
117 | return self.__loaded |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
118 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
119 | @pyqtSlot(bool) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
120 | def on_editButton_toggled(self, checked): |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
121 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
122 | Private slot to switch the dialog into edit mode. |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
123 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
124 | @param checked flag giving the button check state |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
125 | @type bool |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
126 | """ |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
127 | self.installedFromEdit.setReadOnly(not checked) |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
128 | self.interpreteEdit.setReadOnly(not checked) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
129 | self.commandEdit.setReadOnly(not checked) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
130 | self.installPathEdit.setReadOnly(not checked) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
131 | self.remarksEdit.setReadOnly(not checked) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
132 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
133 | if checked: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
134 | self.__edited = True |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
135 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
136 | @pyqtSlot() |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
137 | def on_saveButton_clicked(self): |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
138 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
139 | Private slot handling the save button press. |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
140 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
141 | if self.__edited: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
142 | self.__saveData() |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
143 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
144 | @pyqtSlot() |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
145 | def reject(self): |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
146 | """ |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
147 | Public slot handling the closing of the dialog. |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
148 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
149 | if self.__edited: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
150 | yes = E5MessageBox.yesNo( |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
151 | self, |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
152 | self.tr("Install Information"), |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
153 | self.tr("""The install information was edited. Unsaved""" |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
154 | """ changes will be lost. Save first?"""), |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
155 | yesDefault=True) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
156 | if yes: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
157 | self.__saveData() |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
158 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
159 | super(InstallInfoDialog, self).reject() |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
160 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
161 | def __saveData(self): |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
162 | """ |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
163 | Private method to save the data. |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
164 | """ |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
165 | if self.installedFromEdit.text() != self.__info["install_cwd"]: |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
166 | self.__info["install_cwd"] = self.installedFromEdit.text() |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
167 | self.__info["install_cwd_edited"] = True |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
168 | if self.interpreteEdit.text() != self.__info["exe"]: |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
169 | self.__info["exe"] = self.interpreteEdit.text() |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
170 | self.__info["exe_edited"] = True |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
171 | if self.commandEdit.text() != self.__info["argv"]: |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
172 | self.__info["argv"] = self.commandEdit.text() |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
173 | self.__info["argv_edited"] = True |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
174 | if self.installPathEdit.text() != self.__info["eric"]: |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
175 | self.__info["eric"] = self.installPathEdit.text() |
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
176 | self.__info["eric_edited"] = True |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
177 | self.__info["remarks"] = self.remarksEdit.toPlainText() |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
178 | self.__info["edited"] = True |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
179 | |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
180 | infoFileName = Globals.getInstallInfoFilePath() |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
181 | try: |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
182 | with open(infoFileName, "w") as infoFile: |
7809
f5a61d073100
Added information about the directory the installation was done from.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7808
diff
changeset
|
183 | json.dump(self.__info, infoFile, indent=2) |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
184 | self.__edited = False |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
185 | self.editButton.setChecked(False) |
7836
2f0d208b8137
Changed code to not use the OSError aliases (IOError, EnvironmentError, socket.error and select.error) anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7810
diff
changeset
|
186 | except OSError as err: |
7806
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
187 | E5MessageBox.critical( |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
188 | self, |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
189 | self.tr("Save Install Information"), |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
190 | self.tr("<p>The file containing the install information could" |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
191 | " not be written.</p><p>Reason: {0}</p>""") |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
192 | .format(str(err)) |
b346755b09a1
Main Window: added a dialog showing information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
193 | ) |
7810
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
194 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
195 | @pyqtSlot() |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
196 | def on_deleteButton_clicked(self): |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
197 | """ |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
198 | Private slot deleting the install information file. |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
199 | """ |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
200 | res = E5MessageBox.yesNo( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
201 | self, |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
202 | self.tr("Delete Installation Information"), |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
203 | self.tr("""Do you really want to delete the installation""" |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
204 | """ information? It will be recreated at the next""" |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
205 | """ start.""")) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
206 | if not res: |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
207 | return |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
208 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
209 | infoFileName = Globals.getInstallInfoFilePath() |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
210 | os.remove(infoFileName) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
211 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
212 | # local data will be deleted automatically |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
213 | self.__edited = False |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
214 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
215 | self.close() |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
216 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
217 | @pyqtSlot() |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
218 | def on_updateButton_clicked(self): |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
219 | """ |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
220 | Private slot to show some upgrade instructions. |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
221 | """ |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
222 | updateTextList = [] |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
223 | cmdPrefix = "" |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
224 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
225 | if self.__info["sudo"]: |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
226 | if Globals.isWindowsPlatform(): |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
227 | updateTextList.append( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
228 | self.tr("Perform the following step(s) with Administrator" |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
229 | " privileges.\n")) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
230 | else: |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
231 | cmdPrefix = "sudo " |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
232 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
233 | if self.__info["pip"]: |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
234 | updateTextList.append( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
235 | "{0}{1} -m pip install --upgrade eric-ide".format( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
236 | cmdPrefix, self.__info["exe"], |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
237 | ) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
238 | ) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
239 | else: |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
240 | if ( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
241 | "install_cwd" in self.__info and |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
242 | bool(self.__info["install_cwd"]) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
243 | ): |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
244 | updateTextList.append( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
245 | "cd {0}".format(self.__info["install_cwd"]) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
246 | ) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
247 | updateTextList.append( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
248 | "{0}{1} {2}".format( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
249 | cmdPrefix, self.__info["exe"], self.__info["argv"], |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
250 | ) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
251 | ) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
252 | |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
253 | from E5Gui.E5PlainTextDialog import E5PlainTextDialog |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
254 | dlg = E5PlainTextDialog( |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
255 | title=self.tr("Upgrade Instructions"), |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
256 | text="\n".join(updateTextList)) |
f8afd2238723
Install Info: extended the dialog by a delete action and an action to show upgrade instructions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7809
diff
changeset
|
257 | dlg.exec() |