mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-20 05:49:09 +00:00
building script
This commit is contained in:
parent
3a156f5837
commit
c9272609b8
3 changed files with 16 additions and 14 deletions
3
.github/workflows/publish-exe.yml
vendored
3
.github/workflows/publish-exe.yml
vendored
|
@ -71,8 +71,7 @@ jobs:
|
|||
zip -j mypubdir4/tun2proxy-${{ matrix.target }}.zip target/${{ matrix.target }}/release/tun2proxy README.md target/tun2proxy-ffi.h target/${{ matrix.target }}/release/libtun2proxy.dylib
|
||||
if [[ "${{ matrix.target }}" == "x86_64-apple-darwin" ]]; then
|
||||
./build-apple.sh
|
||||
mv ./target/Tun2Proxy.xcframework .
|
||||
zip -r mypubdir4/tun2proxy-apple-xcframework.zip ./Tun2Proxy.xcframework/
|
||||
zip -r mypubdir4/tun2proxy-apple-xcframework.zip ./tun2proxy.xcframework/
|
||||
fi
|
||||
elif [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
|
||||
zip -j mypubdir4/tun2proxy-${{ matrix.target }}.zip target/${{ matrix.target }}/release/tun2proxy README.md target/tun2proxy-ffi.h target/${{ matrix.target }}/release/libtun2proxy.so
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
tun2proxy.xcframework/
|
||||
.env
|
||||
project.xcworkspace/
|
||||
xcuserdata/
|
||||
|
|
|
@ -15,7 +15,7 @@ echo "Generating includes..."
|
|||
mkdir -p target/include/
|
||||
cbindgen --config cbindgen.toml -l C -o target/include/tun2proxy.h
|
||||
cat > target/include/module.modulemap <<EOF
|
||||
framework module Tun2Proxy {
|
||||
framework module tun2proxy {
|
||||
umbrella header "tun2proxy.h"
|
||||
|
||||
export *
|
||||
|
@ -24,11 +24,13 @@ framework module Tun2Proxy {
|
|||
EOF
|
||||
|
||||
echo "lipo..."
|
||||
|
||||
echo "Simulator"
|
||||
lipo -create \
|
||||
target/aarch64-apple-ios-sim/release/libtun2proxy.a \
|
||||
target/x86_64-apple-ios/release/libtun2proxy.a \
|
||||
-output ./target/libtun2proxy-ios-sim.a
|
||||
|
||||
echo "MacOS"
|
||||
lipo -create \
|
||||
target/aarch64-apple-darwin/release/libtun2proxy.a \
|
||||
|
@ -36,9 +38,9 @@ target/x86_64-apple-darwin/release/libtun2proxy.a \
|
|||
-output ./target/libtun2proxy-macos.a
|
||||
|
||||
echo "Creating XCFramework"
|
||||
rm -rf ./target/Tun2Proxy.xcframework
|
||||
rm -rf ./tun2proxy.xcframework
|
||||
xcodebuild -create-xcframework \
|
||||
-library ./target/aarch64-apple-ios/release/libtun2proxy.a -headers ./target/include/ \
|
||||
-library ./target/libtun2proxy-ios-sim.a -headers ./target/include/ \
|
||||
-library ./target/libtun2proxy-macos.a -headers ./target/include/ \
|
||||
-output ./target/Tun2Proxy.xcframework
|
||||
-output ./tun2proxy.xcframework
|
||||
|
|
Loading…
Add table
Reference in a new issue