source: main/trunk/release-kits/bin/rk.bat@ 35622

Last change on this file since 35622 was 35622, checked in by davidb, 3 years ago

change to specifying JDK8 through JAVACFLAGS -- needed for gs-admin/GAI Java code which uses classes that are only available from this version onwards. Issue found by more careful control of the rt.jar provided during compilation with -source -target flags

File size: 1.1 KB
Line 
1@echo off
2set RELEASE_DIR=%CD%
3echo RELEASE_DIR:%RELEASE_DIR%
4pushd "%CD%"
5CD /D "%~dp0\.."
6set RK_HOME=%CD%
7
8:: make sure ant has enough memory
9set ANT_OPTS=-Xmx1024M
10
11:: set JAVACFLAGS (used in the relevant javac lines in our win32.mak/Makefiles) so that any compiled Java code
12:: is backwards compatible with Java v1.6
13set JAVACFLAGS=-source 1.8 -target 1.8 -bootclasspath "%RK_HOME%\shared\core\java-rt\rt-openjdk8.jar" -extdirs ""
14
15:: Generally, an ant property can be true|on|yes vs false|off|no (or left unset)
16:: see https://ant.apache.org/manual/properties.html#if+unless
17:: However, the release-kit code requires envvar KEEP_SRC to be "true" in order to stop it deleting source code
18:: set KEEP_SRC envvar here or in envi/etc/tasks/snapshot/environment.pl
19::set KEEP_SRC=true
20set debug=
21if not "%KEEP_SRC%" == "" set debug="-Dkeep.src=%KEEP_SRC%"
22
23@echo on
24cmd.exe /c ant -f "%CD%\kits\%RK_NAME%\ant-scripts\build.xml" "-Drk.home=%CD%" "-Drk.name=%RK_NAME%" %debug% "-Dbasedir=%RELEASE_DIR%" -lib "%RELEASE_DIR%/installer/classes" %* | "%CD%\shared\windows\utils\tee.exe" "%RELEASE_DIR%\%RK_NAME%.out"
25
26:end
27set debug=
28
29popd
Note: See TracBrowser for help on using the repository browser.