Skip to content

Commit

Permalink
Merge pull request #3 from PurpShell/master
Browse files Browse the repository at this point in the history
Split iOS binaries
  • Loading branch information
SineVector241 authored Apr 28, 2024
2 parents bb59d3e + f3783b5 commit bd87600
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 8 deletions.
Binary file added OpusLibs/iOS/.DS_Store
Binary file not shown.
6 changes: 5 additions & 1 deletion OpusLibs/iOS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ brew install autoconf automake libtool

You also need to have the latest Xcode tools (`xcode-select --install`).

## Configuring the libopus version

You can set the version of libopus by opening the `compile.sh` file and finding the `OPUS_VERSION` variable. Modify it to your heart's content.

## Run the script

Simply run the script!
Simply run the script:

```
./compile.sh
Expand Down
9 changes: 3 additions & 6 deletions OpusLibs/iOS/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,9 @@ for ARCH in $ARCHS; do
cd ../../
done

# Use lipo to create a universal library
echo "Creating universal library..."
LIPO_LIBS=""
echo "Copying binaries to output dir..."
for ARCH in $ARCHS; do
LIPO_LIBS="$LIPO_LIBS $BUILD_DIR/$ARCH/installed/lib/libopus.a"
cp $BUILD_DIR/$ARCH/installed/lib/libopus.a $OUTPUT_DIR/libopus_$ARCH.a
done
lipo -create $LIPO_LIBS -output $OUTPUT_DIR/libopus.a

echo "libopus.a has been created at $OUTPUT_DIR/libopus.a"
echo "libopus.a has been created for each arch at $OUTPUT_DIR"
6 changes: 5 additions & 1 deletion OpusSharp.iOS/OpusSharp.iOS.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
</metadata>

<files>
<file src="lib/libopus.a" target="runtime/ios/native" />
<file src="lib/libopus_arm64.a" target="runtimes/ios-arm64/native" />
<file src="lib/libopus_armv7.a" target="runtimes/ios-armv7/native" />
<file src="lib/libopus_armv7s.a" target="runtimes/ios-armv7s/native" />
<file src="lib/libopus_i386.a" target="runtimes/ios-i386/native" />
<file src="lib/libopus_x86_64.a" target="runtimes/ios-x64/native" />
</files>
</package>
Binary file removed OpusSharp.iOS/lib/libopus.a
Binary file not shown.
Binary file added OpusSharp.iOS/lib/libopus_arm64.a
Binary file not shown.
Binary file added OpusSharp.iOS/lib/libopus_armv7.a
Binary file not shown.
Binary file added OpusSharp.iOS/lib/libopus_armv7s.a
Binary file not shown.
Binary file added OpusSharp.iOS/lib/libopus_i386.a
Binary file not shown.
Binary file added OpusSharp.iOS/lib/libopus_x86_64.a
Binary file not shown.

0 comments on commit bd87600

Please sign in to comment.