X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos.py;h=87b08237fa02e43ddad363b4eb0a1fc88644c422;hb=66f5187ad2dc8cbaeb196c4987e1f6b073425915;hp=594587be23dd923643246398c14199c15843f805;hpb=107cf69bcaae23a972ff33a805c60a37bd0a1238;p=bertos.git diff --git a/wizard/bertos.py b/wizard/bertos.py index 594587be..87b08237 100755 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python # encoding: utf-8 # # Copyright 2008 Develer S.r.l. (http://www.develer.com/) @@ -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 > 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()