642 """ |
642 """ |
643 self.compileProc = QProcess() |
643 self.compileProc = QProcess() |
644 args = [] |
644 args = [] |
645 self.buf = "" |
645 self.buf = "" |
646 |
646 |
647 if self.project.pdata["PROGLANGUAGE"][0] in ["Python", "Python3"]: |
647 if self.project.pdata["PROGLANGUAGE"][0] in ["Python", "Python2", "Python3"]: |
648 if self.project.getProjectType() in ["Qt4", "E4Plugin"]: |
648 if self.project.getProjectType() in ["Qt4", "E4Plugin"]: |
649 self.uicompiler = 'pyuic4' |
649 self.uicompiler = 'pyuic4' |
650 if Utilities.isWindowsPlatform(): |
650 if Utilities.isWindowsPlatform(): |
651 uic = self.uicompiler + '.bat' |
651 uic = self.uicompiler + '.bat' |
652 else: |
652 else: |
672 return None |
672 return None |
673 |
673 |
674 ofn, ext = os.path.splitext(fn) |
674 ofn, ext = os.path.splitext(fn) |
675 fn = os.path.join(self.project.ppath, fn) |
675 fn = os.path.join(self.project.ppath, fn) |
676 |
676 |
677 if self.project.pdata["PROGLANGUAGE"][0] in ["Python", "Python3"]: |
677 if self.project.pdata["PROGLANGUAGE"][0] in ["Python", "Python2", "Python3"]: |
678 dirname, filename = os.path.split(ofn) |
678 dirname, filename = os.path.split(ofn) |
679 self.compiledFile = os.path.join(dirname, "Ui_" + filename + ".py") |
679 self.compiledFile = os.path.join(dirname, "Ui_" + filename + ".py") |
680 args.append("-x") |
680 args.append("-x") |
681 elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": |
681 elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": |
682 self.compiledFile = ofn + '.rb' |
682 self.compiledFile = ofn + '.rb' |
832 for fn in self.project.pdata["FORMS"]: |
832 for fn in self.project.pdata["FORMS"]: |
833 progress.setValue(i) |
833 progress.setValue(i) |
834 QApplication.processEvents() |
834 QApplication.processEvents() |
835 |
835 |
836 ifn = os.path.join(self.project.ppath, fn) |
836 ifn = os.path.join(self.project.ppath, fn) |
837 if self.project.pdata["PROGLANGUAGE"][0] in ["Python", "Python3"]: |
837 if self.project.pdata["PROGLANGUAGE"][0] in \ |
|
838 ["Python", "Python2", "Python3"]: |
838 dirname, filename = os.path.split(os.path.splitext(ifn)[0]) |
839 dirname, filename = os.path.split(os.path.splitext(ifn)[0]) |
839 ofn = os.path.join(dirname, "Ui_" + filename + ".py") |
840 ofn = os.path.join(dirname, "Ui_" + filename + ".py") |
840 elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": |
841 elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": |
841 ofn = os.path.splitext(ifn)[0] + '.rb' |
842 ofn = os.path.splitext(ifn)[0] + '.rb' |
842 if not os.path.exists(ofn) or \ |
843 if not os.path.exists(ofn) or \ |