aboutsummaryrefslogtreecommitdiff
path: root/modpackman.py
diff options
context:
space:
mode:
authorDylan Jones <dylanjones2011@gmail.com>2020-12-06 03:28:36 -0500
committerDylan Jones <dylanjones2011@gmail.com>2020-12-06 03:28:36 -0500
commit5fa585852d745f4350e7e31680e6b1d764e8d4c2 (patch)
treeac3e973bc7602dafb7b6cce1ab2e12a521f82328 /modpackman.py
parent5b25086399f6a08d087b43ed57a9f3068516d0a2 (diff)
downloadmodpackman-5fa585852d745f4350e7e31680e6b1d764e8d4c2.tar.gz
modpackman-5fa585852d745f4350e7e31680e6b1d764e8d4c2.zip
Prepare for pyinstaller bundling
Diffstat (limited to 'modpackman.py')
-rwxr-xr-xmodpackman.py8
1 files changed, 6 insertions, 2 deletions
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":