X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos.py;h=f178a0a04174db2adf2ee7515afdcc55dd212952;hb=efb100c4cfb9fa25aa16bb3f336cd29e423abcf2;hp=a8d4665091269c92ac7285def2e4e2eac687aa38;hpb=69dafce1e54be44e6c45deb813f6a08baeef9897;p=bertos.git diff --git a/wizard/bertos.py b/wizard/bertos.py index a8d46650..f178a0a0 100755 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -1,10 +1,10 @@ -#!/usr/bin/env python +#!/usr/bin/env python # encoding: utf-8 # # Copyright 2008 Develer S.r.l. (http://www.develer.com/) # All rights reserved. # -# $Id:$ +# $Id$ # # Author: Lorenzo Berni # @@ -52,11 +52,12 @@ def showStartPage(): QApplication.instance().dialog.show() def main(): + os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) 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"): + # Development utility lines, to be removed for production + if not (hasattr(sys, "frozen") and sys.frozen) and newer("bertos.qrc", "bertos.rcc"): os.system("rcc -binary bertos.qrc -o bertos.rcc") QResource.registerResource("bertos.rcc") if "--create" in sys.argv and "--edit" not in sys.argv: @@ -64,7 +65,7 @@ def main(): 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 + # TODO need an explaining message print " ".join(sys.argv) print "Invalid usage!" pass