Fix windows packaging
This commit is contained in:
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -192,27 +192,7 @@ jobs:
|
|||||||
if: matrix.platform == 'windows'
|
if: matrix.platform == 'windows'
|
||||||
run: |
|
run: |
|
||||||
tree
|
tree
|
||||||
New-Item -ItemType Directory -Force -Name "out"
|
.\scripts\package_windows.ps1
|
||||||
New-Item -ItemType Directory -Force -Name "tmp_out"
|
|
||||||
$EXT_ARRAY = "${{ matrix.targets }}" -split ","
|
|
||||||
foreach ($EXT in $EXT_ARRAY) {
|
|
||||||
# Find all files with this extension in the current directory, and copy them to "out" directory
|
|
||||||
Get-ChildItem -Recurse -File -Filter "*setup.$EXT" | Copy-Item -Destination "out" -ErrorAction SilentlyContinue
|
|
||||||
move out\*setup.$EXT tmp_out\setup.$EXT
|
|
||||||
Get-ChildItem -Recurse -File -Filter "*.$EXT"
|
|
||||||
}
|
|
||||||
|
|
||||||
xcopy /s /v '.\.github\help\mac-windows\' .\tmp_out\
|
|
||||||
cd tmp_out
|
|
||||||
Compress-Archive -Path .\* -DestinationPath ..\out\hiddify-${{ matrix.platform }}-x64-setup.zip
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
|
|
||||||
mkdir HiddifyNext-portable
|
|
||||||
xcopy /s /v D:\a\hiddify-next\hiddify-next\build\windows\x64\runner\Release\HiddifyNext.exe .\HiddifyNext-portable\
|
|
||||||
xcopy /s /v '.\.github\help\mac-windows\' .\HiddifyNext-portable\
|
|
||||||
cd HiddifyNext-portable
|
|
||||||
Compress-Archive .\ ..\out\hiddify-${{ matrix.platform }}-x64-portable.zip
|
|
||||||
|
|
||||||
- name: Copy to out Android apk
|
- name: Copy to out Android apk
|
||||||
if: matrix.platform == 'android-apk'
|
if: matrix.platform == 'android-apk'
|
||||||
|
|||||||
9
scripts/package_windows.ps1
Normal file
9
scripts/package_windows.ps1
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
New-Item -ItemType Directory -Force -Name "out"
|
||||||
|
|
||||||
|
# windows setup
|
||||||
|
Get-ChildItem -Recurse -File -Path "dist" -Filter "*windows-setup.exe" | Copy-Item -Destination "out/hiddify-next-setup.exe" -ErrorAction SilentlyContinue
|
||||||
|
Compress-Archive -Force -Path "out/hiddify-next-setup.exe",".github/help/mac-windows/*.url" -DestinationPath "out/hiddify-windows-x64-setup.zip"
|
||||||
|
|
||||||
|
# windows portable
|
||||||
|
Copy-Item -Force -Path "build/windows/x64/runner/Release/*" -Destination "out/hiddify-next"
|
||||||
|
Compress-Archive -Force -Path "out/hiddify-next" -DestinationPath "out/hiddify-windows-x64-portable.zip"
|
||||||
Reference in New Issue
Block a user