Build chiaki-ng msys2 Windows #49
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.8.1" | |
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 | |
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 | |
run: | | |
aqt install-qt -O "${QT_PATH}" windows desktop "${QT_VERSION}" win64_mingw -m qtpositioning qtwebchannel qtwebsockets qtserialport | |
- 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 -DCMAKE_PREFIX_PATH="${QT_PATH}/${QT_VERSION}/mingw_64" | |
- 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 | |
export PATH="${QT_PATH}/${QT_VERSION}/mingw_64/bin:${PATH}" | |
export PATH="${{ github.workspace }}/build/third-party/cpp-steam-tools:${PATH}" | |
echo build/gui/chiaki.exe > tmp0.txt | |
while [ -e tmp0.txt ] | |
do | |
cp tmp0.txt tmp.txt | |
rm tmp0.txt | |
sort -u tmp.txt -o tmp.txt | |
ldd $(<tmp.txt) | grep -v ":" | cut -d " " -f3 | grep -iv "system32" | xargs -d $'\n' sh -c 'for arg do echo "$arg" >> tmp0.txt; cp "$arg" chiaki-ng-Win/; done' | |
done | |
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 | |