@echo off rem Builds the mod and drops the jar into the client's mods folder. rem Only a JDK is needed: no Gradle, no network, nothing but javac and jar. setlocal cd /d "%~dp0" if not exist "build\classes" mkdir "build\classes" if not exist "build\mods" mkdir "build\mods" set ENTRY=com.example.Diagnostics rem where the modloader looks for mods; override with set MODS_DIR=... if "%MODS_DIR%"=="" set MODS_DIR=%LOCALAPPDATA%\rsx-mod\mods echo [1/3] compiling... dir /s /b src\main\java\*.java > build\sources.txt javac -encoding UTF-8 --release 8 -nowarn -cp "libs\rsx-api.jar;libs\rsxm-lib.jar" -d build\classes @build\sources.txt if errorlevel 1 ( echo. echo ?????? ?? ???????. exit /b 1 ) echo [2/3] packaging rsxm-example.jar... if exist "build\mods\rsxm-example.jar" del "build\mods\rsxm-example.jar" jar cfm "build\mods\rsxm-example.jar" manifest.txt -C build/classes . if errorlevel 1 exit /b 1 echo [3/3] installing... if not exist "%MODS_DIR%" ( echo. echo ????? ????? ?? ???????: %MODS_DIR% echo ???????? build\mods\rsxm-example.jar ? ??? ???. exit /b 0 ) copy /y "build\mods\rsxm-example.jar" "%MODS_DIR%\" >nul echo. echo ??????: build\mods\rsxm-example.jar ?????????? ? %MODS_DIR%