mirror of https://github.com/ppy/SDL3-CS.git
Merge pull request #233 from jairov4/build_libs_ios
Build the libraries SDL_image, SDL_ttf, SDL_mixer for iOS in CI
This commit is contained in:
commit
73b855b9ba
|
|
@ -110,23 +110,34 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: recursive
|
||||||
|
|
||||||
- name: Build (iOS)
|
- name: Build (iOS)
|
||||||
run: xcodebuild -project External/SDL/Xcode/SDL/SDL.xcodeproj -target SDL3.xcframework -configuration Release
|
|
||||||
|
|
||||||
- name: Prepare release directory (iOS)
|
|
||||||
run: mkdir -p native/ios
|
|
||||||
|
|
||||||
- name: Prepare release (iOS)
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p native/ios/SDL3.xcframework/ios-arm64/SDL3.framework;
|
modules=("SDL3" "SDL3_image" "SDL3_ttf" "SDL3_mixer")
|
||||||
mkdir -p native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework;
|
architectures=("ios-arm64" "ios-arm64_x86_64-simulator")
|
||||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/Info.plist native/ios/SDL3.xcframework/Info.plist;
|
|
||||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64/SDL3.framework/SDL3 native/ios/SDL3.xcframework/ios-arm64/SDL3.framework/SDL3;
|
for module in "${modules[@]}"; do
|
||||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64/SDL3.framework/Info.plist;
|
module0="${module/SDL3/SDL}"
|
||||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3 native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3;
|
directory="External/${module0}/Xcode"
|
||||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist;
|
if [ "$module" == "SDL3" ]; then
|
||||||
|
directory+="/SDL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
target="${module}.xcframework"
|
||||||
|
framework="${module}.framework"
|
||||||
|
output_dir="native/ios/${target}"
|
||||||
|
|
||||||
|
xcodebuild -project "${directory}/${module0}.xcodeproj" -target "${target}" -configuration Release
|
||||||
|
build_dir="${directory}/build/${target}"
|
||||||
|
|
||||||
|
for arch in "${architectures[@]}"; do
|
||||||
|
mkdir -p "${output_dir}/${arch}/${framework}"
|
||||||
|
cp "${build_dir}/${arch}/${framework}/${module}" "${output_dir}/${arch}/${framework}/${module}"
|
||||||
|
cp "${build_dir}/${arch}/${framework}/Info.plist" "${output_dir}/${arch}/${framework}/Info.plist"
|
||||||
|
done
|
||||||
|
cp "${build_dir}/Info.plist" "${output_dir}/Info.plist"
|
||||||
|
done
|
||||||
|
|
||||||
- name: Compress native directory
|
- name: Compress native directory
|
||||||
run: tar -cvf native-ios.tar native/ios
|
run: tar -cvf native-ios.tar native/ios
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue