42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Optional: Check for a Gitea runner-specific environment variable.
|
|
# You can set a variable like GITEA_RUNNER in your runner configuration.
|
|
if [ -z "$GITEA_RUNNER" ]; then
|
|
echo "Warning: This script does not appear to be running in a Gitea runner environment."
|
|
fi
|
|
|
|
# Get the user's home directory (if needed)
|
|
USER_HOME="$HOME"
|
|
|
|
# Set up Unreal Engine paths for Windows
|
|
# Adjust the UE_ROOT path if your installation differs.
|
|
UE_ROOT="${UE_ROOT:-E:/Games/UE_5.5}"
|
|
UE_EDITOR="$UE_ROOT/Engine/Binaries/Win64/UnrealEditor.exe"
|
|
UE_UAT="$UE_ROOT/Engine/Build/BatchFiles/RunUAT.bat"
|
|
|
|
# Set up project paths based on the current working directory
|
|
WORKSPACE_DIR=$(pwd)
|
|
PROJECT_FILE="$WORKSPACE_DIR/LyraStarterGame.uproject"
|
|
BUILD_DIR="$WORKSPACE_DIR/Builds/Windows"
|
|
|
|
# Create the archive directory if it does not exist
|
|
mkdir -p "$BUILD_DIR"
|
|
|
|
echo "Starting Windows build of LyraGame via Gitea Runner..."
|
|
|
|
# Run the build command using Unreal's Automation Tool (UAT)
|
|
"$UE_ROOT/Engine/Build/BatchFiles/RunUAT.bat" BuildCookRun \
|
|
-project="$PROJECT_FILE" \
|
|
-noP4 \
|
|
-platform=Win64 \
|
|
-clientconfig=Shipping \
|
|
-cook -allmaps \
|
|
-build -stage -pak -archive \
|
|
-archivedirectory="$BUILD_DIR" \
|
|
-target=LyraGame \
|
|
-unrealexe="$UE_EDITOR"
|
|
|
|
echo "Windows build completed successfully"
|