X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface-run;h=eecabd23e4644ed260ef957368a90e71f01cc03c;hp=74fdb73249073adc6abafcb02116c5546e7228ca;hb=aa95005ce00ac174226e7f5b1de895527bcb2730;hpb=a17bc8dca6f06b4c1484be74fc50493b28b3d6f0 diff --git a/sface-run b/sface-run index 74fdb73..eecabd2 100755 --- a/sface-run +++ b/sface-run @@ -11,6 +11,16 @@ exe = os.path.abspath(sys.argv[0]) def using_env(e): print "Using %s = %s" % (e, os.environ[e]) +def print_env(config): + if not config.verbose: + return + + if sys.platform == "darwin": + using_env("DYLD_FRAMEWORK_PATH") + using_env("DYLD_LIBRARY_PATH") + + using_env("PATH") + print "Using sys.path =", sys.path if sys.platform == "darwin": # for testing on mac os x 10.5 - baris @@ -20,9 +30,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") @@ -32,23 +40,16 @@ if sys.platform == "darwin": os.environ["PATH"] = PATH os.environ["DYLD_LIBRARY_PATH"] = DYLD_LIBRARY_PATH os.environ["DYLD_FRAMEWORK_PATH"] = DYLD_FRAMEWORK_PATH - - using_env("PATH") - using_env("DYLD_FRAMEWORK_PATH") - using_env("DYLD_LIBRARY_PATH") - print "Using sys.path =", sys.path + if os.path.exists(RESOURCES): sys.path.append(RESOURCES) + if os.path.exists(FRAMEWORKS): sys.path.append(FRAMEWORKS) elif sys.platform == "linux2": sys.path.extend(["/usr/share", "/usr/share/sface"]) - using_env("PATH") - print "Using sys.path =", sys.path - from sface.mainwindow import MainWindow from sface.config import config - def main(args): app = QApplication(args) app.setStyleSheet(''' @@ -100,4 +101,5 @@ if __name__ == "__main__": (options,args)=parser.parse_args() config.update_from_OptionParser(options) config.display("After command-line") + print_env(config) main(sys.argv)