Make clean GitHub checkouts build the complete server, simulator, Sys.API, admin web UI, global translator and cross-region chat modules. Preserve newer Hypergrid security fixes. Disable unsafe BinaryFormatter settings and enforce project hygiene in CI. Verified fresh checkout on PC-Bomlitz: full build zero errors/warnings, regression and smoke tests passed. Linux x64, ARM64 and Windows x64 builds and ROBUST boot tests succeeded in GitHub Actions; artifact uploads remain blocked by account storage quota. No production deployment.
70 lines
2.7 KiB
Bash
70 lines
2.7 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# The checked-in .NET 10 solution/projects are the canonical build inputs.
|
|
# The legacy Prebuild generator can emit malformed projects and host-specific
|
|
# HintPaths. Never overwrite the tracked projects during normal CI/install.
|
|
case "${1:-}" in
|
|
clean|autoclean) ;;
|
|
*)
|
|
python3 tools/ci/verify_g1_portable_projects.py
|
|
python3 tools/gen11/retarget_net10.py --check
|
|
echo "[OGL BUILD] Using validated version-controlled .NET 10 project files."
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
case "$1" in
|
|
|
|
'clean')
|
|
dotnet bin/prebuild.dll /file prebuild.xml /clean
|
|
|
|
;;
|
|
|
|
|
|
'autoclean')
|
|
|
|
echo y|dotnet bin/prebuild.dll /file prebuild.xml /clean
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
cp bin/System.Drawing.Common.dll.linux bin/System.Drawing.Common.dll
|
|
# The bundled legacy prebuild.dll accepts net8_0. Immediately retarget
|
|
# generated projects before adding addons or compiling.
|
|
dotnet bin/prebuild.dll /target vs2022 /targetframework net8_0 /excludedir = "obj | bin" /file prebuild.xml
|
|
python3 tools/gen11/retarget_net10.py
|
|
python3 tools/gen11/retarget_net10.py --check
|
|
# The shipped Prebuild generator cannot emit net10_0 directly. Convert only
|
|
# its generated TargetFramework elements before any SDK restore/build.
|
|
python3 tools/ci/gen11_retarget_generated_csproj.py --fix
|
|
python3 tools/ci/gen11_retarget_generated_csproj.py --check
|
|
# Prebuild regenerates OpenSim.sln from scratch. Keep SDK-style city
|
|
# and the weather addon in the actual solution, not manual build steps.
|
|
# This also makes a plain 'dotnet build OpenSim.sln' compile their DLLs.
|
|
dotnet sln OpenSim.sln add --in-root \
|
|
addons/NexTraffic/OpenGenesisLINK.Addons.NexTraffic.csproj \
|
|
addons/NexTransit/OpenGenesisLINK.Addons.NexTransit.csproj \
|
|
addons/NexSmartLight/OpenGenesisLINK.Addons.NexSmartLight.csproj \
|
|
addons/OGLWeather/OpenGenesisLINK.Addons.OGLWeather.csproj \
|
|
addons/OGLEnergy/OpenGenesisLINK.Addons.OGLEnergy.csproj \
|
|
addons/OSWebInterface/os_webinterface.csproj \
|
|
addons/SysApi/sys.api.csproj
|
|
printf '%s\n' \
|
|
'#!/bin/sh' 'set -eu' \
|
|
'dotnet build -c Release OpenSim.sln' \
|
|
'for addon in NexTraffic NexTransit NexSmartLight OGLWeather OGLEnergy; do' \
|
|
' test -s "bin/OpenGenesisLINK.Addons.${addon}.dll" || { echo "Missing city addon DLL: ${addon}" >&2; exit 1; }' \
|
|
'done' \
|
|
'test -s bin/os_webinterface.dll || { echo "Missing simulator admin DLL: os_webinterface" >&2; exit 1; }' \
|
|
'test -s bin/sys.api.dll || { echo "Missing ROBUST SYS.API DLL: sys.api" >&2; exit 1; }' \
|
|
'bash addon-modules/OGLAssetService/build.sh Release' > compile.sh
|
|
chmod +x compile.sh
|
|
|
|
;;
|
|
|
|
esac
|