PICARD-1675: Disable autoupdate works for pyinstaller and local builds

Generate tagger.py from tagger.py.in
This commit is contained in:
Philipp Wolfer
2019-11-21 15:42:04 +01:00
parent 05c695f8de
commit ce41927f00
6 changed files with 16 additions and 7 deletions

19
tagger.py.in Normal file
View File

@@ -0,0 +1,19 @@
#!/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__))
if sys.platform == 'win32':
os.environ['PATH'] = basedir + ';' + os.environ['PATH']
from picard.tagger import main
main(os.path.join(basedir, 'locale'), %(autoupdate)s)