IDEA-207608 [jbr11 windows installers] It is better to remove checkboxes related to win32 system from Setup dialog

This commit is contained in:
Vladimir.Orlov
2019-03-04 11:20:29 +03:00
parent 4c0d949a12
commit 488ce5c32d
3 changed files with 15 additions and 9 deletions
+8 -4
View File
@@ -383,16 +383,19 @@ FunctionEnd
Function ConfirmDesktopShortcut
!insertmacro MUI_HEADER_TEXT "$(installation_options)" "$(installation_options_prompt)"
; shortcut for 64-bit launcher.
StrCpy $R0 "${MUI_PRODUCT} launcher"
StrCpy $R1 ""
; not suggest user to create shortcut for 32Bit launcher if bundled jre does not support 32Bit.
StrCmp "${JRE_32BIT_VERSION_SUPPORTED}" "null" getInstallationOptionsPositions 0
${StrRep} $0 ${PRODUCT_EXE_FILE} "64.exe" ".exe"
${If} $0 == ${PRODUCT_EXE_FILE}
; shortcuts for 32-bit and 64-bit.
StrCpy $R0 "32-bit launcher"
StrCpy $R1 "64-bit launcher"
${Else}
;there is only one launcher and it is 64-bit.
StrCpy $R0 "${MUI_PRODUCT} launcher"
StrCpy $R1 ""
${EndIf}
getInstallationOptionsPositions:
Call getInstallationOptionsPositions
!insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field $launcherShortcut" "Text" $R0
@@ -411,6 +414,7 @@ Function ConfirmDesktopShortcut
Pop $R0
${EndIf}
StrCmp "${JRE_32BIT_VERSION_SUPPORTED}" "null" custom_pre_actions 0
; if jre x86 for the build is available then add checkbox to Installation Options dialog
StrCmp "${LINK_TO_JRE}" "null" custom_pre_actions 0
inetc::head /SILENT /TOSTACK /CONNECTTIMEOUT 2 ${LINK_TO_JRE} "" /END
@@ -74,7 +74,8 @@ class WinExeInstallerBuilder {
customizer.fileAssociations.collect { !it.startsWith(".") ? ".$it" : it}
}
void buildInstaller(String winDistPath, String additionalDirectoryToInclude, String secondJreSuffix = null) {
void buildInstaller(String winDistPath, String additionalDirectoryToInclude, String secondJreSuffix = null, String jre32BitVersionSupported = null) {
if (!SystemInfoRt.isWindows && !SystemInfoRt.isLinux) {
buildContext.messages.warning("Windows installer can be built only under Windows or Linux")
return
@@ -130,7 +131,7 @@ class WinExeInstallerBuilder {
buildContext.messages.error("Failed to generated list of files for NSIS installer: $e")
}
prepareConfigurationFiles(box, winDistPath)
prepareConfigurationFiles(box, winDistPath, jre32BitVersionSupported)
customizer.customNsiConfigurationFiles.each {
ant.copy(file: it, todir: "$box/nsiconf", overwrite: "true")
}
@@ -183,7 +184,7 @@ class WinExeInstallerBuilder {
buildContext.notifyArtifactBuilt(installerPath)
}
private void prepareConfigurationFiles(String box, String winDistPath) {
private void prepareConfigurationFiles(String box, String winDistPath, String jre32BitVersionSupported = null) {
def productProperties = buildContext.productProperties
def x64LauncherName = "${productProperties.baseFileName}64.exe"
def mainExeLauncherName = customizer.include32BitLauncher ? "${productProperties.baseFileName}.exe" : x64LauncherName
@@ -213,6 +214,7 @@ class WinExeInstallerBuilder {
!define ASSOCIATION "$fileAssociations"
!define UNINSTALL_WEB_PAGE "${customizer.getUninstallFeedbackPageUrl(buildContext.applicationInfo) ?: "feedback_web_page"}"
!define LINK_TO_JRE "$linkToJre"
!define JRE_32BIT_VERSION_SUPPORTED "$jre32BitVersionSupported"
; if SHOULD_SET_DEFAULT_INSTDIR != 0 then default installation directory will be directory where highest-numbered IDE build has been installed
; set to 1 for release build
@@ -121,11 +121,11 @@ class WindowsDistributionBuilder extends OsSpecificDistributionBuilder {
def productJsonDir = new File(buildContext.paths.temp, "win.dist.product-info.json.exe").absolutePath
generateProductJson(productJsonDir, jreDirectoryPath64 != null)
new ProductInfoValidator(buildContext).validateInDirectory(productJsonDir, "", [winDistPath, jreDirectoryPath64], [])
new WinExeInstallerBuilder(buildContext, customizer, jreDirectoryPath64).buildInstaller(winDistPath, productJsonDir)
new WinExeInstallerBuilder(buildContext, customizer, jreDirectoryPath64).buildInstaller(winDistPath, productJsonDir, null, buildContext.bundledJreManager.is32bitArchSupported() ? "32bitArchSupported" : null)
if (secondJreDirectoryPath != null) {
generateProductJson(productJsonDir, secondJreDirectoryPath != null)
new ProductInfoValidator(buildContext).validateInDirectory(productJsonDir, "", [winDistPath, secondJreDirectoryPath], [])
new WinExeInstallerBuilder(buildContext, customizer, secondJreDirectoryPath).buildInstaller(winDistPath, productJsonDir, "-jbr${buildContext.bundledJreManager.getSecondJreVersion()}")
new WinExeInstallerBuilder(buildContext, customizer, secondJreDirectoryPath).buildInstaller(winDistPath, productJsonDir, "-jbr${buildContext.bundledJreManager.getSecondJreVersion()}", buildContext.bundledJreManager.getSecondJreVersion().toInteger() == 8 ? "32bitArchSupported" : null)
}
}
}