Skip to content

Merge branch 'better-dark-theme' into qe3 #354

Merge branch 'better-dark-theme' into qe3

Merge branch 'better-dark-theme' into qe3 #354

Workflow file for this run

name: Installer
on:
push:
branches: [ "master", "qe3" ]
pull_request:
branches: [ "master", "qe3" ]
jobs:
windows:
name: Qt 6.8 / Windows
runs-on: windows-2025
steps:
- name: Clone the repository
uses: actions/checkout@v4
with:
submodules: true
# - name: Cache libraries
# id: cache-libs
# uses: actions/cache@v3
# with:
# path: |
# C:/openssl/bin/libssl-1_1-x64.dll
# C:/openssl/bin/libcrypto-1_1-x64.dll
# C:/Program Files/PostgreSQL/14/bin/libiconv-2.dll
# C:/Program Files/PostgreSQL/14/bin/libintl-9.dll
# C:/Program Files/PostgreSQL/14/bin/liblz4.dll
# C:/Program Files/PostgreSQL/14/bin/zlib1.dll
# C:/Program Files/PostgreSQL/14/bin/libpq.dll
# key: ${{ runner.os }}-library-cache
- name: Setup MinGW cache
uses: actions/cache@v4
with:
key: x86_64-13.1.0-release-posix-seh-msvcrt-rt_v11-rev1.7z
path: ${{github.workspace}}/x86_64-13.1.0-release-posix-seh-msvcrt-rt_v11-rev1.7z
- name: Install MinGW
# WinMain apps fail to link with the default MinGW compiler on GH actions. I suspect it is because Qt (since
# 6.8) uses msvcrt, but GH Actions uses the ucrt version. Furthermore, GH Actions might have an older MinGW
# version which might make things even less compatible. I don't know the exact reasoning. This works, and that's
# all that matters for me.
run: |
MINGW_FILE_NAME='x86_64-13.1.0-release-posix-seh-msvcrt-rt_v11-rev1.7z'
if ! [[ -f '${{github.workspace}}'/"$MINGW_FILE_NAME" ]]; then
curl -L "https://github.com/niXman/mingw-builds-binaries/releases/download/13.1.0-rt_v11-rev1/$MINGW_FILE_NAME" -o '${{github.workspace}}'/"$MINGW_FILE_NAME"
fi
7z x '${{github.workspace}}'/"$MINGW_FILE_NAME"
echo 'CC=${{github.workspace}}/mingw64/bin/gcc.exe' >> "$GITHUB_ENV"
echo 'CXX=${{github.workspace}}/mingw64/bin/g++.exe' >> "$GITHUB_ENV"
shell: bash
- name: Get libraries
# if: steps.cache-libs.outputs.cache-hit != 'true'
run: |
choco install openssl.light --params "/InstallDir:C:\openssl" --version=3.1.4 -y
choco install postgresql17 -y
choco install innosetup -y
shell: cmd
- name: Setup CMake
uses: ./.github/actions/cmake
with:
qt_version: 6.8.3
qt_arch: win64_mingw
use_qt6: ON
modules: qtserialport qtmultimedia
additional_cmake_args: -DCMAKE_INSTALL_PREFIX='${{ github.workspace }}/install'
- name: Build
run: cmake --build '${{github.workspace}}/build' --parallel "$(nproc)"
shell: bash
- name: Install
run: cmake --install '${{ github.workspace }}/build'
shell: bash
- name: Run windeployqt
run: windeployqt -serialport -multimedia --qmldir '${{ github.workspace }}/install/bin/qml' --qmldir '${{ github.workspace }}/install/bin/reports' '${{ github.workspace }}/install/bin/quickevent.exe'
- name: Copy MinGW runtime libraries
# windeployqt is unable to copy those, because it looks for them next to where g++.exe is. On the GitHub runner,
# they are in a different directory.
run: cp /mingw64/bin/{libstdc++-6.dll,libgcc_s_seh-1.dll,libwinpthread-1.dll} '${{ github.workspace }}/install/bin'
shell: bash
- name: Copy PostgreSQL runtime libraries
run: |
cd "C:/Program Files/PostgreSQL/17/bin"
cp libiconv-2.dll libintl-9.dll liblz4.dll zlib1.dll libpq.dll '${{ github.workspace }}/install/bin/'
cd "C:\openssl"
cp libssl-3-x64.dll libcrypto-3-x64.dll '${{ github.workspace }}/install/bin/'
shell: bash
- name: Get app version
run: echo "VERSION=$(grep APP_VERSION quickevent/app/quickevent/src/appversion.h | cut -d\" -f2)" >> "$GITHUB_ENV"
shell: bash
- name: Create installer
run: iscc "-DBUILD_DIR=${{ github.workspace }}/install" "-DVERSION=${{ env.VERSION }}" quickevent/quickevent.iss
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: quickevent-${{ env.VERSION }}-setup.exe
path: ${{ github.workspace }}/install/_inno/quickevent/quickevent-*-setup.exe