Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 3 additions & 4 deletions .github/workflows/build-proton.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ jobs:
echo "Generated tag: ${TAG_NAME}"

- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.generate_tag.outputs.tag_name }}
name: Proton Wine 11.0-2 (${{ steps.generate_tag.outputs.tag_name }})
Expand All @@ -333,12 +333,11 @@ jobs:
### Features
- Experimental userspace ntsync (via [ntsync-android](https://github.com/GameNative/ntsync-android)) + fsync
- FEX integration (stats shm, `SkipThreadAttach` detach guard) via bylaws' arm64ec patches
- Integrated lsteamclient built into Proton (supports GameNative bionic Steam)
- Stripped, `-g0 -O2` build: smaller tree, faster install (zstd-packed `.wcp`)

### Credits
Compile optimizations (ccache, -g0/strip, zstd packaging) are adopted from
[The412Banner/proton-wine](https://github.com/The412Banner/proton-wine)
release [build-p11-20260821](https://github.com/The412Banner/proton-wine/releases/tag/build-p11-20260821).
Compile optimizations (ccache, -g0/strip, zstd packaging) are adopted from [The412Banner/proton-wine](https://github.com/The412Banner/proton-wine) release [build-p11-20260821](https://github.com/The412Banner/proton-wine/releases/tag/build-p11-20260821).

### WCP Files
**Proton Type:**
Expand Down
202 changes: 202 additions & 0 deletions build-scripts/build-steam-targets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
#!/usr/bin/env bash

set -euo pipefail

usage() {
cat <<'EOF'
Build only lsteamclient and steam_helper artifacts for CI.

Usage:
bash build-scripts/build-steam-targets.sh [options]

Options:
--arch <x86_64|aarch64|arm64ec> Target architecture (default: x86_64)
--enable-16kb-pages Enable 16KB page size build mode
--skip-autogen Do not run autogen.sh
--skip-tools-build Do not build wine-tools (step0)
--skip-sysvshm Skip android_sysvshm build for aarch64
--jobs <n> Parallel make jobs (default: nproc)
--output-root <path> Artifact root directory
--help Show this help

Examples:
bash build-scripts/build-steam-targets.sh --arch x86_64 --enable-16kb-pages
bash build-scripts/build-steam-targets.sh --arch aarch64 --output-root "$GITHUB_WORKSPACE/artifacts"
EOF
}

ARCH="x86_64"
ENABLE_16KB_PAGES=0
RUN_AUTOGEN=1
RUN_TOOLS_BUILD=1
RUN_SYSVSHM=1
JOBS="$(nproc)"
OUTPUT_ROOT="${GITHUB_WORKSPACE:-$(pwd)}/steam-build-artifacts"

while [ "$#" -gt 0 ]; do
case "$1" in
--arch)
ARCH="${2:-}"
shift 2
;;
--enable-16kb-pages)
ENABLE_16KB_PAGES=1
shift
;;
--skip-autogen)
RUN_AUTOGEN=0
shift
;;
--skip-tools-build)
RUN_TOOLS_BUILD=0
shift
;;
--skip-sysvshm)
RUN_SYSVSHM=0
shift
;;
--jobs)
JOBS="${2:-}"
shift 2
;;
--output-root)
OUTPUT_ROOT="${2:-}"
shift 2
;;
--help)
usage
exit 0
;;
*)
echo "Unknown option: $1" >&2
usage
exit 1
;;
esac
done

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
cd "$PROJECT_ROOT"

case "$ARCH" in
x86_64)
STEP_SCRIPT="build-scripts/build-step-x86_64.sh"
ARTIFACT_ARCH="x86_64"
;;
aarch64|arm64ec|arm64)
STEP_SCRIPT="build-scripts/build-step-arm64ec.sh"
ARTIFACT_ARCH="arm64ec"
;;
*)
echo "Unsupported arch: $ARCH" >&2
usage
exit 1
;;
esac

# Re-export PATH/DLLTOOL in this shell so `make` (run after the step script
# returns) sees the llvm-mingw toolchain. Without this, winebuild falls back
# to the system clang's llvm-dlltool, which on Ubuntu is LLVM 18 and lacks
# the -N flag needed for ARM64EC import libraries.
LLVM_MINGW_TOOLCHAIN="${LLVM_MINGW_TOOLCHAIN:-$HOME/toolchains/llvm-mingw-20250920-ucrt-ubuntu-22.04-x86_64/bin}"
if [ -d "$LLVM_MINGW_TOOLCHAIN" ]; then
export PATH="$LLVM_MINGW_TOOLCHAIN:$PATH"
export DLLTOOL="$LLVM_MINGW_TOOLCHAIN/llvm-dlltool"
echo "Using llvm-mingw at: $LLVM_MINGW_TOOLCHAIN"
else
echo "Warning: llvm-mingw toolchain not found at $LLVM_MINGW_TOOLCHAIN" >&2
fi

EXTRA_STEP_ARGS=()
if [ "$ENABLE_16KB_PAGES" -eq 1 ]; then
EXTRA_STEP_ARGS+=("--enable-16kb-pages")
fi

echo "=== Steam targets build config ==="
echo "ARCH: $ARCH"
echo "STEP_SCRIPT: $STEP_SCRIPT"
echo "JOBS: $JOBS"
echo "OUTPUT_ROOT: $OUTPUT_ROOT"
echo "ENABLE_16KB_PAGES: $ENABLE_16KB_PAGES"
echo "RUN_AUTOGEN: $RUN_AUTOGEN"
echo "RUN_TOOLS_BUILD: $RUN_TOOLS_BUILD"
echo "RUN_SYSVSHM: $RUN_SYSVSHM"
echo "=================================="

