mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-05 07:14:00 +00:00
PyInstaller recommends checking both the frozen and _MEIPASS attributes
This commit is contained in:
@@ -30,5 +30,5 @@ IS_HAIKU = sys.platform == 'haiku1'
|
||||
|
||||
# These variables are set by pyinstaller if running from a packaged build
|
||||
# See http://pyinstaller.readthedocs.io/en/stable/runtime-information.html
|
||||
IS_FROZEN = getattr(sys, 'frozen', False)
|
||||
IS_FROZEN = getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS')
|
||||
FROZEN_TEMP_PATH = getattr(sys, '_MEIPASS', '')
|
||||
|
||||
@@ -7,7 +7,7 @@ import sys
|
||||
sys.path.insert(0, '.')
|
||||
|
||||
# This is needed to find resources when using pyinstaller
|
||||
if getattr(sys, 'frozen', False):
|
||||
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
||||
basedir = getattr(sys, '_MEIPASS', '')
|
||||
else:
|
||||
basedir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
Reference in New Issue
Block a user