Updated paths and move app icon to be more pyinstaller friendly
This commit is contained in:
+3
-2
@@ -10,8 +10,9 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import sys
|
||||||
import getopt
|
import getopt
|
||||||
|
import logging
|
||||||
|
|
||||||
from os import path, remove, rename
|
from os import path, remove, rename
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
@@ -196,6 +197,6 @@ def main(sysArgs):
|
|||||||
else:
|
else:
|
||||||
nwApp = QApplication([__package__])
|
nwApp = QApplication([__package__])
|
||||||
nwGUI = GuiMain()
|
nwGUI = GuiMain()
|
||||||
exit(nwApp.exec_())
|
sys.exit(nwApp.exec_())
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
+3
-3
@@ -156,13 +156,13 @@ class Config:
|
|||||||
self.confFile = self.appHandle+".conf"
|
self.confFile = self.appHandle+".conf"
|
||||||
self.homePath = path.expanduser("~")
|
self.homePath = path.expanduser("~")
|
||||||
self.lastPath = self.homePath
|
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.appRoot = path.join(self.appPath,path.pardir)
|
||||||
self.helpPath = path.join(self.appRoot,"help","en_GB")
|
self.helpPath = path.join(self.appRoot,"help","en_GB")
|
||||||
self.guiPath = path.join(self.appPath,"gui")
|
self.guiPath = path.join(self.appPath,"gui")
|
||||||
self.themeRoot = path.join(self.appPath,"themes")
|
self.themeRoot = path.join(self.appPath,"themes")
|
||||||
self.themePath = path.join(self.themeRoot)
|
self.graphPath = path.join(self.appPath,"graphics")
|
||||||
self.appIcon = path.join(self.appRoot, nwFiles.APP_ICON)
|
self.appIcon = path.join(self.graphPath, nwFiles.APP_ICON)
|
||||||
|
|
||||||
# If config folder does not exist, make it.
|
# If config folder does not exist, make it.
|
||||||
# This assumes that the os config folder itself exists.
|
# This assumes that the os config folder itself exists.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
@@ -43,7 +43,7 @@ class GuiConfigEditor(QDialog):
|
|||||||
|
|
||||||
self.setWindowTitle("Preferences")
|
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 = QSvgWidget(path.join(self.gradPath))
|
||||||
self.svgGradient.setFixedSize(QSize(64,64))
|
self.svgGradient.setFixedSize(QSize(64,64))
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ class GuiExport(QDialog):
|
|||||||
self.setWindowTitle("Export Project")
|
self.setWindowTitle("Export Project")
|
||||||
self.setLayout(self.outerBox)
|
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 = QSvgWidget(self.gradPath)
|
||||||
self.svgGradient.setFixedSize(QSize(64,64))
|
self.svgGradient.setFixedSize(QSize(64,64))
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class GuiItemEditor(QDialog):
|
|||||||
|
|
||||||
self.setWindowTitle("Item Settings")
|
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 = QSvgWidget(self.gradPath)
|
||||||
self.svgGradient.setFixedSize(QSize(64,64))
|
self.svgGradient.setFixedSize(QSize(64,64))
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class GuiProjectEditor(QDialog):
|
|||||||
self.setWindowTitle("Project Settings")
|
self.setWindowTitle("Project Settings")
|
||||||
self.setLayout(self.outerBox)
|
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 = QSvgWidget(self.gradPath)
|
||||||
self.svgGradient.setFixedSize(QSize(64,64))
|
self.svgGradient.setFixedSize(QSize(64,64))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user