Skip to content

Add missing askforquit condition #108

Add missing askforquit condition

Add missing askforquit condition #108

Workflow file for this run

name: Build-Static-Win64-and-Linux-AppImage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Get latest VCPKG commit
shell: bash
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
export LATEST_COMMIT=$(git rev-parse HEAD)
echo "LATEST_COMMIT=$LATEST_COMMIT" >> $GITHUB_ENV
- name: Update builtin-baseline in vcpkg.json
shell: bash
run: |
jq --arg commit "$LATEST_COMMIT" '. + {"builtin-baseline": $commit}' vcpkg.json > temp.json && mv temp.json vcpkg.json
- name: Install vcpkg
run: |
.\vcpkg\bootstrap-vcpkg.bat
- name: Remove vcpkg.json for classic mode
shell: bash
run: |
if [ -f "vcpkg.json" ]; then
rm "vcpkg.json"
fi
- name: Install Dependencies with vcpkg
run: |
.\vcpkg\vcpkg.exe install sdl2 sdl2-mixer[libflac,libmodplug,mpg123,opusfile] sdl2-net libsamplerate fluidsynth --triplet x64-windows-static-release --overlay-triplets=cmake/triplets
- name: Configure CMake
run: |
cmake -B build_vs_64 -S . -DCMAKE_BUILD_TYPE=Release `
-DENABLE_LTO=ON `
-DVCPKG_OVERLAY_TRIPLETS="cmake/triplets" `
-DVCPKG_TARGET_TRIPLET="x64-windows-static-release" `
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: Build
run: cmake --build build_vs_64 --config Release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: inter-doom-dev-win64
path: build_vs_64/src/Release/*.exe
retention-days: 90
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
game: [doom, heretic, hexen]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ fuse patchelf \
libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev \
libsamplerate0-dev libfluidsynth-dev \
libflac-dev libmodplug-dev libmpg123-dev libopusfile-dev \
libx11-dev libxext-dev libxrender-dev libxrandr-dev \
libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: Install linuxdeploy and plugin
run: |
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
chmod +x linuxdeploy*.AppImage
- name: Build the project
run: |
cmake -B build_linux -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build_linux --config Release
- name: Add desktop file and icon
run: |
mkdir -p appdir/usr/share/applications
cp data/${{ matrix.game }}.desktop appdir/usr/share/applications/inter-${{ matrix.game }}.desktop
mkdir -p appdir/usr/share/icons/hicolor/128x128/apps
cp data/${{ matrix.game }}.png appdir/usr/share/icons/hicolor/128x128/apps/inter-${{ matrix.game }}.png
- name: Add executable to AppDir
run: |
mkdir -p appdir/usr/bin
cp build_linux/src/inter-${{ matrix.game }} appdir/usr/bin/
- name: Package as AppImage
run: |
./linuxdeploy-x86_64.AppImage --appdir=appdir --output appimage
- name: Clean up unnecessary files
run: |
rm -f linuxdeploy*.AppImage
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: inter-${{ matrix.game }}-dev-linux64
path: "**/*.AppImage"
retention-days: 90