558 args = [] |
558 args = [] |
559 |
559 |
560 args.append("-bpython") |
560 args.append("-bpython") |
561 args.append("-I.") |
561 args.append("-I.") |
562 for directory in params["IncludeDirs"]: |
562 for directory in params["IncludeDirs"]: |
563 args.append("-I{0}".format(directory)) |
563 args.append("-I{0}".format( |
|
564 self.project.getAbsoluteUniversalPath(directory))) |
564 for name in params["DefinedNames"]: |
565 for name in params["DefinedNames"]: |
565 args.append("-D{0}".format(name)) |
566 args.append("-D{0}".format(name)) |
566 for name in params["UndefinedNames"]: |
567 for name in params["UndefinedNames"]: |
567 args.append("-U{0}".format(name)) |
568 args.append("-U{0}".format(name)) |
568 |
569 |
569 fn = os.path.join(self.project.ppath, fn) |
570 fn = self.project.getAbsoluteUniversalPath(fn) |
570 self.idlFile = fn |
571 self.idlFile = fn |
571 args.append("-C{0}".format(os.path.dirname(fn))) |
572 args.append("-C{0}".format(os.path.dirname(fn))) |
572 args.append(fn) |
573 args.append(fn) |
573 |
574 |
574 self.compileProc.finished.connect(self.__compileIDLDone) |
575 self.compileProc.finished.connect(self.__compileIDLDone) |
667 else: |
668 else: |
668 break |
669 break |
669 i += 1 |
670 i += 1 |
670 |
671 |
671 progress.setValue(numIDLs) |
672 progress.setValue(numIDLs) |
672 |
|
673 def __configureCorba(self): |
|
674 """ |
|
675 Private method to open the configuration dialog. |
|
676 """ |
|
677 e5App().getObject("UserInterface").showPreferences("corbaPage") |
|
678 |
673 |
679 def __configureIdlCompiler(self): |
674 def __configureIdlCompiler(self): |
680 """ |
675 """ |
681 Private method to show a dialog to configure some options for the |
676 Private method to show a dialog to configure some options for the |
682 IDL compiler. |
677 IDL compiler. |
683 """ |
678 """ |
684 params = self.project.pdata["IDLPARAMS"] |
679 params = self.project.pdata["IDLPARAMS"] |
685 |
680 |
686 # TODO: remove this test code once done |
681 # TODO: remove this test code once done |
687 print("__configureIdlCompiler") |
682 params = { |
688 return |
683 "IncludeDirs": ["sub3", "sub2"], |
|
684 "DefinedNames": ["n2", "n1=1", "n3 = h e l p"], |
|
685 "UndefinedNames": ["v5", "v2", "aa"], |
|
686 } |
689 |
687 |
690 # TODO: implement IDL compiler options dialog |
688 # TODO: implement IDL compiler options dialog |
691 from .IdlCompilerOptionsDialog import IdlCompilerOptionsDialog |
689 from .IdlCompilerOptionsDialog import IdlCompilerOptionsDialog |
692 dlg = IdlCompilerOptionsDialog( |
690 dlg = IdlCompilerOptionsDialog( |
693 params["IncludeDirs"][:], params["DefinedNames"][:], |
691 params["IncludeDirs"][:], params["DefinedNames"][:], |
694 params["UndefinedNames"][:]) |
692 params["UndefinedNames"][:], self.project, self) |
695 if dlg.exec_() == QDialog.Accepted: |
693 if dlg.exec_() == QDialog.Accepted: |
696 include, defined, undefined = dlg.getData() |
694 include, defined, undefined = dlg.getData() |
697 if include != params["IncludeDirs"]: |
695 if include != params["IncludeDirs"]: |
698 params["IncludeDirs"] = include[:] |
696 params["IncludeDirs"] = include[:] |
699 self.project.setDirty(True) |
697 self.project.setDirty(True) |
701 params["DefinedNames"] = defined[:] |
699 params["DefinedNames"] = defined[:] |
702 self.project.setDirty(True) |
700 self.project.setDirty(True) |
703 if undefined != params["UndefinedNames"]: |
701 if undefined != params["UndefinedNames"]: |
704 params["UndefinedNames"] = undefined[:] |
702 params["UndefinedNames"] = undefined[:] |
705 self.project.setDirty(True) |
703 self.project.setDirty(True) |
|
704 |
|
705 def __configureCorba(self): |
|
706 """ |
|
707 Private method to open the configuration dialog. |
|
708 """ |
|
709 e5App().getObject("UserInterface").showPreferences("corbaPage") |