corda/tools/demobench/package/bugfixes/apply.bat
Chris Rankin bf98f64269 Patch DemoBench for JavaFX bugs when building installers. (#1069)
* Replace buggy classes in rt.jar with patched versions.
* Apply Java bugfixes to MacOSX.
* Initial support for patching Windows JRE.
* Resign DemoBench DMG after the bugfixe source has been deleted.
* Apply Java bugfixes for DemoBench on Windows.
2017-07-20 11:04:09 +01:00

40 lines
671 B
Batchfile

@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
)
if exist "%BUILDDIR%" rmdir /s /q "%BUILDDIR%"
mkdir "%BUILDDIR%"
for /r "%SOURCEDIR%" %%j in (*.java) do (
javac -O -d "%BUILDDIR%" "%%j"
if ERRORLEVEL 1 (
@echo "Failed to compile %%j"
exit /b 1
)
)
jar uvf %1 -C "%BUILDDIR%" .
if ERRORLEVEL 1 (
@echo "Failed to update %1"
exit /b 1
)
@echo "Completed"