diff --git a/wix/Build.OpenJDK_generic.cmd b/wix/Build.OpenJDK_generic.cmd index 9938b16f3..71316fdfe 100644 --- a/wix/Build.OpenJDK_generic.cmd +++ b/wix/Build.OpenJDK_generic.cmd @@ -4,7 +4,8 @@ REM Set version numbers and build option here if being run manually: REM PRODUCT_MAJOR_VERSION=11 REM PRODUCT_MINOR_VERSION=0 REM PRODUCT_MAINTENANCE_VERSION=0 -REM PRODUCT_PATCH_VERSION=28 +REM PRODUCT_PATCH_VERSION=0 +REM PRODUCT_BUILD_NUMBER=28 REM ARCH=x64|x86-32 or both "x64 x86-32" REM JVM=hotspot|openj9 or both JVM=hotspot openj9 REM PRODUCT_CATEGORY=jre|jdk (only one at a time) @@ -17,9 +18,10 @@ IF NOT DEFINED PRODUCT_MAJOR_VERSION SET ERR=1 IF NOT DEFINED PRODUCT_MINOR_VERSION SET ERR=2 IF NOT DEFINED PRODUCT_MAINTENANCE_VERSION SET ERR=3 IF NOT DEFINED PRODUCT_PATCH_VERSION SET ERR=4 -IF NOT DEFINED ARCH SET ERR=5 -IF NOT DEFINED JVM SET ERR=6 -IF NOT DEFINED PRODUCT_CATEGORY SET ERR=7 +IF NOT DEFINED PRODUCT_BUILD_NUMBER SET ERR=5 +IF NOT DEFINED ARCH SET ERR=6 +IF NOT DEFINED JVM SET ERR=7 +IF NOT DEFINED PRODUCT_CATEGORY SET ERR=8 IF NOT %ERR% == 0 ( ECHO Missing args/variable ERR:%ERR% && GOTO FAILED ) IF NOT "%ARCH%" == "x64" ( @@ -67,7 +69,7 @@ REM REM Cultures: https://msdn.microsoft.com/de-de/library/ee825488(v=cs.20).aspx SET PRODUCT_SKU=OpenJDK -SET PRODUCT_VERSION=%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%.%PRODUCT_PATCH_VERSION% +SET PRODUCT_VERSION=%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%.%PRODUCT_PATCH_VERSION%.%PRODUCT_BUILD_NUMBER% SET ICEDTEAWEB_DIR=.\SourceDir\icedtea-web-image SETLOCAL ENABLEDELAYEDEXPANSION @@ -76,16 +78,16 @@ SET JEP322_BASE_NAME="unknown" IF %PRODUCT_CATEGORY% EQU jre SET JRE=-jre IF %PRODUCT_MAJOR_VERSION% GEQ 10 ( IF %PRODUCT_MAJOR_VERSION% EQU 11 SET LTS_VERSION=-LTS - IF DEFINED PRODUCT_PATCH_VERSION ( - SET PATCH=+%PRODUCT_PATCH_VERSION% + IF DEFINED PRODUCT_BUILD_NUMBER ( + SET BUILD_NUM=+%PRODUCT_BUILD_NUMBER% ) - IF "%PRODUCT_MINOR_VERSION%%PRODUCT_MAINTENANCE_VERSION%" EQU "00" SET JEP322_BASE_NAME=%PRODUCT_MAJOR_VERSION%!PATCH! - IF "%PRODUCT_MAINTENANCE_VERSION%" NEQ "0" SET JEP322_BASE_NAME=%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%!PATCH! - IF "%PRODUCT_MINOR_VERSION%" NEQ "0" IF %PRODUCT_MAINTENANCE_VERSION% EQU 0 SET JEP322_BASE_NAME=%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%!PATCH! + IF "%PRODUCT_MINOR_VERSION%%PRODUCT_MAINTENANCE_VERSION%" EQU "00" SET JEP322_BASE_NAME=%PRODUCT_MAJOR_VERSION%!BUILD_NUM! + IF "%PRODUCT_MAINTENANCE_VERSION%" NEQ "0" SET JEP322_BASE_NAME=%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%!BUILD_NUM! + IF "%PRODUCT_MINOR_VERSION%" NEQ "0" IF %PRODUCT_MAINTENANCE_VERSION% EQU 0 SET JEP322_BASE_NAME=%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%!BUILD_NUM! SET JEP322_NAME=!JEP322_BASE_NAME!!LTS_VERSION! ) -REM ECHO Basic =%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%.%PRODUCT_PATCH_VERSION% +REM ECHO Basic =%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%.%PRODUCT_PATCH_VERSION%.%PRODUCT_BUILD_NUMBER% REM ECHO JEP322_NAME=!JEP322_NAME! SET ADOPT_NAME=jdk-!JEP322_BASE_NAME!!JRE! @@ -115,7 +117,7 @@ FOR %%A IN (%ARCH%) DO ( IF NOT EXIST "!REPRO_DIR!" ( ECHO First !REPRO_DIR! not exists IF !PRODUCT_MAJOR_VERSION! == 8 ( - SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\jdk%PRODUCT_MAJOR_VERSION%u%PRODUCT_MAINTENANCE_VERSION%-b%PRODUCT_PATCH_VERSION% + SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\jdk%PRODUCT_MAJOR_VERSION%u%PRODUCT_MAINTENANCE_VERSION%-b%PRODUCT_BUILD_NUMBER% IF !PRODUCT_CATEGORY! == jre ( SET REPRO_DIR=!REPRO_DIR!-!PRODUCT_CATEGORY! ) @@ -124,26 +126,33 @@ FOR %%A IN (%ARCH%) DO ( GOTO FAILED ) ) ELSE ( - SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\jdk-%PRODUCT_MAJOR_VERSION%+%PRODUCT_PATCH_VERSION% + SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\jdk-%PRODUCT_MAJOR_VERSION%+%PRODUCT_BUILD_NUMBER% IF !PRODUCT_CATEGORY! == jre ( SET REPRO_DIR=!REPRO_DIR!-!PRODUCT_CATEGORY! ) IF NOT EXIST "!REPRO_DIR!" ( ECHO Second !REPRO_DIR! not exists - SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\jdk-%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%+%PRODUCT_PATCH_VERSION% + SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\jdk-%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%+%PRODUCT_BUILD_NUMBER% IF !PRODUCT_CATEGORY! == jre ( SET REPRO_DIR=!REPRO_DIR!-!PRODUCT_CATEGORY! ) IF NOT EXIST "!REPRO_DIR!" ( ECHO Third !REPRO_DIR! not exists - REM try folder for JDK-Latest defined in CreateSourceFolder.AdoptOpenJDK.ps1 - SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!-Latest\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\!ADOPT_NAME! + SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!!PRODUCT_MAJOR_VERSION!\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\jdk-%PRODUCT_MAJOR_VERSION%.%PRODUCT_MINOR_VERSION%.%PRODUCT_MAINTENANCE_VERSION%.%PRODUCT_PATCH_VERSION%+%PRODUCT_BUILD_NUMBER% + IF !PRODUCT_CATEGORY! == jre ( + SET REPRO_DIR=!REPRO_DIR!-!PRODUCT_CATEGORY! + ) IF NOT EXIST "!REPRO_DIR!" ( - ECHO OpenJDK-Latest unnumbered !REPRO_DIR! does not exist - ECHO SOURCE Dir not found / failed - ECHO Listing directory : - dir /a:d /s /b /o:n SourceDir - GOTO FAILED + ECHO Fourth !REPRO_DIR! not exists + REM try folder for JDK-Latest defined in CreateSourceFolder.AdoptOpenJDK.ps1 + SET REPRO_DIR=.\SourceDir\!PRODUCT_SKU!-Latest\!PACKAGE_TYPE!\!FOLDER_PLATFORM!\!ADOPT_NAME! + IF NOT EXIST "!REPRO_DIR!" ( + ECHO OpenJDK-Latest unnumbered !REPRO_DIR! does not exist + ECHO SOURCE Dir not found / failed + ECHO Listing directory : + dir /a:d /s /b /o:n SourceDir + GOTO FAILED + ) ) ) ) @@ -336,6 +345,7 @@ SET PRODUCT_MAJOR_VERSION= SET PRODUCT_MINOR_VERSION= SET PRODUCT_MAINTENANCE_VERSION= SET PRODUCT_PATCH_VERSION= +SET PRODUCT_BUILD_NUMBER= SET PRODUCT_ID= SET PRODUCT_VERSION= SET PLATFORM=