4 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
9 # Author: Lorenzo Berni <duplo@develer.com>
14 from distutils.dep_util import newer
16 from PyQt4.QtCore import *
17 from PyQt4.QtGui import *
24 from BFolderPage import BFolderPage
25 from BOpenPage import BOpenPage
26 from BVersionPage import BVersionPage
27 from BCpuPage import BCpuPage
28 from BToolchainPage import BToolchainPage
29 from BModulePage import BModulePage
30 from BOutputPage import BOutputPage
31 from BCreationPage import BCreationPage
32 from BFinalPage import BFinalPage
37 page_list = [BFolderPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage]
38 wizard = BWizard.BWizard(page_list)
43 page_list = [BOpenPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage]
44 wizard = BWizard.BWizard(page_list)
49 QApplication.instance().dialog = BStartPage.BStartPage()
50 QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("newProject"), newProject)
51 QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("editProject"), editProject)
52 QApplication.instance().dialog.show()
55 os.chdir(os.path.dirname(os.path.abspath(sys.argv[0])))
56 app = QApplication(sys.argv)
57 app.settings = QSettings("Develer", "Bertos Configurator")
58 app.project = BProject.BProject()
59 # Development utility lines, to be removed for production
60 if not (hasattr(sys, "frozen") and sys.frozen) and newer("bertos.qrc", "bertos.rcc"):
61 os.system("rcc -binary bertos.qrc -o bertos.rcc")
62 QResource.registerResource("bertos.rcc")
63 if "--create" in sys.argv and "--edit" not in sys.argv:
65 elif "--edit" in sys.argv and "--create" not in sys.argv:
67 elif "--create" in sys.argv and "--edit" in sys.argv:
68 # TODO need an explaining message
69 print " ".join(sys.argv)
70 print "Invalid usage!"
76 if __name__ == '__main__':