tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0 tomcat.nsi
Date Fri, 01 Feb 2002 22:10:10 GMT
remm        02/02/01 14:10:10

  Modified:    .        tomcat.nsi
  Log:
  - Update to use the same install directory and registry keys that the HTTPd uses.
  - At the end of the installation, the NT service will be started (if installed).
  - Before uninstalling, the NT service will be stopped (if installed).
  
  Revision  Changes    Path
  1.28      +47 -21    jakarta-tomcat-4.0/tomcat.nsi
  
  Index: tomcat.nsi
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/tomcat.nsi,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- tomcat.nsi	1 Feb 2002 01:12:26 -0000	1.27
  +++ tomcat.nsi	1 Feb 2002 22:10:10 -0000	1.28
  @@ -1,6 +1,6 @@
   
   ; Tomcat 4 script for Nullsoft Installer
  -; $Id: tomcat.nsi,v 1.27 2002/02/01 01:12:26 remm Exp $
  +; $Id: tomcat.nsi,v 1.28 2002/02/01 22:10:10 remm Exp $
   
   Name "apache-tomcat-4.1"
   Caption "Apache Tomcat 4.1"
  @@ -30,8 +30,8 @@
   SetOverwrite on
   SetDateSave on
   
  -InstallDir "$PROGRAMFILES\Apache Tomcat 4.1"
  -InstallDirRegKey HKLM "SOFTWARE\Apache\Apache Tomcat 4.1" ""
  +InstallDir "$PROGRAMFILES\Apache Group\Tomcat 4.1"
  +InstallDirRegKey HKLM "SOFTWARE\Apache Group\Tomcat\4.1" ""
   
   Section "Tomcat (required)"
   
  @@ -41,6 +41,7 @@
     File tomcat.ico
     File LICENSE
     File /r bin
  +  Delete "$INSTDIR\bin\tomcat.exe"
     File /r common
     File /r shared
     File /r logs
  @@ -70,7 +71,7 @@
     SetOutPath $INSTDIR\bin
     File /oname=tomcat.exe bin\tomcat.exe
     
  -  ExecWait '"$INSTDIR\bin\tomcat.exe" -install "Apache Tomcat" "$2" -Djava.class.path="$INSTDIR\bin\bootstrap.jar"
-Dcatalina.home="$INSTDIR" -start org.apache.catalina.startup.BootstrapService -params start
-stop org.apache.catalina.startup.BootstrapService -params stop -out "$INSTDIR\logs\stdout.log"
-err "$INSTDIR\logs\stderr.log"'
  +  ExecWait '"$INSTDIR\bin\tomcat.exe" -install "Apache Tomcat 4.1" "$2" -Djava.class.path="$INSTDIR\bin\bootstrap.jar"
-Dcatalina.home="$INSTDIR" -start org.apache.catalina.startup.BootstrapService -params start
-stop org.apache.catalina.startup.BootstrapService -params stop -out "$INSTDIR\logs\stdout.log"
-err "$INSTDIR\logs\stderr.log"'
     
     ClearErrors
   
  @@ -123,17 +124,6 @@
                    '-jar -Duser.dir="$INSTDIR" "$INSTDIR\bin\bootstrap.jar" stop' \
                    "$INSTDIR\tomcat.ico" 0 SW_SHOWMINIMIZED
   
  -  SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1\Configuration"
  -
  -  CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Configuration\Edit Server Configuration.lnk"
\
  -                 notepad "$INSTDIR\conf\server.xml"
  -
  -  CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Configuration\Edit Webapp Defaults.lnk"
\
  -                 notepad "$INSTDIR\conf\web.xml"
  -
  -  CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Configuration\Edit Users.lnk" \
  -                 notepad "$INSTDIR\conf\tomcat-users.xml"
  -
   SectionEnd
   
   SectionDivider " documentation and examples "
  @@ -192,7 +182,9 @@
   
     Call configure
   
  -  WriteRegStr HKLM "SOFTWARE\Apache\Apache Tomcat 4.1" "" $INSTDIR
  +  Call startService
  +
  +  WriteRegStr HKLM "SOFTWARE\Apache Group\Tomcat\4.1" "" $INSTDIR
     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat 4.1"
\
                      "DisplayName" "Apache Tomcat 4.1 (remove only)"
     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat 4.1"
\
  @@ -369,9 +361,7 @@
   
     SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1"
   
  -  CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\My Tomcat.lnk" \
  -                 "http://127.0.0.1:$R0"
  -  CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Configuration\Tomcat Administration.lnk"
\
  +  CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat Administration.lnk" \
                    "http://127.0.0.1:$R0/admin"
   
    NoLinks:
  @@ -412,6 +402,39 @@
   FunctionEnd
   
   
  +; =====================
  +; StartService Function
  +; =====================
  +;
  +; Start Tomcat NT Service
  +;
  +Function startService
  +
  +  IfFileExists "$INSTDIR\bin\tomcat.exe" 0 NoService
  +  ExecWait 'net start "Apache Tomcat 4.1"'
  +  Sleep 4000
  +
  + NoService:
  +
  +FunctionEnd
  +
  +
  +; =====================
  +; StopService Function
  +; =====================
  +;
  +; Stop Tomcat NT Service
  +;
  +Function un.stopService
  +
  +  IfFileExists "$INSTDIR\bin\tomcat.exe" 0 NoService
  +  ExecWait 'net stop "Apache Tomcat 4.1"'
  +  Sleep 2000
  +
  + NoService:
  +
  +FunctionEnd
  +
   
   UninstallText "This will uninstall Apache Tomcat 4.1 from your system:"
   
  @@ -420,6 +443,9 @@
   
     Delete "$INSTDIR\uninst-tomcat4.exe"
   
  +  ; Stopping NT service (if in use)
  +  Call un.stopService
  +
     ReadRegStr $1 HKCR ".jsp" ""
     StrCmp $1 "JSPFile" 0 NoOwn ; only do this if we own it
       ReadRegStr $1 HKCR ".jsp" "backup_val"
  @@ -431,12 +457,12 @@
         DeleteRegValue HKCR ".jsp" "backup_val"
     NoOwn:
   
  -  ExecWait '"$INSTDIR\bin\tomcat.exe" -uninstall "Apache Tomcat"'
  +  ExecWait '"$INSTDIR\bin\tomcat.exe" -uninstall "Apache Tomcat 4.1"'
     ClearErrors
   
     DeleteRegKey HKCR "JSPFile"
     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat
4.1"
  -  DeleteRegKey HKLM "SOFTWARE\Apache\Apache Tomcat 4.1"
  +  DeleteRegKey HKLM "SOFTWARE\Apache Group\Tomcat\4.1"
     RMDir /r "$SMPROGRAMS\Apache Tomcat 4.1"
     Delete "$INSTDIR\tomcat.ico"
     Delete "$INSTDIR\LICENSE"
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message