160 lines
4.0 KiB
Bash
160 lines
4.0 KiB
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
# Dubai Metaverse - Unreal Engine 5.4 WSL/Ubuntu Installation Script
|
||
|
|
# Automated installation script for UE5.4 on Ubuntu/WSL
|
||
|
|
|
||
|
|
set -e
|
||
|
|
|
||
|
|
echo "=========================================="
|
||
|
|
echo "Dubai Metaverse - UE5.4 WSL Installation"
|
||
|
|
echo "=========================================="
|
||
|
|
echo ""
|
||
|
|
echo "This script will install Unreal Engine 5.4 from source on Ubuntu/WSL"
|
||
|
|
echo "Prerequisites:"
|
||
|
|
echo " 1. GitHub account linked to Epic Games account"
|
||
|
|
echo " 2. Sufficient disk space (100GB+)"
|
||
|
|
echo " 3. Sufficient RAM (32GB+ recommended)"
|
||
|
|
echo ""
|
||
|
|
read -p "Continue? (y/n) " -n 1 -r
|
||
|
|
echo
|
||
|
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Colors
|
||
|
|
GREEN='\033[0;32m'
|
||
|
|
YELLOW='\033[1;33m'
|
||
|
|
RED='\033[0;31m'
|
||
|
|
NC='\033[0m'
|
||
|
|
|
||
|
|
print_step() {
|
||
|
|
echo -e "${GREEN}[STEP]${NC} $1"
|
||
|
|
}
|
||
|
|
|
||
|
|
print_warning() {
|
||
|
|
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||
|
|
}
|
||
|
|
|
||
|
|
print_error() {
|
||
|
|
echo -e "${RED}[ERROR]${NC} $1"
|
||
|
|
}
|
||
|
|
|
||
|
|
# Step 1: Update system
|
||
|
|
print_step "Updating system packages..."
|
||
|
|
sudo apt update && sudo apt upgrade -y
|
||
|
|
|
||
|
|
# Step 2: Install dependencies
|
||
|
|
print_step "Installing build dependencies..."
|
||
|
|
sudo apt install -y \
|
||
|
|
build-essential \
|
||
|
|
clang \
|
||
|
|
cmake \
|
||
|
|
ninja-build \
|
||
|
|
mono-devel \
|
||
|
|
python3 \
|
||
|
|
python3-pip \
|
||
|
|
git \
|
||
|
|
git-lfs \
|
||
|
|
curl \
|
||
|
|
wget \
|
||
|
|
unzip \
|
||
|
|
libvulkan-dev \
|
||
|
|
libxcb-xinput-dev \
|
||
|
|
libgtk-3-dev \
|
||
|
|
libxrandr-dev \
|
||
|
|
libxinerama-dev \
|
||
|
|
libxi-dev \
|
||
|
|
libsdl2-dev \
|
||
|
|
libssl-dev \
|
||
|
|
libicu-dev \
|
||
|
|
libxml2-dev \
|
||
|
|
libxcursor-dev \
|
||
|
|
libxcb-icccm4-dev \
|
||
|
|
libxcb-image0-dev \
|
||
|
|
libxcb-keysyms1-dev \
|
||
|
|
libxcb-render-util0-dev \
|
||
|
|
libxcb-xkb-dev \
|
||
|
|
libxkbcommon-dev \
|
||
|
|
libxkbcommon-x11-dev \
|
||
|
|
mesa-common-dev \
|
||
|
|
libgl1-mesa-dev
|
||
|
|
|
||
|
|
# Step 3: Setup Git LFS
|
||
|
|
print_step "Setting up Git LFS..."
|
||
|
|
git lfs install
|
||
|
|
|
||
|
|
# Step 4: Check GitHub/Epic Games account
|
||
|
|
print_step "Checking GitHub access..."
|
||
|
|
if ! git ls-remote https://github.com/EpicGames/UnrealEngine.git &>/dev/null; then
|
||
|
|
print_error "Cannot access Unreal Engine repository"
|
||
|
|
echo ""
|
||
|
|
echo "Please ensure:"
|
||
|
|
echo " 1. Your GitHub account is linked to Epic Games account"
|
||
|
|
echo " 2. You have accepted the Unreal Engine license"
|
||
|
|
echo " 3. Visit: https://www.unrealengine.com/en-US/ue-on-github"
|
||
|
|
echo ""
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Step 5: Clone repository
|
||
|
|
print_step "Cloning Unreal Engine 5.4 repository..."
|
||
|
|
echo "This may take 30-60 minutes depending on connection speed..."
|
||
|
|
cd ~
|
||
|
|
if [ -d "UnrealEngine" ]; then
|
||
|
|
print_warning "UnrealEngine directory already exists"
|
||
|
|
read -p "Remove and re-clone? (y/n) " -n 1 -r
|
||
|
|
echo
|
||
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||
|
|
rm -rf UnrealEngine
|
||
|
|
else
|
||
|
|
echo "Using existing directory"
|
||
|
|
fi
|
||
|
|
fi
|
||
|
|
|
||
|
|
if [ ! -d "UnrealEngine" ]; then
|
||
|
|
git clone --depth=1 https://github.com/EpicGames/UnrealEngine.git -b 5.4 UnrealEngine
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Step 6: Run Setup
|
||
|
|
print_step "Running Setup.sh (this may take 30-60 minutes)..."
|
||
|
|
cd ~/UnrealEngine
|
||
|
|
./Setup.sh
|
||
|
|
|
||
|
|
# Step 7: Generate project files
|
||
|
|
print_step "Generating project files..."
|
||
|
|
./GenerateProjectFiles.sh
|
||
|
|
|
||
|
|
# Step 8: Build Unreal Engine
|
||
|
|
print_step "Building Unreal Engine..."
|
||
|
|
echo "This will take 2-4+ hours depending on CPU..."
|
||
|
|
echo "Using $(nproc) parallel jobs"
|
||
|
|
make -j$(nproc) UnrealEditor
|
||
|
|
|
||
|
|
# Step 9: Verify installation
|
||
|
|
print_step "Verifying installation..."
|
||
|
|
if [ -f "Engine/Binaries/Linux/UnrealEditor" ]; then
|
||
|
|
echo -e "${GREEN}✓${NC} Unreal Editor built successfully!"
|
||
|
|
echo ""
|
||
|
|
echo "Installation location: ~/UnrealEngine/Engine/Binaries/Linux/UnrealEditor"
|
||
|
|
echo ""
|
||
|
|
echo "To launch:"
|
||
|
|
echo " ~/UnrealEngine/Engine/Binaries/Linux/UnrealEditor"
|
||
|
|
echo ""
|
||
|
|
echo "For WSL graphics, ensure X server is running (WSLg on Windows 11, or VcXsrv/Xming on Windows 10)"
|
||
|
|
else
|
||
|
|
print_error "Build failed - UnrealEditor binary not found"
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
echo ""
|
||
|
|
echo "=========================================="
|
||
|
|
echo "Installation Complete!"
|
||
|
|
echo "=========================================="
|
||
|
|
echo ""
|
||
|
|
echo "Next steps:"
|
||
|
|
echo "1. Set up X server for graphics (if using WSL)"
|
||
|
|
echo "2. Create project: Follow UE5_WSL_INSTALL.md"
|
||
|
|
echo "3. Configure project settings"
|
||
|
|
echo ""
|
||
|
|
|