Skip to content

Commit

Permalink
ci: add qt6 packages for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Jun 9, 2022
1 parent e3e9b24 commit b55fde6
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 27 deletions.
10 changes: 5 additions & 5 deletions .github/actions/agent-package-win/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ runs:
uses: joncloud/makensis-action@v3.3
with:
script-file: klogg.nsi
arguments: "-DVERSION=%KLOGG_VERSION% -DPLATFORM=%KLOGG_ARCH%"

arguments: "-DVERSION=%KLOGG_VERSION% -DPLATFORM=%KLOGG_ARCH% -DQT_MAJOR=${{ matrix.config.package_suffix }}"
- name: Win package
shell: cmd
run: |
md %KLOGG_BUILD_ROOT%\packages
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-portable.zip %KLOGG_BUILD_ROOT%\packages\ /y
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-pdb.zip %KLOGG_BUILD_ROOT%\packages\ /y
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-setup.exe %KLOGG_BUILD_ROOT%\packages\ /y
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-portable.zip %KLOGG_BUILD_ROOT%\packages\klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-${{ matrix.config.package_suffix }}-portable.zip /y
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-pdb.zip %KLOGG_BUILD_ROOT%\packages\klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-${{ matrix.config.package_suffix }}-pdb.zip /y
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-setup.exe %KLOGG_BUILD_ROOT%\packages\klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-${{ matrix.config.package_suffix }}-setup.exe /y
- name: Win codesign installer
if: ${{ github.event_name != 'pull_request' }}
Expand Down
1 change: 0 additions & 1 deletion .github/actions/docker-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ runs:
run: |
docker run -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/build_root && cpack -G ${{ matrix.config.cpack_gen }} "
docker run --env KLOGG_VERSION=$KLOGG_VERSION -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/build_root && mv ./packages/klogg-$KLOGG_VERSION-Linux.${{ matrix.config.package_suffix }} ./packages/klogg-$KLOGG_VERSION-${{ matrix.config.artifacts_id }}.${{ matrix.config.package_suffix }}"
docker run --env KLOGG_VERSION=$KLOGG_VERSION -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/build_root && mv ./packages/klogg-$KLOGG_VERSION-Linux.${{ matrix.config.package_suffix }}.sha256 ./packages/klogg-$KLOGG_VERSION-${{ matrix.config.artifacts_id }}.${{ matrix.config.package_suffix }}.sha256"
- name: Check package
if: ${{ matrix.config.check_command }}
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,26 @@ jobs:
arch: x64
ssl_arch: -x64
cmake_opts:
artifacts_id: qt5
package_suffix: Qt5

- os: windows
os_version: 2019
qt_version: 6.2.4
arch: x64
ssl_arch: -x64
cmake_opts:
artifacts_id: qt6
package_suffix: Qt6

- os: windows
os_version: 2019
qt_version: 5.15.2
arch: x86
qt_arch: win32_msvc2019
cmake_opts:
artifacts_id: qt5
package_suffix: Qt5

