Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
02d382c
Start of OpenAL bindings
Perksey Jul 6, 2025
8d44a2e
Use new al.xml
Perksey Sep 29, 2025
d88f2cd
Generate OpenAL bindings using al.xml
Perksey Sep 30, 2025
9fabb63
Add missing EFX bindings
Perksey Oct 5, 2025
cd41fe8
Add support for multiple global prefix hints
Perksey Oct 11, 2025
996ac5b
Enable data type trimming for the direct functions
Perksey Oct 11, 2025
3bf4842
Update OpenAL Soft
Perksey Oct 11, 2025
42b2e44
Add native binary build scripts
Perksey Oct 13, 2025
ab77310
Fix build errors (1)
Perksey Oct 13, 2025
b416356
Adjust build scripts
Perksey Oct 13, 2025
6820232
Disable fail fast
Perksey Oct 13, 2025
f8d85db
Add missing packages (this isn't the only thing to fix)
Perksey Oct 14, 2025
8f30049
Split dependency installation and building steps
Perksey Oct 14, 2025
4e25a3d
Helps if I commit the workflow changes
Perksey Oct 14, 2025
64dc196
Fix zig PATH issue
Perksey Oct 14, 2025
5923787
cry
Perksey Oct 14, 2025
98e2fc0
Revert
Perksey Oct 14, 2025
df3856d
Add sysroot parameters to Zig CMake toolchain
Perksey Oct 19, 2025
d386cdb
Use docker for the Linux builds
Perksey Oct 19, 2025
ad20577
Add missing deps, fix CMake lib/include paths, etc
Perksey Oct 20, 2025
9bc4c9b
Give up on Zig, use the GCC cross-compilers from apt
Perksey Oct 25, 2025
ae5ba65
Oops, add sudo back
Perksey Oct 25, 2025
784f7ff
Revert change that leads CI to build twice
Perksey Oct 25, 2025
747c966
Update native binaries for 784f7ffdff38960aa35eedc8e39d31023bfad599
dotnet-bot Oct 25, 2025
f15e53d
Update native binaries for 747c96644cc1550a9680c33bbfb709505ef7a315
dotnet-bot Oct 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 6 additions & 4 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ permissions:
contents: write
env:
# A space-separated list of paths to native libraries to build.
NATIVE_LIBRARY_PATHS: "sources/SDL/Native"
NATIVE_LIBRARY_PATHS: "sources/SDL/Native sources/OpenAL/Soft.Native"
# A space-separated list of submodule paths for each native library path. Use _ if a submodule is not used - this must
# match the number of spaces in NATIVE_LIBRARY_PATHS.
NATIVE_LIBRARY_SUBMODULE_PATHS: "eng/submodules/sdl"
NATIVE_LIBRARY_SUBMODULE_PATHS: "eng/submodules/sdl eng/submodules/openal-soft"
# A space-separated list of shorthands to the native library paths that will build the native library for each native
# library path. This must match the number of spaces in NATIVE_LIBRARY_PATHS. If a shorthand builds multiple native
# binary paths, these will be deduplicated.
NATIVE_LIBRARY_SHORTHANDS: "SDL"
NATIVE_LIBRARY_SHORTHANDS: "SDL OpenAL-Soft"
jobs:
prerequisites:
name: PR Check
Expand Down Expand Up @@ -61,13 +61,15 @@ jobs:
build:
needs: [prerequisites]
strategy:
fail-fast: false
matrix:
flat: ${{ fromJSON(needs.prerequisites.outputs.matrix_strategy) }}
runs-on: ${{ (startsWith(matrix.flat.runtime, 'osx') || startsWith(matrix.flat.runtime, 'ios') || startsWith(matrix.flat.runtime, 'tvos')) && 'macos-latest' || startsWith(matrix.flat.runtime, 'win') && 'windows-latest' || 'ubuntu-latest' }}
name: ${{ matrix.flat.target }} / ${{ matrix.flat.runtime }}
steps:
- uses: actions/checkout@v3
- run: |
- name: Build
run: |
echo "https://github.com/actions/upload-artifact/issues/174" > .workaround-${{ matrix.flat.target }}-${{ matrix.flat.runtime }}.txt
${{ format('.{0}{1}', startsWith(matrix.flat.runtime, 'win') && '\' || '/', matrix.flat.exec) }}
working-directory: ${{ matrix.flat.dir }}
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "eng/submodules/silk.net-2.x"]
path = eng/submodules/silk.net-2.x
url = https://github.com/dotnet/Silk.NET
[submodule "eng/submodules/openal-soft"]
path = eng/submodules/openal-soft
url = https://github.com/kcat/openal-soft
10 changes: 10 additions & 0 deletions Silk.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Windowing", "Windowing", "{
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.Windowing", "sources\Windowing\Windowing\Silk.NET.Windowing.csproj", "{EF07CBB5-D253-4CA9-A5DA-8B3DF2B0DF8E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenAL", "OpenAL", "{AF13F7C9-4EE2-403E-B3D2-C4C2E45D9EF3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenAL", "sources\OpenAL\OpenAL\Silk.NET.OpenAL.csproj", "{1FFFDD72-D023-441C-AF49-F1EA78FF7DE9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -168,6 +172,10 @@ Global
{EF07CBB5-D253-4CA9-A5DA-8B3DF2B0DF8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF07CBB5-D253-4CA9-A5DA-8B3DF2B0DF8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF07CBB5-D253-4CA9-A5DA-8B3DF2B0DF8E}.Release|Any CPU.Build.0 = Release|Any CPU
{1FFFDD72-D023-441C-AF49-F1EA78FF7DE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FFFDD72-D023-441C-AF49-F1EA78FF7DE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FFFDD72-D023-441C-AF49-F1EA78FF7DE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FFFDD72-D023-441C-AF49-F1EA78FF7DE9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -200,6 +208,8 @@ Global
{F16C0AB9-DE7E-4C09-9EE9-DAA8B8E935A6} = {EC4D7B06-D277-4411-BD7B-71A6D37683F0}
{FE4414F8-5370-445D-9F24-C3AD3223F299} = {DD29EA8F-B1A6-45AA-8D2E-B38DA56D9EF6}
{EF07CBB5-D253-4CA9-A5DA-8B3DF2B0DF8E} = {FE4414F8-5370-445D-9F24-C3AD3223F299}
{AF13F7C9-4EE2-403E-B3D2-C4C2E45D9EF3} = {DD29EA8F-B1A6-45AA-8D2E-B38DA56D9EF6}
{1FFFDD72-D023-441C-AF49-F1EA78FF7DE9} = {AF13F7C9-4EE2-403E-B3D2-C4C2E45D9EF3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {78D2CF6A-60A1-43E3-837B-00B73C9DA384}
Expand Down
26 changes: 26 additions & 0 deletions eng/native/cmake/aarch64-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")

set(CMAKE_ASM_COMPILER "/usr/bin/aarch64-linux-gnu-gcc")
set(CMAKE_C_COMPILER "/usr/bin/aarch64-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/aarch64-linux-gnu-g++")

set(CMAKE_ADDR2LINE "/usr/bin/aarch64-linux-gnu-addr2line")
set(CMAKE_AR "/usr/bin/aarch64-linux-gnu-ar")
set(CMAKE_LINKER "/usr/bin/aarch64-linux-gnu-ld")
set(CMAKE_NM "/usr/bin/aarch64-linux-gnu-nm")
set(CMAKE_OBJCOPY "/usr/bin/aarch64-linux-gnu-objcopy")
set(CMAKE_OBJDUMP "/usr/bin/aarch64-linux-gnu-objdump")
set(CMAKE_RANLIB "/usr/bin/aarch64-linux-gnu-ranlib")
set(CMAKE_READELF "/usr/bin/aarch64-linux-gnu-readelf")
set(CMAKE_STRIP "/usr/bin/aarch64-linux-gnu-strip")

set(PKG_CONFIG_EXECUTABLE "/usr/bin/pkg-config")
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/aarch64-linux-gnu/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "/usr/lib/pkgconfig:/usr/share/pkgconfig")

set(CMAKE_FIND_ROOT_PATH "/usr/aarch64-linux-gnu")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
24 changes: 24 additions & 0 deletions eng/native/cmake/aarch64-w64-mingw32.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
set(CMAKE_SYSTEM_NAME "Windows")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")

set(CMAKE_ASM_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-gcc")
set(CMAKE_C_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-gcc")
set(CMAKE_CXX_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-g++")
set(CMAKE_RC_COMPILER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-windres")

set(CMAKE_ADDR2LINE "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-addr2line")
set(CMAKE_AR "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-ar")
set(CMAKE_DLLTOOL "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-dlltool")
set(CMAKE_LINKER "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-ld")
set(CMAKE_NM "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-nm")
set(CMAKE_OBJCOPY "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-objcopy")
set(CMAKE_OBJDUMP "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-objdump")
set(CMAKE_RANLIB "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-ranlib")
set(CMAKE_READELF "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-readelf")
set(CMAKE_STRIP "/opt/llvm-mingw-msvcrt/bin/aarch64-w64-mingw32-strip")

set(CMAKE_FIND_ROOT_PATH "/opt/llvm-mingw-msvcrt/aarch64-w64-mingw32")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
26 changes: 26 additions & 0 deletions eng/native/cmake/arm-linux-gnueabihf.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "armv7l")

set(CMAKE_ASM_COMPILER "/usr/bin/arm-linux-gnueabihf-gcc")
set(CMAKE_C_COMPILER "/usr/bin/arm-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/arm-linux-gnueabihf-g++")

set(CMAKE_ADDR2LINE "/usr/bin/arm-linux-gnueabihf-addr2line")
set(CMAKE_AR "/usr/bin/arm-linux-gnueabihf-ar")
set(CMAKE_LINKER "/usr/bin/arm-linux-gnueabihf-ld")
set(CMAKE_NM "/usr/bin/arm-linux-gnueabihf-nm")
set(CMAKE_OBJCOPY "/usr/bin/arm-linux-gnueabihf-objcopy")
set(CMAKE_OBJDUMP "/usr/bin/arm-linux-gnueabihf-objdump")
set(CMAKE_RANLIB "/usr/bin/arm-linux-gnueabihf-ranlib")
set(CMAKE_READELF "/usr/bin/arm-linux-gnueabihf-readelf")
set(CMAKE_STRIP "/usr/bin/arm-linux-gnueabihf-strip")

set(PKG_CONFIG_EXECUTABLE "/usr/bin/pkg-config")
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/arm-linux-gnueabihf/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "/usr/lib/pkgconfig:/usr/share/pkgconfig")

set(CMAKE_FIND_ROOT_PATH "/usr/arm-linux-gnueabihf")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
26 changes: 26 additions & 0 deletions eng/native/cmake/x86_64-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")

set(CMAKE_ASM_COMPILER "/usr/bin/x86_64-linux-gnu-gcc")
set(CMAKE_C_COMPILER "/usr/bin/x86_64-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/x86_64-linux-gnu-g++")

set(CMAKE_ADDR2LINE "/usr/bin/x86_64-linux-gnu-addr2line")
set(CMAKE_AR "/usr/bin/x86_64-linux-gnu-ar")
set(CMAKE_LINKER "/usr/bin/x86_64-linux-gnu-ld")
set(CMAKE_NM "/usr/bin/x86_64-linux-gnu-nm")
set(CMAKE_OBJCOPY "/usr/bin/x86_64-linux-gnu-objcopy")
set(CMAKE_OBJDUMP "/usr/bin/x86_64-linux-gnu-objdump")
set(CMAKE_RANLIB "/usr/bin/x86_64-linux-gnu-ranlib")
set(CMAKE_READELF "/usr/bin/x86_64-linux-gnu-readelf")
set(CMAKE_STRIP "/usr/bin/x86_64-linux-gnu-strip")

set(PKG_CONFIG_EXECUTABLE "/usr/bin/pkg-config")
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/x86_64-linux-gnu/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "/usr/lib/pkgconfig:/usr/share/pkgconfig")

set(CMAKE_FIND_ROOT_PATH "/usr/x86_64-linux-gnu")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
2 changes: 2 additions & 0 deletions eng/native/cmake/zig-objcopy.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
zig objcopy %*
2 changes: 2 additions & 0 deletions eng/native/cmake/zig-objcopy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
zig objcopy "$@"
2 changes: 2 additions & 0 deletions eng/native/cmake/zig-toolchain-aarch64-linux-gnu.2.28.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(ZIG_TARGET "aarch64-linux-gnu.2.28")
include(${CMAKE_CURRENT_LIST_DIR}/zig-toolchain.cmake)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(ZIG_TARGET "arm-linux-gnueabihf.2.28")
include(${CMAKE_CURRENT_LIST_DIR}/zig-toolchain.cmake)
2 changes: 2 additions & 0 deletions eng/native/cmake/zig-toolchain-x86_64-linux-gnu.2.28.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(ZIG_TARGET "x86_64-linux-gnu.2.28")
include(${CMAKE_CURRENT_LIST_DIR}/zig-toolchain.cmake)
15 changes: 14 additions & 1 deletion eng/native/cmake/zig-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio")
message(FATAL_ERROR "Visual Studio generator not supported, use: cmake -G Ninja")
endif()

if(NOT ZIG_TARGET MATCHES "^([a-zZ-Z0-9_]+)-([a-zZ-Z0-9_]+)-([a-zZ-Z0-9_.]+)$")
if(NOT ZIG_TARGET MATCHES "^([a-zZ-Z0-9_]+)-([a-zZ-Z0-9_]+)-(([a-zZ-Z0-9_]+)\.?([a-zZ-Z0-9_.]*))$")
message(FATAL_ERROR "Expected -DZIG_TARGET=<arch>-<os>-<abi>")
endif()

set(ZIG_ARCH ${CMAKE_MATCH_1})
set(ZIG_OS ${CMAKE_MATCH_2})
set(ZIG_ABI ${CMAKE_MATCH_3})
set(LINUX_ABI ${CMAKE_MATCH_4})

if(ZIG_OS STREQUAL "linux")
set(CMAKE_SYSTEM_NAME "Linux")
Expand Down Expand Up @@ -38,3 +39,15 @@ set(CMAKE_RC_COMPILER "${CMAKE_CURRENT_LIST_DIR}/zig-rc${SCRIPT_SUFFIX}")
set(CMAKE_ASM_COMPILER "${CMAKE_CURRENT_LIST_DIR}/zig-cc${SCRIPT_SUFFIX}" -target ${ZIG_TARGET})
set(CMAKE_C_COMPILER "${CMAKE_CURRENT_LIST_DIR}/zig-cc${SCRIPT_SUFFIX}" -target ${ZIG_TARGET})
set(CMAKE_CXX_COMPILER "${CMAKE_CURRENT_LIST_DIR}/zig-c++${SCRIPT_SUFFIX}" -target ${ZIG_TARGET})
set(CMAKE_OBJCOPY "${CMAKE_CURRENT_LIST_DIR}/zig-objcopy${SCRIPT_SUFFIX}" -target ${ZIG_TARGET})

if(ZIG_OS STREQUAL "linux")
set(PKG_CONFIG_EXECUTABLE "/usr/bin/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}-pkg-config")
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "/usr/lib/pkgconfig:/usr/share/pkgconfig")
set(CMAKE_FIND_ROOT_PATH "/usr/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
endif()
21 changes: 21 additions & 0 deletions eng/silktouch/openal/alsoft/generate.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@../settings.rsp
@../remap.rsp
--exclude
_GUID
--file
openal-soft-al.h
--methodClassName
AL
--namespace
Silk.NET.OpenAL
--output
../../../../sources/OpenAL/al
--test-output
../../../../tests/OpenAL/al
--traverse
../../../submodules/openal-soft/include/AL/al.h
../../../submodules/openal-soft/include/AL/alc.h
../../../submodules/openal-soft/include/AL/alext.h
../../../submodules/openal-soft/include/AL/efx.h
../../../submodules/openal-soft/include/AL/efx-presets.h
openal-soft-al.h
Loading