dion        2003/10/14 00:00:45

  Modified:    nsis/src/plugin-resources/templates setup.jelly
  Log:
  Escape NSIS variables
  
  Revision  Changes    Path
  1.4       +42 -42    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- setup.jelly       14 Oct 2003 06:53:43 -0000      1.3
  +++ setup.jelly       14 Oct 2003 07:00:45 -0000      1.4
  @@ -33,10 +33,10 @@
   CRCCheck on
   
   ; The name of the installer
  -Name "${PROJECT_NAME}"
  +Name "$${PROJECT_NAME}"
   
   ; Maven Setup executable
  -OutFile "${PROJECT_BUILD_DIR}\${PROJECT_FINAL_NAME}.exe"
  +OutFile "$${PROJECT_BUILD_DIR}\$${PROJECT_FINAL_NAME}.exe"
   
   ; Adds an XP manifest to the installer
   XPStyle on
  @@ -49,108 +49,108 @@
   SetFont "Arial" 8
   
   ; License Information
  -LicenseText "${PROJECT_LICENSE_TEXT}"
  -LicenseData "${PROJECT_LICENSE_FILE}"
  +LicenseText "$${PROJECT_LICENSE_TEXT}"
  +LicenseData "$${PROJECT_LICENSE_FILE}"
   
   ; The default installation directory
  -InstallDir "$PROGRAMFILES\${ORGANIZATION}\${PROJECT_NAME} ${PROJECT_VERSION}"
  +InstallDir "$$PROGRAMFILES\$${ORGANIZATION}\$${PROJECT_NAME} $${PROJECT_VERSION}"
   ; Registry key to check for directory (so if you upgrade, it will 
   ; overwrite the old one automatically)
  -InstallDirRegKey HKLM "${PROJECT_REG_KEY}" "Install_Dir"
  +InstallDirRegKey HKLM "$${PROJECT_REG_KEY}" "Install_Dir"
   
   ; The text to prompt the user to enter a directory
  -ComponentText "This will install ${PROJECT_NAME} on your computer."
  +ComponentText "This will install $${PROJECT_NAME} on your computer."
   ; The text to prompt the user to enter a directory
  -DirText "${PROJECT_NAME} Home Directory"
  +DirText "$${PROJECT_NAME} Home Directory"
   
   ; -------------------------------------------------------------- Package up the 
files to be installed
  -Section "${PROJECT_NAME} v${PROJECT_VERSION} Binaries"
  +Section "$${PROJECT_NAME} v$${PROJECT_VERSION} Binaries"
     ; Set output path to the installation directory.
  -  SetOutPath $INSTDIR
  +  SetOutPath $$INSTDIR
     ; Put files and directories there
     ; the script will be run from a directory below Maven
  -  File /r "${PROJECT_DIST_DIR}\*.*"
  +  File /r "$${PROJECT_DIST_DIR}\*.*"
   
     ; Write the installation path into the registry
  -  WriteRegStr HKLM "${PROJECT_REG_KEY}" "Install_Dir" "$INSTDIR"
  +  WriteRegStr HKLM "$${PROJECT_REG_KEY}" "Install_Dir" "$$INSTDIR"
     
     ; Write the environment variables to the Registry
     ; FIXME: This should be a project include.
  -  ; ${MAVEN_HOME}
  +  ; $${MAVEN_HOME}
     Push "MAVEN_HOME"
  -  Push "$INSTDIR"
  +  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"
  +  ; WriteRegStr HKCU "Environment" "MAVEN_LOCAL_HOME" "$$INSTDIR"
   
     ; 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"'
  +  WriteRegStr HKLM "$${PROJECT_REG_UNINSTALL_KEY}" "DisplayName" "$${PROJECT_NAME} 
$${PROJECT_VERSION} (remove only)"
  +  WriteRegStr HKLM "$${PROJECT_REG_UNINSTALL_KEY}" "UninstallString" 
'"$$INSTDIR\Uninst.exe"'
   SectionEnd
   
   ; -------------------------------------------------------------- Create Shortcuts
   Section "Create Start Menu Shortcut(s)"
  -  CreateDirectory "${PROJECT_STARTMENU_FOLDER}"
  +  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";
  +  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";
   SectionEnd
   
   ; FIXME: This should be a project include.
   ; OPTIONAL Desktop Shortcut 
   ; Section "Create Desktop Shortcut"
  -;  CreateShortCut "$DESKTOP\Maven.lnk" "$INSTDIR\bin\maven.bat" "" 
"$INSTDIR\bin\maven.bat"
  +;  CreateShortCut "$$DESKTOP\Maven.lnk" "$$INSTDIR\bin\maven.bat" "" 
"$$INSTDIR\bin\maven.bat"
   ;SectionEnd
   
   ; -------------------------------------------------------------- Section to Install 
the Uninstaller
   Section "Install Uninstaller"
      ; write the uninstaller to the installation directory
  -   WriteUninstaller "$INSTDIR\Uninst.exe"
  +   WriteUninstaller "$$INSTDIR\Uninst.exe"
   SectionEnd
   
   ; -------------------------------------------------------------- Maven Uninstaller
   Section "Uninstall"
     ; remove registry keys
  -  DeleteRegKey HKLM "${PROJECT_REG_UNINSTALL_KEY}"
  -  DeleteRegKey HKLM "${PROJECT_REG_KEY}"
  +  DeleteRegKey HKLM "$${PROJECT_REG_UNINSTALL_KEY}"
  +  DeleteRegKey HKLM "$${PROJECT_REG_KEY}"
   
     ; FIXME: This should be a project include.
  -  ; Remove ${MAVEN_HOME}
  +  ; Remove $${MAVEN_HOME}
     Push "MAVEN_HOME"
     Call un.DeleteEnvStr
   
     ; remove files
  -  Delete $INSTDIR\*.*
  +  Delete $$INSTDIR\*.*
   
     ; MUST REMOVE UNINSTALLER, too
  -  Delete $INSTDIR\Uninst.exe
  +  Delete $$INSTDIR\Uninst.exe
   
     ; remove shortcuts, if any.
  -  Delete "${PROJECT_STARTMENU_FOLDER}\*.*"
  -  RMDir "${PROJECT_STARTMENU_FOLDER}"
  -  ; Delete "$DESKTOP\Maven.lnk"
  +  Delete "$${PROJECT_STARTMENU_FOLDER}\*.*"
  +  RMDir "$${PROJECT_STARTMENU_FOLDER}"
  +  ; Delete "$$DESKTOP\Maven.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"
  +  RMDir /r "$$INSTDIR"
  +  MessageBox MB_OK|MB_ICONEXCLAMATION "$${PROJECT_NAME} has been uninstalled"
   SectionEnd
   
   ; -------------------------------------------------------------- Add Images to the 
Installer / UnInstaller
   Function .onGUIInit
      !ifdef PROJECT_LOGO
  -     !insertmacro BrandingImage "${PROJECT_LOGO}" ""
  +     !insertmacro BrandingImage "$${PROJECT_LOGO}" ""
        ; FIXME: Make an include
        ; TODO Check for a JAVA_HOME environment variable
        Call AssertJavaHome
  @@ -161,7 +161,7 @@
   ; add the logo to the un-installer
   Function un.onGUIInit
      !ifdef PROJECT_LOGO
  -     !insertmacro BrandingImage "${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