- Use project provided includes where given

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114201 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion
2003-10-14 07:27:13 +00:00
parent bbffef4105
commit dcb3a8277f

View File

@@ -75,46 +75,31 @@ Section "$${PROJECT_NAME} v$${PROJECT_VERSION} Binaries"
; Write the installation path into the registry
WriteRegStr HKLM "$${PROJECT_REG_KEY}" "Install_Dir" "$$INSTDIR"
; Write the environment variables to the Registry
; FIXME: This should be a project include.
; $${MAVEN_HOME}
Push "MAVEN_HOME"
Push "$$INSTDIR"
Call WriteEnvStr
; TODO - Add MAVEN_HOME to the path
; TODO Prompt and write other environment variables to the Registry
; WriteRegStr HKCU "Environment" "MAVEN_LOCAL_HOME" "$$INSTDIR"
; Write the environment variables to the Registry
<util:available file="${maven.nsis.src}/registry.nsh">
!include "registry.nsh"
</util:available>
; Write the uninstall keys for Windows
WriteRegStr HKLM "$${PROJECT_REG_UNINSTALL_KEY}" "DisplayName" "$${PROJECT_NAME} $${PROJECT_VERSION} (remove only)"
WriteRegStr HKLM "$${PROJECT_REG_UNINSTALL_KEY}" "UninstallString" '"$$INSTDIR\Uninst.exe"'
SectionEnd
<util:available file="${maven.nsis.src}/startmenu-shortcuts.nsh">
; -------------------------------------------------------------- Create Shortcuts
Section "Create Start Menu Shortcut(s)"
CreateDirectory "$${PROJECT_STARTMENU_FOLDER}"
; it would be nice to get all this from navigation.xml :-)
; FIXME: This should be a project include.
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Maven.lnk" "$$INSTDIR\bin\maven.bat" "" "$$INSTDIR\bin\maven.bat" 0
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Install Maven Repository.lnk" "$$INSTDIR\bin\install_repo.bat" "" "$$INSTDIR\install_repo.bat" 0
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Uninstall.lnk" "$$INSTDIR\Uninst.exe" "" "$$INSTDIR\Uninst.exe" 0
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Homepage.lnk" "http://maven.apache.org/"
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\User Guide.lnk" "http://maven.apache.org/reference/user-guide.html"
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Core Plugins.lnk" "http://maven.apache.org/reference/plugins/core-plugins.html"
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Optional Plugins.lnk" "http://maven.apache.org/reference/plugins/optional/optional.html"
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Reference.lnk" "http://maven.apache.org/reference/index.html"
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Report a Bug.lnk" "http://jira.codehaus.org/secure/BrowseProject.jspa?id=10030"
CreateShortCut "$${PROJECT_STARTMENU_FOLDER}\Frequently Asked Questions.lnk" "http://maven.apache.org/faq.html"
!include "startmenu-shortcuts.nsh"
SectionEnd
</util:available>
; FIXME: This should be a project include.
<util:available file="${maven.nsis.src}/desktop-shortcuts.nsh">
; OPTIONAL Desktop Shortcut
; Section "Create Desktop Shortcut"
; CreateShortCut "$$DESKTOP\Maven.lnk" "$$INSTDIR\bin\maven.bat" "" "$$INSTDIR\bin\maven.bat"
Section "Create Desktop Shortcut"
!include "desktop-shortcuts.nsh"
;SectionEnd
</util:available>
; -------------------------------------------------------------- Section to Install the Uninstaller
Section "Install Uninstaller"
@@ -128,10 +113,9 @@ Section "Uninstall"
DeleteRegKey HKLM "$${PROJECT_REG_UNINSTALL_KEY}"
DeleteRegKey HKLM "$${PROJECT_REG_KEY}"
; FIXME: This should be a project include.
; Remove $${MAVEN_HOME}
Push "MAVEN_HOME"
Call un.DeleteEnvStr
<util:available file="${maven.nsis.src}/registry-uninstall.nsh">
!include "registry-uninstall.nsh"
</util:available>
; remove files
Delete $$INSTDIR\*.*
@@ -142,10 +126,12 @@ Section "Uninstall"
; remove shortcuts, if any.
Delete "$${PROJECT_STARTMENU_FOLDER}\*.*"
RMDir "$${PROJECT_STARTMENU_FOLDER}"
; Delete "$$DESKTOP\Maven.lnk"
; Delete "$$DESKTOP\$${PROJECT_NAME}.lnk"
; Recursively remove files and directories used
; this should also take care of the installer
RMDir /r "$$INSTDIR"
MessageBox MB_OK|MB_ICONEXCLAMATION "$${PROJECT_NAME} has been uninstalled"
SectionEnd
@@ -153,18 +139,16 @@ SectionEnd
Function .onGUIInit
!ifdef PROJECT_LOGO
!insertmacro BrandingImage "$${PROJECT_LOGO}" ""
; FIXME: Make an include
; TODO Check for a JAVA_HOME environment variable
Call AssertJavaHome
!endif
<util:available file="${maven.nsis.src}/before-install.nsh">
!include "before-install.nsh"
</util:available>
FunctionEnd
; add the logo to the un-installer
Function un.onGUIInit
!ifdef PROJECT_LOGO
!insertmacro BrandingImage "$${PROJECT_LOGO}" ""
; FIXME: Make an include
!endif
FunctionEnd