2011-08-11 04:17:53 -04:00
|
|
|
from os import path
|
|
|
|
from sys import platform
|
|
|
|
from PyQt4.QtGui import QDesktopServices
|
|
|
|
|
|
|
|
def isOSX():
|
|
|
|
return platform == "darwin"
|
|
|
|
|
|
|
|
def isWin32():
|
|
|
|
return platform == "win32"
|
|
|
|
|
|
|
|
def isOSXBundle():
|
2011-08-11 04:59:51 -04:00
|
|
|
return isOSX() and (path.abspath('.').find(".app") != -1)
|
2011-08-11 04:17:53 -04:00
|
|
|
|
|
|
|
def getDataDir():
|
|
|
|
if isOSX():
|
|
|
|
return path.join(str(QDesktopServices.storageLocation(QDesktopServices.DataLocation)), "Pesterchum/")
|
|
|
|
else:
|
|
|
|
return ''
|