buildhelp wanted
Repository metrics
- Stars
- (988 stars)
- PR merge metrics
- (PR metrics pending)
Description
I wonder if we would care to have an installer as shell script? Since you have a compiling.md I imagine you don't :)
Either way, Here's mine for MacOS.
#!/usr/bin/env bash
set -euo pipefail
# --- Configuration ---
REPO_URL="https://github.com/StrikerX3/Ymir.git"
REPO_DIR="Ymir"
VCPKG_DIR="vcpkg"
BUILD_DIR="build"
# --- Helper Functions ---
command_exists() { command -v "$1" >/dev/null 2>&1; }
echo ">>> Detecting macOS architecture..."
ARCH=$(uname -m)
echo "Architecture: $ARCH"
echo ">>> Checking for Homebrew..."
if ! command_exists brew; then
echo "Homebrew not found. Installing..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
echo ">>> Installing dependencies via Homebrew..."
brew install cmake ninja || true
echo ">>> Checking for Xcode Command Line Tools..."
if ! xcode-select -p >/dev/null 2>&1; then
echo "Installing Xcode Command Line Tools..."
xcode-select --install
fi
echo ">>> Cloning Ymir (dev branch)..."
if [ ! -d "$REPO_DIR" ]; then
git clone -b dev --recurse-submodules "$REPO_URL" "$REPO_DIR"
else
echo "Repo already exists, skipping clone."
fi
echo ">>> Bootstrapping vcpkg..."
if [ ! -d "$VCPKG_DIR" ]; then
git clone https://github.com/microsoft/vcpkg.git "$VCPKG_DIR"
(cd "$VCPKG_DIR" && ./bootstrap-vcpkg.sh)
fi
echo ">>> Configuring CMake build..."
cmake -S "$REPO_DIR" -B "$REPO_DIR/$BUILD_DIR" -G Ninja \
-DCMAKE_TOOLCHAIN_FILE="../$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake" \
-DCMAKE_BUILD_TYPE=Release \
-DYmir_ENABLE_DEVLOG=OFF \
-DYmir_ENABLE_IMGUI_DEMO=OFF \
-DYmir_EXTRA_INLINING=ON
echo ">>> Building Ymir..."
if [ "$ARCH" = "arm64" ]; then
cmake --build "$REPO_DIR/$BUILD_DIR" --parallel
else
cmake --build "$REPO_DIR/$BUILD_DIR"
fi
APP_PATH="$REPO_DIR/$BUILD_DIR/apps/ymir-sdl3/ymir-sdl3.app"
TARGET_APP="/Applications/Ymir.app"
echo ">>> Copying app bundle to $TARGET_APP..."
sudo rm -rf "$TARGET_APP" 2>/dev/null || true
sudo cp -r "$APP_PATH" "$TARGET_APP"
echo ">>> Installation complete!"
echo "Note: Ymir requires a valid IPL (BIOS) ROM to work."
echo "You can now launch Ymir via Spotlight, Launchpad, or..."
echo " open /Applications/Ymir.app"