From d6266a80ce8d12240d802d07546d22d36f1510af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Tue, 14 Jul 2026 20:48:53 +0200 Subject: [PATCH 1/5] Build on Windows. --- .github/workflows/build-natives.yml | 37 ++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-natives.yml b/.github/workflows/build-natives.yml index 3e950a6..45105cb 100644 --- a/.github/workflows/build-natives.yml +++ b/.github/workflows/build-natives.yml @@ -14,19 +14,40 @@ permissions: jobs: windows: name: Windows (x86 + x64) - runs-on: ubuntu-22.04 + runs-on: windows-2022 steps: - name: Setup Dependencies + shell: pwsh + run: | + New-Item -ItemType Directory -Force artifacts/x86 | Out-Null + New-Item -ItemType Directory -Force artifacts/x64 | Out-Null + + - name: Download sources + shell: pwsh + run: | + $version = ${env:OPENALSOFT_VERSION} + $archive = "openal-soft-$version.tar.bz2" + $url = "https://openal-soft.org/openal-releases/$archive" + + Invoke-WebRequest -Uri $url -OutFile $archive + + $sevenZip = "${env:ProgramFiles}\7-Zip\7z.exe" + & $sevenZip x $archive -y + & $sevenZip x "openal-soft-$version.tar" -y + + - name: Build x86 + shell: pwsh run: | - mkdir -p artifacts/x86 - mkdir artifacts/x64 + cmake -S "openal-soft-${env:OPENALSOFT_VERSION}" -B build-win32 -A Win32 -DALSOFT_EXAMPLES=OFF -DALSOFT_UTILS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake --build build-win32 --config Release + Copy-Item "build-win32\Release\OpenAL32.dll" "artifacts\x86\soft_oal.dll" - # Download an official precompiled release version of OpenAL-Soft because compiling for Windows on Linux is hard. - - name: Download natives + - name: Build x64 + shell: pwsh run: | - curl -s -L -O https://openal-soft.org/openal-binaries/openal-soft-${OPENALSOFT_VERSION}-bin.zip - unzip -j -d artifacts/x86 openal-soft-${OPENALSOFT_VERSION}-bin.zip openal-soft-${OPENALSOFT_VERSION}-bin/bin/Win32/soft_oal.dll - unzip -j -d artifacts/x64 openal-soft-${OPENALSOFT_VERSION}-bin.zip openal-soft-${OPENALSOFT_VERSION}-bin/bin/Win64/soft_oal.dll + cmake -S "openal-soft-${env:OPENALSOFT_VERSION}" -B build-x64 -A x64 -DALSOFT_EXAMPLES=OFF -DALSOFT_UTILS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release + cmake --build build-x64 --config Release + Copy-Item "build-x64\Release\OpenAL32.dll" "artifacts\x64\soft_oal.dll" - name: Upload Artifacts uses: actions/upload-artifact@v4 From 3f35511a79d0bee0843722f3e7406a152a10b2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Tue, 14 Jul 2026 20:57:39 +0200 Subject: [PATCH 2/5] Build for ARM on Windows. --- .github/workflows/build-natives.yml | 40 +++++++++++++++++++++++++++++ .github/workflows/build-nuget.yml | 6 +++++ OpenRA-OpenAL-CS.nuspec | 1 + OpenRA-OpenAL-CS.targets | 7 ++++- 4 files changed, 53 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-natives.yml b/.github/workflows/build-natives.yml index 45105cb..927bb44 100644 --- a/.github/workflows/build-natives.yml +++ b/.github/workflows/build-natives.yml @@ -55,6 +55,46 @@ jobs: name: Natives-Windows path: ./artifacts + windows-arm64: + name: Windows (arm64) + runs-on: windows-11-arm + steps: + - name: Setup Dependencies + shell: pwsh + run: | + New-Item -ItemType Directory -Force artifacts/arm64 | Out-Null + + - name: Download sources + shell: pwsh + run: | + $ErrorActionPreference = "Stop" + $ProgressPreference = "SilentlyContinue" + + $version = ${env:OPENALSOFT_VERSION} + $archive = "openal-soft-$version.tar.bz2" + $url = "https://openal-soft.org/openal-releases/$archive" + + Invoke-WebRequest -Uri $url -OutFile $archive + + $sevenZip = "${env:ProgramFiles}\7-Zip\7z.exe" + & $sevenZip x $archive -y + & $sevenZip x "openal-soft-$version.tar" -y + + - name: Build arm64 + shell: pwsh + run: | + cmake -S "openal-soft-$env:OPENALSOFT_VERSION" -B build-arm64 -G "Visual Studio 17 2022" -A ARM64 ` + -DALSOFT_EXAMPLES=OFF -DALSOFT_UTILS=OFF -DBUILD_SHARED_LIBS=ON ` + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" + cmake --build build-arm64 --config Release + Copy-Item "build-arm64\Release\OpenAL32.dll" "artifacts\arm64\soft_oal.dll" + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: Natives-Windows(arm64) + path: ./artifacts + macos: name: macOS (x64 + arm64) runs-on: macos-14 diff --git a/.github/workflows/build-nuget.yml b/.github/workflows/build-nuget.yml index 9d3cc35..58a23c7 100644 --- a/.github/workflows/build-nuget.yml +++ b/.github/workflows/build-nuget.yml @@ -57,6 +57,12 @@ jobs: name: Natives-Windows path: ./native/win + - name: Download artifacts - native - Windows (arm64) + uses: actions/download-artifact@v4 + with: + name: Natives-Windows(arm64) + path: ./native/win + - name: Download artifacts - native - MacOS uses: actions/download-artifact@v4 with: diff --git a/OpenRA-OpenAL-CS.nuspec b/OpenRA-OpenAL-CS.nuspec index 30d2194..6b9fec5 100644 --- a/OpenRA-OpenAL-CS.nuspec +++ b/OpenRA-OpenAL-CS.nuspec @@ -28,6 +28,7 @@ + diff --git a/OpenRA-OpenAL-CS.targets b/OpenRA-OpenAL-CS.targets index 5fc2bd7..38d678f 100644 --- a/OpenRA-OpenAL-CS.targets +++ b/OpenRA-OpenAL-CS.targets @@ -11,6 +11,11 @@ soft_oal.dll false + + PreserveNewest + soft_oal.dll + false + PreserveNewest soft_oal.so @@ -31,7 +36,7 @@ soft_oal.dylib false - + PreserveNewest OpenAL-CS.dll.config false From 27fd6ffe0ff0e77f631b1fc5b535199f84deb7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 15 Jul 2026 21:17:29 +0200 Subject: [PATCH 3/5] Drop Windows x86. --- .github/workflows/build-natives.yml | 10 +--------- OpenRA-OpenAL-CS.nuspec | 1 - OpenRA-OpenAL-CS.targets | 7 +------ 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-natives.yml b/.github/workflows/build-natives.yml index 927bb44..45821f8 100644 --- a/.github/workflows/build-natives.yml +++ b/.github/workflows/build-natives.yml @@ -13,13 +13,12 @@ permissions: jobs: windows: - name: Windows (x86 + x64) + name: Windows (x64) runs-on: windows-2022 steps: - name: Setup Dependencies shell: pwsh run: | - New-Item -ItemType Directory -Force artifacts/x86 | Out-Null New-Item -ItemType Directory -Force artifacts/x64 | Out-Null - name: Download sources @@ -35,13 +34,6 @@ jobs: & $sevenZip x $archive -y & $sevenZip x "openal-soft-$version.tar" -y - - name: Build x86 - shell: pwsh - run: | - cmake -S "openal-soft-${env:OPENALSOFT_VERSION}" -B build-win32 -A Win32 -DALSOFT_EXAMPLES=OFF -DALSOFT_UTILS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release - cmake --build build-win32 --config Release - Copy-Item "build-win32\Release\OpenAL32.dll" "artifacts\x86\soft_oal.dll" - - name: Build x64 shell: pwsh run: | diff --git a/OpenRA-OpenAL-CS.nuspec b/OpenRA-OpenAL-CS.nuspec index 6b9fec5..db2628c 100644 --- a/OpenRA-OpenAL-CS.nuspec +++ b/OpenRA-OpenAL-CS.nuspec @@ -26,7 +26,6 @@ - diff --git a/OpenRA-OpenAL-CS.targets b/OpenRA-OpenAL-CS.targets index 38d678f..8d9c512 100644 --- a/OpenRA-OpenAL-CS.targets +++ b/OpenRA-OpenAL-CS.targets @@ -1,11 +1,6 @@ - - PreserveNewest - soft_oal.dll - false - PreserveNewest soft_oal.dll @@ -36,7 +31,7 @@ soft_oal.dylib false - + PreserveNewest OpenAL-CS.dll.config false From 78bc15ea15627b71cb437f703fcb766b78fe4044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 16 Jul 2026 19:42:52 +0200 Subject: [PATCH 4/5] Drop Mono support. --- OpenRA-OpenAL-CS.targets | 5 ----- 1 file changed, 5 deletions(-) diff --git a/OpenRA-OpenAL-CS.targets b/OpenRA-OpenAL-CS.targets index 8d9c512..33ae4bc 100644 --- a/OpenRA-OpenAL-CS.targets +++ b/OpenRA-OpenAL-CS.targets @@ -31,10 +31,5 @@ soft_oal.dylib false - - PreserveNewest - OpenAL-CS.dll.config - false - From 3af41f5b1fd47fa4be64ca98dc73f21442eba7d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 17 Jul 2026 00:18:35 +0200 Subject: [PATCH 5/5] Update before installation. --- .github/workflows/build-natives.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-natives.yml b/.github/workflows/build-natives.yml index 45821f8..41c5a4f 100644 --- a/.github/workflows/build-natives.yml +++ b/.github/workflows/build-natives.yml @@ -148,7 +148,9 @@ jobs: - name: Setup Dependencies run: | mkdir -p artifacts/arm64 + sudo apt-get update sudo apt-get install -y build-essential curl cmake libasound2-dev portaudio19-dev libpulse-dev libpipewire-0.3-dev + - name: Compile Natives run: | curl -s -L -O https://openal-soft.org/openal-releases/openal-soft-${OPENALSOFT_VERSION}.tar.bz2