From 73a28576bf18b354d6399db9a0b64b4d4b06fd03 Mon Sep 17 00:00:00 2001 From: problematicconsumer Date: Mon, 11 Sep 2023 19:40:37 +0330 Subject: [PATCH] Add core version --- Makefile | 33 +++++++++++++++++---------------- dependencies.properties | 1 + libcore | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 dependencies.properties diff --git a/Makefile b/Makefile index 0fb381c9..5cf3f074 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ +include dependencies.properties + BINDIR=./libcore/bin ANDROID_OUT=./android/app/libs DESKTOP_OUT=./libcore/bin GEO_ASSETS_DIR=./assets/core -LIBS_DOWNLOAD_URL=https://github.com/hiddify/hiddify-next-core/releases/download/draft + +CORE_NAME=hiddify-libcore +CORE_VERSION=v$(core.version) +LIBS_DOWNLOAD_URL=https://github.com/hiddify/hiddify-next-core/releases/download/$(CORE_VERSION) get: flutter pub get @@ -28,52 +33,48 @@ linux-release: macos-release: flutter_distributor package --platform macos --targets dmg --skip-clean - # flutter build 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 + curl -L $(LIBS_DOWNLOAD_URL)/$(CORE_NAME)-android-$(CORE_VERSION).aar.gz | gunzip > $(ANDROID_OUT)/libcore.aar windows-libs: mkdir -p $(DESKTOP_OUT) - curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-windows-amd64.dll.gz | gunzip > $(DESKTOP_OUT)/libcore.dll + curl -L $(LIBS_DOWNLOAD_URL)/$(CORE_NAME)-windows-amd64-$(CORE_VERSION).dll.gz | gunzip > $(DESKTOP_OUT)/libcore.dll linux-libs: mkdir -p $(DESKTOP_OUT) - curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-linux-amd64.so.gz | gunzip > $(DESKTOP_OUT)/libcore.so + curl -L $(LIBS_DOWNLOAD_URL)/$(CORE_NAME)-linux-amd64-$(CORE_VERSION).so.gz | gunzip > $(DESKTOP_OUT)/libcore.so macos-libs: mkdir -p $(DESKTOP_OUT)/ &&\ - curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-macos-universal.dylib.gz | gunzip > $(DESKTOP_OUT)/libcore.dylib + curl -L $(LIBS_DOWNLOAD_URL)/$(CORE_NAME)-macos-universal-$(CORE_VERSION).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 + curl -L $(LIBS_DOWNLOAD_URL)/$(CORE_NAME)-ios-universal-$(CORE_VERSION).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/SagerNet/sing-geosite/releases/latest/download/geosite.db -o $(GEO_ASSETS_DIR)/geosite.db build-headers: - make -C libcore -f Makefile headers && mv $(BINDIR)/hiddify-libcore-headers.h $(BINDIR)/libcore.h + make -C libcore -f Makefile headers && mv $(BINDIR)/$(CORE_NAME)-headers-*.h $(BINDIR)/libcore.h build-android-libs: - make -C libcore -f Makefile android && mv $(BINDIR)/hiddify-libcore-android.aar $(ANDROID_OUT)/libcore.aar + make -C libcore -f Makefile android && mv $(BINDIR)/$(CORE_NAME)-android-*.aar $(ANDROID_OUT)/libcore.aar build-windows-libs: - make -C libcore -f Makefile windows-amd64 && mv $(BINDIR)/hiddify-libcore-windows-amd64.dll $(DESKTOP_OUT)/libcore.dll + make -C libcore -f Makefile windows-amd64 && mv $(BINDIR)/$(CORE_NAME)-windows-amd64-*.dll $(DESKTOP_OUT)/libcore.dll build-linux-libs: - make -C libcore -f Makefile linux-amd64 && mv $(BINDIR)/hiddify-libcore-linux-amd64.dll $(DESKTOP_OUT)/libcore.so + make -C libcore -f Makefile linux-amd64 && mv $(BINDIR)/$(CORE_NAME)-linux-amd64-*.dll $(DESKTOP_OUT)/libcore.so build-macos-libs: - make -C libcore -f Makefile macos-universal && mv $(BINDIR)/hiddify-libcore-macos-universal.dylib $(DESKTOP_OUT)/libcore.dylib - + make -C libcore -f Makefile macos-universal && mv $(BINDIR)/$(CORE_NAME)-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 + make -C libcore -f Makefile ios && mv $(BINDIR)/$(CORE_NAME)-ios-*.xcframework $(DESKTOP_OUT)/libcore.xcframework \ No newline at end of file diff --git a/dependencies.properties b/dependencies.properties new file mode 100644 index 00000000..5bef9ce7 --- /dev/null +++ b/dependencies.properties @@ -0,0 +1 @@ +core.version=0.1.0 \ No newline at end of file diff --git a/libcore b/libcore index c8878156..dd711cba 160000 --- a/libcore +++ b/libcore @@ -1 +1 @@ -Subproject commit c8878156767c0795324b1a7dc737e026b33fa10f +Subproject commit dd711cba20e5cfbc404b4660dd0e74d82f07bd1b