mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-28 03:32:23 +03:00
1 parent
0f2289288c
commit
cc25e4da75
4 files changed
+10
-22
No files matched your search
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
from sys import platform
|
||||
import json
|
||||
from os import mkdir
|
||||
@@ -17,6 +18,12 @@ from ttkHyperlinkLabel import HyperlinkLabel
|
||||
if __debug__:
|
||||
from traceback import print_exc
|
||||
|
||||
from config import appname, applongname, config
|
||||
if platform == 'win32' and getattr(sys, 'frozen', False):
|
||||
# By default py2exe tries to write log to dirname(sys.executable) which fails when installed
|
||||
import tempfile
|
||||
sys.stderr = open(join(tempfile.gettempdir(), '%s.log' % appname), 'wt')
|
||||
|
||||
import l10n
|
||||
l10n.Translations().install()
|
||||
|
||||
@@ -31,7 +38,6 @@ import flightlog
|
||||
import eddb
|
||||
import stats
|
||||
import prefs
|
||||
from config import appname, applongname, config
|
||||
from hotkey import hotkeymgr
|
||||
from monitor import monitor
|
||||
|
||||
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
@REM http://www.py2exe.org/index.cgi/OptimizedBytecode
|
||||
"C:\Program Files (x86)\Python27\python.exe" -OO setup.py py2exe
|
||||
@@ -114,7 +114,7 @@ setup(
|
||||
version = VERSION,
|
||||
app = [APP],
|
||||
windows = [ {'dest_base': APPNAME,
|
||||
'script': 'winlauncher.py',
|
||||
'script': APP,
|
||||
'icon_resources': [(0, '%s.ico' % APPNAME)],
|
||||
'copyright': u'© 2015 Jonathan Harris',
|
||||
'name': APPNAME, # WinSparkle
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Launcher when running py2exe
|
||||
|
||||
import sys
|
||||
getattr(sys, 'frozen') # Only intended to be run under py2exe
|
||||
|
||||
# By deault py2exe tries to write log to dirname(sys.executable) which fails when installed
|
||||
from os.path import join
|
||||
import tempfile
|
||||
from config import appname
|
||||
sys.stderr = open(join(tempfile.gettempdir(), '%s.log' % appname), 'wt')
|
||||
|
||||
import Tkinter as tk
|
||||
from EDMarketConnector import AppWindow
|
||||
|
||||
# Run the app
|
||||
root = tk.Tk()
|
||||
app = AppWindow(root)
|
||||
root.mainloop()
|
||||
Reference in new issue
Block a user