fix: windows build?

This commit is contained in:
Hiddify
2024-02-09 21:07:47 +01:00
parent edb758eede
commit dab173f321
2 changed files with 23 additions and 20 deletions

View File

@@ -62,27 +62,18 @@ jobs:
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup Apple dependencies
if: matrix.platform == 'macos' || matrix.platform == 'ios'
run: |
brew install create-dmg tree
echo "installed create-dmg tree "
npm install -g appdmg
- name: Setup Flutter - name: Setup Flutter
uses: subosito/flutter-action@v2 uses: subosito/flutter-action@v2
with: with:
flutter-version: '3.16.x' flutter-version: '3.16.x'
channel: 'stable' channel: 'stable'
cache: true cache: true
- name: Setup Java - name: Setup Java
if: startsWith(matrix.platform,'android') if: startsWith(matrix.platform,'android')
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: 17 java-version: 17
- name: Setup NDK - name: Setup NDK
if: startsWith(matrix.platform,'android') if: startsWith(matrix.platform,'android')
uses: nttld/setup-ndk@v1.4.1 uses: nttld/setup-ndk@v1.4.1
@@ -92,15 +83,10 @@ jobs:
add-to-path: true add-to-path: true
link-to-sdk: true link-to-sdk: true
- name: Setup Flutter Distributor
if: ${{ !startsWith(matrix.platform,'android') }}
run: |
dart pub global activate --source git https://github.com/hiddify/flutter_distributor --git-path packages/flutter_distributor
- name: Setup Linux dependencies - name: Setup dependencies
if: ${{ startsWith(matrix.platform,'linux') }}
run: | run: |
make linux-install-dependencies make ${{ matrix.platform }}-install-dependencies
- name: Prepare for ${{ matrix.platform }} - name: Prepare for ${{ matrix.platform }}
run: | run: |
@@ -214,7 +200,7 @@ jobs:
mv ${targetFile} ../out/${targetFile} # added for appimage link mv ${targetFile} ../out/${targetFile} # added for appimage link
fi fi
fi fi
done
- name: Clean up keychain and provisioning profile - name: Clean up keychain and provisioning profile
if: ${{ always() && startsWith(matrix.os,'macos')}} if: ${{ always() && startsWith(matrix.os,'macos')}}

View File

@@ -70,6 +70,19 @@ 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
ios-install-dependencies:
echo "not yet implemented"
android-install-dependencies:
echo "nothing yet"
android-apk-install-dependencies: android-install-dependencies
android-aab-install-dependencies: android-install-dependencies
linux-install-dependencies: linux-install-dependencies:
if [ "$(flutter)" = "true" ]; then \ 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; \ 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; \
@@ -82,12 +95,16 @@ linux-install-dependencies:
PATH="$$PATH":"$$HOME/.pub-cache/bin" PATH="$$PATH":"$$HOME/.pub-cache/bin"
echo 'export PATH="$$PATH:$$HOME/.pub-cache/bin"' >>~/.bashrc 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
dart pub global activate flutter_distributor
sudo modprobe fuse sudo modprobe fuse
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool chmod +x appimagetool
sudo mv appimagetool /usr/local/bin/ sudo mv appimagetool /usr/local/bin/
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
sync_translate: sync_translate:
cd .github && bash sync_translate.sh cd .github && bash sync_translate.sh
@@ -123,9 +140,9 @@ android-apk-libs: android-libs
android-aab-libs: android-libs android-aab-libs: android-libs
windows-libs: windows-libs:
@$(MKDIR) $(DESKTOP_OUT) || echo Folder already exists. Skipping... $(MKDIR) $(DESKTOP_OUT) || echo Folder already exists. Skipping...
curl -L $(CORE_URL)/$(CORE_NAME)-windows-amd64.tar.gz | tar xz -C $(DESKTOP_OUT)$(SEP) curl -L $(CORE_URL)/$(CORE_NAME)-windows-amd64.tar.gz | tar xz -C $(DESKTOP_OUT)$(SEP)
ls $(DESKTOP_OUT)$(SEP) ls $(DESKTOP_OUT)$(SEP) || dir $(DESKTOP_OUT)$(SEP) || tree
linux-libs: linux-libs:
mkdir -p $(DESKTOP_OUT) mkdir -p $(DESKTOP_OUT)