run HUD_main.exe if running fpdb.exe (created by py2exe)
This commit is contained in:
parent
4a0fcd62a0
commit
4d74437845
|
@ -194,8 +194,11 @@ class GuiAutoImport (threading.Thread):
|
||||||
widget.set_label(u' _Stop Autoimport ')
|
widget.set_label(u' _Stop Autoimport ')
|
||||||
if self.pipe_to_hud is None:
|
if self.pipe_to_hud is None:
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
path = sys.path[0].replace('\\','\\\\')
|
if sys.argv[0] == 'fpdb.exe':
|
||||||
command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options']
|
command = 'HUD_main.exe'
|
||||||
|
else:
|
||||||
|
path = sys.path[0].replace('\\','\\\\')
|
||||||
|
command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options']
|
||||||
bs = 0
|
bs = 0
|
||||||
else:
|
else:
|
||||||
command = os.path.join(sys.path[0], 'HUD_main.py')
|
command = os.path.join(sys.path[0], 'HUD_main.py')
|
||||||
|
@ -208,7 +211,8 @@ class GuiAutoImport (threading.Thread):
|
||||||
universal_newlines=True)
|
universal_newlines=True)
|
||||||
except:
|
except:
|
||||||
err = traceback.extract_tb(sys.exc_info()[2])[-1]
|
err = traceback.extract_tb(sys.exc_info()[2])[-1]
|
||||||
self.addText( "\n*** GuiAutoImport Error opening pipe: " + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1]))
|
#self.addText( "\n*** GuiAutoImport Error opening pipe: " + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1]))
|
||||||
|
self.addText( "\n*** GuiAutoImport Error opening pipe: " + traceback.format_exc() )
|
||||||
else:
|
else:
|
||||||
for site in self.input_settings:
|
for site in self.input_settings:
|
||||||
self.importer.addImportDirectory(self.input_settings[site][0], True, site, self.input_settings[site][1])
|
self.importer.addImportDirectory(self.input_settings[site][0], True, site, self.input_settings[site][1])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user