runs-on: ${{ matrix.config.os }}-${{ matrix.config.os_version }}
steps:
Expand Down Expand Up @@ -240,6 +253,6 @@ jobs:
# Final upload of all packages
- uses: actions/upload-artifact@v2
with:
name: packages-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.config.qt_version }}
name: packages-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.config.artifacts_id }}
path: '${{ env.KLOGG_BUILD_ROOT }}/packages/*'
if-no-files-found: error
19 changes: 9 additions & 10 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,20 @@ jobs:
run: |
sentry-cli upload-dif ./packages-bionic-x64/klogg_bionic.sym
sentry-cli upload-dif ./packages-focal-x64/klogg_focal.sym
sentry-cli upload-dif ./packages-oracle-x64/klogg_oracle.sym
sentry-cli upload-dif ./packages-oracle-x64/klogg_oracle.sym
sentry-cli upload-dif ./packages-appimage-x64/klogg_appimage.sym
- name: Upload symbols mac
shell: sh
run: |
sentry-cli upload-dif ./packages-macos-x64/klogg.app/Contents/MacOS/klogg ./packages-macos-x64/klogg.dSym
- name: Upload symbols win x64
- name: Upload symbols win
shell: sh
run: |
sentry-cli upload-dif ./packages-windows-x64/klogg-$KLOGG_VERSION-x64-pdb.zip
- name: Upload symbols win x86
shell: sh
run: |
sentry-cli upload-dif ./packages-windows-x86/klogg-$KLOGG_VERSION-x86-pdb.zip
sentry-cli upload-dif ./packages-windows-x64-qt5/klogg-$KLOGG_VERSION-x64-Qt5-pdb.zip
sentry-cli upload-dif ./packages-windows-x86-qt5/klogg-$KLOGG_VERSION-x86-Qt5-pdb.zip
sentry-cli upload-dif ./packages-windows-x64-qt6/klogg-$KLOGG_VERSION-x64-Qt6-pdb.zip
- name: Release win
uses: "marvinpinto/action-automatic-releases@latest"
Expand All @@ -76,8 +74,9 @@ jobs:
automatic_release_tag: continuous-win
prerelease: true
files: |
./packages-windows-x64-5.15.2/*
./packages-windows-x86-5.15.2/*
./packages-windows-x64-qt5/*
./packages-windows-x86-qt5/*
./packages-windows-x64-qt6/*
- name: Release linux
uses: "marvinpinto/action-automatic-releases@latest"
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true)
set(CPACK_SOURCE_IGNORE_FILES "build_root;.git")

set(CPACK_OUTPUT_FILE_PREFIX "packages")
set(CPACK_PACKAGE_CHECKSUM SHA256)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_DESCRIPTION})
set(CPACK_PACKAGE_VENDOR ${COMPANY})
set(CPACK_PACKAGE_CONTACT "anton.filimonov@gmail.com")
Expand Down
33 changes: 24 additions & 9 deletions packaging/windows/klogg.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
!define PLATFORM 'unknown'
!endif

!ifndef QT_MAJOR
!define QT_MAJOR 'Qt5'
!endif

# Headers
!include "MUI2.nsh"
!include "FileAssociation.nsh"
Expand Down Expand Up @@ -42,7 +46,7 @@ Caption "klogg ${VERSION} Setup"
, a fast, advanced log explorer.$\r$\n$\r$\n\
klogg and the Qt libraries are released under the GPL, see \
the COPYING and NOTICE files.$\r$\n$\r$\n$_CLICK"
; MUI_FINISHPAGE_LINK_LOCATION "http://nsis.sf.net/"
MUI_FINISHPAGE_LINK_LOCATION "https://klogg.filimonov.dev/"

!insertmacro MUI_PAGE_WELCOME
;!insertmacro MUI_PAGE_LICENSE "COPYING"
Expand Down Expand Up @@ -106,14 +110,18 @@ Section "klogg" klogg
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd

Section "Qt5 Runtime libraries" qtlibs
Section "Qt Runtime libraries" qtlibs
SetOutPath $INSTDIR
File release\Qt5Core.dll
File release\Qt5Gui.dll
File release\Qt5Network.dll
File release\Qt5Widgets.dll
File release\Qt5Concurrent.dll
File release\Qt5Xml.dll
File release\${QT_MAJOR}Core.dll
File release\${QT_MAJOR}Gui.dll
File release\${QT_MAJOR}Network.dll
File release\${QT_MAJOR}Widgets.dll
File release\${QT_MAJOR}Concurrent.dll
File release\${QT_MAJOR}Xml.dll
!if ${QT_MAJOR} == "Qt6"
File release\${QT_MAJOR}Core5Compat.dll
!endif

SetOutPath $INSTDIR\platforms
File release\platforms\qwindows.dll
SetOutPath $INSTDIR\styles
Expand Down Expand Up @@ -151,7 +159,7 @@ SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${klogg} "The core files required to use klogg."
!insertmacro MUI_DESCRIPTION_TEXT ${qtlibs} "Needed by klogg, you have to install these unless \
you already have the Qt5 development kit installed."
you already have the Qt development kit installed."
!insertmacro MUI_DESCRIPTION_TEXT ${vcruntime} "Needed by klogg, you have to install these unless \
you already have the Microsoft Visual C++ 2017 Redistributable installed."
!insertmacro MUI_DESCRIPTION_TEXT ${shortcut} "Create a shortcut in the Start menu for klogg."
Expand Down Expand Up @@ -180,6 +188,13 @@ Section "Uninstall"
Delete "$INSTDIR\Qt5Network.dll"
Delete "$INSTDIR\Qt5Concurrent.dll"
Delete "$INSTDIR\Qt5Xml.dll"
Delete "$INSTDIR\Qt6Widgets.dll"
Delete "$INSTDIR\Qt6Core.dll"
Delete "$INSTDIR\Qt6Gui.dll"
Delete "$INSTDIR\Qt6Network.dll"
Delete "$INSTDIR\Qt6Concurrent.dll"
Delete "$INSTDIR\Qt6Xml.dll"
Delete "$INSTDIR\Qt6Core5Compat.dll"
Delete "$INSTDIR\platforms\qwindows.dll"
Delete "$INSTDIR\platforms\qminimal.dll"
Delete "$INSTDIR\styles\qwindowsvistastyle.dll"
Expand Down
11 changes: 11 additions & 0 deletions packaging/windows/prepare_release.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set "QTDIR=%Qt5_Dir%"
set "Qt5_DIR=%QTDIR:/=\%"
echo %Qt5_DIR%
echo %Qt6_DIR%

md %KLOGG_WORKSPACE%\release

Expand Down Expand Up @@ -55,6 +56,16 @@ xcopy %Qt5_DIR%\bin\Qt5Xml.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %Qt5_DIR%\plugins\platforms\qwindows.dll %KLOGG_WORKSPACE%\release\platforms\ /y
xcopy %Qt5_DIR%\plugins\styles\qwindowsvistastyle.dll %KLOGG_WORKSPACE%\release\styles /y

xcopy %Qt6_DIR%\bin\Qt6Core.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %Qt6_DIR%\bin\Qt6Gui.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %Qt6_DIR%\bin\Qt6Network.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %Qt6_DIR%\bin\Qt6Widgets.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %Qt6_DIR%\bin\Qt6Concurrent.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %Qt6_DIR%\bin\Qt6Xml.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %Qt6_DIR%\bin\Qt6Core5Compat.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %Qt6_DIR%\plugins\platforms\qwindows.dll %KLOGG_WORKSPACE%\release\platforms\ /y
xcopy %Qt6_DIR%\plugins\styles\qwindowsvistastyle.dll %KLOGG_WORKSPACE%\release\styles /y

xcopy %SSL_DIR%\libcrypto-1_1%SSL_ARCH%.dll %KLOGG_WORKSPACE%\release\ /y
xcopy %SSL_DIR%\libssl-1_1%SSL_ARCH%.dll %KLOGG_WORKSPACE%\release\ /y

Expand Down

0 comments on commit b55fde6

Please sign in to comment.