mess around with a rust agent version with just rev shell.

This commit is contained in:
KingKDot
2026-08-19 09:54:52 -05:00
parent 691e1c3ba4
commit 7a8fcf39ec
47 changed files with 4790 additions and 93 deletions
+29 -11
View File
@@ -4,6 +4,8 @@ set "SCRIPT_DIR=%~dp0"
for %%I in ("%SCRIPT_DIR%..") do set "ROOT=%%~fI\"
set "SERVER_SRC=%ROOT%Overlord-Server"
set "CLIENT_SRC=%ROOT%Overlord-Client"
set "LITE_SRC=%ROOT%Overlord-Lite"
set "LITE_PLUGIN_SRC=%ROOT%plugins\rust-lite-builder"
set "RELEASE_DIR=%ROOT%release"
if not exist "%SERVER_SRC%\package.json" (
@@ -16,6 +18,16 @@ if not exist "%CLIENT_SRC%\go.mod" (
exit /b 1
)
if not exist "%LITE_SRC%\Cargo.toml" (
echo [error] Overlord-Lite not found at: %LITE_SRC%
exit /b 1
)
if not exist "%LITE_PLUGIN_SRC%\config.json" (
echo [error] Rust Lite Builder plugin not found at: %LITE_PLUGIN_SRC%
exit /b 1
)
where bun >nul 2>&1
if errorlevel 1 (
echo [error] bun was not found in PATH.
@@ -28,34 +40,34 @@ if errorlevel 1 (
exit /b 1
)
echo [1/10] Building server bundle and web assets...
echo [1/11] Building server bundle and web assets...
pushd "%SERVER_SRC%"
call bun install
if errorlevel 1 goto :err
call bun run build
if errorlevel 1 goto :err
echo [2/10] Compiling Windows production executable...
echo [2/11] Compiling Windows production executable...
call bun run build:prod:win
if errorlevel 1 goto :err
echo [3/10] Compiling Linux production executable...
echo [3/11] Compiling Linux production executable...
call bun run build:prod:linux
if errorlevel 1 goto :err
popd
echo [4/10] Skipping prebuilt client binaries ^(prod package exports client source only^)
echo [4/11] Skipping prebuilt client binaries ^(prod package exports client source only^)
echo [5/10] Preparing release folder...
echo [5/11] Preparing release folder...
if exist "%RELEASE_DIR%" rmdir /s /q "%RELEASE_DIR%"
mkdir "%RELEASE_DIR%"
if errorlevel 1 goto :err
echo [6/10] Copying compiled server executables...
echo [6/11] Copying compiled server executables...
copy /Y "%SERVER_SRC%\dist\overlord-server.exe" "%RELEASE_DIR%\overlord-server.exe" >nul
if errorlevel 1 goto :err
copy /Y "%SERVER_SRC%\dist\overlord-server-linux-x64" "%RELEASE_DIR%\overlord-server-linux-x64" >nul
if errorlevel 1 goto :err
echo [6b/10] Copying sharp native module for runtime resolution...
echo [6b/11] Copying sharp native module for runtime resolution...
if exist "%SERVER_SRC%\node_modules\sharp" (
robocopy "%SERVER_SRC%\node_modules\sharp" "%RELEASE_DIR%\node_modules\sharp" /E >nul
if errorlevel 8 goto :robocopy_err
@@ -65,21 +77,27 @@ if exist "%SERVER_SRC%\node_modules\@img" (
if errorlevel 8 goto :robocopy_err
)
echo [7/10] Exporting Overlord-Client source for runtime builds...
echo [7/11] Exporting Overlord-Client source for runtime builds...
robocopy "%CLIENT_SRC%" "%RELEASE_DIR%\Overlord-Client" /E /XD build .git .vscode >nul
if errorlevel 8 goto :robocopy_err
echo [8/10] Copying required public web assets...
echo [8/11] Exporting Overlord-Lite source and Rust builder plugin...
robocopy "%LITE_SRC%" "%RELEASE_DIR%\Overlord-Lite" /E /XD target .git .vscode >nul
if errorlevel 8 goto :robocopy_err
robocopy "%LITE_PLUGIN_SRC%" "%RELEASE_DIR%\plugins\rust-lite-builder" /E /XD data /XF rust-lite-builder.zip >nul
if errorlevel 8 goto :robocopy_err
echo [9/11] Copying required public web assets...
robocopy "%SERVER_SRC%\public" "%RELEASE_DIR%\public" /E >nul
if errorlevel 8 goto :robocopy_err
echo [9/10] Minifying public JS, CSS, and HTML assets...
echo [10/11] Minifying public JS, CSS, and HTML assets...
pushd "%SERVER_SRC%"
call bun run scripts/minify-public.ts --dir "%RELEASE_DIR%\public"
if errorlevel 1 goto :err
popd
echo [10/10] Creating runner scripts...
echo [11/11] Creating runner scripts...
(
echo @echo off