From b9e56894d261948ba5dcf40ced64cadbc91f8c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Sat, 21 May 2022 18:23:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0pyinstaller=E6=89=93=E5=8C=85?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac99e05..c1aa905 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,7 @@ jobs: - name: 🧳 Install dependencies run: | + echo y | pip install --no-python-version-warning --disable-pip-version-check pyinstaller echo y | pip install --no-python-version-warning --disable-pip-version-check nuitka echo y | pip install --no-python-version-warning --disable-pip-version-check zstandard echo y | pip install --no-python-version-warning --disable-pip-version-check pygame @@ -43,8 +44,9 @@ jobs: - name: Build pypvz package run: | + pyinstaller -F main.py -n pypvz-with-python${{ matrix.python_version }}-pyinstaller-x64.exe --distpath ./out echo y | python -m nuitka --standalone --onefile --show-progress --show-memory --output-dir=out --windows-icon-from-ico=pypvz.ico --include-data-dir=resources=resources --include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libogg-0.dll=libogg-0.dll --include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libopus-0.dll=libopus-0.dll --include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libopusfile-0.dll=libopusfile-0.dll --include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbisfile-3.dll=libvorbisfile-3.dll --include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbis-0.dll=libvorbis-0.dll --windows-disable-console main.py - mv ./out/main.exe ./out/pypvz-with-python${{ matrix.python_version }}-windows-msvc-x64.exe + mv ./out/main.exe ./out/pypvz-with-python${{ matrix.python_version }}-nuitka-msvc-x64.exe # artifact压缩包处上传包含exe和运行环境的文件夹 - name: "Upload binaries"