327 if self.__projectSeparator: |
327 if self.__projectSeparator: |
328 menu.removeAction(self.__projectSeparator) |
328 menu.removeAction(self.__projectSeparator) |
329 |
329 |
330 self.__initialize() |
330 self.__initialize() |
331 |
331 |
332 def __projectShowMenu(self, menuName, menu): |
332 def __projectShowMenu(self, menuName, menu): # noqa: U100 |
333 """ |
333 """ |
334 Private slot called, when the the project menu or a submenu is |
334 Private slot called, when the the project menu or a submenu is |
335 about to be shown. |
335 about to be shown. |
336 |
336 |
337 @param menuName name of the menu to be shown |
337 @param menuName name of the menu to be shown |
367 |
367 |
368 def __cxfreeze(self): |
368 def __cxfreeze(self): |
369 """ |
369 """ |
370 Private slot to handle the cxfreeze execution. |
370 Private slot to handle the cxfreeze execution. |
371 """ |
371 """ |
|
372 from CxFreeze.CxfreezeConfigDialog import CxfreezeConfigDialog |
|
373 from CxFreeze.CxfreezeExecDialog import CxfreezeExecDialog |
|
374 |
372 project = ericApp().getObject("Project") |
375 project = ericApp().getObject("Project") |
373 if not project.getMainScript(): |
376 if not project.getMainScript(): |
374 # no main script defined |
377 # no main script defined |
375 EricMessageBox.critical( |
378 EricMessageBox.critical( |
376 self.__ui, |
379 self.__ui, |
395 |
398 |
396 # check if all files saved and errorfree before continue |
399 # check if all files saved and errorfree before continue |
397 if not project.checkAllScriptsDirty(reportSyntaxErrors=True): |
400 if not project.checkAllScriptsDirty(reportSyntaxErrors=True): |
398 return |
401 return |
399 |
402 |
400 from CxFreeze.CxfreezeConfigDialog import CxfreezeConfigDialog |
|
401 |
|
402 parms = project.getData("PACKAGERSPARMS", "CXFREEZE") |
403 parms = project.getData("PACKAGERSPARMS", "CXFREEZE") |
403 dlg = CxfreezeConfigDialog(project, exe, parms) |
404 dlg = CxfreezeConfigDialog(project, exe, parms) |
404 if dlg.exec() == QDialog.DialogCode.Accepted: |
405 if dlg.exec() == QDialog.DialogCode.Accepted: |
405 args, parms = dlg.generateParameters() |
406 args, parms = dlg.generateParameters() |
406 project.setData("PACKAGERSPARMS", "CXFREEZE", parms) |
407 project.setData("PACKAGERSPARMS", "CXFREEZE", parms) |
407 |
408 |
408 # now do the call |
409 # now do the call |
409 from CxFreeze.CxfreezeExecDialog import CxfreezeExecDialog |
|
410 |
|
411 dia = CxfreezeExecDialog("cxfreeze") |
410 dia = CxfreezeExecDialog("cxfreeze") |
412 dia.show() |
411 dia.show() |
413 res = dia.start(args, parms, project.ppath, project.getMainScript()) |
412 res = dia.start(args, parms, project.ppath, project.getMainScript()) |
414 if res: |
413 if res: |
415 dia.exec() |
414 dia.exec() |