2023-08-19 22:27:23 +03:30
|
|
|
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
|
2023-07-06 17:18:41 +03:30
|
|
|
|
|
|
|
|
get:
|
2023-07-18 01:38:39 +03:30
|
|
|
flutter pub get
|
2023-07-19 15:37:37 +02:00
|
|
|
|
2023-07-06 17:18:41 +03:30
|
|
|
gen:
|
|
|
|
|
dart run build_runner build --delete-conflicting-outputs
|
2023-07-19 15:37:37 +02:00
|
|
|
|
2023-07-06 17:18:41 +03:30
|
|
|
translate:
|
|
|
|
|
dart run slang
|
|
|
|
|
|
2023-07-19 12:57:16 +02:00
|
|
|
android-release:
|
2023-07-19 15:37:37 +02:00
|
|
|
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
|
2023-07-19 12:57:16 +02:00
|
|
|
|
2023-08-20 12:05:11 +00:00
|
|
|
android-aab-release:
|
|
|
|
|
flutter build aab --target-platform android-arm,android-arm64,android-x64 --split-per-abi &&\
|
|
|
|
|
|
2023-08-20 10:40:47 +00:00
|
|
|
windows-release:
|
2023-07-19 12:57:16 +02:00
|
|
|
flutter_distributor package --platform windows --targets exe
|
|
|
|
|
|
2023-08-20 10:40:47 +00:00
|
|
|
linux-release:
|
2023-07-19 12:57:16 +02:00
|
|
|
flutter_distributor package --platform linux --targets appimage
|
2023-08-19 22:27:23 +03:30
|
|
|
|
2023-08-20 10:40:47 +00:00
|
|
|
macos-release:
|
2023-08-20 11:48:47 +00:00
|
|
|
flutter_distributor package --platform macos --targets dmg
|
|
|
|
|
# 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
|
2023-08-19 22:27:23 +03:30
|
|
|
|
2023-08-20 14:03:21 +00:00
|
|
|
ios-release: #not tested
|
|
|
|
|
flutter_distributor package --platform ios --targets ipa --build-export-options-plist ios/exportOptions.plist
|
|
|
|
|
|
2023-07-21 00:58:02 +02:00
|
|
|
android-libs:
|
2023-08-19 22:27:23 +03:30
|
|
|
mkdir -p $(ANDROID_OUT)
|
|
|
|
|
curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-android.aar.gz | gunzip > $(ANDROID_OUT)/libcore.aar
|
2023-07-06 17:18:41 +03:30
|
|
|
|
2023-08-20 10:40:47 +00:00
|
|
|
windows-libs:
|
2023-08-19 22:27:23 +03:30
|
|
|
mkdir -p $(DESKTOP_OUT)
|
|
|
|
|
curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-windows-amd64.dll.gz | gunzip > $(DESKTOP_OUT)/libcore.dll
|
2023-07-19 13:12:18 +02:00
|
|
|
|
2023-08-20 10:40:47 +00:00
|
|
|
linux-libs:
|
2023-08-19 22:27:23 +03:30
|
|
|
mkdir -p $(DESKTOP_OUT)
|
|
|
|
|
curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-linux-amd64.so.gz | gunzip > $(DESKTOP_OUT)/libcore.so
|
2023-07-22 00:16:46 +02:00
|
|
|
|
2023-08-20 10:47:40 +00:00
|
|
|
macos-libs:
|
2023-07-22 10:45:10 +02:00
|
|
|
mkdir -p $(DESKTOP_OUT)/ &&\
|
2023-08-20 09:17:10 +00:00
|
|
|
curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-macos-universal.dylib.gz | gunzip > $(DESKTOP_OUT)/libcore.dylib
|
2023-07-22 00:16:46 +02:00
|
|
|
|
2023-08-20 14:03:21 +00:00
|
|
|
ios-libs: #not tested
|
|
|
|
|
mkdir -p $(DESKTOP_OUT)/ &&\
|
|
|
|
|
curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-ios-universal.xcframework.gz | gunzip > $(DESKTOP_OUT)/libcore.xcframework
|
|
|
|
|
|
2023-08-19 22:27:23 +03:30
|
|
|
get-geo-assets:
|
|
|
|
|
curl -L https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db -o $(GEO_ASSETS_DIR)/geoip.db
|
2023-08-22 01:01:55 +03:30
|
|
|
curl -L https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db -o $(GEO_ASSETS_DIR)/geosite.db
|
2023-08-19 22:27:23 +03:30
|
|
|
|
|
|
|
|
build-headers:
|
|
|
|
|
make -C libcore -f Makefile headers && mv $(BINDIR)/hiddify-libcore-headers.h $(BINDIR)/libcore.h
|
|
|
|
|
|
2023-07-21 22:16:43 +03:30
|
|
|
build-android-libs:
|
2023-08-19 22:27:23 +03:30
|
|
|
make -C libcore -f Makefile android && mv $(BINDIR)/hiddify-libcore-android.aar $(ANDROID_OUT)/libcore.aar
|
2023-07-21 22:16:43 +03:30
|
|
|
|
|
|
|
|
build-windows-libs:
|
2023-08-19 22:27:23 +03:30
|
|
|
make -C libcore -f Makefile windows-amd64 && mv $(BINDIR)/hiddify-libcore-windows-amd64.dll $(DESKTOP_OUT)/libcore.dll
|
2023-07-21 22:16:43 +03:30
|
|
|
|
2023-07-22 00:16:46 +02:00
|
|
|
build-linux-libs:
|
2023-08-20 09:17:10 +00:00
|
|
|
make -C libcore -f Makefile linux-amd64 && mv $(BINDIR)/hiddify-libcore-linux-amd64.dll $(DESKTOP_OUT)/libcore.so
|
|
|
|
|
|
|
|
|
|
build-macos-libs:
|
2023-08-20 14:03:21 +00:00
|
|
|
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
|