mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-27 03:37:33 +00:00
PICARD-1763: Ensure macOS working dir is not the app dir\n\nAvoids crashes on startup
This commit is contained in:
committed by
Philipp Wolfer
parent
079808663c
commit
cba7de3c73
@@ -23,6 +23,9 @@ import os
|
||||
import sys
|
||||
|
||||
|
||||
# The macOS app crashes on launch if the working directory happens to be sys._MEIPASS
|
||||
os.chdir(os.path.abspath(os.path.join(sys._MEIPASS, '..', '..')))
|
||||
|
||||
# On macOS ensure libraries such as libdiscid.dylib get loaded from app bundle
|
||||
os.environ['DYLD_FALLBACK_LIBRARY_PATH'] = '%s:%s' % (
|
||||
os.path.dirname(sys.executable), os.environ.get('DYLD_FALLBACK_LIBRARY_PATH', ''))
|
||||
|
||||
Reference in New Issue
Block a user