Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1bb270f
Fix spurious "file does not exist in zip" error in configure.sh
OmniTroid Jun 23, 2026
2854068
minimum qt version 6.8
OmniTroid Jun 23, 2026
521dda2
shadow WrapOpenGL
OmniTroid Jun 23, 2026
decea55
Add FindWrapOpenGL.cmake override to actually shadow Qt's
OmniTroid Jun 23, 2026
8f2344d
Always re-fetch downloaded libs; skip Discord RPC on macOS arm64
OmniTroid Jun 23, 2026
735e253
Restore skip-if-already-present checks for downloaded libs
OmniTroid Jun 23, 2026
497c8d6
Add QT_PATH= CLI override to bypass Qt auto-detection
OmniTroid Jun 23, 2026
02165f4
Add Qt6::Multimedia to the build
OmniTroid Jun 23, 2026
e1e8712
Migrate AOBlipPlayer from BASS to QSoundEffect
OmniTroid Jun 23, 2026
5afbfc6
Migrate AOSfxPlayer from BASS to QSoundEffect
OmniTroid Jun 23, 2026
b71ecd3
Migrate AOMusicPlayer from BASS to QMediaPlayer + QAudioOutput
OmniTroid Jun 23, 2026
70e65b0
Populate audio output picker via QMediaDevices
OmniTroid Jun 23, 2026
70a79a4
Delete BASS plumbing; route players through QAudioDevice
OmniTroid Jun 23, 2026
6f7ac0b
Drop bass/bassopus from CMakeLists and configure.sh
OmniTroid Jun 23, 2026
9b70bc3
CI: have build.yml call configure.sh instead of duplicating deps work
OmniTroid Jun 23, 2026
0380367
Drop QT_ROOT= CLI override; derive it from QT_PATH
OmniTroid Jun 23, 2026
ca9fe6d
Apply clang-format to the migration touchpoints
OmniTroid Jun 23, 2026
1f074a6
configure.sh: don't trip set -e when bundled cmake is absent
OmniTroid Jun 23, 2026
0b65c38
CI Windows: install MinGW alongside Qt; tolerate missing Tools dir
OmniTroid Jun 23, 2026
1482a31
CI Windows: use MinGW 13.1 and stage runtime DLLs
OmniTroid Jun 23, 2026
2c14c8f
Add loop-sidecar parser unit tests + run ctest in CI
OmniTroid Jun 23, 2026
70d2af0
CI Linux: run tests under the offscreen QPA
OmniTroid Jun 23, 2026
d0ef7f4
configure.sh: drive the build via cmake --build --parallel
OmniTroid Jun 23, 2026
1afd16d
Revert "configure.sh: drive the build via cmake --build --parallel"
OmniTroid Jun 23, 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
170 changes: 38 additions & 132 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 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
# Build matrix: each platform job installs Qt, runs ./configure.sh (which
# handles deps, qtapng, themes, cmake+ninja, and windeployqt on Windows),
# then deploys + uploads.
name: CI Build

on:
Expand Down Expand Up @@ -28,84 +29,39 @@ jobs:
- uses: actions/checkout@master
with:
submodules: recursive

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.5.3
target: desktop
arch: win64_mingw
tools: 'tools_mingw1310'
cache: true
cache-key-prefix: install-qt-action
modules: 'qtimageformats qtwebsockets'
modules: 'qtimageformats qtwebsockets qtmultimedia'

- name: Install Windows Discord RPC
shell: bash
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-win.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/win64-dynamic/lib/discord-rpc.lib ./lib/
cp ./discord-rpc/win64-dynamic/bin/discord-rpc.dll ./bin/
cp ./discord-rpc/win64-dynamic/include/discord*.h ./lib/

- name: Install Windows BASS
- name: Configure and build
shell: bash
run: |
curl http://www.un4seen.com/files/bass24.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/c/bass.h ./lib
cp ./bass/c/x64/bass.lib ./lib/
cp ./bass/x64/bass.dll ./bin/

curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/c/bassopus.h ./lib
cp ./bass/c/x64/bassopus.lib ./lib/
cp ./bass/x64/bassopus.dll ./bin/

- name: Clone Apng plugin
uses: actions/checkout@master
with:
repository: jurplel/QtApng
path: ./qtapng

- name: Build Apng plugin
run: |
cd ./qtapng
cmake . -G "MinGW Makefiles"
cmake --build . --config Release
mkdir -p ${{ github.workspace }}/bin/imageformats/
cp plugins/imageformats/qapng.dll ${{ github.workspace }}/bin/imageformats/qapng.dll
run: ./configure.sh QT_PATH="$QT_ROOT_DIR" BUILD_TYPE=Release

- name: Build
run: |
cmake . -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE=Release
cmake --build . --config Release

