diff --git a/build/conf/nsis/idea.nsi b/build/conf/nsis/idea.nsi index 2a280e933e05..d4a20ed784cc 100644 --- a/build/conf/nsis/idea.nsi +++ b/build/conf/nsis/idea.nsi @@ -387,7 +387,7 @@ Function ConfirmDesktopShortcut 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 + StrCmp ${JRE_32BIT_VERSION_SUPPORTED} "0" get_installation_options_positions 0 ${StrRep} $0 ${PRODUCT_EXE_FILE} "64.exe" ".exe" ${If} $0 == ${PRODUCT_EXE_FILE} ; shortcuts for 32-bit and 64-bit. @@ -395,7 +395,7 @@ Function ConfirmDesktopShortcut StrCpy $R1 "64-bit launcher" ${EndIf} -getInstallationOptionsPositions: +get_installation_options_positions: Call getInstallationOptionsPositions !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field $launcherShortcut" "Text" $R0 @@ -414,7 +414,7 @@ getInstallationOptionsPositions: Pop $R0 ${EndIf} - StrCmp "${JRE_32BIT_VERSION_SUPPORTED}" "null" custom_pre_actions 0 + StrCmp ${JRE_32BIT_VERSION_SUPPORTED} "0" 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 @@ -1212,6 +1212,7 @@ Section "IDEA Files" CopyIdeaFiles shortcuts: !insertmacro INSTALLOPTIONS_READ $R2 "Desktop.ini" "Field $launcherShortcut" "State" + StrCmp ${JRE_32BIT_VERSION_SUPPORTED} "0" shortcut_for_exe_64 0 StrCmp $R2 1 "" exe_64 CreateShortCut "$DESKTOP\${PRODUCT_FULL_NAME_WITH_VER}.lnk" \ "$INSTDIR\bin\${PRODUCT_EXE_FILE}" "" "" "" SW_SHOWNORMAL @@ -1219,6 +1220,7 @@ shortcuts: exe_64: !insertmacro INSTALLOPTIONS_READ $R2 "Desktop.ini" "Field $secondLauncherShortcut" "State" StrCmp $R2 1 "" add_to_path +shortcut_for_exe_64: CreateShortCut "$DESKTOP\${PRODUCT_FULL_NAME_WITH_VER} x64.lnk" \ "$INSTDIR\bin\${PRODUCT_EXE_FILE_64}" "" "" "" SW_SHOWNORMAL ${LogText} "Create shortcut: $DESKTOP\${PRODUCT_FULL_NAME_WITH_VER} x64.lnk $INSTDIR\bin\${PRODUCT_EXE_FILE_64}" diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/WinExeInstallerBuilder.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/WinExeInstallerBuilder.groovy index 58956c49611c..c47f62486e95 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/WinExeInstallerBuilder.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/WinExeInstallerBuilder.groovy @@ -61,7 +61,8 @@ class WinExeInstallerBuilder { customizer.fileAssociations.collect { !it.startsWith(".") ? ".$it" : it} } - void buildInstaller(String winDistPath, String additionalDirectoryToInclude, String secondJreSuffix = null, String jre32BitVersionSupported = null) { + void buildInstaller(String winDistPath, String additionalDirectoryToInclude, String secondJreSuffix = null, boolean jre32BitVersionSupported) { + if (!SystemInfoRt.isWindows && !SystemInfoRt.isLinux) { buildContext.messages.warning("Windows installer can be built only under Windows or Linux") return @@ -169,7 +170,7 @@ class WinExeInstallerBuilder { buildContext.notifyArtifactBuilt(installerPath) } - private void prepareConfigurationFiles(String box, String winDistPath, String jre32BitVersionSupported = null) { + private void prepareConfigurationFiles(String box, String winDistPath, boolean jre32BitVersionSupported) { def productProperties = buildContext.productProperties def x64LauncherName = "${productProperties.baseFileName}64.exe" def mainExeLauncherName = customizer.include32BitLauncher ? "${productProperties.baseFileName}.exe" : x64LauncherName @@ -198,7 +199,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" +!define JRE_32BIT_VERSION_SUPPORTED "${jre32BitVersionSupported ? 1 : 0 }" ; 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 diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/WindowsDistributionBuilder.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/WindowsDistributionBuilder.groovy index 26c91c20d1bd..5fda3f398c25 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/WindowsDistributionBuilder.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/WindowsDistributionBuilder.groovy @@ -121,15 +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, null, buildContext.bundledJreManager.is32bitArchSupported() ? "32bitArchSupported" : null) - + new WinExeInstallerBuilder(buildContext, customizer, jreDirectoryPath64).buildInstaller(winDistPath, productJsonDir, null, buildContext.bundledJreManager.is32bitArchSupported()) 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()}", - buildContext.bundledJreManager.getSecondJreVersion().toInteger() == 8 ? "32bitArchSupported" : null) + new WinExeInstallerBuilder(buildContext, customizer, secondJreDirectoryPath).buildInstaller(winDistPath, productJsonDir, "-jbr${buildContext.bundledJreManager.getSecondJreVersion()}", buildContext.bundledJreManager.getSecondJreVersion().toInteger() == 8) } } }