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 build.xml tomcat.nsi
Date Wed, 18 Jul 2001 18:32:49 GMT
remm        01/07/18 11:32:49

  Modified:    .        build.xml tomcat.nsi
  Log:
  - Additional tweaks to make the shorcuts command line shorter (it's limited to
    255 chars - originally, with the default install, it was 231 chars, so using any long
path
    for the JDK would have broken the shotcuts).
  - Add an installation taget for a Windows system service (should work on
    WinNT, Win2k, WinXP). It shouldn't hurt to run that under 9x / Me, but it
    shouldn't do anything. The service is based on JavaService, and a binary
    is now needed to build the "installer" target.
  - Before uninstalling, stop the service !!! I'll add shell calls to stop it for you.
  - Obviously, the installation should be done as root.
  - More tweaks are needed for service shutdown. A specialized version
    of the Bootstrap and Catalina class will be written (since with JNI we have
    only one VM, no need for a socket, but the shutdown has to be syncronous).
    That will improve the security too, since right now, any user can kill Tomcat
    even when it's run as a service by issuing the shutdown command.
  
  Revision  Changes    Path
  1.29      +15 -12    jakarta-tomcat-4.0/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/build.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- build.xml	2001/07/16 23:07:46	1.28
  +++ build.xml	2001/07/18 18:32:49	1.29
  @@ -5,19 +5,20 @@
     <property file="build.properties"/>
     <property file="${user.home}/build.properties"/>
   
  -  <property name="nsis.home"       value="c:\program files\nsis"/>
  +  <property name="nsis.home"        value="c:\program files\nsis"/>
  +  <property name="javaservice.home" value="../javaservice"/>
   
  -  <property name="catalina.build"  value="${basedir}/catalina/build"/>
  -  <property name="jasper.build"    value="${basedir}/jasper/build"/>
  -  <property name="servletapi.home" value="../jakarta-servletapi-4/dist"/>
  -  <property name="tomcat.build"    value="${basedir}/build"/>
  -  <property name="tomcat.dist"     value="${basedir}/dist"/>
  -  <property name="webapps.build"   value="${basedir}/webapps/build"/>
  -  <property name="webapps.dist"    value="${basedir}/webapps/dist"/>
  -
  -  <property name="catalina.deploy" value="${tomcat.build}"/>
  -  <property name="jasper.deploy"   value="${tomcat.build}"/>
  -  <property name="webapps.deploy"  value="${tomcat.build}"/>
  +  <property name="catalina.build"   value="${basedir}/catalina/build"/>
  +  <property name="jasper.build"     value="${basedir}/jasper/build"/>
  +  <property name="servletapi.home"  value="../jakarta-servletapi-4/dist"/>
  +  <property name="tomcat.build"     value="${basedir}/build"/>
  +  <property name="tomcat.dist"      value="${basedir}/dist"/>
  +  <property name="webapps.build"    value="${basedir}/webapps/build"/>
  +  <property name="webapps.dist"     value="${basedir}/webapps/dist"/>
  +
  +  <property name="catalina.deploy"  value="${tomcat.build}"/>
  +  <property name="jasper.deploy"    value="${tomcat.build}"/>
  +  <property name="webapps.deploy"   value="${tomcat.build}"/>
   
   
     <!-- ===================== DEPLOY: Create Directories =================== -->
  @@ -171,6 +172,8 @@
       <copy todir="${tomcat.dist}">
         <fileset dir="resources" />
       </copy>
  +    <copy file="${javaservice.home}/bin/JavaService.exe" 
  +     tofile="${tomcat.dist}/bin/tomcat.exe" />
       <copy file="tomcat.nsi" tofile="${tomcat.dist}/tomcat.nsi" />
       <exec dir="${tomcat.dist}" executable="${nsis.home}\makensis.exe">
         <arg value="tomcat.nsi" />
  
  
  
  1.10      +72 -2     jakarta-tomcat-4.0/tomcat.nsi
  
  Index: tomcat.nsi
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/tomcat.nsi,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- tomcat.nsi	2001/07/16 23:07:46	1.9
  +++ tomcat.nsi	2001/07/18 18:32:49	1.10
  @@ -1,6 +1,6 @@
   
   ; Tomcat 4 script for Nullsoft Installer
  -; $Id: tomcat.nsi,v 1.9 2001/07/16 23:07:46 remm Exp $
  +; $Id: tomcat.nsi,v 1.10 2001/07/18 18:32:49 remm Exp $
   
   Name "jakarta-tomcat-4.0"
   Caption "Jakarta Tomcat 4.0"
  @@ -35,6 +35,7 @@
   Section "Tomcat 4.0 (required)"
   
     SectionIn 1 2 3
  +
     SetOutPath $INSTDIR
     File tomcat.ico
     File LICENSE
  @@ -51,6 +52,27 @@
     File /r webapps\ROOT\WEB-INF
     File webapps\ROOT\*.*
   
  +  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
  +  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$1" "JavaHome"
  +
  +  CopyFiles "$2\lib\tools.jar" "$INSTDIR\common\lib" 5
  +
  +SectionEnd
  +
  +Section "NT Service (NT/2k/XP only)"
  +
  +  SectionIn 1 2 3
  +
  +  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
  +  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$1" "JavaHome"
  +  
  +  SetOutPath $INSTDIR\bin
  +  File /oname=tomcat.exe bin\tomcat.exe
  +  
  +  ExecWait '"$INSTDIR\bin\tomcat.exe" -install "Jakarta Tomcat" $2\jre\bin\hotspot\jvm.dll
