diff --git a/.gitignore b/.gitignore index 98a56e0..352d75d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,7 @@ qrc_*.cpp ui_*.h Makefile* *build-* - +*build* *.snap installer/packages/SoundBand/parts installer/packages/SoundBand/prime diff --git a/CQtDeployer b/CQtDeployer index 7c3b80c..a80e043 160000 --- a/CQtDeployer +++ b/CQtDeployer @@ -1 +1 @@ -Subproject commit 7c3b80c6600fe883df0331682dcdb9931542ad82 +Subproject commit a80e043c4db198497033930e34703fed7d17ad7c diff --git a/SoundBand.pro b/SoundBand.pro index 21fc428..1ef55e5 100644 --- a/SoundBand.pro +++ b/SoundBand.pro @@ -2,8 +2,6 @@ TEMPLATE = subdirs CONFIG += ordered - -ENABLE_SNAP = 1 #only linux ENABLE_INSTALLER = 1 #only desctop SUBDIRS += QuasarAppLib/QuasarApp.pro \ @@ -31,16 +29,3 @@ equals( ENABLE_INSTALLER, 1) { } } -equals( ENABLE_SNAP, 1) { - unix:!android:{ - message(desktopVersion: enabled) - CONFIG(release, debug|release): { - - SUBDIRS += installer/packages/SoundBand/snap.pro - - } else { - message( Selected Debug mode. The snap will not be created ) - - } - } -} diff --git a/installer/deploy/deploy.sh b/installer/deploy/deploy.sh new file mode 100755 index 0000000..581e2ee --- /dev/null +++ b/installer/deploy/deploy.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +CURRENTDIR=$(dirname "$(readlink -f "$0")") + +deploy="$CURRENTDIR/../../CQtDeployer/build/release/cqtdeployer" +qmldir=$1 +qmake=$2 + +rm -rdf "$CURRENTDIR/../packages/SoundBand/data" +rm -rdf "$CURRENTDIR/../packages/SoundBand.Tests/data" + +mkdir "$CURRENTDIR/../packages/SoundBand/data" +mkdir "$CURRENTDIR/../packages/SoundBand.Tests/data" + +cp -R "$CURRENTDIR/../packages/SoundBand/extra/." "$CURRENTDIR/../packages/SoundBand/data" + + +cp -Rp "$CURRENTDIR/../../SoundBand/build/release/SoundBand" "$CURRENTDIR/../packages/SoundBand/data/" +cp -Rpf "$CURRENTDIR/../../QuasarAppLib/build/release/." "$CURRENTDIR/../packages/SoundBand/data" +cp -Rpf "$CURRENTDIR/../../Sync/build/release/." "$CURRENTDIR/../packages/SoundBand/data/" +cp -Rp "$CURRENTDIR/../../tests/build/release/test" "$CURRENTDIR/../packages/SoundBand.Tests/data/" + +chmod +x $deploy + +cp -Rpf "$CURRENTDIR/../../CQtDeployer/QuasarAppLib/build/release/." "$CURRENTDIR/../../CQtDeployer/build/release" + +$deploy -qmake $qmake clear -qmldir $qmldir -bin "$CURRENTDIR/../packages/SoundBand/data/SoundBand" + + diff --git a/installer/deploy/deployFiles.pri b/installer/deploy/deployFiles.pri deleted file mode 100644 index 7aae1f8..0000000 --- a/installer/deploy/deployFiles.pri +++ /dev/null @@ -1,8 +0,0 @@ -TARGET_PATH = $$PWD/../packages/SoundBand/data -equals( TEMPLATE, app) { - DESTDIR = $$PWD/../packages/SoundBand/data -} - -equals( TEMPLATE, lib) { - DESTDIR = $$PWD/../packages/SoundBand/data -} diff --git a/installer/deploy/targetList.pri b/installer/deploy/targetList.pri deleted file mode 100644 index e856cb4..0000000 --- a/installer/deploy/targetList.pri +++ /dev/null @@ -1,19 +0,0 @@ -# Here you need to specify a list of end targets for each platform. - -# windows -win32 { - TARGET_LIST += SoundBand.exe - TARGET_LIST += Sync.dll - TARGET_LIST += QUasarApp.dll -} - -# linux -# by default installer create shortcut for last binary file of the list -unix { - TARGET_LIST += SoundBand -} - -# os X -macx { - TARGET_LIST += SoundBand -} diff --git a/installer/installer.pro b/installer/installer.pro index fee9d96..1b27de9 100644 --- a/installer/installer.pro +++ b/installer/installer.pro @@ -1,4 +1,3 @@ -include($$PWD/deploy/targetList.pri) TEMPLATE = aux @@ -21,7 +20,13 @@ QML_DIR = $$PWD/../SoundBand WINDEPLOY = $$QT_DIR/windeployqt.exe WINDEPLOY_RUN = $$PWD/deploy/deploy.bat -LINUXDEPLOY = $$PWD/../CQtDeployer/build/cqtdeployer + + +LINUXDEPLOY = $$PWD/deploy/deploy.sh + +unix { + installerApp.commands += chmod +x $$LINUXDEPLOY && +} win32 { OUT_FILE = SoundBandInstaller.exe @@ -34,18 +39,16 @@ win32 { win32 { installerApp.commands += $$WINDEPLOY_RUN $$WINDEPLOY $$QML_DIR $$shell_path($$PWD) && } -#prepare end unix { - for(command, TARGET_LIST) { - installerApp.commands += $$LINUXDEPLOY -bin $$DESTDIR/$$command clear -qmlDir $$QML_DIR -qmake $$QMAKE_QMAKE && - } + installerApp.commands += $$LINUXDEPLOY $$QML_DIR $$QMAKE_QMAKE && + } +#prepare end installerApp.commands += $$QT_DIR/../../../Tools/QtInstallerFramework/3.0/bin/binarycreator --offline-only -c $$PWD/config/config.xml -p $$PWD/packages $$PWD/$$OUT_FILE --verbose -f installerApp.CONFIG += target_predeps no_link combine -message( installComands = "$$installerApp.commands") commands += "$$LUPDATE $$PWD/packages/SoundBand/meta/installscript.js -ts $$PWD/packages/SoundBand/meta/ru.ts" commands += "$$LRELEASE $$PWD/packages/SoundBand/meta/ru.ts" @@ -70,5 +73,6 @@ DISTFILES += \ packages/SoundBand.Tests/meta/installscript.js \ packages/SoundBand.Tests/meta/package.xml \ packages/SoundBand.Tests/meta/ru.ts \ - deploy/deploy.bat + deploy/deploy.bat \ + deploy/deploy.sh diff --git a/installer/packages/SoundBand/snap.pro b/installer/packages/SoundBand/snap.pro index 68fec10..69a6f4b 100644 --- a/installer/packages/SoundBand/snap.pro +++ b/installer/packages/SoundBand/snap.pro @@ -1,6 +1,3 @@ -include($$PWD/../../deploy/targetList.pri) -include($$PWD/../../../deploy.pri) - TEMPLATE = aux @@ -11,7 +8,7 @@ DESTDIR = $$PWD INPUT = $$PWD/snap/snapcraft.yaml snapApp.input = INPUT snapApp.output = $$SNAPCRAFT -LINUXDEPLOY = $$PWD/../../../CQtDeployer/build/CQtDeployer +LINUXDEPLOY = $$PWD/../../../CQtDeployer/build/release/CQtDeployer QT_DIR = $$dirname(QMAKE_QMAKE) QML_DIR = $$PWD/../../../SoundBand