1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
From 54f0cd42c6f022e010c63ba7b1f123f78001b490 Mon Sep 17 00:00:00 2001
From: Andreas Zuber <zuber@puzzle.ch>
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
|