-Djava.class.path="$INSTDIR\bin\bootstrap.jar" -Dcatalina.home="$INSTDIR" -start org.apache.catalina.startup.Bootstrap
-params start -stop org.apache.catalina.startup.Bootstrap -params stop -out "$INSTDIR\logs\stdout.log"
-err "$INSTDIR\logs\stderr.log"'
  +  
  +  ClearErrors
  +
   SectionEnd
   
   Section "JSP Development Shell Extensions"
  @@ -92,7 +114,7 @@
   
     CreateShortCut "$SMPROGRAMS\Jakarta Tomcat 4.0\Start Tomcat.lnk" \
                    "$2\bin\java.exe" \
  -                 '-jar -cp "$2\lib\tools.jar" -Dcatalina.home="$INSTDIR" "$INSTDIR\bin\bootstrap.jar"
start' \
  +                 '-jar -Dcatalina.home="$INSTDIR" "$INSTDIR\bin\bootstrap.jar" start' \
                    "$INSTDIR\tomcat.ico" 0 SW_SHOWNORMAL
   
     CreateShortCut "$SMPROGRAMS\Jakarta Tomcat 4.0\Stop Tomcat.lnk" \
  @@ -190,10 +212,13 @@
   
   SectionEnd
   
  +
   Function .onInit
   
     ClearErrors
   
  +  Call doUpdate
  +
     ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
     ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$1" "JavaHome"
     ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
  @@ -209,15 +234,57 @@
   
   FunctionEnd
   
  +
   Function .onInstSuccess
   
     ExecShell open '$SMPROGRAMS\Jakarta Tomcat 4.0'
   
   FunctionEnd
   
  +
  +Function doUpdate
  +
  +  ; This function will be called if a previous Tomcat 4.0 installation has been
  +  ; found
  +
  +  ReadRegStr $1 HKLM "SOFTWARE\Apache\Jakarta Tomcat 4.0" ""
  +  IfErrors NoUpdate
  +
  +  MessageBox MB_YESNO|MB_ICONQUESTION \
  +      "A previous installation of Jakarata Tomcat 4.0 has been found in $1.\
  + Do you want to upgrade it to the latest version ?" IDNO NoUpdate
  +
  +  SetOverwrite ifnewer
  +  SetOutPath $INSTDIR
  +  File tomcat.ico
  +  File LICENSE
  +  File /r bin
  +  File /r common
  +  File /r jasper
  +  File /r lib
  +  File /r logs
  +  File /r server
  +  File /r work
  +  SetOutPath $INSTDIR\webapps
  +  File /r webapps\manager
  +  SetOutPath $INSTDIR\webapps\ROOT
  +  File /r webapps\ROOT\WEB-INF
  +  File webapps\ROOT\*.*
  +
  +  MessageBox MB_OK "Update was successful."
  +
  +  ; Installation over
  +  Abort
  +
  +NoUpdate:
  +
  +FunctionEnd
  +
  +
   UninstallText "This will uninstall Jakarta Tomcat 4.0 from your system:"
   UninstallExeName uninst-tomcat4.exe
   
  +
   Section Uninstall
   
     Delete "$INSTDIR\uninst-tomcat4.exe"
  @@ -232,6 +299,9 @@
         WriteRegStr HKCR ".jsp" "" $1
         DeleteRegValue HKCR ".jsp" "backup_val"
     NoOwn:
  +
  +  ExecWait '"$INSTDIR\bin\tomcat.exe" -uninstall "Jakarta Tomcat"'
  +  ClearErrors
   
     DeleteRegKey HKCR "JSPFile"
     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jakarta Tomcat
4.0"
  
  
  

Mime
View raw message