#!/usr/bin/env bash
-# Start the Aukio workspace with the Fallout 4 environment.
+# Start the Fallout 4 Commonwealth app on Aukio 3D 2.
#
-# Rebuilds every module in dependency order first, so the classpath is
-# always at the latest source state (the FO4 provider resolves `aukio`
-# and `aukio-3d` from the local Maven repository — stale installs there
-# are the classic reason the world silently doesn't show up).
+# Builds the V2 engine and the standalone FO4-2 consumer in dependency
+# order, then launches Fo4App. FO4-2 is not an Aukio workspace
+# environment provider: it assembles its own AwtShell/kernel pipeline.
#
-# Extra args are forwarded to the JVM launcher, e.g.:
-# ./start.sh -Daukio.fo4.cell=ConcordExt
-# Actually: args go to Main. To pass -D properties, edit JAVA_OPTS below
-# or export them before calling.
+# The game path comes from AUKIO_FO4_PATH or the fo4: section of
+# ~/.config/aukio/config.yaml. Extra args are forwarded to Fo4App.
+# To pass -D properties, edit JAVA_OPTS below or export them first.
set -euo pipefail
# Sibling checkouts are resolved relative to this script (Aukio/*
# layout), so nothing here is tied to a particular machine.
ROOT="$(cd "${0%/*}/.." && pwd)"
-FO4="$ROOT/aukio-environment-fo4"
+ENGINE="$ROOT/aukio-3d-2"
+FO4="$ROOT/aukio-environment-fo4-2"
-echo "==> building aukio-3d"
-mvn -f "$ROOT/aukio-3d/pom.xml" install -q -DskipTests -Dmaven.javadoc.skip=true
+echo "==> building aukio-3d-2"
+mvn -f "$ENGINE/pom.xml" install -q -DskipTests -Dmaven.javadoc.skip=true
-echo "==> building aukio"
-mvn -f "$ROOT/aukio/pom.xml" install -q -DskipTests -Dmaven.javadoc.skip=true
-
-echo "==> building aukio-environment-fo4"
+echo "==> building aukio-environment-fo4-2"
mvn -f "$FO4/pom.xml" package -q -DskipTests -Dmaven.javadoc.skip=true
mvn -f "$FO4/pom.xml" dependency:build-classpath -q -Dmdep.outputFile=target/cp.txt
-echo "==> starting Aukio with --env=fallout4"
+echo "==> starting Aukio 3D 2 with Fallout 4"
cd "$FO4"
mkdir -p "$HOME/.cache/aukio/heapdumps"
exec java -Xmx20g --enable-native-access=ALL-UNNAMED \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath="$HOME/.cache/aukio/heapdumps" \
- -Daukio.cull.subpixel=0.4 \
-Daukio.fo4.lodRadius=64 \
${AUKIO_FO4_PATH:+-Daukio.fo4.path=$AUKIO_FO4_PATH} \
${JAVA_OPTS:-} \
-cp "target/classes:$(cat target/cp.txt)" \
- eu.svjatoslav.aukio.core.Main --env=fallout4 "$@"
+ eu.svjatoslav.aukio.environment.fo42.Fo4App "$@"