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:
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
cd build
qmake ../wfview/wfview.pro
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:
~~~
@ -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.

Wyświetl plik

@ -2224,12 +2224,12 @@ void wfmain::setAppTheme(bool isCustom)
#ifndef Q_OS_LINUX
QFile f(":"+prefs.stylesheetPath); // built-in resource
#else
QFile f("/usr/share/wfview/stylesheets/" + prefs.stylesheetPath);
QFile f(PREFIX "/share/wfview/" + prefs.stylesheetPath);
#endif
if (!f.exists())
{
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
{
@ -3925,9 +3925,6 @@ void wfmain::on_bandGenbtn_clicked()
void wfmain::on_aboutBtn_clicked()
{
abtBox->show();
}
void wfmain::on_fStoBtn_clicked()

Wyświetl plik

@ -38,6 +38,12 @@ equals(QT_ARCH, arm): DEFINES += USE_NEON
DEFINES += OUTSIDE_SPEEX
DEFINES += RANDOM_PREFIX=wf
isEmpty(PREFIX) {
PREFIX = /usr/local
}
DEFINES += PREFIX=\\\"$$PREFIX\\\"
# Choose audio system, uses QTMultimedia if both are commented out.
# DEFINES += RTAUDIO
# DEFINES += PORTAUDIO
@ -74,18 +80,25 @@ win32:DEFINES += UNAME=\\\"build\\\"
RESOURCES += qdarkstyle/style.qrc \
resources/resources.qrc
unix:target.path = $$PREFIX/bin
INSTALLS += target
# Why doesn't this seem to do anything?
DISTFILES += resources/wfview.png \
resources/install.sh
DISTFILES += resources/wfview.desktop
linux:QMAKE_POST_LINK += cp ../wfview/resources/wfview.png .;
linux:QMAKE_POST_LINK += cp ../wfview/resources/wfview.desktop .;
linux:QMAKE_POST_LINK += cp ../wfview/resources/install.sh .;
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:applications.files = resources/wfview.desktop
unix:applications.path = $$PREFIX/share/applications
INSTALLS += applications
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:
# CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT