Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
15195d4
test CDCI
EndrII Nov 26, 2025
dc659f3
Merge branch 'main' into CDCI
EndrII Nov 26, 2025
5d08d04
download all qt
EndrII Nov 26, 2025
9c1427a
disable all qt module for build and deploy
EndrII Nov 26, 2025
20b6ba9
update output dir
EndrII Nov 26, 2025
7dca47c
fix qt package
EndrII Nov 26, 2025
7499ca3
disable tests
EndrII Nov 26, 2025
74a3af2
disable docs
EndrII Nov 26, 2025
9f98df0
fix syntax cmake error
EndrII Nov 26, 2025
b9dc960
syntax
EndrII Nov 26, 2025
b6caf7b
fix build
EndrII Nov 27, 2025
7ea042c
try to fix deploy qifw
EndrII Nov 30, 2025
f8e9518
fix path
EndrII Nov 30, 2025
b503c18
fix typo
EndrII Nov 30, 2025
2a1f6a1
get qifw path wrow env
EndrII Nov 30, 2025
e42224b
more info
EndrII Nov 30, 2025
6f7d244
move to new ubuntu
EndrII Nov 30, 2025
c823588
force disable parallel deploy and release
EndrII Nov 30, 2025
35b1aa7
disable verbose log for deploy step
EndrII Nov 30, 2025
1d17590
added lxd to ubuntu builder
EndrII Nov 30, 2025
6fb3c7f
disable LSD on windows
EndrII Nov 30, 2025
53a355b
added snap secret
EndrII Nov 30, 2025
9c2db83
fix deploy and release snap
EndrII Nov 30, 2025
d217bd2
fix path of QIF
EndrII Nov 30, 2025
a99324a
try to fix snap base name
EndrII Nov 30, 2025
e33ffcd
fix snap path
EndrII Nov 30, 2025
cd555f2
update submodules
EndrII Dec 1, 2025
702b186
update window qt depends
EndrII Dec 1, 2025
0ac1644
remove specific compiller name from windows build
EndrII Dec 1, 2025
66238cd
added qt mingw
EndrII Dec 1, 2025
1e478a5
update sumbodules and copyright
EndrII Jan 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 41 additions & 16 deletions .github/workflows/cmake-multi-platform-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms

