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: pull_request:
branches: [ "master" ] branches: [ "master" ]
jobs: jobs:
formatting-check: formatting-check:
name: formatting-check name: formatting-check
@ -22,8 +21,6 @@ jobs:
check-path: 'src' check-path: 'src'
fallback-style: LLVM fallback-style: LLVM
build-windows: build-windows:
needs: formatting-check needs: formatting-check
runs-on: windows-latest runs-on: windows-latest
@ -35,33 +32,16 @@ jobs:
- name: Install Qt - name: Install Qt
uses: jurplel/install-qt-action@v3 uses: jurplel/install-qt-action@v3
with: with:
version: 5.15.2 version: 6.5.3
target: desktop target: desktop
arch: win64_msvc2019_64 arch: win64_msvc2019_64
cache: true cache: true
cache-key-prefix: qt-windows-5.15.2 cache-key-prefix: install-qt-action
modules: 'qtimageformats qtwebsockets'
- name: Clone QtApng
uses: actions/checkout@master
with:
repository: Skycoder42/QtApng
path: "QtApng"
- name: Configure MSVC (Windows) - name: Configure MSVC (Windows)
uses: ilammy/msvc-dev-cmd@v1 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 - name: Install Windows Discord RPC
shell: bash shell: bash
run: | run: |
@ -92,29 +72,40 @@ jobs:
cp ./bass/c/x64/bassopus.lib ./lib/ cp ./bass/c/x64/bassopus.lib ./lib/
cp ./bass/x64/bassopus.dll ./bin/ cp ./bass/x64/bassopus.dll ./bin/
- name: Set reusable strings - name: Clone Apng plugin
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. uses: actions/checkout@master
id: strings with:
shell: bash repository: jurplel/QtApng
run: | path: ./qtapng
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake - name: Build Apng plugin
run: > run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} cd ./qtapng
-DCMAKE_CXX_COMPILER=cl cmake .
-DCMAKE_C_COMPILER=cl cmake --build . --config Release
-DCMAKE_BUILD_TYPE=Release
-S ${{ github.workspace }}
- name: Build - name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release run: |
cmake .
cmake --build . --config Release
- name: Deploy Windows - name: Deploy Windows
working-directory: ${{github.workspace}}/bin/ working-directory: ${{github.workspace}}/bin/
shell: bash shell: bash
run: | 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 - name: Upload Artifact
uses: actions/upload-artifact@master uses: actions/upload-artifact@master
@ -130,26 +121,17 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Install Qt (Ubuntu) - name: Install Qt
run: | uses: jurplel/install-qt-action@v3
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
with: with:
repository: Skycoder42/QtApng aqtversion: '==3.1.*'
path: "QtApng" version: '6.5.3'
host: 'linux'
- name: Build and deploy QtApng target: 'desktop'
run: | arch: 'gcc_64'
cd QtApng/src/3rdparty cache: true
chmod +x get_libs.sh cache-key-prefix: install-qt-action
./get_libs.sh 1.3.1 1.6.40 modules: 'qtimageformats qtwebsockets'
cd ../..
qmake CONFIG+=install_ok QMAKE_CXXFLAGS+="-fno-sized-deallocation"
make
- name: Install Linux Discord RPC - name: Install Linux Discord RPC
run: | run: |
@ -179,41 +161,47 @@ jobs:
cp ./bass/libs/x86_64/libbassopus.so ./lib/ cp ./bass/libs/x86_64/libbassopus.so ./lib/
cp ./bass/libs/x86_64/libbassopus.so ./bin/ cp ./bass/libs/x86_64/libbassopus.so ./bin/
- name: Set reusable strings - name: Clone Apng plugin
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. uses: actions/checkout@master
id: strings with:
shell: bash repository: jurplel/QtApng
run: | path: ./qtapng
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake - name: Build Apng plugin
run: > run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} cd ./qtapng
-DCMAKE_CXX_COMPILER=g++ cmake . -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE="${{ github.workspace }}/bin/imageformats/"
-DCMAKE_C_COMPILER=gcc cmake --build . --config Release
-DCMAKE_BUILD_TYPE=Release
-S ${{ github.workspace }}
- name: Build - name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release run: |
cmake .
cmake --build . --config Release
- name: Deploy Linux - name: Deploy Linux
working-directory: ${{github.workspace}}/bin/
shell: bash shell: bash
run: | run: |
cd ${{ github.workspace }}/bin
mkdir ./imageformats
cp ../qtapng/plugins/imageformats/libqapng.so ./imageformats
cp ../scripts/launch.sh . cp ../scripts/launch.sh .
mkdir -p imageformats
cp ../QtApng/plugins/imageformats/libqapng.so ./imageformats/libqapng.so
chmod +x launch.sh chmod +x launch.sh
chmod +x Attorney_Online chmod +x Attorney_Online
tar -cf Attorney_Online.tar ./*
rm -rf imageformats - name: Clone Themes
rm *.so uses: actions/checkout@master
rm *.sh with:
rm Attorney_Online 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 - name: Upload Artifact
uses: actions/upload-artifact@master uses: actions/upload-artifact@master
with: with:
name: Attorney_Online-Linux 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: 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: * 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: * Arch:
``` ```
$ sudo pacman -Syu qt5-base qt5-websockets qt5-imageformats qt5-svg $ sudo pacman -Syu qt6-base qt6-websockets qt6-imageformats qt6-svg
``` ```
* Fedora: * Fedora:
``` ```
$ sudo dnf install qt5-qtbase qt5-qtwebsockets qt5-qtimageformats qt5-qtsvg $ sudo dnf install qt6-qtbase qt6-qtwebsockets qt6-qtimageformats qt6-qtsvg
``` ```
## Credits ## Credits
@ -40,7 +40,7 @@ Killing Fever Online additions copyright (c) 2019 Crystalwarrior
### Qt ### 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. Copyright (c) 2016 The Qt Company Ltd.