1a10d4efe8
The Windows launcher was built without crt-static and imported VCRUNTIME140.dll, which only the Visual C++ redistributable installs: players without it got a missing-DLL dialog before anything started. The game itself links only system DLLs (vulkan-1.dll is loaded at run time). - launcher.yml links the C runtime on Windows. - tools/check_imports.py reads PE import and delay-import tables (and ELF loader, needed libraries and run paths); release.yml and launcher.yml fail when a Windows binary imports a non-system DLL. - release.yml builds Linux on Ubuntu 22.04: the NixOS-made Linux release asked for a /nix/store loader, so it ran nowhere but NixOS. - No adapter: the game says the Vulkan driver is missing and what to install, and on Windows keeps the console open until Enter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
95 lines
3.2 KiB
YAML
95 lines
3.2 KiB
YAML
name: launcher
|
|
# Builds the launcher on Linux, macOS and Windows. A pushed `launcher-vX.Y.Z` tag also puts the
|
|
# three archives on a draft GitHub release of that tag, to publish by hand. Horizon's own
|
|
# releases are tagged `vYYYY.MM.DD`; the launcher reads only `launcher-v*` releases for itself.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [launcher]
|
|
tags: ['launcher-v*']
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
asset: horizon-launcher-linux-x86_64.tar.gz
|
|
binary: horizon-launcher
|
|
- os: macos-latest
|
|
asset: horizon-launcher-macos-arm64.zip
|
|
binary: horizon-launcher
|
|
- os: windows-latest
|
|
asset: horizon-launcher-windows-x64.zip
|
|
binary: horizon-launcher.exe
|
|
# The C runtime linked in: without it the launcher asks for VCRUNTIME140.dll,
|
|
# which only the Visual C++ redistributable installs.
|
|
rustflags: -C target-feature=+crt-static
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
RUSTFLAGS: ${{ matrix.rustflags }}
|
|
defaults:
|
|
run:
|
|
working-directory: launcher
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: launcher
|
|
- name: Linux libraries GPUI links to
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libxkbcommon-x11-dev libwayland-dev libx11-xcb-dev libfontconfig-dev libvulkan-dev libasound2-dev
|
|
- name: The tag matches Cargo.toml
|
|
if: startsWith(github.ref, 'refs/tags/launcher-v')
|
|
run: grep -qx "version = \"${GITHUB_REF_NAME#launcher-v}\"" Cargo.toml
|
|
- run: cargo test --release --locked --lib
|
|
- run: cargo build --release --locked
|
|
- name: Only system libraries
|
|
if: runner.os == 'Windows'
|
|
run: python ../tools/check_imports.py target/release/${{ matrix.binary }}
|
|
- name: Package
|
|
run: |
|
|
mkdir -p dist
|
|
cp target/release/${{ matrix.binary }} dist/
|
|
cd dist
|
|
if [[ "${{ matrix.asset }}" == *.tar.gz ]]; then
|
|
tar czf ../${{ matrix.asset }} ${{ matrix.binary }}
|
|
elif [[ "$RUNNER_OS" == "Windows" ]]; then
|
|
7z a ../${{ matrix.asset }} ${{ matrix.binary }}
|
|
else
|
|
zip ../${{ matrix.asset }} ${{ matrix.binary }}
|
|
fi
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.asset }}
|
|
path: launcher/${{ matrix.asset }}
|
|
|
|
release:
|
|
if: startsWith(github.ref, 'refs/tags/launcher-v')
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
path: dist
|
|
merge-multiple: true
|
|
# A draft, and never marked latest: Horizon's own releases stay the repository's latest.
|
|
- uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
name: Horizon launcher ${{ github.ref_name }}
|
|
draft: true
|
|
make_latest: false
|
|
files: dist/*
|