9 |
9 |
10 import os |
10 import os |
11 import sys |
11 import sys |
12 |
12 |
13 from PyQt4.QtCore import QObject, QTranslator, QCoreApplication |
13 from PyQt4.QtCore import QObject, QTranslator, QCoreApplication |
14 from PyQt4.QtGui import QDialog, QMessageBox |
14 from PyQt4.QtGui import QDialog |
15 |
15 |
|
16 from E5Gui import E5MessageBox |
16 from E5Gui.E5Action import E5Action |
17 from E5Gui.E5Action import E5Action |
17 from E5Gui.E5Application import e5App |
18 from E5Gui.E5Application import e5App |
18 |
19 |
19 import Utilities |
20 import Utilities |
20 |
21 |
21 # Start-of-Header |
22 # Start-of-Header |
22 name = "CxFreeze Plugin" |
23 name = "CxFreeze Plugin" |
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 autoactivate = True |
25 autoactivate = True |
25 deactivateable = True |
26 deactivateable = True |
26 version = "5.1.0" |
27 version = "5.1.1" |
27 className = "CxFreezePlugin" |
28 className = "CxFreezePlugin" |
28 packageName = "CxFreeze" |
29 packageName = "CxFreeze" |
29 shortDescription = "Show the CxFreeze dialogs." |
30 shortDescription = "Show the CxFreeze dialogs." |
30 longDescription = """This plugin implements the CxFreeze dialogs.""" \ |
31 longDescription = """This plugin implements the CxFreeze dialogs.""" \ |
31 """ CxFreeze is used to generate a distribution package.""" |
32 """ CxFreeze is used to generate a distribution package.""" |
254 Private slot to handle the cxfreeze execution. |
255 Private slot to handle the cxfreeze execution. |
255 """ |
256 """ |
256 project = e5App().getObject("Project") |
257 project = e5App().getObject("Project") |
257 if len(project.pdata["MAINSCRIPT"]) == 0: |
258 if len(project.pdata["MAINSCRIPT"]) == 0: |
258 # no main script defined |
259 # no main script defined |
259 QMessageBox.critical(None, |
260 E5MessageBox.critical(None, |
260 self.trUtf8("cxfreeze"), |
261 self.trUtf8("cxfreeze"), |
261 self.trUtf8( |
262 self.trUtf8( |
262 """There is no main script defined for the current project."""), |
263 """There is no main script defined for the current project."""), |
263 QMessageBox.StandardButtons( |
264 E5MessageBox.StandardButtons(E5MessageBox.Abort)) |
264 QMessageBox.Abort)) |
|
265 return |
265 return |
266 |
266 |
267 parms = project.getData('PACKAGERSPARMS', "CXFREEZE") |
267 parms = project.getData('PACKAGERSPARMS', "CXFREEZE") |
268 exe = _findExecutable() |
268 exe = _findExecutable() |
269 if exe is None: |
269 if exe is None: |
270 QMessageBox.critical(None, |
270 E5MessageBox.critical(None, |
271 self.trUtf8("cxfreeze"), |
271 self.trUtf8("cxfreeze"), |
272 self.trUtf8("""The cxfreeze executable could not be found.""")) |
272 self.trUtf8("""The cxfreeze executable could not be found.""")) |
273 return |
273 return |
274 |
274 |
275 from CxFreeze.CxfreezeConfigDialog import CxfreezeConfigDialog |
275 from CxFreeze.CxfreezeConfigDialog import CxfreezeConfigDialog |