Skip to content

The only downloader you need. 下载器的集大成者。

feat(build): 添加FeaturePacks到构建流程

XiaoYouChR11b7f29c0205
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 966266f7..14ea51aa 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -38,6 +38,21 @@ jobs:
python deploy.py
mv dist/Ghost-Downloader-3.dist dist/Ghost-Downloader-3-Unsigned.dist
+ - name: Copy FeaturePacks
+ shell: pwsh
+ run: |
+ $targetRoot = "dist/Ghost-Downloader-3-Unsigned.dist/features"
+ New-Item -ItemType Directory -Force -Path $targetRoot | Out-Null
+
+ foreach ($pack in @("http_pack", "bili_pack", "ffmpeg_pack")) {
+ $source = Join-Path "features" $pack
+ $target = Join-Path $targetRoot $pack
+ if (Test-Path $target) {
+ Remove-Item -Recurse -Force $target
+ }
+ Copy-Item -Recurse -Force $source $target
+ }
+
- name: upload-unsigned-artifact
id: upload-unsigned-artifact
uses: actions/upload-artifact@v4
@@ -120,6 +135,16 @@ jobs:
mv "dist/Ghost-Downloader-3.app" "dist/Ghost Downloader.app"
mv "resources/修复软件损坏" "dist/修复软件损坏"
+ - name: Copy FeaturePacks
+ run: |
+ target_root="dist/Ghost Downloader.app/Contents/MacOS/features"
+ mkdir -p "$target_root"
+
+ for pack in http_pack bili_pack ffmpeg_pack; do
+ rm -rf "$target_root/$pack"
+ cp -R "features/$pack" "$target_root/$pack"
+ done
+
- name: Create DMG
run: |
ln -s /Applications dist/Applications
@@ -184,6 +209,16 @@ jobs:
mv "dist/Ghost-Downloader-3.app" "dist/Ghost Downloader.app"
mv "resources/修复软件损坏" "dist/修复软件损坏"
+ - name: Copy FeaturePacks
+ run: |
+ target_root="dist/Ghost Downloader.app/Contents/MacOS/features"
+ mkdir -p "$target_root"
+
+ for pack in http_pack bili_pack ffmpeg_pack; do
+ rm -rf "$target_root/$pack"
+ cp -R "features/$pack" "$target_root/$pack"
+ done
+
- name: Reinstall openssl libs
run: |
brew install openssl@3
@@ -231,6 +266,16 @@ jobs:
python deploy.py
chmod +x "dist/Ghost-Downloader-3.dist/Ghost-Downloader-3.bin"
+ - name: Copy FeaturePacks
+ run: |
+ target_root="dist/Ghost-Downloader-3.dist/features"
+ mkdir -p "$target_root"
+
+ for pack in http_pack bili_pack ffmpeg_pack; do
+ rm -rf "$target_root/$pack"
+ cp -R "features/$pack" "$target_root/$pack"
+ done
+
- name: Tar the contents of Ghost-Downloader
shell: pwsh
run: |
diff --git a/.github/workflows/build_Linux.yml b/.github/workflows/build_Linux.yml
index c7683d5b..145a9740 100644
--- a/.github/workflows/build_Linux.yml
+++ b/.github/workflows/build_Linux.yml
@@ -34,6 +34,16 @@ jobs:
rm -rf version.txt
python deploy.py
+ - name: Copy FeaturePacks
+ run: |
+ target_root="dist/Ghost-Downloader-3.dist/features"
+ mkdir -p "$target_root"
+
+ for pack in http_pack bili_pack ffmpeg_pack; do
+ rm -rf "$target_root/$pack"
+ cp -R "features/$pack" "$target_root/$pack"
+ done
+
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
diff --git a/.github/workflows/build_Windows.yml b/.github/workflows/build_Windows.yml
index ec5e1413..68886ef9 100644
--- a/.github/workflows/build_Windows.yml
+++ b/.github/workflows/build_Windows.yml
@@ -50,6 +50,21 @@ jobs:
del version.txt
python deploy.py
+ - name: Copy FeaturePacks
+ shell: pwsh
+ run: |
+ $targetRoot = "dist/Ghost-Downloader-3.dist/features"
+ New-Item -ItemType Directory -Force -Path $targetRoot | Out-Null
+
+ foreach ($pack in @("http_pack", "bili_pack", "ffmpeg_pack")) {
+ $source = Join-Path "features" $pack
+ $target = Join-Path $targetRoot $pack
+ if (Test-Path $target) {
+ Remove-Item -Recurse -Force $target
+ }
+ Copy-Item -Recurse -Force $source $target
+ }
+
- name: Prepare For Sign
if: ${{ github.event.inputs.sign_artifact == 'true' }}
run: |
diff --git a/.github/workflows/build_macOS.yml b/.github/workflows/build_macOS.yml
index 343c1d62..76076cd2 100644
--- a/.github/workflows/build_macOS.yml
+++ b/.github/workflows/build_macOS.yml
@@ -37,6 +37,16 @@ jobs:
mv "dist/Ghost-Downloader-3.app" "dist/Ghost Downloader.app"
mv "resources/修复软件损坏" "dist/修复软件损坏"
+ - name: Copy FeaturePacks
+ run: |
+ target_root="dist/Ghost Downloader.app/Contents/MacOS/features"
+ mkdir -p "$target_root"
+
+ for pack in http_pack bili_pack ffmpeg_pack; do
+ rm -rf "$target_root/$pack"
+ cp -R "features/$pack" "$target_root/$pack"
+ done
+
- name: Create DMG
run: |
ln -s /Applications dist/Applications
@@ -101,6 +111,16 @@ jobs:
mv "dist/Ghost-Downloader-3.app" "dist/Ghost Downloader.app"
mv "resources/修复软件损坏" "dist/修复软件损坏"
+ - name: Copy FeaturePacks
+ run: |
+ target_root="dist/Ghost Downloader.app/Contents/MacOS/features"
+ mkdir -p "$target_root"
+
+ for pack in http_pack bili_pack ffmpeg_pack; do
+ rm -rf "$target_root/$pack"
+ cp -R "features/$pack" "$target_root/$pack"
+ done
+
- name: Reinstall openssl libs
run: |
brew install openssl@3