From 7f50503aec098dc7d84a6750cd6af05111a1a663 Mon Sep 17 00:00:00 2001 From: StinGer ShoGun Date: Wed, 12 Apr 2017 16:07:21 +0200 Subject: [PATCH 1/2] Allow game database file to be loaded from a different directory. This will allow system-wide installation of Pyfa in Python site-packages directory, where eve.db has nothing to do. This commit is part of attempts to ease system package creation and maintenance (specifically Gentoo ebuilds). --- config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index 1b84f837a9..38dea64407 100644 --- a/config.py +++ b/config.py @@ -96,7 +96,9 @@ def defPaths(customSavePath): # The database where the static EVE data from the datadump is kept. # This is not the standard sqlite datadump but a modified version created by eos # maintenance script - gameDB = os.path.join(pyfaPath, "eve.db") + gameDB = getattr(configforced, "gameDB", gameDB) + if not gameDB: + gameDB = os.path.join(pyfaPath, "eve.db") # DON'T MODIFY ANYTHING BELOW import eos.config From c00372900f811f2579c0eba7e1a59a078bd810d4 Mon Sep 17 00:00:00 2001 From: StinGer ShoGun Date: Wed, 12 Apr 2017 16:13:56 +0200 Subject: [PATCH 2/2] Save HTML export to .pyfa user's directory by default. This commit is part of attempts to ease system package creation and maintenance (specifically Gentoo ebuilds). --- service/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/settings.py b/service/settings.py index 895a9d297f..cdf84ea6ef 100644 --- a/service/settings.py +++ b/service/settings.py @@ -263,7 +263,7 @@ def getInstance(cls): def __init__(self): serviceHTMLExportDefaultSettings = { - "path" : config.pyfaPath + os.sep + 'pyfaFits.html', + "path" : config.savePath + os.sep + 'pyfaFits.html', "minimal": False } self.serviceHTMLExportSettings = SettingsProvider.getInstance().getSettings(