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 |
257 Private slot to handle the cxfreeze execution. |
258 Private slot to handle the cxfreeze execution. |
258 """ |
259 """ |
259 project = e5App().getObject("Project") |
260 project = e5App().getObject("Project") |
260 if len(project.pdata["MAINSCRIPT"]) == 0: |
261 if len(project.pdata["MAINSCRIPT"]) == 0: |
261 # no main script defined |
262 # no main script defined |
262 QMessageBox.critical(None, |
263 E5MessageBox.critical(None, |
263 self.trUtf8("cxfreeze"), |
264 self.trUtf8("cxfreeze"), |
264 self.trUtf8( |
265 self.trUtf8( |
265 """There is no main script defined for the current project."""), |
266 """There is no main script defined for the current project."""), |
266 QMessageBox.StandardButtons( |
267 E5MessageBox.StandardButtons(E5MessageBox.Abort)) |
267 QMessageBox.Abort)) |
|
268 return |
268 return |
269 |
269 |
270 parms = project.getData('PACKAGERSPARMS', "CXFREEZE") |
270 parms = project.getData('PACKAGERSPARMS', "CXFREEZE") |
271 exe = _findExecutable() |
271 exe = _findExecutable() |
272 if exe is None: |
272 if exe is None: |
273 QMessageBox.critical(None, |
273 E5MessageBox.critical(None, |
274 self.trUtf8("cxfreeze"), |
274 self.trUtf8("cxfreeze"), |
275 self.trUtf8("""The cxfreeze executable could not be found.""")) |
275 self.trUtf8("""The cxfreeze executable could not be found.""")) |
276 return |
276 return |
277 |
277 |
278 from CxFreeze.CxfreezeConfigDialog import CxfreezeConfigDialog |
278 from CxFreeze.CxfreezeConfigDialog import CxfreezeConfigDialog |