Fix local build commands
This commit is contained in:
25
Makefile
25
Makefile
@@ -19,17 +19,19 @@ GEO_ASSETS_DIR=assets$(SEP)core
|
|||||||
|
|
||||||
CORE_PRODUCT_NAME=hiddify-core
|
CORE_PRODUCT_NAME=hiddify-core
|
||||||
CORE_NAME=$(CORE_PRODUCT_NAME)
|
CORE_NAME=$(CORE_PRODUCT_NAME)
|
||||||
|
CORE_LIB_NAME=libcore
|
||||||
SRV_NAME=HiddifyService
|
SRV_NAME=HiddifyService
|
||||||
|
|
||||||
ifeq ($(CHANNEL),prod)
|
ifeq ($(CHANNEL),prod)
|
||||||
CORE_URL=https://github.com/hiddify/hiddify-next-core/releases/download/v$(core.version)
|
CORE_URL=https://github.com/hiddify/hiddify-next-core/releases/download/v$(core.version)
|
||||||
else
|
else
|
||||||
CORE_URL=https://github.com/hiddify/hiddify-next-core/releases/download/draft
|
CORE_URL=https://github.com/hiddify/hiddify-next-core/releases/download/draft
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CHANNEL),prod)
|
ifeq ($(CHANNEL),prod)
|
||||||
TARGET=lib/main_prod.dart
|
TARGET=lib/main_prod.dart
|
||||||
else
|
else
|
||||||
TARGET=lib/main.dart
|
TARGET=lib/main.dart
|
||||||
endif
|
endif
|
||||||
|
|
||||||
BUILD_ARGS=--dart-define sentry_dsn=$(SENTRY_DSN)
|
BUILD_ARGS=--dart-define sentry_dsn=$(SENTRY_DSN)
|
||||||
@@ -37,8 +39,6 @@ DISTRIBUTOR_ARGS=--skip-clean --build-target $(TARGET) --build-dart-define sentr
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
get:
|
get:
|
||||||
flutter pub get
|
flutter pub get
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ translate:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
prepare: #get-geo-assets get gen translate
|
prepare:
|
||||||
@echo use the following commands to prepare the library for each platform:
|
@echo use the following commands to prepare the library for each platform:
|
||||||
@echo make android-prepare
|
@echo make android-prepare
|
||||||
@echo make windows-prepare
|
@echo make windows-prepare
|
||||||
@@ -92,7 +92,6 @@ linux-deb-release:
|
|||||||
linux-rpm-release:
|
linux-rpm-release:
|
||||||
flutter_distributor package --platform linux --targets rpm $(DISTRIBUTOR_ARGS)
|
flutter_distributor package --platform linux --targets rpm $(DISTRIBUTOR_ARGS)
|
||||||
|
|
||||||
|
|
||||||
macos-release:
|
macos-release:
|
||||||
flutter_distributor package --platform macos --targets dmg $(DISTRIBUTOR_ARGS)
|
flutter_distributor package --platform macos --targets dmg $(DISTRIBUTOR_ARGS)
|
||||||
|
|
||||||
@@ -114,7 +113,6 @@ linux-libs:
|
|||||||
@$(MKDIR) $(DESKTOP_OUT) || echo Folder already exists. Skipping...
|
@$(MKDIR) $(DESKTOP_OUT) || echo Folder already exists. Skipping...
|
||||||
curl -L $(CORE_URL)/$(CORE_NAME)-linux-amd64.tar.gz | tar xz -C $(DESKTOP_OUT)/
|
curl -L $(CORE_URL)/$(CORE_NAME)-linux-amd64.tar.gz | tar xz -C $(DESKTOP_OUT)/
|
||||||
|
|
||||||
|
|
||||||
linux-deb-libs:linux-libs
|
linux-deb-libs:linux-libs
|
||||||
linux-rpm-libs:linux-libs
|
linux-rpm-libs:linux-libs
|
||||||
linux-appimage-libs:linux-libs
|
linux-appimage-libs:linux-libs
|
||||||
@@ -137,27 +135,22 @@ build-headers:
|
|||||||
|
|
||||||
build-android-libs:
|
build-android-libs:
|
||||||
make -C libcore -f Makefile android
|
make -C libcore -f Makefile android
|
||||||
mv $(BINDIR)/$(CORE_NAME).aar $(ANDROID_OUT)/
|
mv $(BINDIR)/$(CORE_LIB_NAME).aar $(ANDROID_OUT)/
|
||||||
|
|
||||||
build-windows-libs:
|
build-windows-libs:
|
||||||
make -C libcore -f Makefile windows-amd64
|
make -C libcore -f Makefile windows-amd64
|
||||||
mv $(BINDIR)/$(CORE_NAME).dll $(DESKTOP_OUT)/
|
|
||||||
mv $(BINDIR)/$(SRV_NAME) $(DESKTOP_OUT)/
|
|
||||||
|
|
||||||
build-linux-libs:
|
build-linux-libs:
|
||||||
make -C libcore -f Makefile linux-amd64
|
make -C libcore -f Makefile linux-amd64
|
||||||
mv $(BINDIR)/$(CORE_NAME).so $(DESKTOP_OUT)/
|
|
||||||
mv $(BINDIR)/$(SRV_NAME) $(DESKTOP_OUT)/
|
|
||||||
|
|
||||||
build-macos-libs:
|
build-macos-libs:
|
||||||
make -C libcore -f Makefile macos-universal
|
make -C libcore -f Makefile macos-universal
|
||||||
mv $(BINDIR)/$(CORE_NAME).dylib $(DESKTOP_OUT)/
|
|
||||||
mv $(BINDIR)/$(SRV_NAME) $(DESKTOP_OUT)/
|
mv $(BINDIR)/$(SRV_NAME) $(DESKTOP_OUT)/
|
||||||
|
|
||||||
build-ios-libs:
|
build-ios-libs:
|
||||||
@$(RM) $(IOS_OUT)/Libcore.xcframework && \
|
@$(RM) $(IOS_OUT)/Libcore.xcframework && \
|
||||||
make -C libcore -f Makefile ios && \
|
make -C libcore -f Makefile ios && \
|
||||||
mv $(BINDIR)/$(CORE_NAME)-ios.xcframework $(IOS_OUT)/Libcore.xcframework
|
mv $(BINDIR)/Libcore.xcframework $(IOS_OUT)/Libcore.xcframework
|
||||||
|
|
||||||
release: # Create a new tag for release.
|
release: # Create a new tag for release.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user