Merge branch 'linstall'

lv2
Roeland Jansen 2021-08-03 20:13:50 +02:00
commit 3fc75320e4
3 zmienionych plików z 25 dodań i 14 usunięć

Wyświetl plik

@ -40,15 +40,16 @@ git clone https://gitlab.com/eliggett/wfview.git
~~~ ~~~
### 3. Create a build directory, compile, and install: ### 3. Create a build directory, compile, and install:
If you want to change the default install path from `/usr/local` to a different prefix (e.g. `/opt`), you must call `qmake ../wfview/wfview.pro PREFIX=/opt`
~~~ ~~~
mkdir build mkdir build
cd build cd build
qmake ../wfview/wfview.pro qmake ../wfview/wfview.pro
make -j make -j
sudo ./install.sh sudo make install
~~~ ~~~
### 4. You can now launch wfview, either from the terminal or from your desktop environment. If you encounter issues using the serial port, run the following command: ### 4. You can now launch wfview, either from the terminal or from your desktop environment. If you encounter issues using the serial port, run the following command:
~~~ ~~~
@ -65,7 +66,7 @@ sudo usermod -aG dialout $USER
~~~ ~~~
### opensuse/sles/tumbleweed install ### ### opensuse/sles/tumbleweed install
--- ---
install wfview on suse 15.x sles 15.x or tumbleweed; this was done on a clean install/updated OS. install wfview on suse 15.x sles 15.x or tumbleweed; this was done on a clean install/updated OS.

Wyświetl plik

@ -2224,12 +2224,12 @@ void wfmain::setAppTheme(bool isCustom)
#ifndef Q_OS_LINUX #ifndef Q_OS_LINUX
QFile f(":"+prefs.stylesheetPath); // built-in resource QFile f(":"+prefs.stylesheetPath); // built-in resource
#else #else
QFile f("/usr/share/wfview/stylesheets/" + prefs.stylesheetPath); QFile f(PREFIX "/share/wfview/" + prefs.stylesheetPath);
#endif #endif
if (!f.exists()) if (!f.exists())
{ {
printf("Unable to set stylesheet, file not found\n"); printf("Unable to set stylesheet, file not found\n");
printf("Tried to load: [%s]\n", QString( QString("/usr/share/wfview/stylesheets/") + prefs.stylesheetPath).toStdString().c_str() ); printf("Tried to load: [%s]\n", f.fileName().toStdString().c_str() );
} }
else else
{ {
@ -3925,9 +3925,6 @@ void wfmain::on_bandGenbtn_clicked()
void wfmain::on_aboutBtn_clicked() void wfmain::on_aboutBtn_clicked()
{ {
abtBox->show(); abtBox->show();
} }
void wfmain::on_fStoBtn_clicked() void wfmain::on_fStoBtn_clicked()

Wyświetl plik

@ -38,6 +38,12 @@ equals(QT_ARCH, arm): DEFINES += USE_NEON
DEFINES += OUTSIDE_SPEEX DEFINES += OUTSIDE_SPEEX
DEFINES += RANDOM_PREFIX=wf DEFINES += RANDOM_PREFIX=wf
isEmpty(PREFIX) {
PREFIX = /usr/local
}
DEFINES += PREFIX=\\\"$$PREFIX\\\"
# Choose audio system, uses QTMultimedia if both are commented out. # Choose audio system, uses QTMultimedia if both are commented out.
# DEFINES += RTAUDIO # DEFINES += RTAUDIO
# DEFINES += PORTAUDIO # DEFINES += PORTAUDIO
@ -74,18 +80,25 @@ win32:DEFINES += UNAME=\\\"build\\\"
RESOURCES += qdarkstyle/style.qrc \ RESOURCES += qdarkstyle/style.qrc \
resources/resources.qrc resources/resources.qrc
unix:target.path = $$PREFIX/bin
INSTALLS += target
# Why doesn't this seem to do anything? # Why doesn't this seem to do anything?
DISTFILES += resources/wfview.png \ DISTFILES += resources/wfview.png \
resources/install.sh resources/install.sh
DISTFILES += resources/wfview.desktop DISTFILES += resources/wfview.desktop
linux:QMAKE_POST_LINK += cp ../wfview/resources/wfview.png .; unix:applications.files = resources/wfview.desktop
linux:QMAKE_POST_LINK += cp ../wfview/resources/wfview.desktop .; unix:applications.path = $$PREFIX/share/applications
linux:QMAKE_POST_LINK += cp ../wfview/resources/install.sh .; INSTALLS += applications
linux:QMAKE_POST_LINK += cp -r ../wfview/qdarkstyle .;
linux:QMAKE_POST_LINK += chmod 755 install.sh;
linux:QMAKE_POST_LINK += echo; echo; echo "Run install.sh as root from the build directory to install."; echo; echo;
unix:pixmaps.files = resources/wfview.png
unix:pixmaps.path = $$PREFIX/share/pixmaps
INSTALLS += pixmaps
unix:stylesheets.files = qdarkstyle
unix:stylesheets.path = $$PREFIX/share/wfview
INSTALLS += stylesheets
# Do not do this, it will hang on start: # Do not do this, it will hang on start:
# CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT # CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT