Changeset 462bb850583c…
Parent 19d3c7906d7b…
by
Changes to one file · Browse files at 462bb850583c Showing diff from parent 19d3c7906d7b Diff from another changeset...
@@ -11,6 +11,15 @@ import os
import sys
+argv = sys.argv[1:]
+if 'THG_OSX_APP' in os.environ:
+ # Remove the -psn argument supplied by launchd
+ argv = argv[1:]
+ # sys.path as created by py2app doesn't work quite right with demandimport
+ # Add the explicit path where PyQt4 and other libs are
+ bundlepath = os.path.dirname(os.path.realname(__file__))
+ sys.path.insert(0, os.path.join(bundlepath, 'lib/python2.6/lib-dynload'))
+
if hasattr(sys, "frozen"):
if sys.frozen == 'windows_exe' and 'THGDEBUG' in os.environ:
import win32traceutil
@@ -64,7 +73,7 @@ from tortoisehg.hgqt.bugreport import run
from tortoisehg.hgqt.run import qtrun
opts = {}
- opts['cmd'] = ' '.join(sys.argv[1:])
+ opts['cmd'] = ' '.join(argv)
opts['error'] = '\n' + errmsg + '\n'
opts['nofork'] = True
qtrun(run, ui.ui(), **opts)
|
Loading...