dion        2003/10/14 00:27:13

  Modified:    nsis/src/plugin-resources/templates setup.jelly
  Log:
  - Use project provided includes where given
  
  Revision  Changes    Path
  1.6       +20 -36    maven-plugins/nsis/src/plugin-resources/templates/setup.jelly
  
  Index: setup.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/nsis/src/plugin-resources/templates/setup.jelly,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- setup.jelly       14 Oct 2003 07:06:30 -0000      1.5
  +++ setup.jelly       14 Oct 2003 07:27:13 -0000      1.6
  @@ -75,46 +75,31 @@
   
     ; 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 @@
     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 @@
     ; 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 @@
   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
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to