IDEA-CR-26346: added warning if silent.config is not generated.

This commit is contained in:
Vladimir.Orlov
2017-11-03 13:40:19 +03:00
parent 69336e969c
commit 86263ee9a3
2 changed files with 19 additions and 15 deletions
@@ -75,7 +75,7 @@ abstract class WindowsDistributionCustomizer {
/**
* Path to silent.config which contains set of properties to manage UI options to install product in silent mode
*/
String silentInstallationConfig = ""
String silentInstallationConfig = null
/**
* Name of the root directory in Windows .zip archive
@@ -38,23 +38,27 @@ class WinExeInstallerBuilder {
}
private void generateInstallationConfigFileForSilentMode() {
if (new File(customizer.silentInstallationConfig).exists()) {
def extensionsList = customizer.fileAssociations
String associations = "; List of associations. To create an association change value to 1.\n"
if (! extensionsList.isEmpty()) {
for (int i = 0; i < extensionsList.size(); i++) {
associations += extensionsList.get(i) + "=0\n"
if (customizer.silentInstallationConfig != null) {
if (new File(customizer.silentInstallationConfig).exists()) {
def extensionsList = customizer.fileAssociations
String associations = "; List of associations. To create an association change value to 1.\n"
if (! extensionsList.isEmpty()) {
for (int i = 0; i < extensionsList.size(); i++) {
associations += extensionsList.get(i) + "=0\n"
}
} else {
associations = "; There are no associations for the product.\n"
}
} else {
associations = "; There are no associations for the product.\n"
}
buildContext.messages.info(associations)
buildContext.ant.copy(todir: "${buildContext.paths.artifacts}") {
fileset(file: customizer.silentInstallationConfig)
filterset(begintoken: "@@", endtoken: "@@") {
filter(token: "List of associations", value: associations)
buildContext.messages.info(associations)
buildContext.ant.copy(todir: "${buildContext.paths.artifacts}") {
fileset(file: customizer.silentInstallationConfig)
filterset(begintoken: "@@", endtoken: "@@") {
filter(token: "List of associations", value: associations)
}
}
}
} else {
buildContext.messages.warning("Silent config file for Windows installer won't be generated because it is not defined.")
}
}