Windows: remove all files on uninstall #50
Workflow file for this run
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 | |
on: | |
push: | |
branches: "*" | |
tags: | |
- "[0-9].[0-9].[0-9]" | |
jobs: | |
build_windows: | |
name: Build for Windows | |
runs-on: windows-latest | |
steps: | |
- name: Set up MSVC Environment | |
uses: compnerd/gha-setup-vsdevenv@main | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: "6.5.*" | |
- name: Install Taglib | |
run: | | |
git clone --recurse-submodules https://github.com/taglib/taglib.git | |
cd taglib | |
cmake -B build -G "Visual Studio 17 2022" -A x64 -DWITH_ZLIB=OFF -DBUILD_SHARED_LIBS=ON -DENABLE_STATIC_RUNTIME=OFF -DBUILD_TESTING=OFF | |
msbuild build/install.vcxproj -p:Configuration=Release | |
cp -r "C:/Program Files/taglib/include/taglib" ../include | |
copy build/taglib/Release/tag.dll ../lib/win64 | |
copy build/taglib/Release/tag.lib ../lib/win64 | |
- name: Install cld2 | |
run: | | |
cd include/cld2/internal | |
cl /TP /GR /EHsc /c /MD cldutil.cc cldutil_shared.cc compact_lang_det.cc compact_lang_det_hint_code.cc compact_lang_det_impl.cc debug.cc fixunicodevalue.cc generated_entities.cc generated_language.cc generated_ulscript.cc getonescriptspan.cc lang_script.cc offsetmap.cc scoreonescriptspan.cc tote.cc utf8statetable.cc cld_generated_cjk_uni_prop_80.cc cld2_generated_cjk_compatible.cc cld_generated_cjk_delta_bi_32.cc generated_distinct_bi_0.cc cld2_generated_quad0122.cc cld2_generated_deltaocta0122.cc cld2_generated_distinctocta0122.cc cld_generated_score_quad_octa_0122.cc | |
link /dll /out:cld2.dll *.obj | |
lib /out:cld2.lib *.obj | |
copy .\cld2.lib ..\..\..\lib\win64 | |
copy .\cld2.dll ..\..\..\lib\win64 | |
- name: Build | |
run: | | |
cd src | |
qmake6 UltraStar-Creator.pro -spec win32-msvc | |
nmake | |
- name: Create installer | |
uses: joncloud/[email protected] | |
with: | |
script-file: setup/win64/UltraStar-Creator.nsi | |
- name: Upload Portable Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: WIN64-UltraStar-Creator-portable | |
path: bin/release | |
if-no-files-found: error | |
- name: Upload Installer Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: WIN64-UltraStar-Creator-installer | |
path: bin/WIN64-UltraStar-Creator*-setup.exe | |
if-no-files-found: error | |
build_mac: | |
name: Build for MacOS (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-13, macos-14] | |
fail-fast: false | |
steps: | |
- name: Get Number of CPU Cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Determine Arch | |
run: | | |
if [ "${{ matrix.os }}" = "macos-13" ]; then | |
echo "arch=x86" >> $GITHUB_ENV | |
else | |
echo "arch=ARM" >> $GITHUB_ENV | |
fi | |
- name: Install Dependencies | |
run: | | |
brew install taglib | |
brew install create-dmg | |
brew install qt | |
- name: Install cld2 | |
run: | | |
cd include/cld2/internal/ | |
export CFLAGS="-Wno-narrowing -O3" | |
sed -i '' "s/soname=/install_name,/g" compile_libs.sh | |
sed -i '' "s/-shared/-dynamiclib/g" compile_libs.sh | |
sed -i '' "s/libcld2.so/libcld2.dylib/g" compile_libs.sh | |
sed -i '' "s/libcld2_full.so/libcld2_full.dylib/g" compile_libs.sh | |
cat compile_libs.sh | |
./compile_libs.sh | |
cp libcld2.dylib ../../../lib/macx | |
- name: Fix Qt lib rpaths # see: https://github.com/orgs/Homebrew/discussions/2823#discussioncomment-2010340) | |
run: | | |
install_name_tool -id '@rpath/QtCore.framework/Versions/A/QtCore' $(brew --prefix)/lib/QtCore.framework/Versions/A/QtCore | |
install_name_tool -id '@rpath/QtGui.framework/Versions/A/QtGui' $(brew --prefix)/lib/QtGui.framework/Versions/A/QtGui | |
install_name_tool -id '@rpath/QtNetwork.framework/Versions/A/QtNetwork' $(brew --prefix)/lib/QtNetwork.framework/Versions/A/QtNetwork | |
install_name_tool -id '@rpath/QtWidgets.framework/Versions/A/QtWidgets' $(brew --prefix)/lib/QtWidgets.framework/Versions/A/QtWidgets | |
install_name_tool -id '@rpath/QtPdf.framework/Versions/A/QtPdf' $(brew --prefix)/lib/QtPdf.framework/Versions/A/QtPdf | |
install_name_tool -id '@rpath/QtSvg.framework/Versions/A/QtSvg' $(brew --prefix)/lib/QtSvg.framework/Versions/A/QtSvg | |
install_name_tool -id '@rpath/QtVirtualKeyboard.framework/Versions/A/QtVirtualKeyboard' $(brew --prefix)/lib/QtVirtualKeyboard.framework/Versions/A/QtVirtualKeyboard | |
install_name_tool -id '@rpath/QtQuick.framework/Versions/A/QtQuick' $(brew --prefix)/lib/QtQuick.framework/Versions/A/QtQuick | |
install_name_tool -id '@rpath/QtQmlModels.framework/Versions/A/QtQmlModels' $(brew --prefix)/lib/QtQmlModels.framework/Versions/A/QtQmlModels | |
install_name_tool -id '@rpath/QtQml.framework/Versions/A/QtQml' $(brew --prefix)/lib/QtQml.framework/Versions/A/QtQml | |
install_name_tool -id '@rpath/QtOpenGL.framework/Versions/A/QtOpenGL' $(brew --prefix)/lib/QtOpenGL.framework/Versions/A/QtOpenGL | |
install_name_tool -id '@rpath/QtMultimedia.framework/Versions/A/QtMultimedia' $(brew --prefix)/lib/QtMultimedia.framework/Versions/A/QtMultimedia | |
- name: Build | |
run: | | |
cd src | |
qmake6 UltraStar-Creator.pro | |
make -j$${{ steps.cpu-cores.outputs.count }} | |
cd ../bin/release | |
mv UltraStar-Creator.dmg MAC-${{ env.arch }}-UltraStar-Creator.dmg | |
- name: Upload Portable Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MAC-${{ env.arch }}-UltraStar-Creator-portable | |
path: bin/release | |
if-no-files-found: error | |
- name: Upload Image Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MAC-${{ env.arch }}-UltraStar-Creator-image | |
path: bin/release/MAC-${{ env.arch }}-UltraStar-Creator.dmg | |
if-no-files-found: error | |
build_linux: | |
name: Build for Linux | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Get Number of CPU Cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: "6.5.*" | |
- name: Install Dependencies | |
run: | | |
sudo apt update -qq | |
sudo apt install -y libgl1-mesa-dev build-essential | |
sudo apt install libtag1-dev libcld2-dev | |
sudo apt install -y libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb-dev libxkbcommon-x11-0 libxcb-cursor0 libgtk2.0-dev libfuse2 | |
- name: Build | |
run: | | |
cd src | |
qmake6 UltraStar-Creator.pro | |
make -j${{ steps.cpu-cores.outputs.count }} | |
- name: Create AppImage | |
run: | | |
cd bin/release | |
wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage | |
chmod a+x linuxdeployqt*.AppImage | |
cp ../../setup/unix/UltraStar-Creator.desktop . | |
cp ../../setup/unix/UltraStar-Creator.png . | |
sed -i "s/Name=UltraStar-Creator/Name=LINUX-UltraStar-Creator/g" UltraStar-Creator.desktop | |
./linuxdeployqt*.AppImage UltraStar-Creator.desktop -bundle-non-qt-libs -appimage | |
mv LINUX-UltraStar-Creator-*.AppImage LINUX-UltraStar-Creator.AppImage | |
- name: Upload AppImage Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LINUX-UltraStar-Creator-appimage | |
path: bin/release/LINUX-UltraStar-Creator.AppImage | |
if-no-files-found: error | |
draft_release: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
name: Draft a Release | |
needs: [build_windows, build_mac, build_linux] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Download Artifacts from Build Jobs | |
uses: actions/download-artifact@v4 | |
with: | |
path: . | |
pattern: "*" | |
- name: Compress Portable Folders | |
run: | | |
zip -r MAC-x86-UltraStar-Creator-portable.zip MAC-x86-UltraStar-Creator-portable | |
zip -r MAC-ARM-UltraStar-Creator-portable.zip MAC-ARM-UltraStar-Creator-portable | |
zip -r WIN64-UltraStar-Creator-portable.zip WIN64-UltraStar-Creator-portable | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "LINUX-UltraStar-Creator-appimage/*, MAC-x86-UltraStar-Creator-image/*, MAC-x86-UltraStar-Creator-portable.zip, MAC-ARM-UltraStar-Creator-image/*, MAC-ARM-UltraStar-Creator-portable.zip, WIN64-UltraStar-Creator-installer/*, WIN64-UltraStar-Creator-portable.zip" | |
draft: true | |
artifactErrorsFailBuild: true |