The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
ci:新增 Inno Setup 安装程序构建步骤并支持发布到 Release
XiaoYouChR579d2f9de006
diff --git a/.github/workflows/build-with-plugin.yml b/.github/workflows/build-with-plugin.ymldeleted file mode 100644index 30bac31a..00000000--- a/.github/workflows/build-with-plugin.yml+++ /dev/null@@ -1,179 +0,0 @@-name: Build Ghost Downloader 3 With Plugin--on:- workflow_dispatch:--jobs:- build-windows:- strategy:- matrix:- architecture: [x86_64, arm64]- runs-on: windows-2019- steps:- - name: Checkout code- uses: actions/checkout@v2-- - name: Set up Python 3.11- uses: actions/setup-python@v4- with:- python-version: '3.11'-- - name: Install dependencies- run: |- pip install --timeout=300 -r requirements.txt-- - name: Build with Nuitka- run: |- python -c "from app.common.config import VERSION; f = open('version.txt', 'w'); f.write(VERSION); f.close()"- $VERSION = gc version.txt- Write-Host "VERSION=$VERSION"- echo "VERSION=$VERSION" >> $env:GITHUB_ENV- del version.txt- python deploy.py- nuitka --module plugins/jy_os_page.py- mkdir -p dist/Ghost-Downloader-3.dist/plugins/- mv jy_os_page*.pyd dist/Ghost-Downloader-3.dist/plugins/-- - name: Upload artifacts- uses: actions/upload-artifact@v4- with:- name: GD3-For-JackYao-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}- path: dist/Ghost-Downloader-3.dist-- build-macos-14-arm:- strategy:- matrix:- architecture: [arm64]- runs-on: macos-14- steps:- - name: Checkout code- uses: actions/checkout@v2-- - name: Set up Python 3.11- uses: actions/setup-python@v4- with:- python-version: '3.11'-- - name: Install dependencies- run: |- pip install --timeout=300 -r requirements.txt-- - name: Build with Nuitka- run: |- python3 -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"- rm -rf version.txt- python3 deploy.py- chmod u+x "dist/Ghost-Downloader-3.app/Contents/MacOS/Ghost-Downloader-3"- rm -rf "dist/Ghost-Downloader-3.build"- rm -rf "dist/Ghost-Downloader-3.dist"- mv "dist/Ghost-Downloader-3.app" "dist/Ghost Downloader.app"- mv "resources/修复软件损坏" "dist/修复软件损坏"- python3 -m nuitka --module plugins/jy_os_page.py- mkdir -p dist/Ghost-Downloader-3.dist/plugins/- mv jy_os_page*.so dist/Ghost-Downloader-3.dist/plugins/-- - name: Create DMG- run: |- ln -s /Applications dist/Applications- sleep 1- hdiutil create -srcfolder "dist/" -volname "Ghost-Downloader-3" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 400m "GD3-For-JackYao-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg"-- - name: Upload artifacts- uses: actions/upload-artifact@v4- with:- name: GD3-For-JackYao-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}- path: GD3-For-JackYao-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg-- build-macos-13-x86_64:- strategy:- matrix:- architecture: [x86_64]- runs-on: macos-13- steps:- - name: Checkout code- uses: actions/checkout@v2-- - name: Remove problematic brew libs- run: |- brew remove --force --ignore-dependencies openssl@3- brew cleanup openssl@3-- - name: Set up Python 3.11- uses: actions/setup-python@v4- with:- python-version: '3.11'-- - name: Install dependencies- run: |- pip install --timeout=300 -r requirements.txt-- - name: Build with Nuitka- run: |- python3 -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"- rm -rf version.txt- python3 deploy.py- chmod u+x "dist/Ghost-Downloader-3.app/Contents/MacOS/Ghost-Downloader-3"- rm -rf "dist/Ghost-Downloader-3.build"- rm -rf "dist/Ghost-Downloader-3.dist"- mv "dist/Ghost-Downloader-3.app" "dist/Ghost Downloader.app"- mv "resources/修复软件损坏" "dist/修复软件损坏"- python3 -m nuitka --module plugins/jy_os_page.py- mkdir -p dist/Ghost-Downloader-3.dist/plugins/- mv jy_os_page*.so dist/Ghost-Downloader-3.dist/plugins/-- - name: Reinstall openssl libs- run: |- brew install openssl@3-- - name: Create DMG- run: |- ln -s /Applications dist/Applications- sleep 1- hdiutil create -srcfolder "dist/" -volname "Ghost-Downloader-3" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 400m "GD3-For-JackYao-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg"-- - name: Upload artifacts- uses: actions/upload-artifact@v4- with:- name: GD3-For-JackYao-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}- path: GD3-For-JackYao-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg-- build-ubuntu:- strategy:- matrix:- architecture: [x86_64, arm64]- runs-on: ubuntu-22.04- steps:- - name: Checkout code- uses: actions/checkout@v2-- - name: Set up Python 3.11- uses: actions/setup-python@v4- with:- python-version: '3.11'-- - name: Install dependencies- run: |- sudo apt-get update- sudo apt-get install -y libegl1-mesa- pip install --timeout=300 -r requirements.txt-- - name: Build with Nuitka- run: |- python3 -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"- rm -rf version.txt- python deploy.py- nuitka --module plugins/jy_os_page.py- mkdir -p "dist/Ghost-Downloader-3.dist/plugins/"- mv jy_os_page*.so "dist/Ghost-Downloader-3.dist/plugins/"-- - name: Upload artifacts- uses: actions/upload-artifact@v4- with:- name: GD3-For-JackYao-v${{ env.VERSION }}-Linux-${{ matrix.architecture }}- path: dist/Ghost-Downloader-3.distdiff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 4f04a50e..2fb6ecd4 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -1,7 +1,8 @@-name: Build Ghost Downloader 3+name: Releaseon:- workflow_dispatch:+ release:+ types: [published]jobs:build-windows:@@ -30,15 +31,37 @@ jobs:echo "VERSION=$VERSION" >> $env:GITHUB_ENVdel version.txtpython deploy.py-# nuitka --module plugins/jy_os_page.py-# mv jy_os_page*.pyd output/- - name: Upload artifacts- uses: actions/upload-artifact@v4+ - name: Download Inno Setup Translation Files+ run: |+ Invoke-WebRequest -Uri "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/ChineseSimplified.isl" -OutFile "C:\Program Files (x86)\Inno Setup 6\Languages\ChineseSimplified.isl"++ - name: Build Installer+ uses: Minionguyjpro/[email protected]with:- name: Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}- path: dist/Ghost-Downloader-3.dist+ path: Ghost-Downloader-3.iss+ - name: Create zip file+ shell: pwsh+ run: |+ $distPath = "dist/Ghost-Downloader.dist"+ $zipFile = "Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}.zip"++ # Create a zip file containing the contents of Ghost-Downloader.dist, without the folder itself+ Write-Output "Zipping contents of $distPath..."+ Compress-Archive -Path "$distPath\*" -DestinationPath $zipFile+ Write-Output "Zip created at $zipFile"++ mv dist/Ghost-Downloader-v${{ env.VERSION }}-Windows-Setup.exe dist/Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}-Setup.exe++ - name: Upload to release+ uses: softprops/action-gh-release@v2+ if: startsWith(github.ref, 'refs/tags/')+ with:+ files: |+ Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}.zip+ dist/Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}-Setup.exe+build-macos-14-arm:strategy:matrix:@@ -73,14 +96,28 @@ jobs:- name: Create DMGrun: |ln -s /Applications dist/Applications- sleep 1- 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+ attempt=0+ max_attempts=10+ while [ $attempt -lt $max_attempts ]; do+ hdiutil create -srcfolder "dist/" -volname "Ghost-Downloader" -fs HFS+ \+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 400m \+ "Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg" && break++ attempt=$((attempt + 1))+ echo "Attempt $attempt failed, retrying..."+ sleep 1 # 等待 1 秒后重试+ done++ if [ $attempt -eq $max_attempts ]; then+ echo "Failed to create DMG after $max_attempts attempts"+ fi++ - name: Upload to release+ uses: softprops/action-gh-release@v2+ if: startsWith(github.ref, 'refs/tags/')with:- name: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}- path: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg+ files: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmgbuild-macos-13-x86_64:strategy:@@ -161,12 +198,20 @@ jobs:echo "VERSION=${version}" >> "$GITHUB_ENV"rm -rf version.txtpython 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/"- - name: Upload artifacts- uses: actions/upload-artifact@v4+ - name: Zip the contents of Ghost-Downloader+ shell: pwsh+ run: |+ $distPath = "dist/Ghost-Downloader"+ $zipFile = "Ghost-Downloader-v${{ env.VERSION }}-Linux-${{ matrix.architecture }}.zip"++ # Create a zip file containing the contents of Ghost-Downloader.dist, without the folder itself+ Write-Output "Zipping contents of $distPath..."+ Compress-Archive -Path "$distPath\*" -DestinationPath $zipFile+ Write-Output "Zip created at $zipFile"++ - name: Upload to release+ uses: softprops/action-gh-release@v2+ if: startsWith(github.ref, 'refs/tags/')with:- name: Ghost-Downloader-v${{ env.VERSION }}-Linux-${{ matrix.architecture }}- path: dist/Ghost-Downloader-3.dist+ files: Ghost-Downloader-v${{ env.VERSION }}-Linux-${{ matrix.architecture }}.zipdiff --git a/.github/workflows/build_Linux.yml b/.github/workflows/build_Linux.ymlnew file mode 100644index 00000000..cc37a913--- /dev/null+++ b/.github/workflows/build_Linux.yml@@ -0,0 +1,39 @@+name: Build Linux++on:+ workflow_dispatch:++jobs:+ build-ubuntu:+ strategy:+ matrix:+ architecture: [x86_64, arm64]+ runs-on: ubuntu-22.04+ steps:+ - name: Checkout code+ uses: actions/checkout@v2++ - name: Set up Python 3.11+ uses: actions/setup-python@v4+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ sudo apt-get update+ sudo apt-get install -y libegl1-mesa+ pip install --timeout=300 -r requirements.txt++ - name: Build with Nuitka+ run: |+ python3 -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"+ rm -rf version.txt+ python deploy.py++ - name: Upload artifacts+ uses: actions/upload-artifact@v4+ with:+ name: Ghost-Downloader-v${{ env.VERSION }}-Linux-${{ matrix.architecture }}+ path: dist/Ghost-Downloader-3.distdiff --git a/.github/workflows/build_Windows.yml b/.github/workflows/build_Windows.ymlnew file mode 100644index 00000000..c9d098fe--- /dev/null+++ b/.github/workflows/build_Windows.yml@@ -0,0 +1,53 @@+name: Build Windows++on:+ workflow_dispatch:++jobs:+ build-windows:+ strategy:+ matrix:+ architecture: [x86_64, arm64]+ runs-on: windows-2019+ steps:+ - name: Checkout code+ uses: actions/checkout@v2++ - name: Set up Python 3.11+ uses: actions/setup-python@v4+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ pip install --timeout=300 -r requirements.txt++ - name: Build with Nuitka+ run: |+ python -c "from app.common.config import VERSION; f = open('version.txt', 'w'); f.write(VERSION); f.close()"+ $VERSION = gc version.txt+ Write-Host "VERSION=$VERSION"+ echo "VERSION=$VERSION" >> $env:GITHUB_ENV+ del version.txt+ python deploy.py++ - name: Download Inno Setup Translation Files+ run: |+ Invoke-WebRequest -Uri "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/ChineseSimplified.isl" -OutFile "C:\Program Files (x86)\Inno Setup 6\Languages\ChineseSimplified.isl"++ - name: Build Installer+ uses: Minionguyjpro/[email protected]+ with:+ path: Ghost-Downloader-3.iss++ - name: Upload Installer+ uses: actions/upload-artifact@v4+ with:+ name: Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}-Setup+ path: dist/Ghost-Downloader-v${{ env.VERSION }}-Windows-Setup.exe++ - name: Upload artifacts+ uses: actions/upload-artifact@v4+ with:+ name: Ghost-Downloader-v${{ env.VERSION }}-Windows-${{ matrix.architecture }}+ path: dist/Ghost-Downloader-3.distdiff --git a/.github/workflows/build_macOS.yml b/.github/workflows/build_macOS.ymlnew file mode 100644index 00000000..8e573310--- /dev/null+++ b/.github/workflows/build_macOS.yml@@ -0,0 +1,114 @@+name: Build macOS++on:+ workflow_dispatch:++jobs:+ build-macos-14-arm:+ strategy:+ matrix:+ architecture: [arm64]+ runs-on: macos-14+ steps:+ - name: Checkout code+ uses: actions/checkout@v2++ - name: Set up Python 3.11+ uses: actions/setup-python@v4+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ pip install --timeout=300 -r requirements.txt++ - name: Build with Nuitka+ run: |+ python3 -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"+ rm -rf version.txt+ python3 deploy.py+ chmod u+x "dist/Ghost-Downloader-3.app/Contents/MacOS/Ghost-Downloader-3"+ rm -rf "dist/Ghost-Downloader-3.build"+ rm -rf "dist/Ghost-Downloader-3.dist"+ mv "dist/Ghost-Downloader-3.app" "dist/Ghost Downloader.app"+ mv "resources/修复软件损坏" "dist/修复软件损坏"++ - name: Create DMG+ run: |+ ln -s /Applications dist/Applications++ attempt=0+ max_attempts=10+ while [ $attempt -lt $max_attempts ]; do+ hdiutil create -srcfolder "dist/" -volname "Ghost-Downloader" -fs HFS+ \+ -fsargs "-c c=64,a=16,e=16" -format UDZO -size 400m \+ "Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg" && break++ attempt=$((attempt + 1))+ echo "Attempt $attempt failed, retrying..."+ sleep 1 # 等待 1 秒后重试+ done++ if [ $attempt -eq $max_attempts ]; then+ echo "Failed to create DMG after $max_attempts attempts"+ fi++ - name: Upload artifacts+ uses: actions/upload-artifact@v4+ with:+ name: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}+ path: Ghost-Downloader-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmg++ build-macos-13-x86_64:+ strategy:+ matrix:+ architecture: [x86_64]+ runs-on: macos-13+ steps:+ - name: Checkout code+ uses: actions/checkout@v2++ - name: Remove problematic brew libs+ run: |+ brew remove --force --ignore-dependencies openssl@3+ brew cleanup openssl@3++ - name: Set up Python 3.11+ uses: actions/setup-python@v4+ with:+ python-version: '3.11'++ - name: Install dependencies+ run: |+ pip install --timeout=300 -r requirements.txt++ - name: Build with Nuitka+ run: |+ python3 -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"+ rm -rf version.txt+ python3 deploy.py+ chmod u+x "dist/Ghost-Downloader-3.app/Contents/MacOS/Ghost-Downloader-3"+ rm -rf "dist/Ghost-Downloader-3.build"+ rm -rf "dist/Ghost-Downloader-3.dist"+ mv "dist/Ghost-Downloader-3.app" "dist/Ghost Downloader.app"+ mv "resources/修复软件损坏" "dist/修复软件损坏"++ - name: Reinstall openssl libs+ run: |+ brew install openssl@3++ - name: Create DMG+ run: |+ ln -s /Applications dist/Applications+ sleep 1+ 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-v${{ env.VERSION }}-macOS-${{ matrix.architecture }}.dmgdiff --git a/Ghost-Downloader-3.iss b/Ghost-Downloader-3.issnew file mode 100644index 00000000..8fbdda8e--- /dev/null+++ b/Ghost-Downloader-3.iss@@ -0,0 +1,58 @@+; Script generated by the Inno Setup Script Wizard.+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!++#define MyAppName "Ghost Downloader"+#define MyAppVersion "3.5.8"+#define MyAppPublisher "XiaoYouChR"+#define MyAppURL "https://github.com/XiaoYouChR/Ghost-Downloader-3/"+#define MyAppExeName "Ghost-Downloader-3.exe"++[Setup]+; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)+AppId={{C7E5C3F5-8579-4C76-BC5F-2D18D82FD9B8}+AppName={#MyAppName}+AppVersion={#MyAppVersion}+;AppVerName={#MyAppName} {#MyAppVersion}+AppPublisher={#MyAppPublisher}+AppPublisherURL={#MyAppURL}+AppSupportURL={#MyAppURL}+AppUpdatesURL={#MyAppURL}+DefaultDirName={autopf}\{#MyAppName}+UninstallDisplayIcon={app}\{#MyAppExeName}+; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run+; on anything but x64 and Windows 11 on Arm.+ArchitecturesAllowed=x64compatible+; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the+; install be done in "64-bit mode" on x64 or Windows 11 on Arm,+; meaning it should use the native 64-bit Program Files directory and+; the 64-bit view of the registry.+ArchitecturesInstallIn64BitMode=x64compatible+DisableProgramGroupPage=yes+LicenseFile=LICENSE+; Remove the following line to run in administrative install mode (install for all users).+PrivilegesRequired=lowest+OutputDir=dist+OutputBaseFilename=Ghost-Downloader-v{#MyAppVersion}-Windows-Setup+SetupIconFile=resources/logo.ico+SolidCompression=yes+WizardStyle=modern++[Languages]+Name: "english"; MessagesFile: "compiler:Default.isl"+Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"++[Tasks]+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked++[Files]+Source: "dist/Ghost-Downloader-3.dist/{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion+Source: "dist/Ghost-Downloader-3.dist/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs+; NOTE: Don't use "Flags: ignoreversion" on any shared system files++[Icons]+Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"+Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon++[Run]+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent