fix: appimage build and add make req for linux
This commit is contained in:
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@@ -39,11 +39,11 @@ jobs:
|
||||
targets: exe
|
||||
filename: hiddify-windows-x64
|
||||
|
||||
# - platform: linux-appimage
|
||||
# os: ubuntu-20.04
|
||||
# aarch: amd64
|
||||
# targets: AppImage
|
||||
# filename: hiddify-linux-x64
|
||||
- platform: linux-appimage
|
||||
os: ubuntu-20.04
|
||||
aarch: amd64
|
||||
targets: AppImage
|
||||
filename: hiddify-linux-x64
|
||||
|
||||
- platform: linux-deb
|
||||
os: ubuntu-20.04
|
||||
@@ -105,28 +105,11 @@ jobs:
|
||||
- name: Setup Linux dependencies
|
||||
if: ${{ startsWith(matrix.platform,'linux') }}
|
||||
run: |
|
||||
sudo apt install -y locate ninja-build pkg-config libgtk-3-dev libglib2.0-dev libgio2.0-cil-dev libayatana-appindicator3-dev fuse rpm patchelf
|
||||
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/
|
||||
make linux-install-dependencies
|
||||
|
||||
- name: Get Geo Assets
|
||||
- name: Prepare for ${{ matrix.platform }}
|
||||
run: |
|
||||
make get-geo-assets
|
||||
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
make get
|
||||
|
||||
- name: Generate
|
||||
run: |
|
||||
make translate
|
||||
make gen
|
||||
|
||||
- name: Get Libs & Bindings ${{ matrix.platform }}
|
||||
run: |
|
||||
make ${{ matrix.platform }}-libs
|
||||
make ${{ matrix.platform }}-prepare
|
||||
|
||||
- name: Setup Android Signing Properties
|
||||
if: startsWith(matrix.platform,'android')
|
||||
@@ -230,7 +213,9 @@ jobs:
|
||||
cd tmp_out
|
||||
7z a ${{matrix.filename}}.zip ./
|
||||
mv *.zip ../out/
|
||||
mv ${{matrix.filename}}.AppImage HiddifyNext.AppImage || echo "no appimage" # added for appimage link
|
||||
fi
|
||||
|
||||
|
||||
- name: Clean up keychain and provisioning profile
|
||||
if: ${{ always() && startsWith(matrix.os,'macos')}}
|
||||
|
||||
44
Makefile
44
Makefile
@@ -19,19 +19,17 @@ GEO_ASSETS_DIR=assets$(SEP)core
|
||||
|
||||
CORE_PRODUCT_NAME=hiddify-core
|
||||
CORE_NAME=$(CORE_PRODUCT_NAME)
|
||||
CORE_LIB_NAME=libcore
|
||||
SRV_NAME=HiddifyService
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
ifeq ($(CHANNEL),prod)
|
||||
TARGET=lib/main_prod.dart
|
||||
TARGET=lib/main_prod.dart
|
||||
else
|
||||
TARGET=lib/main.dart
|
||||
TARGET=lib/main.dart
|
||||
endif
|
||||
|
||||
BUILD_ARGS=--dart-define sentry_dsn=$(SENTRY_DSN)
|
||||
@@ -62,9 +60,27 @@ windows-prepare: get-geo-assets get gen translate windows-libs
|
||||
ios-prepare: get-geo-assets get gen translate ios-libs
|
||||
macos-prepare: get-geo-assets get gen translate macos-libs
|
||||
linux-prepare: get-geo-assets get gen translate linux-libs
|
||||
android-prepare: get-geo-assets get gen translate android-libs
|
||||
android-prepare: get-geo-assets get gen translate android-libs
|
||||
|
||||
|
||||
linux-install-dependencies:
|
||||
if [ "$(flutter)" = "true" ]; then \
|
||||
wget -O ~/Downloads/flutter_linux_3.16.9-stable.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.16.9-stable.tar.xz; \
|
||||
mkdir -p ~/develop; \
|
||||
cd ~/develop; \
|
||||
tar xf ~/Downloads/flutter_linux_3.16.9-stable.tar.xz; \
|
||||
export PATH="$$PATH:$$HOME/develop/flutter/bin"; \
|
||||
echo 'export PATH="$$PATH:$$HOME/develop/flutter/bin"' >> ~/.bashrc; \
|
||||
fi
|
||||
PATH="$$PATH":"$$HOME/.pub-cache/bin"
|
||||
echo 'export PATH="$$PATH:$$HOME/.pub-cache/bin"' >>~/.bashrc
|
||||
sudo apt install -y clang ninja-build pkg-config cmake libgtk-3-dev locate ninja-build pkg-config libgtk-3-dev libglib2.0-dev libgio2.0-cil-dev libayatana-appindicator3-dev fuse rpm patchelf file appstream
|
||||
dart pub global activate flutter_distributor
|
||||
sudo modprobe fuse
|
||||
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||
chmod +x appimagetool
|
||||
sudo mv appimagetool /usr/local/bin/
|
||||
|
||||
|
||||
sync_translate:
|
||||
cd .github && bash sync_translate.sh
|
||||
@@ -110,7 +126,7 @@ windows-libs:
|
||||
curl -L $(CORE_URL)/$(CORE_NAME)-windows-amd64.tar.gz | tar xz -C $(DESKTOP_OUT)/
|
||||
|
||||
linux-libs:
|
||||
@$(MKDIR) $(DESKTOP_OUT) || echo Folder already exists. Skipping...
|
||||
mkdir -p $(DESKTOP_OUT)
|
||||
curl -L $(CORE_URL)/$(CORE_NAME)-linux-amd64.tar.gz | tar xz -C $(DESKTOP_OUT)/
|
||||
|
||||
linux-deb-libs:linux-libs
|
||||
@@ -118,12 +134,12 @@ linux-rpm-libs:linux-libs
|
||||
linux-appimage-libs:linux-libs
|
||||
|
||||
macos-libs:
|
||||
@$(MKDIR) $(DESKTOP_OUT) || echo Folder already exists. Skipping...
|
||||
mkdir -p $(DESKTOP_OUT)
|
||||
curl -L $(CORE_URL)/$(CORE_NAME)-macos-universal.tar.gz | tar xz -C $(DESKTOP_OUT)
|
||||
|
||||
ios-libs: #not tested
|
||||
@$(MKDIR) $(IOS_OUT) || echo Folder already exists. Skipping...
|
||||
@$(RM) $(IOS_OUT)/Libcore.xcframework
|
||||
mkdir -p $(IOS_OUT)
|
||||
rm -rf $(IOS_OUT)/Libcore.xcframework
|
||||
curl -L $(CORE_URL)/$(CORE_NAME)-ios.tar.gz | tar xz -C "$(IOS_OUT)"
|
||||
|
||||
get-geo-assets:
|
||||
@@ -141,15 +157,15 @@ build-windows-libs:
|
||||
make -C libcore -f Makefile windows-amd64
|
||||
|
||||
build-linux-libs:
|
||||
make -C libcore -f Makefile linux-amd64
|
||||
make -C libcore -f Makefile linux-amd64
|
||||
|
||||
build-macos-libs:
|
||||
make -C libcore -f Makefile macos-universal
|
||||
mv $(BINDIR)/$(SRV_NAME) $(DESKTOP_OUT)/
|
||||
|
||||
build-ios-libs:
|
||||
@$(RM) $(IOS_OUT)/Libcore.xcframework && \
|
||||
make -C libcore -f Makefile ios && \
|
||||
rf -rf $(IOS_OUT)/Libcore.xcframework
|
||||
make -C libcore -f Makefile ios
|
||||
mv $(BINDIR)/Libcore.xcframework $(IOS_OUT)/Libcore.xcframework
|
||||
|
||||
release: # Create a new tag for release.
|
||||
|
||||
Reference in New Issue
Block a user