From 53721e04e7493382e836a9da7d343286f20d9448 Mon Sep 17 00:00:00 2001 From: Hiddify Date: Fri, 9 Feb 2024 21:29:11 +0100 Subject: [PATCH] fix: windows? --- .github/workflows/build.yml | 10 +++++++++- Makefile | 11 ++++++----- macos/packaging/pkg/make_config.yaml | 2 ++ 3 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 macos/packaging/pkg/make_config.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 75541ca4..c2bf4a93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,7 @@ env: "aab": "Hiddify-Android", "exe": "Hiddify-Windows-x64", "dmg": "Hiddify-MacOS", + "pkg": "Hiddify-MacOS-Installer", "ipa": "Hiddify-iOS", } jobs: @@ -56,7 +57,7 @@ jobs: - platform: macos os: macos-13 aarch: universal - targets: dmg + targets: dmg,pkg runs-on: ${{ matrix.os }} steps: @@ -91,6 +92,7 @@ jobs: - name: Prepare for ${{ matrix.platform }} run: | make ${{ matrix.platform }}-prepare + tree - name: Setup Android Signing Properties if: startsWith(matrix.platform,'android') @@ -158,6 +160,8 @@ jobs: .\scripts\package_windows.ps1 - name: Copy to out Android APK + env: + TARGET_MAP: ${{ env.TARGET_MAP }} if: matrix.platform == 'android-apk' run: | mkdir out @@ -169,6 +173,8 @@ jobs: - name: Copy to out Android AAB if: matrix.platform == 'android-aab' + env: + TARGET_MAP: ${{ env.TARGET_MAP }} run: | mkdir out ls -R ./build/app/outputs @@ -176,6 +182,8 @@ jobs: - name: Copy to out unix if: startsWith(matrix.platform,'linux') || matrix.platform == 'macos' || matrix.platform == 'ios' + env: + TARGET_MAP: ${{ env.TARGET_MAP }} run: | ls -R dist/ mkdir out diff --git a/Makefile b/Makefile index 31caebca..12d04c40 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ include dependencies.properties -ifeq ($(OS),Windows_NT) +ifeq ($(OS),Windows_1NT) MKDIR := -mkdir RM := rmdir /s /q SEP:=\\ @@ -73,7 +73,7 @@ android-aab-prepare:android-prepare macos-install-dependencies: brew install create-dmg tree npm install -g appdmg - dart pub global activate --source git https://github.com/hiddify/flutter_distributor --git-path packages/flutter_distributor + dart pub global activate flutter_distributor ios-install-dependencies: echo "not yet implemented" @@ -94,7 +94,8 @@ linux-install-dependencies: 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 + 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 + sudo modprobe fuse wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" @@ -104,7 +105,7 @@ linux-install-dependencies: dart pub global activate --source git https://github.com/hiddify/flutter_distributor --git-path packages/flutter_distributor windows-install-dependencies: - dart pub global activate --source git https://github.com/hiddify/flutter_distributor --git-path packages/flutter_distributor + dart pub global activate flutter_distributor sync_translate: cd .github && bash sync_translate.sh @@ -142,7 +143,7 @@ android-aab-libs: android-libs windows-libs: $(MKDIR) $(DESKTOP_OUT) || echo Folder already exists. Skipping... curl -L $(CORE_URL)/$(CORE_NAME)-windows-amd64.tar.gz | tar xz -C $(DESKTOP_OUT)$(SEP) - ls $(DESKTOP_OUT)$(SEP) || dir $(DESKTOP_OUT)$(SEP) || tree + ls $(DESKTOP_OUT) || dir $(DESKTOP_OUT)$(SEP) linux-libs: mkdir -p $(DESKTOP_OUT) diff --git a/macos/packaging/pkg/make_config.yaml b/macos/packaging/pkg/make_config.yaml new file mode 100644 index 00000000..0c2b8eaa --- /dev/null +++ b/macos/packaging/pkg/make_config.yaml @@ -0,0 +1,2 @@ +install-path: /Applications +#sign-identity: