2023-07-21 01:07:44 +02:00
|
|
|
ANDROID_OUT=./android/app/src/main/jniLibs
|
2023-07-06 17:18:41 +03:30
|
|
|
NDK_BIN=$(ANDROID_HOME)/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin
|
|
|
|
|
GOBUILD=CGO_ENABLED=1 go build -trimpath -tags with_gvisor,with_lwip -ldflags="-w -s" -buildmode=c-shared
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
windows-release:
|
2023-07-19 15:37:37 +02:00
|
|
|
dart pub global activate flutter_distributor && \
|
2023-07-19 12:57:16 +02:00
|
|
|
flutter_distributor package --platform windows --targets exe
|
|
|
|
|
|
|
|
|
|
linux-release:
|
2023-07-19 15:37:37 +02:00
|
|
|
dart pub global activate flutter_distributor && \
|
|
|
|
|
which locate && \
|
|
|
|
|
if [ $$? != 0 ]; then \
|
|
|
|
|
sudo apt install locate; \
|
|
|
|
|
fi && \
|
|
|
|
|
which appimagetool && \
|
|
|
|
|
if [ $$? != 0 ]; then \
|
|
|
|
|
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" && \
|
|
|
|
|
chmod +x appimagetool && \
|
|
|
|
|
mv appimagetool /usr/local/bin/; \
|
|
|
|
|
fi && \
|
2023-07-19 12:57:16 +02:00
|
|
|
flutter_distributor package --platform linux --targets appimage
|
|
|
|
|
|
|
|
|
|
macos-release:
|
2023-07-19 15:37:37 +02:00
|
|
|
dart pub global activate flutter_distributor && \
|
|
|
|
|
npm install -g appdmg && \
|
2023-07-19 12:57:16 +02:00
|
|
|
flutter_distributor package --platform macos --targets dmg
|
|
|
|
|
|
|
|
|
|
ios-release:
|
2023-07-19 15:37:37 +02:00
|
|
|
flutter_distributor package --platform ios --targets ipa --build-export-options-plist ios/exportOptions.plist
|
2023-07-19 12:57:16 +02:00
|
|
|
|
2023-07-21 00:58:02 +02:00
|
|
|
android-libs:
|
2023-07-21 01:07:44 +02:00
|
|
|
mkdir -p $(ANDROID_OUT)/x86_64 $(ANDROID_OUT)/arm64-v8a/ armeabi-v7a/ &&\
|
2023-07-21 14:42:49 +02:00
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-android-amd64-cgo.so.gz | gunzip > $(ANDROID_OUT)/x86_64/libclash.so &&\
|
2023-07-21 10:30:39 +02:00
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-android-arm64-cgo.so.gz | gunzip >$(ANDROID_OUT)/arm64-v8a/libclash.so &&\
|
2023-07-21 14:42:49 +02:00
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-android-arm7-cgo.so.gz | gunzip >$(ANDROID_OUT)/armeabi-v7a/libclash.so
|
2023-07-06 17:18:41 +03:30
|
|
|
|
|
|
|
|
windows-libs:
|
2023-07-21 10:30:39 +02:00
|
|
|
mkdir -p ./core/dist/&&\
|
|
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-windows-amd64-cgo.dll.gz | gunzip >./core/dist/hiddify_libclash_x64.dll &&\
|
|
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-windows-386-cgo.dll.gz | gunzip >./core/dist/hiddify_libclash_x86.dll
|
2023-07-19 13:12:18 +02:00
|
|
|
|
|
|
|
|
linux-libs:
|
2023-07-21 10:30:39 +02:00
|
|
|
mkdir -p ./core/dist/&&\
|
|
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-linux-amd64-cgo.so.gz | gunzip > ./core/dist/hiddify_libclash_x64.so &&\
|
|
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-linux-386-cgo.so.gz | gunzip > ./core/dist/hiddify_libclash_x86.so
|
2023-07-19 13:12:18 +02:00
|
|
|
|
|
|
|
|
macos-libs:
|
2023-07-21 01:07:44 +02:00
|
|
|
mkdir -p ./macos/Frameworks &&\
|
2023-07-21 00:58:02 +02:00
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-darwin-amd64-cgo.dylib.gz | gunzip > ./macos/Frameworks/hiddify_libclash_x64.dylib &&\
|
|
|
|
|
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify_clashlib-darwin-arm64-cgo.dylib.gz | gunzip > ./macos/Frameworks/hiddify_libclash_arm64.dylib
|