if [ "$RUN_AUTOGEN" -eq 1 ]; then
echo "Running autogen (applies server_protocol.def.patch + autogen.sh)..."
bash build-scripts/build-step0-autogen.sh
fi

if [ "$RUN_TOOLS_BUILD" -eq 1 ]; then
echo "Building wine-tools..."
bash build-scripts/build-step0.sh
fi

if [ "$ARCH" != "x86_64" ] && [ "$RUN_SYSVSHM" -eq 1 ]; then
echo "Building android_sysvshm for $ARCH..."
bash "$STEP_SCRIPT" "${EXTRA_STEP_ARGS[@]}" --build-sysvshm
fi

echo "Configuring build..."
bash "$STEP_SCRIPT" "${EXTRA_STEP_ARGS[@]}" --configure

echo "Building lsteamclient and steam_helper only..."
make -j"$JOBS" lsteamclient/all steam_helper/all

ARTIFACT_DIR="$OUTPUT_ROOT/$ARTIFACT_ARCH"
mkdir -p "$ARTIFACT_DIR"

collect_dir() {
local src_dir="$1"
local dest_subdir="$2"
local found=0

if [ ! -d "$src_dir" ]; then
return 1
fi

mkdir -p "$ARTIFACT_DIR/$dest_subdir"
while IFS= read -r -d '' f; do
# Preserve the per-arch subdirectory layout (e.g. arm64ec-windows/, i386-windows/)
# so multiple-arch builds don't overwrite each other at the artifact destination.
local rel
rel="${f#$src_dir/}"
local dest_path="$ARTIFACT_DIR/$dest_subdir/$rel"
mkdir -p "$(dirname "$dest_path")"
cp "$f" "$dest_path"
echo "Collected artifact: $f -> $dest_path"
found=1
done < <(find "$src_dir" \
\( -name "*.dll" -o -name "*.so" -o -name "*.exe" -o -name "*.dll.so" -o -name "*.exe.so" \) \
-type f -print0)

if [ "$found" -ne 1 ]; then
return 1
fi
return 0
}

LSTEAMCLIENT_OK=0
STEAM_HELPER_OK=0

collect_dir "lsteamclient" "lsteamclient" && LSTEAMCLIENT_OK=1 || true
collect_dir "steam_helper" "steam_helper" && STEAM_HELPER_OK=1 || true

if [ "$LSTEAMCLIENT_OK" -ne 1 ]; then
echo "Error: no lsteamclient artifact was produced." >&2
echo "Tree under lsteamclient/:" >&2
find lsteamclient -maxdepth 3 -type f >&2 || true
exit 1
fi

if [ "$STEAM_HELPER_OK" -ne 1 ]; then
echo "Error: no steam_helper artifact was produced." >&2
echo "Tree under steam_helper/:" >&2
find steam_helper -maxdepth 3 -type f >&2 || true
exit 1
fi

echo "Artifacts saved in: $ARTIFACT_DIR"
find "$ARTIFACT_DIR" -type f
2 changes: 1 addition & 1 deletion build-scripts/build-step-arm64ec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export DLLTOOL=$LLVM_MINGW_TOOLCHAIN/llvm-dlltool
export PKG_CONFIG="${PKG_CONFIG:-$(command -v pkg-config)}"
export PKG_CONFIG_LIBDIR=$deps/lib/pkgconfig:$deps/share/pkgconfig
export ACLOCAL_PATH=$deps/lib/aclocal:$deps/share/aclocal
export CPPFLAGS="-I$deps/include --sysroot=$TOOLCHAIN/../sysroot"
export CPPFLAGS="--sysroot=$TOOLCHAIN/../sysroot -idirafter $deps/include"

# -g0 + post-install llvm-strip keep the packaged tree small; ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES
# + max-page-size=16384 give 16KB page support on a single SDK 28 target.
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/build-step-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export DLLTOOL=$LLVM_MINGW_TOOLCHAIN/llvm-dlltool
export PKG_CONFIG="${PKG_CONFIG:-$(command -v pkg-config)}"
export PKG_CONFIG_LIBDIR=$deps/lib/pkgconfig:$deps/share/pkgconfig
export ACLOCAL_PATH=$deps/lib/aclocal:$deps/share/aclocal
export CPPFLAGS="-I$deps/include --sysroot=$TOOLCHAIN/../sysroot"
export CPPFLAGS="--sysroot=$TOOLCHAIN/../sysroot -idirafter $deps/include"

# -g0 + post-install llvm-strip keep the packaged tree small; ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES
# + max-page-size=16384 give 16KB page support on a single SDK 28 target.
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3573,6 +3573,7 @@ WINE_CONFIG_MAKEFILE(dlls/xpssvcs)
WINE_CONFIG_MAKEFILE(dlls/xtajit64)
WINE_CONFIG_MAKEFILE(fonts)
WINE_CONFIG_MAKEFILE(include)
WINE_CONFIG_MAKEFILE(lsteamclient)
WINE_CONFIG_MAKEFILE(libs/adsiid)
WINE_CONFIG_MAKEFILE(libs/capstone)
WINE_CONFIG_MAKEFILE(libs/compiler-rt)
Expand Down Expand Up @@ -3743,6 +3744,7 @@ WINE_CONFIG_MAKEFILE(programs/wusa)
WINE_CONFIG_MAKEFILE(programs/xcopy)
WINE_CONFIG_MAKEFILE(programs/xcopy/tests)
WINE_CONFIG_MAKEFILE(server)
WINE_CONFIG_MAKEFILE(steam_helper)
WINE_CONFIG_MAKEFILE(tools)
WINE_CONFIG_MAKEFILE(tools/sfnt2fon)
WINE_CONFIG_MAKEFILE(tools/widl)
Expand Down
Loading
Loading