Updated windows portable GH Action
All checks were successful
Check / mypy (push) Successful in 46s
Check / ruff (push) Successful in 30s

This commit is contained in:
Christoph Stahl 2025-07-02 23:28:28 +02:00
parent 8107d47e11
commit b10b8dfade

View file

@ -30,7 +30,7 @@ jobs:
- name: Download and extract latest MPV nightly - name: Download and extract latest MPV nightly
run: | run: |
Invoke-WebRequest -Uri https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20250215/mpv-dev-x86_64-20250215-git-834f99e.7z -OutFile mpv.7z Invoke-WebRequest -Uri https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20250702/mpv-dev-x86_64-20250702-git-a043624.7z -OutFile mpv.7z
7z x mpv.7z 7z x mpv.7z
@ -49,15 +49,15 @@ jobs:
Copy-Item -Verbose syng/static/background.png work/portable/ Copy-Item -Verbose syng/static/background.png work/portable/
Copy-Item -Verbose syng/static/background20perc.png work/portable/ Copy-Item -Verbose syng/static/background20perc.png work/portable/
Copy-Item -Verbose libmpv-2.dll work/portable/ Copy-Item -Verbose libmpv-2.dll work/portable/
Copy-Item -Verbose ffmpeg-7.1-full_build/bin/ffmpeg.exe work/portable/ Copy-Item -Verbose ffmpeg-7.1.1-full_build/bin/ffmpeg.exe work/portable/
mkdir work/install # mkdir work/install
Copy-Item -Recurse -Verbose syng work/install/syng # Copy-Item -Recurse -Verbose syng work/install/syng
Copy-Item -Verbose requirements-client.txt work/install/requirements.txt # Copy-Item -Verbose requirements-client.txt work/install/requirements.txt
Copy-Item -Verbose resources/icons/syng.ico work/install/ # Copy-Item -Verbose resources/icons/syng.ico work/install/
Copy-Item -Verbose syng/static/background.png work/install/ # Copy-Item -Verbose syng/static/background.png work/install/
Copy-Item -Verbose syng/static/background20perc.png work/install/ # Copy-Item -Verbose syng/static/background20perc.png work/install/
Copy-Item -Verbose libmpv-2.dll work/install/ # Copy-Item -Verbose libmpv-2.dll work/install/
Copy-Item -Verbose ffmpeg-7.1-full_build/bin/ffmpeg.exe work/install/ # Copy-Item -Verbose ffmpeg-7.1-full_build/bin/ffmpeg.exe work/install/
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
name: Install Python name: Install Python
with: with:
@ -78,30 +78,30 @@ jobs:
run: pip install -r requirements.txt run: pip install -r requirements.txt
working-directory: ./work working-directory: ./work
# - name: Bundle Syng (portable) - name: Bundle Syng (portable)
# run:
# pyinstaller -n "syng-${{ env.VERSION }}" -F -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' syng/main.py
# working-directory: ./work/portable
- name: Bundle Syng (install)
run: run:
pyinstaller -D --contents-directory data -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' -n syng syng/main.py pyinstaller -n "syng-${{ env.VERSION }}" -F -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' syng/main.py
working-directory: ./work/install working-directory: ./work/portable
# build msi # - name: Bundle Syng (install)
- name: Add msbuild to PATH # run:
uses: microsoft/setup-msbuild@v2 # pyinstaller -D --contents-directory data -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' -n syng syng/main.py
- name: Install WiX # working-directory: ./work/install
run: | #
dotnet tool install --global wix --version 5.0.2 # # build msi
wix extension add -g WixToolset.UI.wixext/5.0.2 # - name: Add msbuild to PATH
- name: Copy wix file to dist # uses: microsoft/setup-msbuild@v2
run: | # - name: Install WiX
Copy-Item -Verbose resources/windows/syng.wxs work/install/dist/syng.wxs # run: |
Copy-Item -Verbose resources/windows/agpl-3.0.rtf work/install/dist/agpl-3.0.rtf # dotnet tool install --global wix --version 5.0.2
- name: Build WiX on Windows # wix extension add -g WixToolset.UI.wixext/5.0.2
run: wix build -ext WixToolset.UI.wixext .\syng.wxs # - name: Copy wix file to dist
working-directory: ./work/install/dist # run: |
# Copy-Item -Verbose resources/windows/syng.wxs work/install/dist/syng.wxs
# Copy-Item -Verbose resources/windows/agpl-3.0.rtf work/install/dist/agpl-3.0.rtf
# - name: Build WiX on Windows
# run: wix build -ext WixToolset.UI.wixext .\syng.wxs
# working-directory: ./work/install/dist
# - name: Upload artifact (portable) # - name: Upload artifact (portable)
@ -113,5 +113,5 @@ jobs:
- name: Upload artifact (install) - name: Upload artifact (install)
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Syng Version ${{ env.VERSION }} Installer name: Syng Version ${{ env.VERSION }}
path: work/install/dist/syng.msi path: work/install/portable/syng-${{ env.VERSION }}.exe