Removed PyObjc dependency for OSX

This commit is contained in:
Maran 2012-11-29 21:20:44 +01:00
parent f998d934d9
commit 4c0624663b
1 changed files with 6 additions and 6 deletions

View File

@ -3415,12 +3415,12 @@ if __name__ == "__main__":
APPNAME = "PyBitmessage" APPNAME = "PyBitmessage"
from os import path, environ from os import path, environ
if sys.platform == 'darwin': if sys.platform == 'darwin':
from AppKit import NSSearchPathForDirectoriesInDomains if "HOME" in environ:
# http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSSearchPathForDirectoriesInDomains appdata = path.join(os.environ["HOME"], "Library/Application support/", APPNAME) + '/'
# NSApplicationSupportDirectory = 14 else:
# NSUserDomainMask = 1 print 'Could not find home folder, please report this message and your OS X version to the BitMessage Github.'
# True for expanding the tilde into a fully qualified path sys.exit()
appdata = path.join(NSSearchPathForDirectoriesInDomains(14, 1, True)[0], APPNAME) + '/'
elif 'win' in sys.platform: elif 'win' in sys.platform:
appdata = path.join(environ['APPDATA'], APPNAME) + '\\' appdata = path.join(environ['APPDATA'], APPNAME) + '\\'
else: else: