Complete the zipapp packaging for Windows

This commit is contained in:
Veronica K. B. Olsen
2021-01-23 14:25:12 +01:00
parent e3972c6205
commit 5f86ab27bb
3 changed files with 55 additions and 37 deletions
+10 -4
View File
@@ -269,10 +269,16 @@ class Config:
logger.verbose("Config path: %s" % self.confPath)
logger.verbose("Data path: %s" % self.dataPath)
self.confFile = self.appHandle+".conf"
self.lastPath = os.path.expanduser("~")
self.appPath = getattr(sys, "_MEIPASS", os.path.abspath(os.path.dirname(__file__)))
self.appRoot = os.path.join(self.appPath, os.path.pardir)
self.confFile = self.appHandle+".conf"
self.lastPath = os.path.expanduser("~")
self.appPath = getattr(sys, "_MEIPASS", os.path.abspath(os.path.dirname(__file__)))
self.appRoot = os.path.abspath(os.path.join(self.appPath, os.path.pardir))
if self.appRoot.endswith(".pyz"):
self.appRoot = os.path.abspath(os.path.join(self.appRoot, os.path.pardir))
self.appPath = self.appRoot
# Assets
self.assetPath = os.path.join(self.appPath, "assets")
self.themeRoot = os.path.join(self.assetPath, "themes")
self.dictPath = os.path.join(self.assetPath, "dict")