Files
picard/tagger.py.in
Philipp Wolfer fb37df7ef8 PICARD-2291: Fix DLL search path in Windows portable install
Move setting the PATH to include the package folder earlier in the PyInstaller hooks.
2021-10-17 11:52:14 +02:00

24 lines
570 B
Python

#!/usr/bin/env python3
import os
import sys
sys.path.insert(0, '.')
# This is needed to find resources when using pyinstaller
if getattr(sys, 'frozen', False):
basedir = getattr(sys, '_MEIPASS', '')
else:
basedir = os.path.dirname(os.path.abspath(__file__))
try:
from picard.tagger import main
main(os.path.join(basedir, 'locale'), %(autoupdate)s)
except SystemExit:
raise # Just continue with a normal application exit
except: # noqa: E722,F722 # pylint: disable=bare-except
from picard import crash_handler
crash_handler()
raise