name: CMake Release Builder
on:
push:
tags:
Expand All @@ -13,7 +10,7 @@ jobs:
build:
runs-on: ${{ matrix.os }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
Expand All @@ -26,7 +23,7 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [windows-2025, ubuntu-22.04]
os: [windows-2025, ubuntu-24.04]
build_type: [Release]
c_compiler: [gcc]

Expand All @@ -39,10 +36,10 @@ jobs:
with:
version: '6.10.1'
target: 'desktop'
arch: 'win64_llvm_mingw'
arch: 'win64_mingw'
cache: true
tools: 'tools_llvm_mingw1706'
modules: 'qtquick3d qtquick3dphysics qtmultimedia qtquicktimeline qtshadertools'
tools: 'tools_mingw1310 tools_ifw'
# modules: 'qtquick3d qtquick3dphysics qtmultimedia qtquicktimeline qtshadertools'
aqtversion: ==3.2.*

- name: Install Qt
Expand All @@ -53,20 +50,35 @@ jobs:
target: 'desktop'
arch: 'linux_gcc_64'
cache: true
modules: 'qtquick3d qtquick3dphysics qtmultimedia qtquicktimeline qtshadertools'
tools: 'tools_ifw'

# modules: 'qtquick3d qtquick3dphysics qtmultimedia qtquicktimeline qtshadertools'
aqtversion: ==3.2.*

- name: Setup LXD
if: runner.os == 'Linux'
uses: canonical/setup-lxd@main
with:
channel: latest/stable

- name: Install Snapcraft
if: runner.os == 'Linux'
uses: samuelmeuli/action-snapcraft@v3

# Checkout main repository without submodules first
- uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
fetch-tags: true
fetch-depth: 0


- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"

- name: Download and Extract CQtDeployer Linux
if: runner.os == 'Linux'
uses: robinraju/release-downloader@v1
Expand Down Expand Up @@ -111,9 +123,8 @@ jobs:
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-G Ninja
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_C_COMPILER=clang
-DBUILD_SHARED_LIBS=ON
-DCQT_DEPLOYER_TESTS=OFF
-DCMAKE_PREFIX_PATH='${{ steps.sdl.outputs.prefix }};${{ env.QT_ROOT_DIR }}'
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
Expand All @@ -124,6 +135,7 @@ jobs:
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-G Ninja
-DBUILD_SHARED_LIBS=ON
-DCQT_DEPLOYER_TESTS=OFF
-DCMAKE_PREFIX_PATH='${{ steps.sdl.outputs.prefix }};${{ env.QT_ROOT_DIR }}'
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
Expand All @@ -134,11 +146,11 @@ jobs:

- name: deploy
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target deploy
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target deploy --parallel 1

- name: release
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target release
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target release --parallel 1

- name: Create Release and Upload Assets Installer
uses: svenstaro/upload-release-action@v2
Expand Down Expand Up @@ -175,3 +187,16 @@ jobs:
overwrite: true
body: CQtDeployer ${{ env.CQT_DEPLOYER_VERSION }}

- name: Create Release and Upload Assets Snap
if: runner.os == 'Linux'

uses: svenstaro/upload-release-action@v2
with:
tag: v${{ env.CQT_DEPLOYER_VERSION }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Distro/${{ env.SNAP_BASE_NAME }}_amd64.snap
prerelease: true
asset_name: ${{ env.BASE_FULL_NAME }}.snap
overwrite: true
body: CQtDeployer ${{ env.CQT_DEPLOYER_VERSION }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ui_*.h
Makefile*
*cqtdeployer_resource.rc
sharedQtWin64/*
*.qmlls.ini

# Qt unit tests
target_wrapper.*
Expand Down
17 changes: 14 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2020-2024 QuasarApp.
# Copyright (C) 2020-2026 QuasarApp.
# Distributed under the GPLv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
Expand Down Expand Up @@ -42,7 +42,17 @@ set(CQT_DEPLOYER_VERSION_SHORT_PREFIX "1.6")
set(CQT_DEPLOYER_VERSION "${CQT_DEPLOYER_VERSION_SHORT_PREFIX}.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
set(QIFW_VERSION "4.7") # rebuild for the 4.7.0

if(DEFINED ENV{GITHUB_ENV})
file(APPEND $ENV{GITHUB_ENV} "CQT_DEPLOYER_VERSION=${CQT_DEPLOYER_VERSION}\n")
file(APPEND $ENV{GITHUB_ENV} "CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}\n")
file(APPEND $ENV{GITHUB_ENV} "CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}\n")
file(APPEND $ENV{GITHUB_ENV} "INSTALLER_SUFIX=${INSTALLER_SUFIX}\n")

endif()
Comment on lines +45 to +51
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This block introduces a direct dependency on GitHub Actions by checking for ENV{GITHUB_ENV}. This couples your build script to a specific CI system. For better portability and separation of concerns, consider passing the necessary information from the CI environment to CMake via command-line arguments. For example, you could define a CMake variable like CI_EXPORT_FILE and set it in your GitHub Actions workflow: cmake -DCI_EXPORT_FILE=$GITHUB_ENV .... Then, your CMake script would check for if(CI_EXPORT_FILE). A similar pattern is used in src/CQtDeployer/CMakeLists.txt and should also be refactored.


option(CQT_DEPLOYER_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project" ${Qt${QT_VERSION_MAJOR}Test_FOUND})
option(CQT_DEPLOYER_DOCS "This option disables or enables documentation of the ${PROJECT_NAME} project" OFF)

option(CQT_DEPLOYER_TOOL "This option disables or enables example app of the ${PROJECT_NAME} project" ON)

if (ANDROID OR IOS OR NOT QT_VERSION_MAJOR OR QA_WASM32)
Expand Down Expand Up @@ -87,8 +97,9 @@ endif()

configure_file_in("" "${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf")

addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)

if (CQT_DEPLOYER_DOCS)
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
endif()

install(TARGETS CQtDeployer
BUNDLE DESTINATION .
Expand Down
61 changes: 50 additions & 11 deletions src/CQtDeployer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2021-2024 QuasarApp.
# Copyright (C) 2021-2026 QuasarApp.
# Distributed under the GPLv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
Expand Down Expand Up @@ -68,6 +68,21 @@ if (WIN32)

endif()

set(BASE_NAME "${CURRENT_PROJECT}_${CQT_DEPLOYER_VERSION}")
string(TOLOWER ${BASE_NAME} SNAP_BASE_NAME)

set(BASE_FULL_NAME "${BASE_NAME}_${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}")

set(INSTALLER_FULL_NAME "${BASE_FULL_NAME}${INSTALLER_SUFIX}")

if(DEFINED ENV{GITHUB_ENV})
file(APPEND $ENV{GITHUB_ENV} "INSTALLER_FULL_NAME=${INSTALLER_FULL_NAME}\n")
file(APPEND $ENV{GITHUB_ENV} "BASE_FULL_NAME=${BASE_FULL_NAME}\n")
file(APPEND $ENV{GITHUB_ENV} "SNAP_BASE_NAME=${SNAP_BASE_NAME}\n")


endif()

configure_file_in(${CURRENT_PROJECT} "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/CQtDeployer.json")
configure_file_in(${CURRENT_PROJECT} "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/CQtDeployerSingle.json")

Expand All @@ -87,19 +102,43 @@ configure_file_in(${CURRENT_PROJECT} "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/QIFWTem

addDeployFromCustomFile(${CURRENT_PROJECT} "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/CQtDeployer.json")

set(QIF_DESTINATION_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/QIFW/QIF")

ADD_CUSTOM_TARGET(
downloadQIFW
SOURCES ${${name}files}
COMMAND python "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/QIFW.py" ${QIFW_PLATFORM} ${QIFW_VERSION} "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/QIFW"
COMMENT python "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/QIFW.py" ${QIFW_PLATFORM} ${QIFW_VERSION} "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/QIFW"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
addDeployFromCustomFile(${CURRENT_PROJECT}Single "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/CQtDeployerSingle.json")

if (NOT DEFINED IQTA_TOOLS)
set(IQTA_TOOLS $ENV{IQTA_TOOLS})

if(NOT "${IQTA_TOOLS}" STREQUAL "")

if (WIN32)
set(QIF_SOURCE_BIN_PATH "${IQTA_TOOLS}/QtInstallerFramework/${QIFW_VERSION}/bin/binarycreator.exe")
set(QIF_OUT_BIN_PATH "${QIF_DESTINATION_PATH}/binarycreator.exe")

else()
set(QIF_SOURCE_BIN_PATH "${IQTA_TOOLS}/QtInstallerFramework/${QIFW_VERSION}/bin/binarycreator")
set(QIF_OUT_BIN_PATH "${QIF_DESTINATION_PATH}/binarycreator")

endif()


add_custom_target(
downloadQIFW
COMMAND ${CMAKE_COMMAND} -E make_directory "${QIF_DESTINATION_PATH}"
COMMAND ${CMAKE_COMMAND} -E copy
"${QIF_SOURCE_BIN_PATH}"
"${QIF_OUT_BIN_PATH}"

COMMENT "Copy QIFW binaries to build directory"
)

add_dependencies(deploy${CURRENT_PROJECT} downloadQIFW)
add_dependencies(deploy${CURRENT_PROJECT}Single downloadQIFW)

endif()
endif()

add_dependencies(deploy${CURRENT_PROJECT} downloadQIFW)

addDeployFromCustomFile(${CURRENT_PROJECT}Single "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/CQtDeployerSingle.json")
add_dependencies(deploy${CURRENT_PROJECT}Single downloadQIFW)

if (UNIX)
addDeploySnap(${CURRENT_PROJECT} "${CMAKE_SOURCE_DIR}/Distro/")
Expand Down
2 changes: 1 addition & 1 deletion src/CQtDeployer/Deploy/CQtDeployer.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"deploySystem": false,
"deb": false,
"qif": "./QIFWTemplate",
"qifOut": "CQtDeployer_@CQT_DEPLOYER_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@@INSTALLER_SUFIX@",
"qifOut": "@INSTALLER_FULL_NAME@",
"zip": false,
"ignoreEnv": [
"@CMAKE_SOURCE_DIR@/Distro"
Expand Down
5 changes: 2 additions & 3 deletions src/CQtDeployer/Deploy/CQtDeployerSingle.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
"deb": true,
"qif": false,
"zip": true,
"debOut": "CQtDeployer_@CQT_DEPLOYER_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@.deb",
"zipOut": "CQtDeployer_@CQT_DEPLOYER_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@.zip",

"debOut": "@BASE_FULL_NAME@.deb",
"zipOut": "@BASE_FULL_NAME@.zip",
"ignoreEnv": [
"@CMAKE_SOURCE_DIR@/Distro"
],
Expand Down
51 changes: 0 additions & 51 deletions src/CQtDeployer/Deploy/QIFW.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/CQtDeployer/Deploy/snapcraft.yaml.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2018-2024 QuasarApp.
# Copyright (C) 2018-2026 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.
Expand Down
6 changes: 3 additions & 3 deletions src/CQtDeployer/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 QuasarApp.
* Copyright (C) 2018-2026 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.
Expand All @@ -20,7 +20,7 @@ int main(int argc, char *argv[]) {


if (!QuasarAppUtils::Params::parseParams(argc, argv, DeployCore::avilableOptions())) {
QuasarAppUtils::Params::log("Wrong parameters. Please use the 'help' of 'h' option to show the help page.", QuasarAppUtils::Warning);
qWarning() << "Wrong parameters. Please use the 'help' of 'h' option to show the help page.";
exit(4);
}

Expand All @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) {
int code = deploy.run();

if (code) {
QuasarAppUtils::Params::log(Deploy::codeString(code), QuasarAppUtils::Error);
qCritical() << Deploy::codeString(code);
}

return code;
Expand Down
2 changes: 1 addition & 1 deletion src/Deploy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2020-2024 QuasarApp.
# Copyright (C) 2020-2026 QuasarApp.
# Distributed under the GPLv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
Expand Down
9 changes: 5 additions & 4 deletions src/Deploy/src/Distributions/deb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ bool Deb::deployTemplate(PackageControl &pkg) {
QHash<QString, QString> packagesTemplates;

if (!customTemplate.isEmpty()) {
QuasarAppUtils::Params::log("Using custom template for debian package: " + customTemplate,
QuasarAppUtils::Info);

auto availablePacakages = QDir(customTemplate).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
qInfo() << "Using custom template for debian package: " + customTemplate;

const auto availablePacakages = QDir(customTemplate).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);

for (const auto& pkg: availablePacakages) {
packagesTemplates.insert(pkg.fileName(), pkg.absoluteFilePath());
Expand Down Expand Up @@ -58,7 +58,8 @@ bool Deb::deployTemplate(PackageControl &pkg) {
}

if (!QFile::setPermissions(local + "/DEBIAN", static_cast<QFile::Permission>(0x7775))) {
QuasarAppUtils::Params::log("Failed to set permissions", QuasarAppUtils::Warning);

qWarning() << "Failed to set permissions";
}

inouts.push_back({local, cfg->getTargetDir() + "/" + info.debOut});
Expand Down
Loading