From 1d6c7db6de515a452a33fd4c3b26d2d2c13a1eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Szyma=C5=84ski?= Date: Mon, 22 May 2017 18:07:40 +0200 Subject: [PATCH 1/2] Update building and installation --- CasterSoundboard/CasterSoundboard.pro | 33 +++++++++--------- README.md | 17 ++++----- .../linux}/CasterSoundboard.appdata.xml | 0 {xdg => dist/linux}/CasterSoundboard.desktop | 0 {xdg => dist/linux}/CasterSoundboard.png | Bin {snap => dist/snap}/snapcraft.yaml | 0 6 files changed, 25 insertions(+), 25 deletions(-) rename {xdg => dist/linux}/CasterSoundboard.appdata.xml (100%) rename {xdg => dist/linux}/CasterSoundboard.desktop (100%) rename {xdg => dist/linux}/CasterSoundboard.png (100%) rename {snap => dist/snap}/snapcraft.yaml (100%) diff --git a/CasterSoundboard/CasterSoundboard.pro b/CasterSoundboard/CasterSoundboard.pro index 6bb415b..0155206 100644 --- a/CasterSoundboard/CasterSoundboard.pro +++ b/CasterSoundboard/CasterSoundboard.pro @@ -4,15 +4,19 @@ # #------------------------------------------------- +isEmpty(PREFIX) { + PREFIX = /usr/local +} +BINDIR = $$PREFIX/bin +DATADIR = $$PREFIX/share -QT += core gui multimedia network +QT += core gui multimedia network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = CasterSoundboard TEMPLATE = app - SOURCES += main.cpp\ CasterPlayer.cpp \ CasterBoard.cpp \ @@ -124,25 +128,20 @@ HEADERS += \ libs/tools/NtpTimestamp.h \ CasterOSCServerConfigPicker.h +RESOURCES += res.qrc -FORMS += +linux { + appdata.files = ../dist/linux/CasterSoundboard.appdata.xml + appdata.path = $$DATADIR/appdata/ -RESOURCES += \ - res.qrc + desktop.files = ../dist/linux/CasterSoundboard.desktop + desktop.path = $$DATADIR/applications/ -unix { - desktop.files = ../xdg/CasterSoundboard.desktop - desktop.path = $${PREFIX}/share/applications/ - INSTALLS += desktop + pixmap.files = ../dist/linux/CasterSoundboard.png + pixmap.path = $$DATADIR/pixmaps/ - appdata.files = ../xdg/CasterSoundboard.appdata.xml - appdata.path = $${PREFIX}/share/appdata/ - INSTALLS += appdata - - pixmap.files = ../xdg/CasterSoundboard.png - pixmap.path = $${PREFIX}/share/pixmaps/ - INSTALLS += pixmap + INSTALLS += appdata desktop pixmap } -target.path = $${PREFIX}/bin +target.path = $$BINDIR INSTALLS += target diff --git a/README.md b/README.md index e823ffd..388eed3 100644 --- a/README.md +++ b/README.md @@ -63,35 +63,36 @@ commands for various platforms are listed below: # brew install qt ``` -You should then have access to qmake, make, and the qt5 development -libraries. Next cd into the project folder inside the repo: +You should then have access to `qmake`, make, and the qt5 development +libraries. Next `cd` into the project folder inside the repo: ``` $ cd CasterSoundboard/CasterSoundboard ``` -Now run qmake, this will auto generate a makefile: +You can specify the target directory using the `PREFIX` `qmake` variable (default: `/usr/local`). +Now run `qmake`, this will auto generate a makefile: ``` -$ qmake +$ qmake PREFIX=/usr ``` or on Fedora: ``` -$ qmake-qt5 +$ qmake-qt5 PREFIX=/usr ``` -Then run make to build the project: +Then run `make` to build the project: ``` $ make ``` -And finally run make install to install the app: +And finally run `make install` to install the app: ``` -# make install INSTALL_ROOT=/usr +# make install ``` Now you're good to go! diff --git a/xdg/CasterSoundboard.appdata.xml b/dist/linux/CasterSoundboard.appdata.xml similarity index 100% rename from xdg/CasterSoundboard.appdata.xml rename to dist/linux/CasterSoundboard.appdata.xml diff --git a/xdg/CasterSoundboard.desktop b/dist/linux/CasterSoundboard.desktop similarity index 100% rename from xdg/CasterSoundboard.desktop rename to dist/linux/CasterSoundboard.desktop diff --git a/xdg/CasterSoundboard.png b/dist/linux/CasterSoundboard.png similarity index 100% rename from xdg/CasterSoundboard.png rename to dist/linux/CasterSoundboard.png diff --git a/snap/snapcraft.yaml b/dist/snap/snapcraft.yaml similarity index 100% rename from snap/snapcraft.yaml rename to dist/snap/snapcraft.yaml From 843bc1ea911a486168028db6a13301fd07235287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Szyma=C5=84ski?= Date: Mon, 22 May 2017 18:15:09 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 388eed3..6de951f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Building from Source for installation instructions. ## Packages ### Arch AUR -Thanks to [@j605](https://github.com/j605 "Jagannathan Tiruvallur Eachambadi") for creating a PKGBUILD for people on Arch who want to try this software: +Thanks to [@j605](https://github.com/j605 "Jagannathan Tiruvallur Eachambadi") for creating a `PKGBUILD` for people on Arch who want to try this software: + [CasterSoundboard-git](https://aur.archlinux.org/packages/castersoundboard-git) ### Fedora 25 and newer @@ -38,7 +38,7 @@ RPM package can be found in the [Copr](https://copr.fedorainfracloud.org/coprs/f ### Building From Source -First clone the repository using git, if you don't have git installed +First clone the repository using `git`, if you don't have `git` installed you can find installation instructions [here](https://git-scm.com) ``` @@ -63,7 +63,7 @@ commands for various platforms are listed below: # brew install qt ``` -You should then have access to `qmake`, make, and the qt5 development +You should then have access to `qmake`, `make`, and the qt5 development libraries. Next `cd` into the project folder inside the repo: ```