From 7b630b143582c329ee5af929a5768bc8c909360d Mon Sep 17 00:00:00 2001 From: KingKDot Date: Tue, 10 Mar 2026 18:27:45 -0500 Subject: [PATCH] add warnings --- Overlord-Server/public/assets/build.js | 22 +++++++++++++++++++++ Overlord-Server/src/server/build-process.ts | 21 ++++++++++++++++++++ build-clients.bat | 4 ++++ 3 files changed, 47 insertions(+) diff --git a/Overlord-Server/public/assets/build.js b/Overlord-Server/public/assets/build.js index a2678f2..2ac5c65 100644 --- a/Overlord-Server/public/assets/build.js +++ b/Overlord-Server/public/assets/build.js @@ -195,6 +195,28 @@ form?.addEventListener("submit", async (e) => { }; const hasAndroid = platforms.some(p => p.startsWith('android-')); + const hasBsd = platforms.some( + p => p.startsWith('freebsd-') || p.startsWith('openbsd-'), + ); + + if (hasAndroid || hasBsd) { + let warningText = 'WARNING: Some selected targets are severely untested and will probably not work right.\n\n'; + + if (hasAndroid) { + warningText += '- Android targets are severely untested and will probably not work right.\n'; + } + + if (hasBsd) { + warningText += '- BSD targets are severely untested and will probably not work right.\n'; + } + + warningText += '\nContinue with build anyway?'; + + if (!confirm(warningText)) { + return; + } + } + if (hasAndroid && enablePersistence) { if (!confirm( '⚠️ WARNING: Persistence is NOT supported on Android\n\n' + diff --git a/Overlord-Server/src/server/build-process.ts b/Overlord-Server/src/server/build-process.ts index f543eb2..ceb8852 100644 --- a/Overlord-Server/src/server/build-process.ts +++ b/Overlord-Server/src/server/build-process.ts @@ -167,6 +167,27 @@ export async function startBuildProcess( throw new Error("One or more requested platforms are not allowed"); } + const hasAndroidTargets = platformsToBuild.some((p) => p.startsWith("android-")); + const hasBsdTargets = platformsToBuild.some( + (p) => p.startsWith("freebsd-") || p.startsWith("openbsd-"), + ); + + if (hasAndroidTargets) { + sendToStream({ + type: "output", + text: "WARNING: Android targets are severely untested and will probably not work right.\n", + level: "warn", + }); + } + + if (hasBsdTargets) { + sendToStream({ + type: "output", + text: "WARNING: BSD targets are severely untested and will probably not work right.\n", + level: "warn", + }); + } + const ndkBin = resolveAndroidNdkToolchainBin(); if (!ndkBin && platformsToBuild.some((p) => p.startsWith("android-"))) { sendToStream({ diff --git a/build-clients.bat b/build-clients.bat index 42d07f0..c51c17a 100644 --- a/build-clients.bat +++ b/build-clients.bat @@ -131,6 +131,8 @@ set CGO_ENABLED=0 %BUILD_CMD% %BUILD_TAGS% -ldflags="%LDFLAGS%" -o "%OUT_DIR%\agent-darwin-amd64" ./cmd/agent if errorlevel 1 goto :err +echo WARNING: BSD targets are severely untested and will probably not work right. + echo == Building agent for freebsd amd64 == set GOOS=freebsd set GOARCH=amd64 @@ -145,6 +147,8 @@ set CGO_ENABLED=0 %BUILD_CMD% %BUILD_TAGS% -ldflags="%LDFLAGS%" -o "%OUT_DIR%\agent-freebsd-arm64" ./cmd/agent if errorlevel 1 goto :err +echo WARNING: Android targets are severely untested and will probably not work right. + echo == Building agent for android arm64 == set GOOS=android set GOARCH=arm64