- name: Deploy Windows
working-directory: ${{github.workspace}}/bin/
- name: Run tests
shell: bash
run: |
windeployqt --no-quick-import --no-translations --no-compiler-runtime --no-opengl-sw ./Attorney_Online.exe
run: ctest --output-on-failure

- name: Clone Themes
uses: actions/checkout@master
with:
repository: AttorneyOnline/AO2-Themes
path: "bin/base/themes"

- name: Cleanup Themes Checkout
- name: Stage MinGW runtime DLLs
shell: pwsh
run: |
rm ./bin/base/themes/.gitignore
rm ./bin/base/themes/.gitattributes
Remove-Item -Path "./bin/base/themes/.git" -Recurse -Force
Copy-Item "$Env:IQTA_TOOLS\mingw1310_64\bin\libgcc_s_seh-1.dll" bin\
Copy-Item "$Env:IQTA_TOOLS\mingw1310_64\bin\libstdc++-6.dll" bin\
Copy-Item "$Env:IQTA_TOOLS\mingw1310_64\bin\libwinpthread-1.dll" bin\

- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: Attorney_Online-Windows
path: ${{github.workspace}}/bin
path: ${{ github.workspace }}/bin

build-linux:
needs: formatting-check
runs-on: ubuntu-22.04
Expand All @@ -124,103 +80,55 @@ jobs:
arch: 'gcc_64'
cache: true
cache-key-prefix: install-qt-action
modules: 'qtimageformats qtwebsockets'
modules: 'qtimageformats qtwebsockets qtmultimedia'

- name: Install Linux Discord RPC
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ./lib/
cp ./discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ./bin/
cp ./discord-rpc/linux-dynamic/include/discord*.h ./src/
- name: Install system build tools
run: sudo apt-get update && sudo apt-get install -y ninja-build patchelf libxcb-cursor0

- name: Install Linux BASS
run: |
curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/c/bass.h ./lib
cp ./bass/libs/x86_64/libbass.so ./lib/
cp ./bass/libs/x86_64/libbass.so ./bin/

curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/c/bassopus.h ./lib
cp ./bass/libs/x86_64/libbassopus.so ./lib/
cp ./bass/libs/x86_64/libbassopus.so ./bin/

- name: Clone Apng plugin
uses: actions/checkout@master
with:
repository: jurplel/QtApng
path: ./qtapng
- name: Configure and build
run: ./configure.sh QT_PATH="$QT_ROOT_DIR" BUILD_TYPE=Release

- name: Build Apng plugin
run: |
cd ./qtapng
cmake . -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE="${{ github.workspace }}/bin/imageformats/"
cmake --build . --config Release
- name: Run tests
env:
QT_QPA_PLATFORM: offscreen
run: ctest --output-on-failure

# install plugin
cp plugins/imageformats/libqapng.so ${QT_ROOT_DIR}/plugins/imageformats

- name: Build
- name: Stage APNG plugin for AppImage
run: |
cmake .
cmake --build . --config Release

- name: Clone Themes
uses: actions/checkout@master
with:
repository: AttorneyOnline/AO2-Themes
path: "bin/base/themes"
mkdir -p "$QT_ROOT_DIR/plugins/imageformats"
cp qtapng/plugins/imageformats/libqapng.so "$QT_ROOT_DIR/plugins/imageformats/"

- name: Cleanup Themes Checkout
run: |
rm ./bin/base/themes/.gitignore
rm ./bin/base/themes/.gitattributes
rm -r ./bin/base/themes/.git

- name: Deploy Linux
- name: Package dynamic tarball
shell: bash
run: |
cd ${{ github.workspace }}/bin
mkdir ./imageformats
cp ../qtapng/plugins/imageformats/libqapng.so ./imageformats
cd "${{ github.workspace }}/bin"
cp ../data/logo-client.png ./icon.png
cp ../README_LINUX.md .
cp ../scripts/DYNAMIC_INSTALL.sh ./INSTALL.sh
chmod +x INSTALL.sh
chmod +x Attorney_Online

chmod +x INSTALL.sh Attorney_Online
patchelf --add-rpath . Attorney_Online

cd ..
tar --transform='flags=r;s|bin|Attorney Online|' -cvf Attorney_Online-Dynamic.tar bin

- name: Create AppImage
- name: Build AppImage
shell: bash
run: |
# necessary, apparently
sudo apt install libxcb-cursor0
# from https://github.com/probonopd/go-appimage/blob/master/src/appimagetool/README.md
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
mv appimagetool-*-x86_64.AppImage appimagetool
chmod +x appimagetool

mkdir -p AppDir/usr/bin
mkdir -p AppDir/usr/lib/plugins/imageformats
mkdir -p AppDir/usr/share/applications

