new: add windows portable version
This commit is contained in:
37
.github/workflows/ci.yml
vendored
37
.github/workflows/ci.yml
vendored
@@ -18,29 +18,40 @@ jobs:
|
|||||||
- platform: android
|
- platform: android
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
targets: aab,apk
|
targets: aab,apk
|
||||||
|
target: android
|
||||||
|
|
||||||
- platform: windows
|
- platform: windows
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
aarch: amd64
|
aarch: amd64
|
||||||
targets: exe
|
targets: exe
|
||||||
# - platform: windows
|
target: windows-x64
|
||||||
# os: windows-latest
|
- platform: windows
|
||||||
# aarch: 386
|
os: windows-latest
|
||||||
# targets: exe
|
aarch: 386
|
||||||
|
targets: exe
|
||||||
|
target: windows-x86
|
||||||
|
|
||||||
# - platform: linux
|
# - platform: linux
|
||||||
# os: ubuntu-latest
|
# os: ubuntu-latest
|
||||||
# aarch: 386
|
# aarch: 386
|
||||||
# targets: AppImage
|
# targets: AppImage
|
||||||
|
|
||||||
# - platform: macos
|
- platform: macos
|
||||||
# os: macos-11
|
os: macos-11
|
||||||
# aarch: amd64
|
aarch: universal
|
||||||
# targets: dmg
|
targets: dmg
|
||||||
|
|
||||||
- platform: linux
|
- platform: linux
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
aarch: amd64
|
aarch: amd64
|
||||||
targets: AppImage
|
targets: AppImage
|
||||||
|
target: linux-x64
|
||||||
|
- platform: linux
|
||||||
|
os: ubuntu-latest
|
||||||
|
aarch: 386
|
||||||
|
targets: AppImage
|
||||||
|
target: linux-x86
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
@@ -104,22 +115,24 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Libs ${{ matrix.platform }}
|
- name: Get Libs ${{ matrix.platform }}
|
||||||
run: |
|
run: |
|
||||||
make ${{ matrix.platform }}-libs
|
make ${{ matrix.target }}-libs
|
||||||
|
|
||||||
- name: Release ${{ matrix.platform }}
|
- name: Release ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
make ${{ matrix.platform }}-release
|
make ${{ matrix.target }}-release
|
||||||
|
|
||||||
- name: Copy to out WINDOWS
|
- name: Copy to out WINDOWS
|
||||||
if: matrix.platform == 'windows'
|
if: matrix.platform == 'windows'
|
||||||
run: |
|
run: |
|
||||||
New-Item -ItemType Directory -Force -Name "out"
|
New-Item -ItemType Directory -Force -Name "out"
|
||||||
|
|
||||||
$EXT_ARRAY = "${{ matrix.targets }}" -split ","
|
$EXT_ARRAY = "${{ matrix.targets }}" -split ","
|
||||||
foreach ($EXT in $EXT_ARRAY) {
|
foreach ($EXT in $EXT_ARRAY) {
|
||||||
# Find all files with this extension in the current directory, and copy them to "out" directory
|
# 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
|
Get-ChildItem -Recurse -File -Filter "*setup.$EXT" | Copy-Item -Destination "out" -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
mkdir ${{ matrix.target }}-portable
|
||||||
|
copy build/windows/runner/Release ${{ matrix.target }}-portable
|
||||||
|
Compress-Archive ${{ matrix.target }}-portable out\${{ matrix.target }}-portable.zip
|
||||||
|
|
||||||
- name: Copy to out unix
|
- name: Copy to out unix
|
||||||
if: matrix.platform != 'windows'
|
if: matrix.platform != 'windows'
|
||||||
|
|||||||
7
Makefile
7
Makefile
@@ -41,7 +41,7 @@ linux-libs:
|
|||||||
|
|
||||||
macos-libs:
|
macos-libs:
|
||||||
mkdir -p $(DESKTOP_OUT)/ &&\
|
mkdir -p $(DESKTOP_OUT)/ &&\
|
||||||
curl -L https://github.com/hiddify/hiddify-libclash/releases/latest/download/hiddify-clashlib-macos-amd64.so.gz | gunzip > $(DESKTOP_OUT)/libclash.dylib
|
curl -L $(LIBS_DOWNLOAD_URL)/hiddify-libcore-macos-universal.dylib.gz | gunzip > $(DESKTOP_OUT)/libcore.dylib
|
||||||
|
|
||||||
get-geo-assets:
|
get-geo-assets:
|
||||||
curl -L https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db -o $(GEO_ASSETS_DIR)/geoip.db
|
curl -L https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db -o $(GEO_ASSETS_DIR)/geoip.db
|
||||||
@@ -57,4 +57,7 @@ build-windows-libs:
|
|||||||
make -C libcore -f Makefile windows-amd64 && mv $(BINDIR)/hiddify-libcore-windows-amd64.dll $(DESKTOP_OUT)/libcore.dll
|
make -C libcore -f Makefile windows-amd64 && mv $(BINDIR)/hiddify-libcore-windows-amd64.dll $(DESKTOP_OUT)/libcore.dll
|
||||||
|
|
||||||
build-linux-libs:
|
build-linux-libs:
|
||||||
make -C libcore -f Makefile linux-amd64 && mv $(BINDIR)/hiddify-libcore-linux-amd64.dll $(DESKTOP_OUT)/libcore.so
|
make -C libcore -f Makefile linux-amd64 && mv $(BINDIR)/hiddify-libcore-linux-amd64.dll $(DESKTOP_OUT)/libcore.so
|
||||||
|
|
||||||
|
build-macos-libs:
|
||||||
|
make -C libcore -f Makefile macos-amd64 && mv $(BINDIR)/hiddify-libcore-macos-amd64.dylib $(DESKTOP_OUT)/libcore.dylib
|
||||||
Reference in New Issue
Block a user