OS X distributive was pointing to the wrong path for the pyfa root, due to the executable being in a different place than the actual root. This changes the logic to use sys.executable as a fallback when __file__ doesn't exist (for example in the windows distributive)
This commit is contained in:
@@ -51,7 +51,7 @@ def isFrozen():
|
||||
return False
|
||||
|
||||
def getPyfaRoot():
|
||||
base = sys.executable if isFrozen() else sys.argv[0]
|
||||
base = getattr(sys.modules['__main__'], "__file__", sys.executable) if isFrozen() else sys.argv[0]
|
||||
root = os.path.dirname(os.path.realpath(os.path.abspath(base)))
|
||||
root = unicode(root, sys.getfilesystemencoding())
|
||||
return root
|
||||
|
||||
@@ -34,7 +34,7 @@ def DrawFilledBitmap(width, height, color):
|
||||
|
||||
def DrawGradientBar(width, height, gStart, gEnd, gMid = None, fillRatio = 4):
|
||||
# we need to have dimensions to draw
|
||||
assert width > 0 and height > 0
|
||||
#assert width > 0 and height > 0
|
||||
canvas = wx.EmptyBitmap(width,height)
|
||||
|
||||
mdc = wx.MemoryDC()
|
||||
|
||||
Reference in New Issue
Block a user