mkdir -p AppDir/usr/bin AppDir/usr/lib/plugins/imageformats AppDir/usr/share/applications
cp bin/Attorney_Online AppDir/usr/bin
cp bin/lib*.so AppDir/usr/lib
cp bin/lib*.so AppDir/usr/lib 2>/dev/null || true
cp scripts/Attorney_Online.desktop AppDir/usr/share/applications
cp data/logo-client.png AppDir/Attorney_Online.png

GIT_SHORT_SHA="${GITHUB_SHA::8}"
QTDIR=${QT_ROOT_DIR} ./appimagetool deploy AppDir/usr/share/applications/Attorney_Online.desktop
QTDIR="$QT_ROOT_DIR" ./appimagetool deploy AppDir/usr/share/applications/Attorney_Online.desktop
ARCH=x86_64 VERSION=${GIT_SHORT_SHA} ./appimagetool AppDir

- name: Deploy AppImage
- name: Package AppImage tarball
shell: bash
run: |
mkdir bin-appimage
Expand All @@ -229,9 +137,7 @@ jobs:
cp README_LINUX.md bin-appimage
cp scripts/APPIMAGE_INSTALL.sh bin-appimage/INSTALL.sh
cp Attorney_Online-*-x86_64.AppImage bin-appimage
chmod +x bin-appimage/INSTALL.sh
chmod +x bin-appimage/Attorney_Online-*-x86_64.AppImage

chmod +x bin-appimage/INSTALL.sh bin-appimage/Attorney_Online-*-x86_64.AppImage
tar --transform='flags=r;s|bin-appimage|Attorney Online|' -cvf Attorney_Online-AppImage.tar bin-appimage

- name: Upload Dynamic Artifact
Expand Down
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ option(AO_BUILD_TESTS "Build test programs" ON)
option(AO_ENABLE_DISCORD_RPC "Enable Discord Rich Presence" ON)

find_package(QT NAMES Qt6)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets Concurrent WebSockets UiTools)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets Concurrent WebSockets UiTools Multimedia)

qt_add_executable(Attorney_Online
src/aoapplication.cpp
Expand Down Expand Up @@ -77,6 +77,8 @@ qt_add_executable(Attorney_Online
src/hardware_functions.h
src/lobby.cpp
src/lobby.h
src/loopsidecar.cpp
src/loopsidecar.h
src/main.cpp
src/network/websocketconnection.cpp
src/network/websocketconnection.h
Expand Down Expand Up @@ -125,8 +127,7 @@ target_link_libraries(Attorney_Online PRIVATE
Qt${QT_VERSION_MAJOR}::Concurrent
Qt${QT_VERSION_MAJOR}::WebSockets
Qt${QT_VERSION_MAJOR}::UiTools
bass
bassopus
Qt${QT_VERSION_MAJOR}::Multimedia
)

if(AO_ENABLE_DISCORD_RPC)
Expand All @@ -135,6 +136,7 @@ if(AO_ENABLE_DISCORD_RPC)
endif()

if(AO_BUILD_TESTS)
enable_testing()
add_subdirectory(test)
endif()

Expand Down
43 changes: 43 additions & 0 deletions cmake/FindWrapOpenGL.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Override for Qt's FindWrapOpenGL.cmake on macOS.
#
# Qt 6.5–6.8's bundled FindWrapOpenGL.cmake unconditionally adds
# `-framework AGL` to QtGui's public link interface. AGL was removed from
# the macOS SDK around Xcode 16 / macOS 15, so the link fails with
# "framework 'AGL' not found". Fixed upstream in Qt 6.9.
#
# This file is a copy of Qt's module with the single AGL target_link_libraries
# line removed. It is picked up via CMAKE_MODULE_PATH before Qt's copy.
#
# Original: Copyright (C) 2022 The Qt Company Ltd. SPDX BSD-3-Clause.

if(TARGET WrapOpenGL::WrapOpenGL)
set(WrapOpenGL_FOUND ON)
return()
endif()

set(WrapOpenGL_FOUND OFF)

find_package(OpenGL ${WrapOpenGL_FIND_VERSION})

if (OpenGL_FOUND)
set(WrapOpenGL_FOUND ON)

add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED)
if(APPLE)
get_target_property(__opengl_fw_lib_path OpenGL::GL IMPORTED_LOCATION)
if(__opengl_fw_lib_path AND NOT __opengl_fw_lib_path MATCHES "/([^/]+)\\.framework$")
get_filename_component(__opengl_fw_path "${__opengl_fw_lib_path}" DIRECTORY)
endif()

if(NOT __opengl_fw_path)
set(__opengl_fw_path "-framework OpenGL")
endif()

target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE ${__opengl_fw_path})
else()
target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::GL)
endif()
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(WrapOpenGL DEFAULT_MSG WrapOpenGL_FOUND)
Loading
Loading