From 33bcc485afbee73a3985a6909994c2aed0fd38dc Mon Sep 17 00:00:00 2001 From: EndrII Date: Wed, 22 Aug 2018 20:14:44 +0300 Subject: [PATCH] snap control beta --- CQtDeployer | 2 +- SoundBand.pro | 30 +++++++++++++++++++++------ installer/packages/SoundBand/snap.pro | 28 +++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 installer/packages/SoundBand/snap.pro diff --git a/CQtDeployer b/CQtDeployer index d456ce7..941478e 160000 --- a/CQtDeployer +++ b/CQtDeployer @@ -1 +1 @@ -Subproject commit d456ce7f86f2d4c0cc53442e4b00273815a89d6f +Subproject commit 941478e99bb8817f540d49a3426c7686253b8aac diff --git a/SoundBand.pro b/SoundBand.pro index 220205c..49fca81 100644 --- a/SoundBand.pro +++ b/SoundBand.pro @@ -4,6 +4,8 @@ CONFIG += ordered include($$PWD/installer/deploy/deployFiles.pri) message( DEPLOY_FILES_MASTER = $$DEPLOY_FILES) +ENABLE_SNAP = 1 #only linux +ENABLE_INSTALLER = 0 #only desctop SUBDIRS += Sync \ QuasarAppLib/QuasarApp.pro \ @@ -13,14 +15,30 @@ SUBDIRS += Sync \ SoundBand.depends = Sync QuasarAppLib/QuasarApp.pro -!android:{ - message(desktopVersion: enabled) - CONFIG(release, debug|release): { +equals( ENABLE_INSTALLER, 1) { + !android:{ + message(desktopVersion: enabled) + CONFIG(release, debug|release): { - SUBDIRS += installer + SUBDIRS += installer - } else { - message( Selected Debug mode. The installer will not be created ) + } else { + message( Selected Debug mode. The installer will not be created ) + } + } +} + +equals( ENABLE_SNAP, 1) { + !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/packages/SoundBand/snap.pro b/installer/packages/SoundBand/snap.pro new file mode 100644 index 0000000..f011a68 --- /dev/null +++ b/installer/packages/SoundBand/snap.pro @@ -0,0 +1,28 @@ +TEMPLATE = aux + +SNAPCRAFT = snapcraft + +DESTDIR = $$PWD/packages/SoundBand + +INPUT = $$PWD/snap/snapcraft.yaml +snapApp.input = INPUT +snapApp.output = $$SNAPCRAFT + +unix { + message($$DESTDIR); + + snapApp.commands += $$SNAPCRAFT + snapApp.CONFIG += target_predeps no_link combine + + message( snapComands = "cd $$DESTDIR && $$snapApp.commands") +} + + +QMAKE_EXTRA_COMPILERS += snapApp + +DISTFILES += \ + +unix:extraclean.commands = $$SNAPCRAFT clean soundband + +distclean.depends = extraclean +QMAKE_EXTRA_TARGETS += distclean extraclean