Skip to content

Build Release Package for Windows #1

Build Release Package for Windows

Build Release Package for Windows #1

# Release workflow for Windows
# Builds 64-bit packages (ZIP and MSI) for Windows. Uses vcpkg to source all third-party dependencies,
# including projectM.
name: Build Release Package for Windows
on: workflow_dispatch
jobs:
build:
name: Windows, x64
runs-on: windows-latest
env:
USERNAME: projectM-visualizer
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
FEED_URL: https://nuget.pkg.github.com/projectM-visualizer/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/projectM-visualizer/index.json,readwrite"
steps:
- name: Checkout vcpkg
uses: actions/checkout@v4
with:
repository: microsoft/vcpkg
path: vcpkg
submodules: recursive
- name: Bootstrap vcpkg
shell: pwsh
run: ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
- name: Add NuGet sources
shell: pwsh
run: |
.$(${{ env.VCPKG_EXE }} fetch nuget) `
sources add `
-Source "${{ env.FEED_URL }}" `
-StorePasswordInClearText `
-Name GitHubPackages `
-UserName "${{ env.USERNAME }}" `
-Password "${{ secrets.VCPKG_PACKAGES_TOKEN }}"
.$(${{ env.VCPKG_EXE }} fetch nuget) `
setapikey "${{ secrets.VCPKG_PACKAGES_TOKEN }}" `
-Source "${{ env.FEED_URL }}"
- name: Checkout projectMSDL Sources
uses: actions/checkout@v4
with:
path: frontend-sdl2
submodules: recursive
- name: Checkout Cream of the Crop preset pack
uses: actions/checkout@v4
with:
repository: projectM-visualizer/presets-cream-of-the-crop
path: presets-cream-of-the-crop
- name: Checkout Milkdrop Texture Pack
uses: actions/checkout@v4
with:
repository: projectM-visualizer/presets-milkdrop-texture-pack
path: presets-milkdrop-texture-pack
- name: Build projectMSDL
run: |
mkdir cmake-build-frontend-sdl2
cmake -G "Visual Studio 17 2022" -A "X64" `
-S "${{ github.workspace }}/frontend-sdl2" `
-B "${{ github.workspace }}/cmake-build-frontend-sdl2" `
-DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=x64-windows `
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/install-libprojectm" `
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" `
-DPRESET_DIRS="${{ github.workspace }}/presets-cream-of-the-crop" `
-DTEXTURE_DIRS="${{ github.workspace }}/presets-milkdrop-texture-pack/textures" `
-DENABLE_INSTALL_BDEPS=ON
cmake --build "${{ github.workspace }}/cmake-build-frontend-sdl2" --parallel --config Release
- name: Package projectMSDL
run: |
cd cmake-build-frontend-sdl2
cpack -G ZIP
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: projectMSDL-Windows-Portable-x64
path: |
cmake-build-frontend-sdl2/*.zip