Add icon for the window
[bertos.git] / wizard / bertos.py
index a92a054bc289a42b7653f66a2a453c1f0d844585..87b08237fa02e43ddad363b4eb0a1fc88644c422 100755 (executable)
@@ -55,11 +55,22 @@ def main():
     app = QApplication(sys.argv)
     app.settings = QSettings("Develer", "Bertos Configurator")
     app.project = BProject.BProject()
+    # Development utility lines, to be removed for production
     if newer("bertos.qrc", "bertos.rcc"):
         os.system("rcc -binary bertos.qrc -o bertos.rcc")
     QResource.registerResource("bertos.rcc")
-    showStartPage()
-    sys.exit(app.exec_())
+    if "--create" in sys.argv and "--edit" not in sys.argv:
+        newProject()
+    elif "--edit" in sys.argv and "--create" not in sys.argv:
+        editProject()
+    elif "--create" in sys.argv and "--edit" in sys.argv:
+        # TODO need an explaining message
+        print " ".join(sys.argv)
+        print "Invalid usage!"
+        pass
+    else:
+        showStartPage()
+        sys.exit(app.exec_())
 
 if __name__ == '__main__':
     main()