From 54f0cd42c6f022e010c63ba7b1f123f78001b490 Mon Sep 17 00:00:00 2001 From: Andreas Zuber Date: Mon, 30 Oct 2017 09:53:31 +0100 Subject: [PATCH 3/3] staticdata make gameDB and imgs.zip paths settable from configforced --- config.py | 7 +++++++ gui/bitmapLoader.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index b15c30a3..a5a07acb 100644 --- a/config.py +++ b/config.py @@ -30,6 +30,7 @@ savePath = None saveDB = None gameDB = None logPath = None +imgsZIP = None def isFrozen(): @@ -61,6 +62,7 @@ def defPaths(customSavePath): global savePath global saveDB global gameDB + global imgsZIP global saveInRoot pyfalog.debug("Configuring Pyfa") @@ -100,6 +102,11 @@ def defPaths(customSavePath): if not gameDB: gameDB = os.path.join(pyfaPath, "eve.db") + imgsZIP = getattr(configforced, "imgsZIP", imgsZIP) + if not imgsZIP: + imgsZIP = os.path.join(pyfaPath, "imgs.zip") + + # DON'T MODIFY ANYTHING BELOW import eos.config diff --git a/gui/bitmapLoader.py b/gui/bitmapLoader.py index eb53b1f1..86036001 100644 --- a/gui/bitmapLoader.py +++ b/gui/bitmapLoader.py @@ -37,7 +37,7 @@ except ImportError: class BitmapLoader(object): try: - archive = zipfile.ZipFile(os.path.join(config.pyfaPath, 'imgs.zip'), 'r') + archive = zipfile.ZipFile(config.imgsZIP, 'r') logging.info("Using zipped image files.") except IOError: logging.info("Using local image files.") -- 2.14.3