diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8928912..3f648ad 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -3,7 +3,7 @@ name: Build and Push Docker Image on: release: types: [published] - workflow_dispatch: # 允许手动触发工作流 + workflow_dispatch: jobs: publish-docker: diff --git a/.github/workflows/executable_build.yml b/.github/workflows/executable_build.yml index 20b0f62..457d24c 100644 --- a/.github/workflows/executable_build.yml +++ b/.github/workflows/executable_build.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [macos-latest, windows-latest] python-version: [3.12] steps: @@ -28,12 +28,15 @@ jobs: pip install pyinstaller - name: 构建可执行文件 + if: runner.os == 'Windows' run: | - if [ "$RUNNER_OS" = "Windows" ]; then - pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static;static" --add-data "locale;locale" .\main.py - else - pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py - fi + pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static;static" --add-data "locale;locale" .\main.py + shell: pwsh + + - name: Build executable on macOS + if: runner.os == 'macOS' + run: | + pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py - name: 上传文件 uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index cc6babc..ea9439f 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@
如果仅需下载无水印作品文件,建议选择 程序运行 或 Docker 运行;如果有其他需求,建议选择 源码运行!
建议自行设置 cookie 参数,若不设置该参数,程序功能可能无法正常使用!
Windows 10 及以上用户可前往 Releases 下载程序压缩包,解压后打开程序文件夹,双击运行 main.exe 即可使用。
Mac OS(尚未测试)、Windows 10 及以上用户可前往 Releases 下载程序压缩包,解压后打开程序文件夹,双击运行 main 即可使用。
若通过此方式使用程序,文件默认下载路径为:.\_internal\Download;配置文件路径为:.\_internal\settings.json
3.12 的 Python 解释器pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt 命令安装程序所需模块pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt 命令安装程序所需模块main.py 即可使用If you only need to download watermark-free content files, it is recommended to choose Program Run; if you have other needs, it is recommended to choose Source Code Run!
It is recommended to set the cookie parameter manually; if this parameter is not set, the program functions may not work properly!
Windows 10 and above users can go to Releases to download the program package, unzip it, open the program folder, and double-click to run main.exe to use.
Mac OS, Windows 10 and above users can go to Releases to download the program package, unzip it, open the program folder, and double-click to run main to use.
If you use the program in this way, the default download path for files is: .\_internal\Download; the configuration file path is: .\_internal\settings.json
3.12pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt to install the required modulespip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt to install the required modulesmain.py to use