From 29478554dfc19e081681e485997222040dcccfda Mon Sep 17 00:00:00 2001 From: Hiddify <114227601+hiddify1@users.noreply.github.com> Date: Sun, 20 Aug 2023 14:03:21 +0000 Subject: [PATCH] add build option for ios but not tested --- .github/workflows/ci.yml | 8 +++++--- Makefile | 13 ++++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e87b2d0..2da068ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,10 @@ jobs: aarch: universal targets: dmg + # - platform: ios + # os: macos-11 + # aarch: universal + # targets: ipa - platform: linux os: ubuntu-latest @@ -80,7 +84,7 @@ jobs: cache: true - name: Build macos dmg - if: matrix.platform == 'macos' + if: matrix.platform == 'macos' || matrix.platform == 'ios' run: | brew install create-dmg tree node npm install -g appdmg @@ -96,8 +100,6 @@ jobs: run: | sudo apt install -y locate ninja-build pkg-config libgtk-3-dev libglib2.0-dev libgio2.0-cil-dev libayatana-appindicator3-dev fuse sudo modprobe fuse - - wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" chmod +x appimagetool mv appimagetool /usr/local/bin/ diff --git a/Makefile b/Makefile index 42128bf5..6066c11d 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,9 @@ macos-release: # tree ./build/macos/Build &&\ # create-dmg --app-drop-link 600 185 "hiddify-macos-universal.dmg" ./build/macos/Build/Products/Release/hiddify.app +ios-release: #not tested + flutter_distributor package --platform ios --targets ipa --build-export-options-plist ios/exportOptions.plist + android-libs: mkdir -p $(ANDROID_OUT) curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-android.aar.gz | gunzip > $(ANDROID_OUT)/libcore.aar @@ -47,6 +50,10 @@ macos-libs: mkdir -p $(DESKTOP_OUT)/ &&\ curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-macos-universal.dylib.gz | gunzip > $(DESKTOP_OUT)/libcore.dylib +ios-libs: #not tested + mkdir -p $(DESKTOP_OUT)/ &&\ + curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-ios-universal.xcframework.gz | gunzip > $(DESKTOP_OUT)/libcore.xcframework + get-geo-assets: curl -L https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db -o $(GEO_ASSETS_DIR)/geoip.db curl -L https://github.com/hiddify/sing-geosite/releases/latest/download/geosite.db -o $(GEO_ASSETS_DIR)/geosite.db @@ -64,4 +71,8 @@ build-linux-libs: make -C libcore -f Makefile linux-amd64 && mv $(BINDIR)/hiddify-libcore-linux-amd64.dll $(DESKTOP_OUT)/libcore.so build-macos-libs: - make -C libcore -f Makefile macos-amd64 && mv $(BINDIR)/hiddify-libcore-macos-amd64.dylib $(DESKTOP_OUT)/libcore.dylib \ No newline at end of file + make -C libcore -f Makefile macos-universal && mv $(BINDIR)/hiddify-libcore-macos-universal.dylib $(DESKTOP_OUT)/libcore.dylib + + +build-ios-libs: #not tested + make -C libcore -f Makefile ios && mv $(BINDIR)/hiddify-libcore-ios.xcframework $(DESKTOP_OUT)/libcore.xcframework \ No newline at end of file