Merge pull request #9 from maran/master

Removed PyObjc dependency
This commit is contained in:
Jonathan Warren 2012-11-29 12:46:02 -08:00
commit 15e96702eb

View File

@ -3429,12 +3429,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: