Use $APPIMAGE to determine exe folder and enable portable mode for AppImage

This commit is contained in:
Lee Miller 2022-08-12 05:30:18 +03:00
parent 5efd072deb
commit 4711dfdd93
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -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():