Skip to content

Commit

Permalink
Refs #3, Adding an App Icon and some small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevPavelmc committed Feb 10, 2019
1 parent 3d5cafc commit ffce828
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
16 changes: 16 additions & 0 deletions deb/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Package: PKG
Version: VER
Maintainer: Pavel Milanes <[email protected]>
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.
5 changes: 5 additions & 0 deletions deb/skyflash
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# Script to call the GUI version for skyflash

/usr/bin/env python3 /opt/skyflash/skyflash.py
2 changes: 1 addition & 1 deletion makedeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
Binary file added skyflash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions skyflash.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *

Expand Down Expand Up @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit ffce828

Please sign in to comment.