Fix some issues with resolving paths for a packaged single executable
This commit is contained in:
+5
-2
@@ -272,8 +272,11 @@ class Config:
|
||||
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))
|
||||
if os.path.isfile(self.appRoot):
|
||||
# novelWriter is packaged as a single file, so the app and
|
||||
# root paths are the same, and equal to the folder that
|
||||
# contains the single executable.
|
||||
self.appRoot = os.path.dirname(self.appRoot)
|
||||
self.appPath = self.appRoot
|
||||
|
||||
# Assets
|
||||
|
||||
+1
-1
@@ -203,7 +203,7 @@ class GuiTheme:
|
||||
return
|
||||
|
||||
def updateFont(self):
|
||||
"""Updated the GUI's font style from settings,
|
||||
"""Update the GUI's font style from settings.
|
||||
"""
|
||||
theFont = QFont()
|
||||
if self.mainConf.guiFont not in self.guiFontDB.families():
|
||||
|
||||
Reference in New Issue
Block a user