Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
msystem: clang64
install: mingw-w64-clang-x86_64-clang mingw-w64-clang-aarch64-clang
- name: macos-universal
os: macos-latest
os: macos-14
compiler: clang++
shell: sh
- name: linux-universal
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
name: Create and upload release
permissions:
contents: write
runs-on: ubuntu-22.04
runs-on: macos-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: [build]
defaults:
Expand Down
13 changes: 11 additions & 2 deletions build_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ build_deps() {
done

mkdir -p "build_temp"
mkdir -p "ares-deps/src"
cd "build_temp"
pwd > ../ares-deps/sourcemap
for dependency in "${dependencies[@]}"
do
# set up the dependency
Expand All @@ -42,13 +44,20 @@ build_deps() {
# if we have a patch, patch the dependency
patch_func="${dependency}_patch"
$patch_func


# package the source code for debugging
patch_func="${dependency}_package_source"
$patch_func

# build the dependency
build_func="${dependency}_build"
$build_func
done
cd ..


# remove git repository directories for packaged sources
find ares-deps/src -type d -name ".git" -exec rm -rf {} +

mkdir -p "ares-deps"
for dependency in "${dependencies[@]}"
do
Expand Down
10 changes: 5 additions & 5 deletions deps.linux/slang_shaders
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ slang_shaders_setup() {
git -C slang-shaders reset --hard "$slang_shaders_hash"
}

slang_shaders_clean() {
echo "Todo"
slang_shaders_package_source() {
echo "[slang_shaders] packaging source -- skipped"
}

slang_shaders_config() {
echo "No configuration to perform"
slang_shaders_clean() {
echo "[slang_shaders] cleaning up -- skipped"
}

slang_shaders_patch() {
echo "No patching to perform"
echo "[slang_shaders] patching -- skipped"
}

slang_shaders_build() {
Expand Down
17 changes: 15 additions & 2 deletions deps.macos/librashader
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ librashader_hash='75ca917cd705885e887ac840b693b408480b5b88'
librashader_profile='release'

librashader_setup() {
echo "[librashader] cloning"
if [ ! -d "librashader" ]; then
git clone https://github.com/SnowflakePowered/librashader.git
else
Expand All @@ -18,22 +19,32 @@ librashader_setup() {
librashader_profile='optimized'
fi
export MACOSX_DEPLOYMENT_TARGET=10.15
echo "[librashader] cloning -- success"
}

librashader_package_source() {
echo "[librashader] packaging source"
ditto librashader ../ares-deps/src/librashader
echo "[librashader] packaging source -- success"
}

librashader_clean() {
echo "Todo"
echo "[librashader] cleaning up -- skipped"
}

librashader_patch() {
echo "[librashader] patching source"
cd librashader
echo "Pinning nightly Rust version to 2025-05-20"
echo $'[toolchain]' > rust-toolchain.toml
echo $'channel = \"nightly-2025-03-21\"' >> rust-toolchain.toml
echo $'targets = [ \"x86_64-apple-darwin\", \"aarch64-apple-darwin\" ]' >> rust-toolchain.toml
cd ..
echo "[librashader] patching source -- success"
}

librashader_build() {
echo "[librashader] building"
cd librashader
export RUSTFLAGS=-g
cargo run -p librashader-build-script -- --profile ${librashader_profile} --target x86_64-apple-darwin
Expand All @@ -46,14 +57,16 @@ librashader_build() {
ditto target/aarch64-apple-darwin/${librashader_profile}/deps/liblibrashader_capi.dylib.dSYM/Contents/Info.plist target/${librashader_profile}/librashader.dylib.dSYM/Contents/Info.plist
lipo -create -output target/${librashader_profile}/librashader.dylib.dSYM/Contents/Resources/DWARF/liblibrashader_capi.dylib target/x86_64-apple-darwin/${librashader_profile}/deps/liblibrashader_capi.dylib.dSYM/Contents/Resources/DWARF/liblibrashader_capi.dylib target/aarch64-apple-darwin/${librashader_profile}/deps/liblibrashader_capi.dylib.dSYM/Contents/Resources/DWARF/liblibrashader_capi.dylib
cd ..
echo "[librashader] building -- success"
}

librashader_install() {
pwd
echo "[librashader] installing"
ditto build_temp/librashader/include ares-deps/include/librashader/
ditto build_temp/librashader/target/${librashader_profile}/librashader.dylib ares-deps/lib/librashader.dylib
ditto build_temp/librashader/target/${librashader_profile}/librashader.dylib.dSYM ares-deps/lib/librashader.dylib.dSYM
fix_rpaths ares-deps/lib/librashader.dylib
ditto build_temp/librashader/LICENSE.md ares-deps/licenses/librashader/LICENSE.md
ditto build_temp/librashader/LICENSE-GPL.md ares-deps/licenses/librashader/LICENSE-GPL.md
echo "[librashader] installing -- success"
}
16 changes: 14 additions & 2 deletions deps.macos/moltenvk
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,44 @@ moltenvk_url='https://github.com/KhronosGroup/MoltenVK.git'
moltenvk_hash='458870543b9bcf6b0edd6f90aaa776707b310d96'

moltenvk_setup() {
echo "[MoltenVK] cloning"
if [ ! -d "MoltenVK" ]; then
git clone https://github.com/KhronosGroup/MoltenVK.git
else
git -C MoltenVK fetch
fi
git -C MoltenVK reset --hard "$moltenvk_hash"
export MACOSX_DEPLOYMENT_TARGET=10.15
echo "[MoltenVK] cloning -- success"
}

moltenvk_package_source() {
echo "[MoltenVK] packaging source"
ditto MoltenVK/ ../ares-deps/src/MoltenVK
echo "[MoltenVK] packaging source -- success"
}

moltenvk_clean() {
echo "Todo"
echo "[MoltenVK] cleaning up -- skipped"
}

moltenvk_patch() {
echo "No patching to perform"
echo "[MoltenVK] patching source -- skipped"
}

moltenvk_build() {
echo "[MoltenVK] building"
cd MoltenVK
./fetchDependencies --macos
xcodebuild build -quiet -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (macOS only)" -configuration ${config} GCC_GENERATE_DEBUGGING_SYMBOLS=TRUE DEBUG_INFORMATION_FORMAT="dwarf-with-dsym" GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS MVK_LOG_LEVEL_INFO=0 MVK_LOG_LEVEL_DEBUG=0'
cd ..
echo "[MoltenVK] building -- success"
}

moltenvk_install() {
echo "[MoltenVK] installing"
ditto build_temp/MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib ares-deps/lib/libMoltenVK.dylib
ditto build_temp/MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib.dSYM ares-deps/lib/libMoltenVK.dylib.dSYM
ditto build_temp/MoltenVK/LICENSE ares-deps/licenses/MoltenVK/LICENSE
echo "[MoltenVK] installing -- success"
}
22 changes: 14 additions & 8 deletions deps.macos/sdl
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,33 @@ SDLARGS=()

## Build Steps
sdl_setup() {
if [ ! -d "SDL" ]; then
git clone ${sdl_url}
else
git -C SDL fetch
fi
git -C SDL reset --hard "$sdl_hash"
echo "[SDL3] cloning"
if [ ! -d "SDL" ]; then
git clone ${sdl_url}
else
git -C SDL fetch
fi
git -C SDL reset --hard "$sdl_hash"
export MACOSX_DEPLOYMENT_TARGET=10.15
echo "[SDL3] cloning -- success"
}

sdl_package_source() {
echo "[SDL3] packaging source"
ditto SDL ../ares-deps/src/SDL
echo "[SDL3] packaging source -- success"
}

sdl_clean() {
echo "Todo"
echo "[SDL3] cleaning up -- skipped"
}

sdl_patch() {
echo "No patching to perform"
echo "[SDL3] patching -- skipped"
}

sdl_build() {
echo "[SDL3] building"
SDLARGS=()
SDLARGS+=("-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64;")

Expand All @@ -46,12 +49,15 @@ sdl_build() {
2>&1 | xcbeautify --renderer github-actions

cd ..
echo "[SDL3] building -- success"
}

sdl_install() {
echo "[SDL3] installing"
ditto build_temp/SDL/build.xcarchive/Products/Library/Frameworks/SDL3.framework ares-deps/lib/SDL3.framework
ditto build_temp/SDL/build.xcarchive/dSYMs/SDL3.framework.dSYM ares-deps/lib/SDL3.framework.dSYM
ditto build_temp/SDL/LICENSE.txt ares-deps/licenses/SDL/LICENSE.txt
echo "[SDL3] installing -- success"
}


Expand Down
14 changes: 12 additions & 2 deletions deps.macos/slang_shaders
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,43 @@ slang_shaders_hash='c9303dcc4d11fe5d37db9ef9a24c8eab4087c0c3'

## Build Steps
slang_shaders_setup() {
echo "[slang_shaders] cloning"
if [ ! -d "slang-shaders" ]; then
git clone https://github.com/libretro/slang-shaders.git
else
git -C slang-shaders fetch
fi
git -C slang-shaders reset --hard "$slang_shaders_hash"
echo "[slang_shaders] cloning -- success"
}

slang_shaders_package_source() {
echo "[slang_shaders] packaging source -- skipped"
}

slang_shaders_clean() {
echo "Todo"
echo "[slang_shaders] cleaning up -- skipped"
}

slang_shaders_patch() {
echo "No patching to perform"
echo "[slang_shaders] patching -- skipped"
}

slang_shaders_build() {
echo "[slang_shaders] building"
cd slang-shaders
rm -rf .git
rm -f .gitlab-ci.yml
rm -f configure
rm -f Makefile
cd ..
echo "[slang_shaders] building -- skipped"
}

slang_shaders_install() {
echo "[slang_shaders] installing"
ditto "build_temp"/slang-shaders ares-deps/share/libretro/shaders/shaders_slang
echo "[slang_shaders] installing -- skipped"
}


Expand Down
17 changes: 16 additions & 1 deletion deps.windows/librashader
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ librashader_hash='75ca917cd705885e887ac840b693b408480b5b88'
librashader_profile='release'

librashader_setup() {
echo "[librashader] cloning"
if [ ! -d "librashader" ]; then
git clone https://github.com/SnowflakePowered/librashader.git
else
Expand All @@ -17,22 +18,33 @@ librashader_setup() {
elif [[ $config == "Release" ]]; then
librashader_profile='optimized'
fi
echo "[librashader] cloning -- success"
}

librashader_package_source() {
echo "[librashader] packaging source"
mkdir -p ../ares-deps/src/librashader
cp -R librashader/. ../ares-deps/src/librashader
echo "[librashader] packaging source -- success"
}

librashader_clean() {
echo "Todo"
echo "[librashader] cleaning up -- skipped"
}

librashader_patch() {
echo "[librashader] patching source"
cd librashader
echo "Pinning nightly Rust version to 2025-05-20"
echo $'[toolchain]' > rust-toolchain.toml
echo $'channel = \"nightly-2025-03-21\"' >> rust-toolchain.toml
echo $'targets = [ \"aarch64-pc-windows-msvc\", \"x86_64-pc-windows-msvc\" ]' >> rust-toolchain.toml
cd ..
echo "[librashader] patching source -- success"
}

librashader_build() {
echo "[librashader] building"
cd librashader
export RUSTFLAGS='-Ctarget-feature=+crt-static'
export CXXFLAGS='-MT'
Expand All @@ -45,9 +57,11 @@ librashader_build() {
fi
unset RUSTFLAGS CXXFLAGS CFLAGS
cd ..
echo "[librashader] building -- success"
}

librashader_install() {
echo "[librashader] installing"
mkdir -p ares-deps/include/librashader/
mkdir -p ares-deps/lib/
cp -R build_temp/librashader/include/. ares-deps/include/librashader/
Expand All @@ -62,4 +76,5 @@ librashader_install() {
cp -R build_temp/librashader/target/${targetName}/${librashader_profile}/librashader.dll.lib ares-deps/lib/librashader.dll.lib
mv ares-deps/lib/librashader.dll.lib ares-deps/lib/librashader.lib
cp -R build_temp/librashader/target/${targetName}/${librashader_profile}/librashader.pdb ares-deps/lib/librashader.pdb
echo "[librashader] installing -- success"
}
Loading