Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Distribution on Mac OSX done

  • Loading branch information...
commit 8df0c1ea53ca6bafa50faee33fda0d4ba7cfd002 1 parent 4e57772
@jceipek jceipek authored
View
2  Makefile
@@ -5,7 +5,7 @@ all: main.app
# python setup.py py2app -A
# Mac OS X
-main.app: maraudersmap/mapclient.py maraudersmap/data/qt.conf maraudersmap/data/Info.plist setup.py
+main.app: src/mapclient.py data/qt.conf data/Info.plist setup.py
python setup.py py2app
# Removing
View
9 setup.py
@@ -16,13 +16,13 @@
if sys.platform.startswith('darwin'):
from setuptools import setup
APP = ['src/mapclient.py']
- DATA_FILES = ['src/data/qt.conf', # Used to fix mysterious segfault based on advice from http://www.thetoryparty.com/2009/03/03/pyqt4-i-hate-you/
- 'src/data/demoIcon.png',
- 'src/data/demoIconWhite.png']
+ DATA_FILES = ['data/qt.conf', # Used to fix mysterious segfault based on advice from http://www.thetoryparty.com/2009/03/03/pyqt4-i-hate-you/
+ 'data/demoIcon.png',
+ 'data/demoIconWhite.png']
# The plist file specifies that there should be no icon in the dock
# See: http://www.macosxtips.co.uk/index_files/disable-the-dock-icon-for-any-application.php
- OPTIONS = {'argv_emulation': True, 'plist':'src/data/Info.plist'}
+ OPTIONS = {'argv_emulation': True, 'plist':'data/Info.plist'}
setup(
app=APP,
@@ -31,7 +31,6 @@
setup_requires=['py2app'],
packages=['mapclient'],
package_dir={'mapclient': 'src'},
- package_data={'mapclient': ['data/*']}
)
elif sys.platform.startswith('linux'):
from distutils.core import setup
View
1  src/configuration.py
@@ -1,5 +1,4 @@
import os
-import sys
import appdirs
import json
import ConfigParser
View
4 src/data/Info.plist
@@ -1,4 +0,0 @@
-<dict>
-<key>LSUIElement</key>
-<string>1</string>
-</dict>
View
BIN  src/data/demoIcon.png
Deleted file not rendered
View
BIN  src/data/demoIconWhite.png
Deleted file not rendered
View
0  src/data/qt.conf
No changes.
View
20 src/mapclient.py
@@ -23,12 +23,28 @@
from getpass import getuser
import webbrowser
import urllib
+import os
+import sys
import client_api
from configuration import Settings, Undefined_Value_Error
import signal_strength
import authserver
+DATA_PATH = None
+if os.getenv('DEBUG_OLIN_MM') != "TRUE":
+ basepath = os.path.dirname(__file__)
+ # Set data path based on OS
+ if sys.platform.startswith('darwin'):
+ DATA_PATH = os.path.abspath(os.path.join(basepath, "..", 'Resources'))
+ elif sys.platform.startswith('linux'):
+ pass
+ elif sys.platform.startswith('win'):
+ pass
+else:
+ basepath = os.path.dirname(__file__)
+ DATA_PATH = os.path.abspath(os.path.join(basepath, "..", 'data'))
+
class GeneralPrefs(QtGui.QWidget):
"""Tab for general preferences in the :class:`PreferencesWindow`.
@@ -325,8 +341,8 @@ def create_system_tray(self):
'''
'''
- self.sys_tray_icon_default = QtGui.QIcon("data/demoIcon.png")
- self.sys_tray_icon_clicked = QtGui.QIcon("data/demoIconWhite.png")
+ self.sys_tray_icon_default = QtGui.QIcon(os.path.join(DATA_PATH, "demoIcon.png"))
+ self.sys_tray_icon_clicked = QtGui.QIcon(os.path.join(DATA_PATH, "demoIconWhite.png"))
self.sys_tray = QtGui.QSystemTrayIcon(self, icon=self.sys_tray_icon_default)
self.sys_tray.setToolTip("Marauder's Map")
Please sign in to comment.
Something went wrong with that request. Please try again.