2017-07-20 10:04:09 +00:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
set DIRNAME=%~dp0
|
|
|
|
if "%DIRNAME%" == "" set DIRNAME=.
|
|
|
|
|
|
|
|
set SOURCEDIR=%DIRNAME%java
|
|
|
|
set BUILDDIR=%DIRNAME%build
|
|
|
|
|
|
|
|
if '%1' == '' (
|
|
|
|
@echo Need location of rt.jar
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
if not "%~nx1" == "rt.jar" (
|
|
|
|
@echo File '%1' is not rt.jar
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
if not exist %1 (
|
|
|
|
@echo %1 not found.
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
|
2017-08-15 14:07:28 +00:00
|
|
|
rem Bugfixes:
|
|
|
|
rem =========
|
|
|
|
rem
|
|
|
|
rem sun.swing.JLightweightFrame:473
|
|
|
|
rem https://bugs.openjdk.java.net/browse/JDK-8185890
|
|
|
|
|
2017-07-20 10:04:09 +00:00
|
|
|
if exist "%BUILDDIR%" rmdir /s /q "%BUILDDIR%"
|
|
|
|
mkdir "%BUILDDIR%"
|
|
|
|
|
|
|
|
for /r "%SOURCEDIR%" %%j in (*.java) do (
|
2018-06-27 15:45:39 +00:00
|
|
|
"%JAVA_HOME%\bin\javac" -O -d "%BUILDDIR%" "%%j"
|
2017-07-20 10:04:09 +00:00
|
|
|
if ERRORLEVEL 1 (
|
|
|
|
@echo "Failed to compile %%j"
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2018-06-27 15:45:39 +00:00
|
|
|
"%JAVA_HOME%\bin\jar" uvf %1 -C "%BUILDDIR%" .
|
2017-07-20 10:04:09 +00:00
|
|
|
if ERRORLEVEL 1 (
|
|
|
|
@echo "Failed to update %1"
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
|
|
|
|
@echo "Completed"
|