@echo off setlocal EnableExtensions set "SCRIPT_DIR=%~dp0" set "PLUGIN_DIR=%SCRIPT_DIR%plugin" cd /d "%PLUGIN_DIR%" if errorlevel 1 ( echo Failed to change to plugin directory: echo "%PLUGIN_DIR%" pause exit /b 1 ) where xmake >nul 2>&1 if errorlevel 1 ( echo xmake was not found on PATH. echo Install XMake and add it to PATH: https://xmake.io pause exit /b 1 ) echo Configuring Commonwealth Online plugin... xmake if errorlevel 1 ( echo xmake configuration failed. pause exit /b 1 ) echo Building Commonwealth Online plugin... xmake build if errorlevel 1 ( echo Build failed. pause exit /b 1 ) echo. echo Build succeeded. echo plugin\build\windows\x64\release\CommonwealthOnline.dll echo Run stage-mod.bat or build-all.bat to package the full mod into build\Fallout 4\Data endlocal exit /b 0