From d632ebba7f2ae372d679fb7fa82e0a6555a46e46 Mon Sep 17 00:00:00 2001 From: aheritier Date: Sat, 28 Oct 2006 22:58:44 +0000 Subject: [PATCH] MPNSIS-13 : The script "remove-shortcuts.nsh" can be used to remove shortcuts created in "startmenu-shortcuts.nsh" and "desktop-shortcuts.nsh". git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@468782 13f79535-47bb-0310-9956-ffa450edef68 --- nsis/src/plugin-resources/remove-shortcuts.nsh | 3 +++ nsis/src/plugin-resources/templates/setup.jelly | 6 ++---- nsis/xdocs/changes.xml | 1 + nsis/xdocs/customizing.xml | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 nsis/src/plugin-resources/remove-shortcuts.nsh diff --git a/nsis/src/plugin-resources/remove-shortcuts.nsh b/nsis/src/plugin-resources/remove-shortcuts.nsh new file mode 100644 index 00000000..54a5fdf2 --- /dev/null +++ b/nsis/src/plugin-resources/remove-shortcuts.nsh @@ -0,0 +1,3 @@ + ; remove shortcuts, if any. + Delete "$${PROJECT_STARTMENU_FOLDER}\*.*" + RMDir "$${PROJECT_STARTMENU_FOLDER}" \ No newline at end of file diff --git a/nsis/src/plugin-resources/templates/setup.jelly b/nsis/src/plugin-resources/templates/setup.jelly index e88605eb..85f7f70e 100644 --- a/nsis/src/plugin-resources/templates/setup.jelly +++ b/nsis/src/plugin-resources/templates/setup.jelly @@ -46,7 +46,7 @@ ; macro to check if the jdk is installed !include "JDK.nsh" -; Fonctions to set/remove environment variables +; Functions to set/remove environment variables !include "Environment.nsh" ; include project specific details @@ -152,9 +152,7 @@ Section "Uninstall" ; MUST REMOVE UNINSTALLER, too Delete $$INSTDIR\Uninst.exe - ; remove shortcuts, if any. - Delete "$${PROJECT_STARTMENU_FOLDER}\*.*" - RMDir "$${PROJECT_STARTMENU_FOLDER}" + !include "remove-shortcuts.nsh" ; Recursively remove files and directories used ; this should also take care of the installer diff --git a/nsis/xdocs/changes.xml b/nsis/xdocs/changes.xml index 0196a634..3ad9d81f 100644 --- a/nsis/xdocs/changes.xml +++ b/nsis/xdocs/changes.xml @@ -24,6 +24,7 @@ + The script "remove-shortcuts.nsh" can be used to remove shortcuts created in "startmenu-shortcuts.nsh" and "desktop-shortcuts.nsh". Set compress options (force/lzma). NSIS plugin does not support silent uninstall. Remove the final dialog box. diff --git a/nsis/xdocs/customizing.xml b/nsis/xdocs/customizing.xml index 5b91973a..b20628fe 100644 --- a/nsis/xdocs/customizing.xml +++ b/nsis/xdocs/customizing.xml @@ -160,6 +160,10 @@ registry-uninstall.nsh Allow customization of environment variables and registry entries to be removed on uninstall + + remove-shortcuts.nsh + Allow customization of shortcuts deletion. The default script removes everything in ${PROJECT_STARTMENU_FOLDER}. + startmenu-shortcuts.nsh Allow start menu shortcuts to be added