diff --git a/deb/control b/deb/control new file mode 100644 index 0000000..11afc24 --- /dev/null +++ b/deb/control @@ -0,0 +1,16 @@ +Package: PKG +Version: VER +Maintainer: Pavel Milanes +Architecture: amd64 +Section: main +Priority: optional +Depends: libc6 (>= 2.25), pv (>=1.5), python3 (>=3.5), python3-pyqt5 (>=5.10), python3-pyqt5.qtquick (>=5.10), qml-module-qtquick2 (>=5.9), qml-module-qtquick-window2 (>=5.9), qml-module-qtquick-layouts(>=5.9), qml-module-qtquick-extras (>=5.9), qml-module-qtquick-dialogs (>=5.9), qml-module-qtquick-controls2 (>=5.9), qml-module-qtquick-controls (>=5.9), qml-module-qt-labs-folderlistmodel (>=5.9), qml-module-qt-labs-settings (>=5.9) +Installed-Size: SIZE +Description: A tool to customise your Skycoin Skyminer OS images + Skyflash is the tool used to customise Skybian, the Skycoin Skyminers official OS. + . + Within this package we have skyflash and skyflash-cli + . + skyflash is a GUI interface written in Python3 + PyQT5 + QML and packaged with pyinstaller as a standalone executable elf file for the linux desktop. + . + skyflash-cli is a linux bash script that performs the same task but in command line. diff --git a/deb/skyflash b/deb/skyflash new file mode 100755 index 0000000..e5b13e0 --- /dev/null +++ b/deb/skyflash @@ -0,0 +1,5 @@ +#!/bin/bash + +# Script to call the GUI version for skyflash + +/usr/bin/env python3 /opt/skyflash/skyflash.py diff --git a/makedeb.sh b/makedeb.sh index 9f901ee..373e430 100755 --- a/makedeb.sh +++ b/makedeb.sh @@ -21,8 +21,8 @@ mkdir -p $PKG/usr/bin mkdir -p $PKG/DEBIAN cp skyflash.py $PKG/opt/$PKG/ cp skyflash.qml $PKG/opt/$PKG/ +cp skyflash.png $PKG/opt/$PKG/ cp README.md $PKG/opt/$PKG/ -cp deb/skyflash.png $PKG/opt/$PKG/ cp skyflash-cli $PKG/usr/bin/ cp deb/skyflash $PKG/usr/bin/ cp deb/skyflash.desktop $PKG/usr/share/applications/ diff --git a/skyflash.png b/skyflash.png new file mode 100644 index 0000000..eac0216 Binary files /dev/null and b/skyflash.png differ diff --git a/skyflash.py b/skyflash.py index 702b095..61f738e 100755 --- a/skyflash.py +++ b/skyflash.py @@ -18,7 +18,7 @@ from urllib.request import Request, urlopen # GUI imports -from PyQt5.QtGui import QGuiApplication +from PyQt5.QtGui import QGuiApplication, QIcon from PyQt5.QtQml import QQmlApplicationEngine from PyQt5.QtCore import * @@ -1792,6 +1792,11 @@ def loadPrevious(self): # GUI app app = QGuiApplication(sys.argv) + appPath = QFileInfo(__file__).absolutePath() + app.setWindowIcon(QIcon(os.path.join(appPath, 'skyflash.png'))) + + # debug + print("App path is: {}".format(appPath)) # main workspace, skyflash object skyflash = skyFlash() @@ -1801,7 +1806,7 @@ def loadPrevious(self): engine.rootContext().setContextProperty("skf", skyflash) # Conditional QML file loading, first try to load it from the local folder - localQML = os.path.join(os.getcwd(), "skyflash.qml") + localQML = os.path.join(appPath, "skyflash.qml") if os.path.exists(localQML): # local qml file engine.load(localQML)