Merge pull request #991 from AttorneyOnline/ci-qt6

Change CI builds to Qt 6.5.3
This commit is contained in:
Leifa 2024-06-30 23:12:41 +02:00 committed by GitHub
commit 6488b181af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 72 additions and 84 deletions

View File

@ -8,7 +8,6 @@ on:
pull_request:
branches: [ "master" ]
jobs:
formatting-check:
name: formatting-check
@ -22,8 +21,6 @@ jobs:
check-path: 'src'
fallback-style: LLVM
build-windows:
needs: formatting-check
runs-on: windows-latest
@ -35,33 +32,16 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
version: 6.5.3
target: desktop
arch: win64_msvc2019_64
cache: true
cache-key-prefix: qt-windows-5.15.2
- name: Clone QtApng
uses: actions/checkout@master
with:
repository: Skycoder42/QtApng
path: "QtApng"
cache-key-prefix: install-qt-action
modules: 'qtimageformats qtwebsockets'
- name: Configure MSVC (Windows)
uses: ilammy/msvc-dev-cmd@v1
- name: Build and deploy QtApng
run: |
cd QtApng/src/3rdparty
chmod +x get_libs.sh
./get_libs.sh 1.3.1 1.6.40
cd ../..
qmake CONFIG+=install_ok QMAKE_CXXFLAGS+="-fno-sized-deallocation"
nmake
cd ..
mkdir ./bin/imageformats
cp ./QtApng/plugins/imageformats/qapng.dll ./bin/imageformats/qapng.dll
- name: Install Windows Discord RPC
shell: bash
run: |
@ -92,29 +72,40 @@ jobs:
cp ./bass/c/x64/bassopus.lib ./lib/
cp ./bass/x64/bassopus.dll ./bin/
- 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: Clone Apng plugin
uses: actions/checkout@master
with:
repository: jurplel/QtApng
path: ./qtapng
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=cl
-DCMAKE_C_COMPILER=cl
-DCMAKE_BUILD_TYPE=Release
-S ${{ github.workspace }}
- name: Build Apng plugin
run: |
cd ./qtapng
cmake .
cmake --build . --config Release
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release
run: |
cmake .
cmake --build . --config Release
- name: Deploy Windows
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
windeployqt --no-quick-import --no-translations --no-virtualkeyboard --no-compiler-runtime --no-webkit2 --no-opengl-sw ./Attorney_Online.exe
windeployqt --no-quick-import --no-translations --no-compiler-runtime --no-opengl-sw ./Attorney_Online.exe
- name: Clone Themes
uses: actions/checkout@master
with:
repository: AttorneyOnline/AO2-Themes
path: "bin/base/themes"
- name: Cleanup Themes Checkout
run: |
rm ./bin/base/themes/.gitignore
rm ./bin/base/themes/.gitattributes
Remove-Item -Path "./bin/base/themes/.git" -Recurse -Force
- name: Upload Artifact
uses: actions/upload-artifact@master
@ -130,26 +121,17 @@ jobs:
with:
submodules: recursive
- name: Install Qt (Ubuntu)
run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install qtbase5-dev libqt5websockets5-dev qttools5-dev qt5-image-formats-plugins
- name: Clone QtApng
uses: actions/checkout@master
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
repository: Skycoder42/QtApng
path: "QtApng"
- name: Build and deploy QtApng
run: |
cd QtApng/src/3rdparty
chmod +x get_libs.sh
./get_libs.sh 1.3.1 1.6.40
cd ../..
qmake CONFIG+=install_ok QMAKE_CXXFLAGS+="-fno-sized-deallocation"
make
aqtversion: '==3.1.*'
version: '6.5.3'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
cache: true
cache-key-prefix: install-qt-action
modules: 'qtimageformats qtwebsockets'
- name: Install Linux Discord RPC
run: |
@ -179,41 +161,47 @@ jobs:
cp ./bass/libs/x86_64/libbassopus.so ./lib/
cp ./bass/libs/x86_64/libbassopus.so ./bin/
- 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: Clone Apng plugin
uses: actions/checkout@master
with:
repository: jurplel/QtApng
path: ./qtapng
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_C_COMPILER=gcc
-DCMAKE_BUILD_TYPE=Release
-S ${{ github.workspace }}
- name: Build Apng plugin
run: |
cd ./qtapng
cmake . -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE="${{ github.workspace }}/bin/imageformats/"
cmake --build . --config Release
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release
run: |
cmake .
cmake --build . --config Release
- name: Deploy Linux
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
cd ${{ github.workspace }}/bin
mkdir ./imageformats
cp ../qtapng/plugins/imageformats/libqapng.so ./imageformats
cp ../scripts/launch.sh .
mkdir -p imageformats
cp ../QtApng/plugins/imageformats/libqapng.so ./imageformats/libqapng.so
chmod +x launch.sh
chmod +x Attorney_Online
tar -cf Attorney_Online.tar ./*
rm -rf imageformats
rm *.so
rm *.sh
rm Attorney_Online
- name: Clone Themes
uses: actions/checkout@master
with:
repository: AttorneyOnline/AO2-Themes
path: "bin/base/themes"
- name: Cleanup Themes Checkout
run: |
rm ./bin/base/themes/.gitignore
rm ./bin/base/themes/.gitattributes
rm -r ./bin/base/themes/.git
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: Attorney_Online-Linux
path: ${{github.workspace}}/bin/Attorney_Online.tar
path: ${{github.workspace}}/bin

View File

@ -9,15 +9,15 @@
Linux users will need to install the system dependencies related to Qt. These are the commands to run on a terminal for some distributions:
* Ubuntu 22.04 LTS:
```
$ sudo apt-get install qt5base-dev libqt5websockets5 qt5-image-formats-plugins libqt5svg5
$ sudo apt-get install qt6base-dev libqt6websockets6 qt6-image-formats-plugins libqt6svg6
```
* Arch:
```
$ sudo pacman -Syu qt5-base qt5-websockets qt5-imageformats qt5-svg
$ sudo pacman -Syu qt6-base qt6-websockets qt6-imageformats qt6-svg
```
* Fedora:
```
$ sudo dnf install qt5-qtbase qt5-qtwebsockets qt5-qtimageformats qt5-qtsvg
$ sudo dnf install qt6-qtbase qt6-qtwebsockets qt6-qtimageformats qt6-qtsvg
```
## Credits
@ -40,7 +40,7 @@ Killing Fever Online additions copyright (c) 2019 Crystalwarrior
### Qt
This project uses Qt 5, which is licensed under the [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.txt) with [certain licensing restrictions and exceptions](https://www.qt.io/qt-licensing-terms/). To comply with licensing requirements for static linking, object code is available if you would like to relink with an alternative version of Qt, and the source code for Qt may be found at https://github.com/qt/qtbase, http://code.qt.io/cgit/, or at https://qt.io.
This project uses Qt 6.5.3, which is licensed under the [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.txt) with [certain licensing restrictions and exceptions](https://www.qt.io/qt-licensing-terms/). To comply with licensing requirements for static linking, object code is available if you would like to relink with an alternative version of Qt, and the source code for Qt may be found at https://github.com/qt/qtbase, http://code.qt.io/cgit/, or at https://qt.io.
Copyright (c) 2016 The Qt Company Ltd.