dion        2003/10/09 21:15:11

  Modified:    src/installer/nsis JDK.nsh Environment.nsh BrandingImage.nsh
  Log:
  *** keyword substitution change ***
  
  Revision  Changes    Path
  1.2       +11 -11    maven/src/installer/nsis/JDK.nsh
  
  Index: JDK.nsh
  ===================================================================
  RCS file: /home/cvs/maven/src/installer/nsis/JDK.nsh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JDK.nsh   10 Oct 2003 04:01:59 -0000      1.1
  +++ JDK.nsh   10 Oct 2003 04:15:11 -0000      1.2
  @@ -1,11 +1,11 @@
  -Function AssertJavaHome
  -   ClearErrors
  -   ReadEnvStr $0 "JAVA_HOME"
  -
  -   IfErrors 0 Found
  -      ClearErrors
  -      MessageBox MB_OK|MB_ICONSTOP "The JAVA_HOME environment variable must be set. 
Please set JAVA_HOME to the location of your JDK and try installing again"
  -      Abort
  -
  -   Found:
  -FunctionEnd
  +Function AssertJavaHome
  +   ClearErrors
  +   ReadEnvStr $0 "JAVA_HOME"
  +
  +   IfErrors 0 Found
  +      ClearErrors
  +      MessageBox MB_OK|MB_ICONSTOP "The JAVA_HOME environment variable must be set. 
Please set JAVA_HOME to the location of your JDK and try installing again"
  +      Abort
  +
  +   Found:
  +FunctionEnd
  
  
  
  1.2       +139 -139  maven/src/installer/nsis/Environment.nsh
  
  Index: Environment.nsh
  ===================================================================
  RCS file: /home/cvs/maven/src/installer/nsis/Environment.nsh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Environment.nsh   10 Oct 2003 04:14:48 -0000      1.1
  +++ Environment.nsh   10 Oct 2003 04:15:11 -0000      1.2
  @@ -1,139 +1,139 @@
  -;
  -; From NSISArchives 
