Build chiaki-ng msys2 Windows #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build chiaki-ng msys2 Windows | |
on: | |
workflow_dispatch: | |
env: | |
QT_PATH: "/opt/qt" | |
QT_VERSION: "6.7.3" | |
jobs: | |
build-windows_x64-msys2: | |
name: Build windows msys2 version | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Disable autocrlf | |
shell: pwsh | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
update: true | |
install: git | |
pacboy: >- | |
ca-certificates:p | |
cc:p | |
cmake:p | |
curl:p | |
diffutils:p | |
fast_float:p | |
fftw:p | |
hidapi:p | |
json-c:p | |
lcms2:p | |
libdovi:p | |
libplacebo:p | |
meson:p | |
miniupnpc:p | |
nasm:p | |
ninja:p | |
openssl:p | |
opus:p | |
pkgconf:p | |
protobuf-c:p | |
python:p | |
python-psutil:p | |
python-glad:p | |
python-jinja:p | |
python-pip:p | |
SDL2:p | |
shaderc:p | |
speexdsp:p | |
spirv-cross:p | |
vulkan:p | |
vulkan-headers:p | |
- name: Install python protobuf, aqtinstall, and zip | |
run: | | |
pip install protobuf aqtinstall | |
pacman -S git make unzip --noconfirm | |
- name: Install qt and add to path | |
run: | | |
aqt install-qt -O "${QT_PATH}" windows desktop "${QT_VERSION}" win64_mingw -m qtpositioning qtwebchannel qtwebsockets qtserialport | |
echo PATH=\""${QT_PATH}/${QT_VERSION}/mingw_64/bin:$PATH"\" >> "$HOME/.bashrc" | |
echo LD_LIBRARY_PATH=\""${QT_PATH}/${QT_VERSION}/mingw_64/lib:$LD_LIBRARY_PATH"\" >> "$HOME/.bashrc" | |
- name: Build libbplacebo | |
run: | | |
scripts/build-libplacebo-windows.sh | |
- name: Setup ffmpeg | |
run: | | |
curl -LO https://github.com/r52/FFmpeg-Builds/releases/download/latest/ffmpeg-n7.1-latest-win64-gpl-shared-7.1.zip | |
unzip ffmpeg-n7.1-latest-win64-gpl-shared-7.1.zip | |
cp -a "ffmpeg-n7.1-latest-win64-gpl-shared-7.1/bin/." /mingw64/bin | |
cp -a "ffmpeg-n7.1-latest-win64-gpl-shared-7.1/include/." /mingw64/include | |
cp -a "ffmpeg-n7.1-latest-win64-gpl-shared-7.1/lib/." /mingw64/lib | |
- name: Configure chiaki-ng | |
run: | | |
cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCHIAKI_ENABLE_CLI=OFF | |
- name: Build chiaki-ng | |
run: | | |
cmake --build build --config Release --clean-first --target chiaki | |
- name: Deploy chiaki-ng | |
run: | | |
mkdir chiaki-ng-Win | |
cp build/gui/chiaki.exe chiaki-ng-Win | |
cp build/third-party/cpp-steam-tools/libcpp-steam-tools.dll chiaki-ng-Win/ | |
ldd build/gui/chiaki.exe | cut -d " " -f3 | grep -iv "system32" | xargs -Ix -n1 cp x chiaki-ng-Win/ | |
cp scripts/qtwebengine_import.qml gui/src/qml/ | |
windeployqt6.exe --no-translations --qmldir=$PWD/gui/src/qml --release chiaki-ng-Win/chiaki.exe | |
- name: Compile .ISS to .EXE Installer | |
uses: Minionguyjpro/[email protected] | |
with: | |
path: "scripts/chiaki-ng.iss" | |
options: /O+ | |
- name: Upload chiaki-ng Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chiaki-ng-win_x64-MSYS2-Release.zip | |
path: chiaki-ng-windows-installer.exe | |
if-no-files-found: error | |
retention-days: 7 | |