From df72d0f765565089ffb798deac2bb941057e3464 Mon Sep 17 00:00:00 2001 From: dion Date: Tue, 14 Oct 2003 14:50:16 +0000 Subject: [PATCH] Conditionally include license. If no license file is found, no license page is generated in the installer git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114204 13f79535-47bb-0310-9956-ffa450edef68 --- nsis/src/plugin-resources/templates/project.jelly | 2 ++ nsis/src/plugin-resources/templates/setup.jelly | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nsis/src/plugin-resources/templates/project.jelly b/nsis/src/plugin-resources/templates/project.jelly index 2e970174..891e46b5 100644 --- a/nsis/src/plugin-resources/templates/project.jelly +++ b/nsis/src/plugin-resources/templates/project.jelly @@ -17,8 +17,10 @@ !define ORGANIZATION "${pom.organization}" !define PROJECT_BUILD_DIR "${build}" !define PROJECT_FINAL_NAME "${maven.final.name}" + !define PROJECT_LICENSE_FILE "${license}" !define PROJECT_LICENSE_TEXT "${maven.nsis.license.text}" + !define PROJECT_NAME "${pom.name}" !define PROJECT_REG_KEY "SOFTWARE\${pom.organization}\${pom.name}\${pom.currentVersion}" !define PROJECT_REG_UNINSTALL_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${pom.name} ${pom.version}" diff --git a/nsis/src/plugin-resources/templates/setup.jelly b/nsis/src/plugin-resources/templates/setup.jelly index c9553678..312e7085 100644 --- a/nsis/src/plugin-resources/templates/setup.jelly +++ b/nsis/src/plugin-resources/templates/setup.jelly @@ -51,9 +51,11 @@ XPStyle on ; Sets the font of the installer SetFont "Arial" 8 -; License Information -LicenseText "$${PROJECT_LICENSE_TEXT}" -LicenseData "$${PROJECT_LICENSE_FILE}" +!ifdef PROJECT_LICENSE_FILE + ; License Information + LicenseText "$${PROJECT_LICENSE_TEXT}" + LicenseData "$${PROJECT_LICENSE_FILE}" +!endif ; The default installation directory InstallDir "$$PROGRAMFILES\$${ORGANIZATION}\$${PROJECT_NAME} $${PROJECT_VERSION}"