http://nsis.sourceforge.net/archive/nsisweb.php?page=156&instances=0,11
  -;
  -!include WinMessages.nsh
  -
  -!ifdef ALL_USERS
  -  !define WriteEnvStr_RegKey \
  -     'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
  -!else
  -  !define WriteEnvStr_RegKey 'HKCU "Environment"'
  -!endif
  -
  -#
  -# WriteEnvStr - Writes an environment variable
  -# Note: Win9x systems requires reboot
  -#
  -# Example:
  -#  Push "HOMEDIR"           # name
  -#  Push "C:\New Home Dir\"  # value
  -#  Call WriteEnvStr
  -#
  -Function WriteEnvStr
  -  Exch $1 ; $1 has environment variable value
  -  Exch
  -  Exch $0 ; $0 has environment variable name
  -  Push $2
  -
  -  Call IsNT
  -  Pop $2
  -  StrCmp $2 1 WriteEnvStr_NT
  -    ; Not on NT
  -    StrCpy $2 $WINDIR 2 ; Copy drive of windows (c:)
  -    FileOpen $2 "$2\autoexec.bat" a
  -    FileSeek $2 0 END
  -    FileWrite $2 "$\r$\nSET $0=$1$\r$\n"
  -    FileClose $2
  -    SetRebootFlag true
  -    Goto WriteEnvStr_done
  -
  -  WriteEnvStr_NT:
  -      WriteRegExpandStr ${WriteEnvStr_RegKey} $0 $1
  -      SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \
  -        0 "STR:Environment" /TIMEOUT=5000
  -
  -  WriteEnvStr_done:
  -    Pop $2
  -    Pop $1
  -    Pop $0
  -FunctionEnd
  -
  -#
  -# un.DeleteEnvStr - Removes an environment variable
  -# Note: Win9x systems requires reboot
  -#
  -# Example:
  -#  Push "HOMEDIR"           # name
  -#  Call un.DeleteEnvStr
  -#
  -Function un.DeleteEnvStr
  -  Exch $0 ; $0 now has the name of the variable
  -  Push $1
  -  Push $2
  -  Push $3
  -  Push $4
  -  Push $5
  -
  -  Call un.IsNT
  -  Pop $1
  -  StrCmp $1 1 DeleteEnvStr_NT
  -    ; Not on NT
  -    StrCpy $1 $WINDIR 2
  -    FileOpen $1 "$1\autoexec.bat" r
  -    GetTempFileName $4
  -    FileOpen $2 $4 w
  -    StrCpy $0 "SET $0="
  -    SetRebootFlag true
  -
  -    DeleteEnvStr_dosLoop:
  -      FileRead $1 $3
  -      StrLen $5 $0
  -      StrCpy $5 $3 $5
  -      StrCmp $5 $0 DeleteEnvStr_dosLoop
  -      StrCmp $5 "" DeleteEnvStr_dosLoopEnd
  -      FileWrite $2 $3
  -      Goto DeleteEnvStr_dosLoop
  -
  -    DeleteEnvStr_dosLoopEnd:
  -      FileClose $2
  -      FileClose $1
  -      StrCpy $1 $WINDIR 2
  -      Delete "$1\autoexec.bat"
  -      CopyFiles /SILENT $4 "$1\autoexec.bat"
  -      Delete $4
  -      Goto DeleteEnvStr_done
  -
  -  DeleteEnvStr_NT:
  -    DeleteRegValue ${WriteEnvStr_RegKey} $0
  -    SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \
  -      0 "STR:Environment" /TIMEOUT=5000
  -
  -  DeleteEnvStr_done:
  -    Pop $5
  -    Pop $4
  -    Pop $3
  -    Pop $2
  -    Pop $1
  -    Pop $0
  -FunctionEnd
  -
  -#
  -# [un.]IsNT - Pushes 1 if running on NT, 0 if not
  -#
  -# Example:
  -#   Call IsNT
  -#   Pop $0
  -#   StrCmp $0 1 +3
  -#     MessageBox MB_OK "Not running on NT!"
  -#     Goto +2
  -#     MessageBox MB_OK "Running on NT!"
  -#
  -!macro IsNT UN
  -Function ${UN}IsNT
  -  Push $0
  -  ReadRegStr $0 HKLM \
  -    "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
  -  StrCmp $0 "" 0 IsNT_yes
  -  ; we are not NT.
  -  Pop $0
  -  Push 0
  -  Return
  -
  -  IsNT_yes:
  -    ; NT!!!
  -    Pop $0
  -    Push 1
  -FunctionEnd
  -!macroend
  -!insertmacro IsNT ""
  -!insertmacro IsNT "un."
  +;
  +; From NSISArchives 
