Added install script and various enhancements to wfview.pro to make

installing easier, including an icon and a desktop launcher.
merge-requests/1/merge
Elliott Liggett 2020-03-12 20:06:33 -07:00
rodzic 32c930788b
commit 797798d3b6
6 zmienionych plików z 67 dodań i 3 usunięć

Wyświetl plik

@ -0,0 +1,35 @@
#!/bin/bash
echo "This script copies the following items into your system:"
echo ""
echo "icon: wfview.png to /usr/share/pixmaps/"
echo "wfview application to /usr/local/bin/"
echo "wfview.desktop to /usr/share/applications/"
echo "qdarkstyle stylesheet to /usr/share/wfview/stylesheets"
echo ""
echo "This script MUST be run from the build directory. Do not run it from the source directory!"
echo ""
if ! [ $(id -u) = 0 ]; then
echo "This script must be run as root."
echo "example: sudo $0"
exit 1
fi
read -p "Do you wish to continue? (Y/N): " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
# Now the actual install:
cp wfview /usr/local/bin/wfview
cp wfview.desktop /usr/share/applications/
cp wfview.png /usr/share/pixmaps/
mkdir -p /usr/share/wfview/stylesheets
cp -r qdarkstyle /usr/share/wfview/stylesheets/
echo "Done!"

Wyświetl plik

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="resources">
<file>wfview.png</file>
</qresource>
</RCC>

Wyświetl plik

@ -0,0 +1,9 @@
[Desktop Entry]
Name=wfview
GenericName=Radio Controller
Comment=Control and visualize data from amateur radios
Exec=wfview
Icon=wfview
Terminal=false
Type=Application
Categories=Network;HamRadio;

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 116 KiB

Wyświetl plik

@ -14,6 +14,7 @@ wfmain::wfmain(QWidget *parent) :
QGuiApplication::setApplicationDisplayName("wfview");
QGuiApplication::setApplicationName(QString("wfview"));
setWindowIcon(QIcon( QString(":resources/wfview.png")));
ui->setupUi(this);
theParent = parent;
@ -1520,9 +1521,8 @@ void wfmain::on_aboutBtn_clicked()
QMessageBox msgBox(this);
msgBox.setWindowTitle("Abou wfviewt");
// msgBox.setIcon( QIcon(":/icons/wfview_small.png") );
msgBox.setTextFormat(Qt::RichText);
msgBox.setWindowIcon(QIcon(":resources/wfview.png"));
// TODO: change style of link color based on current CSS sheet.
QString copyright = QString("Copyright 2017-2020 Elliott H. Liggett. All rights reserved.");

Wyświetl plik

@ -36,7 +36,20 @@ DEFINES += HOST=\\\"`hostname`\\\" UNAME=\\\"`whoami`\\\"
DEFINES += GITSHORT="\\\"$(shell git -C $$PWD rev-parse --short HEAD)\\\""
RESOURCES += qdarkstyle/style.qrc
RESOURCES += qdarkstyle/style.qrc \
resources/resources.qrc
# Why doesn't this seem to do anything?
DISTFILES += resources/wfview.png
DISTFILES += resources/wfview.desktop
QMAKE_POST_LINK += cp ../wfview/resources/wfview.png .;
QMAKE_POST_LINK += cp ../wfview/resources/wfview.desktop .;
QMAKE_POST_LINK += cp ../wfview/resources/install.sh .;
QMAKE_POST_LINK += cp -r ../wfview/qdarkstyle .;
QMAKE_POST_LINK += chmod 755 install.sh;
QMAKE_POST_LINK += echo; echo; echo "Run install.sh as root from the build directory to install."; echo; echo;
# Do not do this, it will hang on start:
# CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT
@ -69,3 +82,5 @@ HEADERS += wfmain.h \
rigidentities.h
FORMS += wfmain.ui