diff --git a/nsis/plugin.jelly b/nsis/plugin.jelly index b39ad076..3c89b28c 100644 --- a/nsis/plugin.jelly +++ b/nsis/plugin.jelly @@ -21,6 +21,7 @@ @@ -32,14 +33,17 @@ - Installer generated successfully - - + + + + + + @@ -80,14 +84,74 @@ The NSIS executable '${maven.nsis.exe}' could not be found - - + + Installer ${maven.build.dir}/${maven.nsis.final.name}.exe generated successfully + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nsis/plugin.properties b/nsis/plugin.properties index 670e00c8..9c9ffef1 100644 --- a/nsis/plugin.properties +++ b/nsis/plugin.properties @@ -43,3 +43,9 @@ maven.nsis.logo.position=left # size of the logo on the first page #maven.nsis.logo.widthHeight= + +# directory containing contents to be bundled +maven.nsis.build.dir= + +# name of generated exe +maven.nsis.final.name=${maven.final.name} \ No newline at end of file diff --git a/nsis/project.xml b/nsis/project.xml index 70500140..6be848bc 100644 --- a/nsis/project.xml +++ b/nsis/project.xml @@ -21,7 +21,7 @@ 3 Maven NSIS Plug-in maven-nsis-plugin - 1.2-SNAPSHOT + 2.0-SNAPSHOT A plugin to generate Win32 installer programs using NSIS NSIS Plugin for Maven diff --git a/nsis/src/plugin-resources/templates/project.jelly b/nsis/src/plugin-resources/templates/project.jelly index 745487fa..dda4fddb 100644 --- a/nsis/src/plugin-resources/templates/project.jelly +++ b/nsis/src/plugin-resources/templates/project.jelly @@ -25,16 +25,16 @@ - + ; template for project details ; generated by ${user.name} from project.xml version ${pom.currentVersion} ; on date ${TODAY}, time ${TSTAMP} !define PROJECT_BUILD_DIR "${build}" -!define PROJECT_DIST_BIN_DIR "${maven.dist.bin.assembly.dir}" -!define PROJECT_DIST_DIR "${maven.dist.dir}" -!define PROJECT_FINAL_NAME "${maven.final.name}" +!define PROJECT_DIST_BIN_DIR "${maven.nsis.build.dir}" +!define PROJECT_DIST_DIR "${maven.build.dir}" +!define PROJECT_FINAL_NAME "${maven.nsis.final.name}" !define PROJECT_LICENSE_FILE "${license}" !define PROJECT_LICENSE_TEXT "${maven.nsis.license.text}" diff --git a/nsis/xdocs/changes.xml b/nsis/xdocs/changes.xml index 3f680afd..9bf6f103 100644 --- a/nsis/xdocs/changes.xml +++ b/nsis/xdocs/changes.xml @@ -25,7 +25,8 @@ - + + Use maven.nsis.build.dir instead of maven.dist.assembly.dir. Fail when makensis fails. Rename ORGANIZATION constant to PROJECT_ORGANIZATION. Check maven.nsis.exe exists before using it. @@ -43,7 +44,7 @@ PROJECT_DIST_DIRconstant to PROJECT_DIST_BIN_DIR, and define PROJECT_DIST_DIRto be - ${maven.dist.dir> + ${maven.dist.dir} Add docs on how the plugin process works Add some basic documentation diff --git a/nsis/xdocs/customizing.xml b/nsis/xdocs/customizing.xml index c0c70b99..562e4279 100644 --- a/nsis/xdocs/customizing.xml +++ b/nsis/xdocs/customizing.xml @@ -83,9 +83,9 @@ - - - + + + diff --git a/nsis/xdocs/faq.fml b/nsis/xdocs/faq.fml index 53ce73ed..a4611944 100644 --- a/nsis/xdocs/faq.fml +++ b/nsis/xdocs/faq.fml @@ -11,12 +11,12 @@

With the default templates, all the files from the directory denoted by the - maven.dist.bin.assembly.dir property are installed, + maven.nsis.build.dir property are installed, together with an uninstaller if the end-user so desires.

- If you call the dist goal before calling the nsis goal, - it will set the property correctly and generate files into that directory. + If you call the dist goal before calling the nsis goal, e.g. (maven dist nsis), + it will set the property correctly.

@@ -82,15 +82,15 @@ maven.nsis.exe=C:/develop/build/NSIS/makensis.exe Why am I getting org.apache.commons.jelly.JellyTagException: ... - 'maven.dist.bin.assembly.dir' must be specified ... + 'maven.nsis.build.dir' must be specified ... when I run the nsis goal?

- The nsis goal counts on the maven.dist.bin.assembly.dir property being set. - Normally the dist goal does this. You could also pass it in when running the goal, e.g. + The nsis goal counts on the maven.nsis.build.dir property being set. + You could also pass it in when running the goal, e.g.

- maven -Dmaven.dist.bin.assembly.dir=c:/develop/build/files nsis + maven -maven.nsis.build.dir=c:/develop/build/files nsis
diff --git a/nsis/xdocs/index.xml b/nsis/xdocs/index.xml index 4b48950a..a5e850ad 100644 --- a/nsis/xdocs/index.xml +++ b/nsis/xdocs/index.xml @@ -64,12 +64,13 @@

The plugin creates an installation program from your distribution, - as created by maven dist. The dist goal must be + as created by maven dist. The dist goal is usually run before using the plugin.

- Once you've run dist, run the nsis goal. This - produces an executable in ${maven.build.dir}/${maven.final.name}.exe + Once you've run dist, or created your directory with the installation contents, + run the nsis goal. This produces an executable in + ${maven.build.dir}/${maven.nsis.final.name}.exe

diff --git a/nsis/xdocs/process.xml b/nsis/xdocs/process.xml index 83e3037a..146aab4e 100644 --- a/nsis/xdocs/process.xml +++ b/nsis/xdocs/process.xml @@ -27,7 +27,7 @@

- The process of creating an installer from your ${maven.dist.bin.dir} + The process of creating an installer from your ${maven.nsis.build.dir} using the plugin is as follows:

Constant Value
PROJECT_BUILD_DIR ${maven.build.dir}
PROJECT_DIST_BIN_DIR ${maven.dist.bin.assembly.dir}
PROJECT_DIST_DIR ${maven.dist.dir}
PROJECT_FINAL_NAME ${maven.final.name}
PROJECT_DIST_BIN_DIR ${maven.nsis.build.dir}
PROJECT_DIST_DIR ${maven.build.dir}
PROJECT_FINAL_NAME ${maven.nsis.final.name}
PROJECT_LICENSE_FILE ${maven.license.licenseFile}
PROJECT_LICENSE_TEXT ${maven.nsis.license.text}
PROJECT_LOGO ${maven.nsis.logo}