From 5fa585852d745f4350e7e31680e6b1d764e8d4c2 Mon Sep 17 00:00:00 2001 From: Dylan Jones Date: Sun, 6 Dec 2020 03:28:36 -0500 Subject: Prepare for pyinstaller bundling --- modpackman.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modpackman.py') diff --git a/modpackman.py b/modpackman.py index 1bd28d4..503fbf3 100755 --- a/modpackman.py +++ b/modpackman.py @@ -1,7 +1,11 @@ #!/usr/bin/env python3 -import argparse import os import sys + +if hasattr(sys, '_MEIPASS'): # we're running in a bundle, go to where we have our bundled assets + os.chdir(sys._MEIPASS) + +import argparse import shutil import requests import pathlib @@ -130,7 +134,7 @@ if __name__ == "__main__": # run the command if args.command == "install": - install("version.txt", config['pack']["whitelist"], os.path.join(config['pack']['location'], 'mods')) + install() elif args.command == "apply_updates": apply_updates(config['mods'], "version.txt", config['pack']["game_version"]) elif args.command == "check_updates": -- cgit v1.2.3