Updated paths and move app icon to be more pyinstaller friendly

This commit is contained in:
Veronica K. B. Olsen
2019-10-29 21:07:40 +01:00
parent b46a8a81b5
commit a595ec8bf2
7 changed files with 10 additions and 9 deletions
+3 -2
View File
@@ -10,8 +10,9 @@
"""
import logging
import sys
import getopt
import logging
from os import path, remove, rename
from PyQt5.QtWidgets import QApplication
@@ -196,6 +197,6 @@ def main(sysArgs):
else:
nwApp = QApplication([__package__])
nwGUI = GuiMain()
exit(nwApp.exec_())
sys.exit(nwApp.exec_())
return
+3 -3
View File
@@ -156,13 +156,13 @@ class Config:
self.confFile = self.appHandle+".conf"
self.homePath = path.expanduser("~")
self.lastPath = self.homePath
self.appPath = path.dirname(__file__)
self.appPath = getattr(sys, "_MEIPASS", path.abspath(path.dirname(__file__)))
self.appRoot = path.join(self.appPath,path.pardir)
self.helpPath = path.join(self.appRoot,"help","en_GB")
self.guiPath = path.join(self.appPath,"gui")
self.themeRoot = path.join(self.appPath,"themes")
self.themePath = path.join(self.themeRoot)
self.appIcon = path.join(self.appRoot, nwFiles.APP_ICON)
self.graphPath = path.join(self.appPath,"graphics")
self.appIcon = path.join(self.graphPath, nwFiles.APP_ICON)
# If config folder does not exist, make it.
# This assumes that the os config folder itself exists.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

+1 -1
View File
@@ -43,7 +43,7 @@ class GuiConfigEditor(QDialog):
self.setWindowTitle("Preferences")
self.gradPath = path.abspath(path.join(self.mainConf.appPath,"graphics","gear.svg"))
self.gradPath = path.abspath(path.join(self.mainConf.graphPath,"gear.svg"))
self.svgGradient = QSvgWidget(path.join(self.gradPath))
self.svgGradient.setFixedSize(QSize(64,64))
+1 -1
View File
@@ -55,7 +55,7 @@ class GuiExport(QDialog):
self.setWindowTitle("Export Project")
self.setLayout(self.outerBox)
self.gradPath = path.abspath(path.join(self.mainConf.appPath,"graphics","export.svg"))
self.gradPath = path.abspath(path.join(self.mainConf.graphPath,"export.svg"))
self.svgGradient = QSvgWidget(self.gradPath)
self.svgGradient.setFixedSize(QSize(64,64))
+1 -1
View File
@@ -41,7 +41,7 @@ class GuiItemEditor(QDialog):
self.setWindowTitle("Item Settings")
self.gradPath = path.abspath(path.join(self.mainConf.appPath,"graphics","gear.svg"))
self.gradPath = path.abspath(path.join(self.mainConf.graphPath,"gear.svg"))
self.svgGradient = QSvgWidget(self.gradPath)
self.svgGradient.setFixedSize(QSize(64,64))
+1 -1
View File
@@ -43,7 +43,7 @@ class GuiProjectEditor(QDialog):
self.setWindowTitle("Project Settings")
self.setLayout(self.outerBox)
self.gradPath = path.abspath(path.join(self.mainConf.appPath,"graphics","gear.svg"))
self.gradPath = path.abspath(path.join(self.mainConf.graphPath,"gear.svg"))
self.svgGradient = QSvgWidget(self.gradPath)
self.svgGradient.setFixedSize(QSize(64,64))