diff --git a/src/service/CMakeLists.txt b/src/service/CMakeLists.txt index dba6a8e..5a649e6 100644 --- a/src/service/CMakeLists.txt +++ b/src/service/CMakeLists.txt @@ -39,6 +39,16 @@ SET(TARGET_DIR "${CMAKE_SOURCE_DIR}/Distro") file(MAKE_DIRECTORY ${TARGET_DIR}) # Desctop deploying +# sets qifw variable +set(ApplicationsDir "@HomeDir@") +set(QIFW_PLATFORM linux) +set(INSTALLER_SUFIX ".run") +if (WIN32) + set(QIFW_PLATFORM windows) + set(INSTALLER_SUFIX ".exe") + set(ApplicationsDir "@ApplicationsDir@") + +endif() message(GIT_COMMIT_COUNT = ${GIT_COMMIT_COUNT}) configure_file_in(${CURRENT_PROJECT} "${CMAKE_CURRENT_SOURCE_DIR}/deploy/SecretService.json") diff --git a/src/service/deploy/SecretService.json.in b/src/service/deploy/SecretService.json.in index e3fb2fb..d35fcee 100644 --- a/src/service/deploy/SecretService.json.in +++ b/src/service/deploy/SecretService.json.in @@ -13,13 +13,20 @@ "recursiveDepth": "10", "deploySystem": false, "deb": true, + "zip": true, "qif": true, "ignoreEnv": [ "@CMAKE_SOURCE_DIR@/Distro" ], "extraLib": "crypto", "targetDir": "@CMAKE_SOURCE_DIR@/Distro", - "deployVersion": "@SECRETSERVICE_VERSION@" + "deployVersion": "@SECRETSERVICE_VERSION@", + "publisher": "QuasarApp group", + "releaseDate": "@TODAY@", + "name": "QASecretService", + "debOut": "QASecretService_@SECRETSERVICE_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@.deb", + "zipOut": "QASecretService_@SECRETSERVICE_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@.zip", + "qifOut": "QASecretService_@SECRETSERVICE_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@@INSTALLER_SUFIX@" } diff --git a/src/service/deploy/snap/cqt.sh b/src/service/deploy/snap/cqt.sh new file mode 100644 index 0000000..42903fd --- /dev/null +++ b/src/service/deploy/snap/cqt.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +function join_by { local IFS="$1"; shift; echo "$*"; } + +var=$(join_by , $@) +$SNAP/CQtDeployer.sh $var -bin $var + diff --git a/src/service/deploy/snapcraft.yaml.in b/src/service/deploy/snapcraft.yaml.in new file mode 100644 index 0000000..2f8af95 --- /dev/null +++ b/src/service/deploy/snapcraft.yaml.in @@ -0,0 +1,46 @@ +# +# Copyright (C) 2024-2024 QuasarApp. +# Distributed under the lgplv3 software license, see the accompanying +# Everyone is permitted to copy and distribute verbatim copies +# of this license document, but changing it is not allowed. +# + +name: qasecretservice # you probably want to 'snapcraft register ' +version: '@SECRETSERVICE_VERSION@' +summary: Secret service for open-source projects: securely store confidential values on build machines from source. # 79 char long summary +description: | + Secret service for open-source projects that require safely storing a confidential value on a build machine from the source. + +grade: stable # must be 'stable' to release into candidate/stable channels +confinement: strict # use 'strict' once you have the right plugs and slots +base: core22 +icon: snap/gui/icon.png +apps: + qasecretservice: + command: bin/bash $SNAP/QASecretService.sh + plugs: [home] + +parts: + qasecretservice: + # See 'snapcraft plugins' + + plugin: dump + source: Distro/QASecretService_@SECRETSERVICE_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@.zip + + stage-packages: + - bash + + after: [ cqt-meta ] + + override-stage: | + snapcraftctl stage + chmod 777 -R "$SNAPCRAFT_STAGE" + + cqt-meta: + plugin: dump + source: src/service/Deploy/snap/ + + override-stage: | + snapcraftctl stage + chmod 777 -R "$SNAPCRAFT_STAGE" +