Skip to content

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

build(deploy): 更新版本号至 3.5.2 并优化构建流程

XiaoYouChR0695f46b154b
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..fbc1dda8
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,13 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
+custom: ['https://space.bilibili.com/437313511']
\ No newline at end of file
diff --git a/.github/workflows/deploy-application.yml b/.github/workflows/deploy-application.yml
index 4db399ab..4746a4c7 100644
--- a/.github/workflows/deploy-application.yml
+++ b/.github/workflows/deploy-application.yml
@@ -21,20 +21,21 @@ jobs:
- name: Install dependencies
run: |
pip install --timeout=300 -r requirements.txt
- pip install nuitka==2.5.4
- name: Build with Nuitka
run: |
- mv main.py Ghost-Downloader-3.py
- nuitka --standalone --enable-plugin=pyside6 --show-memory --output-dir=output --windows-console-mode=disable --windows-icon-from-ico=resources/logo.ico --company-name=XiaoYouChR --product-name="Ghost Downloader" --file-description="Ghost Downloader" --copyright="Copyright(C) 2024 XiaoYouChR" --file-version=3.5.1 --product-version=3.5.1 Ghost-Downloader-3.py
+ $VERSION = python -c "from app.common.setting import VERSION; print(VERSION)"
+ Write-Host "VERSION=$VERSION"
+ echo "VERSION=$VERSION" >> $env:GITHUB_ENV
+ python deploy.py
# nuitka --module plugins/jy_os_page.py
# mv jy_os_page*.pyd output/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
- name: Ghost-Downloader-v3.5.1-Windows-${{ matrix.architecture }}
- path: output/Ghost-Downloader-3.dist
+ name: Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}
+ path: dist/Ghost-Downloader-3.dist
build-macos-14-arm:
strategy:
@@ -53,26 +54,26 @@ jobs:
- name: Install dependencies
run: |
pip install --timeout=300 -r requirements.txt
- pip install nuitka==2.5.4
+ pip install nuitka==2.6.4
- name: Build with Nuitka
run: |
- mv main.py "Ghost-Downloader-3.py"
- python -c "import sys; sys.path.append('./app/common'); import config; print(config.VERSION)" > version.txt
- version=$(sed -n '4p' version.txt)
- echo "VERSION=$version" >> "$GITHUB_ENV"
- echo "VERSION=${{ env.VERSION }}"
- nuitka --standalone --enable-plugin=pyside6 --show-memory --output-dir=output --disable-console --macos-app-icon=resources/logo.icns --macos-create-app-bundle --company-name=XiaoYouChR --macos-app-name="Ghost-Downloader-3" --macos-app-version=$version Ghost-Downloader-3.py
- chmod u+x "output/Ghost-Downloader-3.app/Contents/MacOS/Ghost-Downloader-3"
- rm -rf "output/Ghost-Downloader-3.build"
- ln -s /Applications output/Applications
- hdiutil create -srcfolder "output/" -volname "Ghost-Downloader-3" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 200m "Ghost-Downloader-3.dmg"
+ VERSION=$(python3 -c "from app.common.setting import VERSION; print(VERSION)")
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
+ python3 deploy.py
+ chmod u+x "dist/Ghost Downloader.app/Contents/MacOS/Ghost Downloader"
+ rm -rf "dist/Ghost Downloader.build"
+
+ - name: Create DMG
+ run: |
+ ln -s /Applications dist/Applications
+ hdiutil create -srcfolder "dist/" -volname "Ghost-Downloader-3" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 400m "Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}
- path: Ghost-Downloader-3.dmg
+ path: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg
build-macos-13-x86_64:
strategy:
@@ -91,26 +92,26 @@ jobs:
- name: Install dependencies
run: |
pip install --timeout=300 -r requirements.txt
- pip install nuitka==1.8.6
+ pip install nuitka==2.6.4
- name: Build with Nuitka
run: |
- mv main.py "Ghost-Downloader-3.py"
- python -c "import sys; sys.path.append('./app/common'); import config; print(config.VERSION)" > version.txt
- version=$(sed -n '4p' version.txt)
- echo "VERSION=$version" >> "$GITHUB_ENV"
- echo "VERSION=${{ env.VERSION }}"
- nuitka3 --standalone --enable-plugin=pyside6 --show-memory --output-dir=output --disable-console --macos-app-icon=resources/logo.icns --macos-create-app-bundle --company-name=XiaoYouChR --macos-app-name="Ghost-Downloader-3" --macos-app-version=$version Ghost-Downloader-3.py
- chmod u+x "output/Ghost-Downloader-3.app/Contents/MacOS/Ghost-Downloader-3"
- rm -rf "output/Ghost-Downloader-3.build"
- ln -s /Applications output/Applications
- hdiutil create -srcfolder "output/" -volname "Ghost-Downloader-3" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 200m "Ghost-Downloader-3.dmg"
+ VERSION=$(python3 -c "from app.common.setting import VERSION; print(VERSION)")
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
+ python3 deploy.py
+ chmod u+x "dist/Ghost Downloader.app/Contents/MacOS/Ghost Downloader"
+ rm -rf "dist/Ghost Downloader.build"
+
+ - name: Create DMG
+ run: |
+ ln -s /Applications dist/Applications
+ hdiutil create -srcfolder "dist/" -volname "Ghost-Downloader-3" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 400m "Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}
- path: Ghost-Downloader-3.dmg
+ path: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg
build-ubuntu:
strategy:
@@ -131,16 +132,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y libegl1-mesa
pip install --timeout=300 -r requirements.txt
- pip install nuitka
+ pip install nuitka==2.6.4
- name: Build with Nuitka
run: |
- mv main.py "Ghost-Downloader-3.py"
- python -c "import sys; sys.path.append('./app/common'); import config; print(config.VERSION)" > version.txt
- version=$(sed -n '4p' version.txt)
- echo "VERSION=$version" >> "$GITHUB_ENV"
- echo "VERSION=${{ env.VERSION }}"
- nuitka --standalone --enable-plugin=pyside6 --show-memory --output-dir=output --disable-console --company-name=XiaoYouChR --product-name="Ghost-Downloader-3" --file-description="Ghost-Downloader-3" --copyright="Copyright(C) 2024 XiaoYouChR" --file-version=$version --product-version=$version "Ghost-Downloader-3.py"
+ VERSION=$(python3 -c "from app.common.setting import VERSION; print(VERSION)")
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
+ python deploy.py
# nuitka --module plugins/jy_os_page.py
# mkdir -p "output/Ghost-Downloader-3.dist/plugins/"
# mv jy_os_page*.so "output/Ghost-Downloader-3.dist/plugins/"
@@ -149,4 +147,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Ghost-Downloader-v${{ env.VERSION }}-Linux-${{ matrix.architecture }}
- path: output/Ghost-Downloader-3.dist
+ path: dist/Ghost-Downloader-3.dist
diff --git a/app/common/config.py b/app/common/config.py
index f7cf600b..2b1f8fcc 100644
--- a/app/common/config.py
+++ b/app/common/config.py
@@ -81,9 +81,9 @@ class Config(QConfig):
def resetGlobalSpeed(self):
self.globalSpeed = 0
-YEAR = 2024
+YEAR = 2025
AUTHOR = "XiaoYouChR"
-VERSION = "3.5.1"
+VERSION = "3.5.2"
LATEST_EXTENSION_VERSION = "1.1.1"
AUTHOR_URL = "https://space.bilibili.com/437313511"
FEEDBACK_URL = "https://github.com/XiaoYouChR/Ghost-Downloader-3/issues"
diff --git a/deploy.py b/deploy.py
new file mode 100644
index 00000000..36ed70f0
--- /dev/null
+++ b/deploy.py
@@ -0,0 +1,61 @@
+import os
+import sys
+
+from app.common.config import VERSION, YEAR, AUTHOR
+
+if sys.platform == "win32":
+ args = [
+ 'nuitka',
+ '--standalone',
+ '--windows-console-mode=disable',
+ '--plugin-enable=pyside6' ,
+ '--assume-yes-for-downloads',
+ # '--msvc=latest', # Use MSVC
+ '--mingw64', # Use MinGW
+ '--show-memory' ,
+ '--show-progress' ,
+ '--windows-icon-from-ico=resources/logo.ico',
+ '--company-name=XiaoYouChR',
+ '--product-name="Ghost Downloader"',
+ f'--file-version={VERSION}',
+ f'--product-version={VERSION}',
+ '--file-description="Ghost Downloader"',
+ f'--copyright="Copyright(C) {YEAR} {AUTHOR}"'
+ '--output-dir=dist',
+ 'Ghost-Downloader-3.py',
+ ]
+elif sys.platform == "darwin":
+ args = [
+ 'python3 -m nuitka',
+ '--standalone',
+ '--plugin-enable=pyside6',
+ '--show-memory',
+ '--show-progress',
+ "--macos-create-app-bundle",
+ "--assume-yes-for-download",
+ "--macos-app-mode=gui",
+ f"--macos-app-version={VERSION}",
+ '--macos-app-name="Ghost Downloader"',
+ "--macos-app-icon=resources/logo.icns",
+ f'--copyright="Copyright(C) {YEAR} {AUTHOR}"'
+ '--output-dir=dist',
+ '--macos-signed-app-name=com.xiaoyouchr.ghostdownloader'
+ 'Ghost-Downloader-3.py',
+ ]
+else:
+ args = [
+ 'nuitka',
+ '--standalone',
+ '--plugin-enable=pyside6',
+ '--include-qt-plugins=platforms',
+ '--assume-yes-for-downloads',
+ '--show-memory',
+ '--show-progress',
+ '--linux-icon=resources/logo.ico',
+ '--output-dir=dist',
+ 'Ghost-Downloader-3.py',
+ ]
+
+
+os.system(' '.join(args))
+
diff --git a/plugins/jy_os_page.py b/plugins/jy_os_page.py
index 09d9e675..e669965d 100644
--- a/plugins/jy_os_page.py
+++ b/plugins/jy_os_page.py
@@ -10,14 +10,13 @@ from PySide6.QtWidgets import QWidget, QFrame, QVBoxLayout, QSizePolicy, QHBoxLa
from loguru import logger
from qfluentwidgets import SmoothScrollArea, TitleLabel, SettingCardGroup, OptionsConfigItem, OptionsValidator, \
ComboBoxSettingCard, FluentIcon as FIF, TextEdit, PushSettingCard, RangeSettingCard, RangeConfigItem, \
- RangeValidator, PrimaryPushButton, PushButton, MessageBox, ElevatedCardWidget, RoundMenu, Action, PixmapLabel, BodyLabel, \
+ RangeValidator, PrimaryPushButton, PushButton, MessageBox, ElevatedCardWidget, RoundMenu, Action, PixmapLabel, \
+ BodyLabel, \
PrimarySplitPushButton, NavigationItemPosition, FluentStyleSheet, IndeterminateProgressRing
from qfluentwidgets.components.dialog_box.mask_dialog_base import MaskDialogBase
-from app.common.config import Headers
from app.common.methods import getProxy, addDownloadTask
from app.common.plugin_base import PluginBase
-from app.common.signal_bus import signalBus
class JyOSPagePlugin(PluginBase):
diff --git a/requirements.txt b/requirements.txt
index 13ea675a..0dc8bf52 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-PySide6-Fluent-Widgets>=1.6.4
+PySide6-Fluent-Widgets>=1.7.4
PySide6==6.7.2
loguru~=0.7.2
httpx[socks]~=0.27.0
diff --git a/tests/test_pop_up_window.py b/tests/test_pop_up_window.py
index 55bdb73c..31a23da3 100644
--- a/tests/test_pop_up_window.py
+++ b/tests/test_pop_up_window.py
@@ -1,12 +1,10 @@
import sys
-from time import sleep
from PySide6.QtWidgets import QApplication, QPushButton, QVBoxLayout, QWidget
-from app.view.pop_up_window import FinishedPopUpWindow, ReceivedPopUpWindow
-
# noinspection PyUnresolvedReferences
import Res_rc
+from app.view.pop_up_window import FinishedPopUpWindow, ReceivedPopUpWindow
class TestPopUpWindow(QWidget):