Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
portable: fix for newer PyInstaller and AppImage support
Starting with PyInstaller 4.3 the behaviour of `__file__` was changed and we can't rely on it anymore to construct the portable path as that will result in the data directory being created in the `TEMP` folder and deleted later. Instead of using `__file__` we now use `sys.executable` instead. For the AppImage we also use the `APPIMAGE` environment variable which points to the AppImage file. There is a fallback to the current working directory in case the other methods do not work. This was tested with all the .exe and .AppImage files, with `--portable` and without. Also tested using a local git checkout.
- Loading branch information