Use $APPIMAGE to determine exe folder and enable portable mode for AppImage
This commit is contained in:
parent
5efd072deb
commit
4711dfdd93
13
src/paths.py
13
src/paths.py
|
@ -21,14 +21,15 @@ def lookupExeFolder():
|
||||||
if frozen:
|
if frozen:
|
||||||
exeFolder = (
|
exeFolder = (
|
||||||
# targetdir/Bitmessage.app/Contents/MacOS/Bitmessage
|
# targetdir/Bitmessage.app/Contents/MacOS/Bitmessage
|
||||||
os.path.dirname(sys.executable).split(os.path.sep)[0] + os.path.sep
|
os.path.dirname(sys.executable).split(os.path.sep)[0]
|
||||||
if frozen == "macosx_app" else
|
if frozen == "macosx_app" else os.path.dirname(sys.executable))
|
||||||
os.path.dirname(sys.executable) + os.path.sep)
|
elif os.getenv('APPIMAGE'):
|
||||||
|
exeFolder = os.path.dirname(os.getenv('APPIMAGE'))
|
||||||
elif __file__:
|
elif __file__:
|
||||||
exeFolder = os.path.dirname(__file__) + os.path.sep
|
exeFolder = os.path.dirname(__file__)
|
||||||
else:
|
else:
|
||||||
exeFolder = ''
|
return ''
|
||||||
return exeFolder
|
return exeFolder + os.path.sep
|
||||||
|
|
||||||
|
|
||||||
def lookupAppdataFolder():
|
def lookupAppdataFolder():
|
||||||
|
|
Reference in New Issue
Block a user