http://nsis.sourceforge.net/archive/nsisweb.php?page=156&instances=0,11
  +;
  +!include WinMessages.nsh
  +
  +!ifdef ALL_USERS
  +  !define WriteEnvStr_RegKey \
  +     'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
  +!else
  +  !define WriteEnvStr_RegKey 'HKCU "Environment"'
  +!endif
  +
  +#
  +# WriteEnvStr - Writes an environment variable
  +# Note: Win9x systems requires reboot
  +#
  +# Example:
  +#  Push "HOMEDIR"           # name
  +#  Push "C:\New Home Dir\"  # value
  +#  Call WriteEnvStr
  +#
  +Function WriteEnvStr
  +  Exch $1 ; $1 has environment variable value
  +  Exch
  +  Exch $0 ; $0 has environment variable name
  +  Push $2
  +
  +  Call IsNT
  +  Pop $2
  +  StrCmp $2 1 WriteEnvStr_NT
  +    ; Not on NT
  +    StrCpy $2 $WINDIR 2 ; Copy drive of windows (c:)
  +    FileOpen $2 "$2\autoexec.bat" a
  +    FileSeek $2 0 END
  +    FileWrite $2 "$\r$\nSET $0=$1$\r$\n"
  +    FileClose $2
  +    SetRebootFlag true
  +    Goto WriteEnvStr_done
  +
  +  WriteEnvStr_NT:
  +      WriteRegExpandStr ${WriteEnvStr_RegKey} $0 $1
  +      SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \
  +        0 "STR:Environment" /TIMEOUT=5000
  +
  +  WriteEnvStr_done:
  +    Pop $2
  +    Pop $1
  +    Pop $0
  +FunctionEnd
  +
  +#
  +# un.DeleteEnvStr - Removes an environment variable
  +# Note: Win9x systems requires reboot
  +#
  +# Example:
  +#  Push "HOMEDIR"           # name
  +#  Call un.DeleteEnvStr
  +#
  +Function un.DeleteEnvStr
  +  Exch $0 ; $0 now has the name of the variable
  +  Push $1
  +  Push $2
  +  Push $3
  +  Push $4
  +  Push $5
  +
  +  Call un.IsNT
  +  Pop $1
  +  StrCmp $1 1 DeleteEnvStr_NT
  +    ; Not on NT
  +    StrCpy $1 $WINDIR 2
  +    FileOpen $1 "$1\autoexec.bat" r
  +    GetTempFileName $4
  +    FileOpen $2 $4 w
  +    StrCpy $0 "SET $0="
  +    SetRebootFlag true
  +
  +    DeleteEnvStr_dosLoop:
  +      FileRead $1 $3
  +      StrLen $5 $0
  +      StrCpy $5 $3 $5
  +      StrCmp $5 $0 DeleteEnvStr_dosLoop
  +      StrCmp $5 "" DeleteEnvStr_dosLoopEnd
  +      FileWrite $2 $3
  +      Goto DeleteEnvStr_dosLoop
  +
  +    DeleteEnvStr_dosLoopEnd:
  +      FileClose $2
  +      FileClose $1
  +      StrCpy $1 $WINDIR 2
  +      Delete "$1\autoexec.bat"
  +      CopyFiles /SILENT $4 "$1\autoexec.bat"
  +      Delete $4
  +      Goto DeleteEnvStr_done
  +
  +  DeleteEnvStr_NT:
  +    DeleteRegValue ${WriteEnvStr_RegKey} $0
  +    SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \
  +      0 "STR:Environment" /TIMEOUT=5000
  +
  +  DeleteEnvStr_done:
  +    Pop $5
  +    Pop $4
  +    Pop $3
  +    Pop $2
  +    Pop $1
  +    Pop $0
  +FunctionEnd
  +
  +#
  +# [un.]IsNT - Pushes 1 if running on NT, 0 if not
  +#
  +# Example:
  +#   Call IsNT
  +#   Pop $0
  +#   StrCmp $0 1 +3
  +#     MessageBox MB_OK "Not running on NT!"
  +#     Goto +2
  +#     MessageBox MB_OK "Running on NT!"
  +#
  +!macro IsNT UN
  +Function ${UN}IsNT
  +  Push $0
  +  ReadRegStr $0 HKLM \
  +    "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
  +  StrCmp $0 "" 0 IsNT_yes
  +  ; we are not NT.
  +  Pop $0
  +  Push 0
  +  Return
  +
  +  IsNT_yes:
  +    ; NT!!!
  +    Pop $0
  +    Push 1
  +FunctionEnd
  +!macroend
  +!insertmacro IsNT ""
  +!insertmacro IsNT "un."
  
  
  
  1.2       +10 -10    maven/src/installer/nsis/BrandingImage.nsh
  
  Index: BrandingImage.nsh
  ===================================================================
  RCS file: /home/cvs/maven/src/installer/nsis/BrandingImage.nsh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BrandingImage.nsh 10 Oct 2003 04:01:59 -0000      1.1
  +++ BrandingImage.nsh 10 Oct 2003 04:15:11 -0000      1.2
  @@ -1,10 +1,10 @@
  -; macro for the image on the install screen
  -!macro BrandingImage IMAGE PARMS
  -     Push $0
  -     GetTempFileName $0
  -     File /oname=$0 "${IMAGE}"
  -     SetBrandingImage ${PARMS} $0
  -     Delete $0
  -     Pop $0
  -!macroend
  -
  +; macro for the image on the install screen
  +!macro BrandingImage IMAGE PARMS
  +     Push $0
  +     GetTempFileName $0
  +     File /oname=$0 "${IMAGE}"
  +     SetBrandingImage ${PARMS} $0
  +     Delete $0
  +     Pop $0
  +!macroend
  +
  
  
  

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

Reply via email to