X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface-run;h=48650dccf503a0b699e927b4a72eb96c910cc9be;hp=f1dadeb2f35ad209fe4996f24d2259a6e79890e9;hb=a27d51684e4c3f10b721b6fd6b28711f26063da9;hpb=e3ccd419a7d411e01f21988c58b360e093544288 diff --git a/sface-run b/sface-run index f1dadeb..48650dc 100755 --- a/sface-run +++ b/sface-run @@ -3,9 +3,8 @@ import os import sys from optparse import OptionParser -from PyQt4.QtGui import * -sys.path.append(".") +sys.path.insert(0, ".") exe = os.path.abspath(sys.argv[0]) def using_env(e): @@ -30,9 +29,7 @@ if sys.platform == "darwin": CONTENTS = os.path.dirname(DIR) RESOURCES = os.path.join(CONTENTS, "Resources") FRAMEWORKS = os.path.join(CONTENTS, "Frameworks") - - sys.path.extend([RESOURCES, FRAMEWORKS]) - + DYLD_FRAMEWORK_PATH = FRAMEWORKS DYLD_LIBRARY_PATH = RESOURCES PATH = os.getenv("PATH") @@ -42,11 +39,14 @@ if sys.platform == "darwin": os.environ["PATH"] = PATH os.environ["DYLD_LIBRARY_PATH"] = DYLD_LIBRARY_PATH os.environ["DYLD_FRAMEWORK_PATH"] = DYLD_FRAMEWORK_PATH + if os.path.exists(RESOURCES): sys.path.insert(0, RESOURCES) + if os.path.exists(FRAMEWORKS): sys.path.insert(0, FRAMEWORKS) elif sys.platform == "linux2": sys.path.extend(["/usr/share", "/usr/share/sface"]) +from PyQt4.QtGui import * from sface.mainwindow import MainWindow from sface.config import config