markt 2004/05/22 10:34:58
Modified: . build.xml tomcat.nsi
resources INSTALLLICENSE config.ini
resources/confinstall server_1.xml server_2.xml
tomcat-users_1.xml tomcat-users_2.xml
Log:
Update to use NSIS version 2. Only uses new features where required
to get installer task to complete. Some minor changes in behaviour but
otherwise remains consistent with previous behaviour.
Updating to version 2 to allow me to fix a bug in the installer without
having to swap between NSIS versions for TC4 and TC5.
Revision Changes Path
1.83 +2 -2 jakarta-tomcat-4.0/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/build.xml,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- build.xml 23 Oct 2003 15:32:10 -0000 1.82
+++ build.xml 22 May 2004 17:34:57 -0000 1.83
@@ -261,14 +261,14 @@
<copy todir="${tomcat.dist}">
<fileset dir="resources" />
</copy>
- <copy file="${nsis.home}/InstallOptions.dll"
+ <copy file="${nsis.home}/Plugins/InstallOptions.dll"
todir="${tomcat.dist}" />
<copy file="${javaservice.home}/bin/JavaService.exe"
tofile="${tomcat.dist}/bin/tomcat.exe" />
<filter token="VERSION" value="${version}"/>
<copy file="tomcat.nsi" tofile="${tomcat.dist}/tomcat.nsi"
filtering="true"/>
- <exec dir="${tomcat.dist}" executable="${nsis.home}\makensis-bz2.exe">
+ <exec dir="${tomcat.dist}" executable="${nsis.home}\makensis.exe">
<arg value="tomcat.nsi" />
</exec>
<move file="${tomcat.dist}/tomcat4.exe"
1.36 +140 -137 jakarta-tomcat-4.0/tomcat.nsi
Index: tomcat.nsi
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/tomcat.nsi,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- tomcat.nsi 27 Apr 2004 22:41:50 -0000 1.35
+++ tomcat.nsi 22 May 2004 17:34:57 -0000 1.36
@@ -2,7 +2,7 @@
; Tomcat 4 script for Nullsoft Installer
; $Id$
-Name "Apache Tomcat @VERSION@"
+Name "Apache Tomcat 4.1"
OutFile tomcat4.exe
CRCCheck on
SetCompress force
@@ -12,188 +12,179 @@
InstallColors FF8080 000000
InstProgressFlags smooth colored
+PageEx license
+ LicenseText "You must read the following license before installing:"
+ LicenseData INSTALLLICENSE
+PageExEnd
+
+PageEx components
+ ComponentText "This will install the Apache Tomcat 4.1 servlet container on your
computer:"
+PageExEnd
+
+PageEx directory
+ DirText "Please select a location to install Tomcat 4.1 (or use the default):"
+PageExEnd
+
+Page instfiles
+Page custom configure "" ": Basic settings"
+
+UninstPage uninstConfirm
+UninstPage instfiles
+
Icon main.ico
UninstallIcon uninst.ico
-EnabledBitmap tickyes.bmp
-DisabledBitmap tickno.bmp
-LicenseText "You must read the following license before installing:"
-LicenseData INSTALLLICENSE
-ComponentText "This will install the Apache Tomcat 4.1 servlet container on your
computer:"
InstType Normal
InstType Minimum
InstType "Full (w/ Source Code)"
AutoCloseWindow false
ShowInstDetails show
-DirText "Please select a location to install Tomcat 4.1 (or use the default):"
SetOverwrite on
SetDateSave on
InstallDir "$PROGRAMFILES\Apache Group\Tomcat 4.1"
InstallDirRegKey HKLM "SOFTWARE\Apache Group\Tomcat\4.1" ""
-Section "Tomcat (required)"
+SubSection /e "Main"
+ Section "Tomcat (required)"
- SectionIn 1 2 3
+ SectionIn 1 2 3
- SetOutPath $INSTDIR
- File tomcat.ico
- File LICENSE
- File /r bin
- Delete "$INSTDIR\bin\tomcat.exe"
- File /r common
- File /r shared
- File /r logs
- File /r server
- File /r work
- File /r temp
- SetOutPath $INSTDIR\webapps
- File webapps\*.xml
- File /r webapps\ROOT
+ SetOutPath $INSTDIR
+ File tomcat.ico
+ File LICENSE
+ File /r bin
+ Delete "$INSTDIR\bin\tomcat.exe"
+ File /r common
+ File /nonfatal /r shared
+ File /nonfatal /r logs
+ File /r server
+ File /nonfatal /r work
+ File /nonfatal /r temp
+ SetOutPath $INSTDIR\webapps
+ File webapps\*.xml
+ File /r webapps\ROOT
- Call findJavaPath
- Pop $2
+ Call findJavaPath
+ Pop $2
- CopyFiles "$2\lib\tools.jar" "$INSTDIR\common\lib" 4500
+ CopyFiles "$2\lib\tools.jar" "$INSTDIR\common\lib" 4500
- WriteUninstaller "$INSTDIR\uninst-tomcat4.exe"
+ WriteUninstaller "$INSTDIR\uninst-tomcat4.exe"
-SectionEnd
+ SectionEnd
-Section "NT Service (NT/2k/XP only)"
+ Section "NT Service (NT/2k/XP only)"
- SectionIn 3
+ SectionIn 3
- Call findJVMPath
- Pop $2
+ Call findJVMPath
+ Pop $2
- SetOutPath $INSTDIR\bin
- File /oname=tomcat.exe bin\tomcat.exe
+ SetOutPath $INSTDIR\bin
+ File /oname=tomcat.exe bin\tomcat.exe
- ExecWait '"$INSTDIR\bin\tomcat.exe" -install "Apache Tomcat 4.1" "$2"
-Djava.class.path="$INSTDIR\bin\bootstrap.jar" -Dcatalina.home="$INSTDIR"
-Djava.endorsed.dirs="$INSTDIR\common\endorsed" -Dsun.io.useCanonCaches=false -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"
-Djava.endorsed.dirs="$INSTDIR\common\endorsed" -Dsun.io.useCanonCaches=false -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
+ ClearErrors
-SectionEnd
+ SectionEnd
-Section "JSP Development Shell Extensions"
+ Section "JSP Development Shell Extensions"
- SectionIn 1 2 3
- ; back up old value of .jsp
- ReadRegStr $1 HKCR ".jsp" ""
- StrCmp $1 "" Label1
+ SectionIn 1 2 3
+ ; back up old value of .jsp
+ ReadRegStr $1 HKCR ".jsp" ""
+ StrCmp $1 "" Label1
StrCmp $1 "JSPFile" Label1
WriteRegStr HKCR ".jsp" "backup_val" $1
-Label1:
-
- WriteRegStr HKCR ".jsp" "" "JSPFile"
- WriteRegStr HKCR "JSPFile" "" "Java Server Pages source"
- WriteRegStr HKCR "JSPFile\shell" "" "open"
- WriteRegStr HKCR "JSPFile\DefaultIcon" "" "$INSTDIR\tomcat.ico"
- WriteRegStr HKCR "JSPFile\shell\open\command" "" 'notepad.exe "%1"'
-
-SectionEnd
-
-Section "Tomcat Start Menu Group"
+ Label1:
- SectionIn 1 2 3
+ WriteRegStr HKCR ".jsp" "" "JSPFile"
+ WriteRegStr HKCR "JSPFile" "" "Java Server Pages source"
+ WriteRegStr HKCR "JSPFile\shell" "" "open"
+ WriteRegStr HKCR "JSPFile\DefaultIcon" "" "$INSTDIR\tomcat.ico"
+ WriteRegStr HKCR "JSPFile\shell\open\command" "" 'notepad.exe "%1"'
- Call findJavaPath
- Pop $2
+ SectionEnd
- SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1"
+ Section "Tomcat Start Menu Group"
- CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat Home Page.lnk" \
- "http://jakarta.apache.org/tomcat"
+ SectionIn 1 2 3
- CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Uninstall Tomcat 4.1.lnk" \
- "$INSTDIR\uninst-tomcat4.exe"
+ Call findJavaPath
+ Pop $2
- CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat 4.1 Program Directory.lnk" \
- "$INSTDIR"
+ SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1"
- CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Start Tomcat.lnk" \
- "$2\bin\java.exe" \
- '-jar -Duser.dir="$INSTDIR"
-Djava.endorsed.dirs="$INSTDIR\common\endorsed" "$INSTDIR\bin\bootstrap.jar" start' \
- "$INSTDIR\tomcat.ico" 0 SW_SHOWNORMAL
+ CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat Home Page.lnk" \
+ "http://jakarta.apache.org/tomcat"
- CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Stop Tomcat.lnk" \
- "$2\bin\java.exe" \
- '-jar -Duser.dir="$INSTDIR" "$INSTDIR\bin\bootstrap.jar" stop' \
- "$INSTDIR\tomcat.ico" 0 SW_SHOWMINIMIZED
+ CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Uninstall Tomcat 4.1.lnk" \
+ "$INSTDIR\uninst-tomcat4.exe"
-SectionEnd
+ CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat 4.1 Program Directory.lnk"
\
+ "$INSTDIR"
-SectionDivider " documentation and examples "
+ CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Start Tomcat.lnk" \
+ "$2\bin\java.exe" \
+ '-jar -Duser.dir="$INSTDIR"
-Djava.endorsed.dirs="$INSTDIR\common\endorsed" "$INSTDIR\bin\bootstrap.jar" start' \
+ "$INSTDIR\tomcat.ico" 0 SW_SHOWNORMAL
-Section "Tomcat Documentation"
+ CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Stop Tomcat.lnk" \
+ "$2\bin\java.exe" \
+ '-jar -Duser.dir="$INSTDIR" "$INSTDIR\bin\bootstrap.jar" stop' \
+ "$INSTDIR\tomcat.ico" 0 SW_SHOWMINIMIZED
- SectionIn 1 3
- SetOutPath $INSTDIR\webapps
- File /r webapps\tomcat-docs
+ SectionEnd
+SubSectionEnd
- IfFileExists "$SMPROGRAMS\Apache Tomcat 4.1" 0 NoLinks
+SubSection "Documentation and Examples"
+ Section "Tomcat Documentation"
- SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1"
-
- CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat Documentation.lnk" \
- "$INSTDIR\webapps\tomcat-docs\index.html"
-
- NoLinks:
+ SectionIn 1 3
+ SetOutPath $INSTDIR\webapps
+ File /r webapps\tomcat-docs
-SectionEnd
+ IfFileExists "$SMPROGRAMS\Apache Tomcat 4.1" 0 NoLinks
-Section "Example Web Applications"
+ SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1"
- SectionIn 1 3
+ CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat Documentation.lnk" \
+ "$INSTDIR\webapps\tomcat-docs\index.html"
- SetOverwrite off
- SetOutPath $INSTDIR\conf
- File conf\server.xml
- SetOverwrite on
- SetOutPath $INSTDIR\webapps
- File /r webapps\examples
- File /r webapps\webdav
+ NoLinks:
-SectionEnd
+ SectionEnd
-SectionDivider " developer resources "
+ Section "Example Web Applications"
-Section "Tomcat Source Code"
+ SectionIn 1 3
- SectionIn 3
- SetOutPath $INSTDIR
- File /r src
- File /r jtc-src
+ SetOverwrite off
+ SetOutPath $INSTDIR\conf
+ File conf\server.xml
+ SetOverwrite on
+ SetOutPath $INSTDIR\webapps
+ File /r webapps\examples
+ File /r webapps\webdav
-SectionEnd
+ SectionEnd
-Section -post
+SubSEctionEnd
+SubSection "Developer Resources"
- SetOverwrite off
- SetOutPath $INSTDIR\conf
- File /oname=server.xml conf\server-noexamples.xml.config
- SetOutPath $INSTDIR
- File /r conf
+ Section "Tomcat Source Code"
- SetOverwrite on
+ SectionIn 3
+ SetOutPath $INSTDIR
+ File /r src
+ File /r jtc-src
- Call configure
-
- 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" \
- "UninstallString" '"$INSTDIR\uninst-tomcat4.exe"'
-
- Sleep 500
- BringToFront
-
-SectionEnd
+ SectionEnd
+SubSectionEnd
Function .onInit
@@ -202,6 +193,9 @@
Call findJavaPath
Pop $1
MessageBox MB_OK "Using Java Development Kit found in $1"
+
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\config.ini config.ini
FunctionEnd
@@ -306,22 +300,22 @@
; and build the configuration files
;
Function configure
+ SetOverwrite off
+ SetOutPath $INSTDIR\conf
+ File /oname=server.xml conf\server-noexamples.xml.config
+ SetOutPath $INSTDIR
+ File /r conf
; Output files needed for the configuration dialog
SetOverwrite on
- GetTempFileName $8
- GetTempFileName $7
- File /oname=$8 "InstallOptions.dll"
- File /oname=$7 "config.ini"
- Push $7
- CallInstDLL $8 dialog
+ Push $1
+ InstallOptions::dialog $PLUGINSDIR\config.ini
Pop $1
- StrCmp $1 "0" NoConfig
- ReadINIStr $R0 $7 "Field 2" State
- ReadINIStr $R1 $7 "Field 5" State
- ReadINIStr $R2 $7 "Field 7" State
+ ReadINIStr $R0 $PLUGINSDIR\config.ini "Field 2" State
+ ReadINIStr $R1 $PLUGINSDIR\config.ini "Field 5" State
+ ReadINIStr $R2 $PLUGINSDIR\config.ini "Field 7" State
StrCpy $R4 'port="$R0"'
StrCpy $R5 '<user name="$R1" password="$R2" roles="admin,manager" />'
@@ -363,12 +357,21 @@
NoLinks:
- NoConfig:
-
Delete $7
Delete $8
RMDir /r "$TEMP\confinstall"
+ 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" \
+ "UninstallString" '"$INSTDIR\uninst-tomcat4.exe"'
+
+ Sleep 500
+ BringToFront
+
FunctionEnd
@@ -488,7 +491,7 @@
; if $INSTDIR was removed, skip these next ones
IfFileExists "$INSTDIR" 0 Removed
MessageBox MB_YESNO|MB_ICONQUESTION \
- "Remove all files in your Tomcat 4.1 directory? (If you have anything\
+ "Remove all files in your Tomcat 4.1 directory? (If you have anything \
you created that you want to keep, click No)" IDNO Removed
Delete "$INSTDIR\*.*" ; this would be skipped if the user hits no
RMDir /r "$INSTDIR"
1.4 +4 -4 jakarta-tomcat-4.0/resources/INSTALLLICENSE
Index: INSTALLLICENSE
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/resources/INSTALLLICENSE,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- INSTALLLICENSE 24 Dec 2003 19:50:52 -0000 1.3
+++ INSTALLLICENSE 22 May 2004 17:34:57 -0000 1.4
@@ -1,11 +1,11 @@
-==========================================================
+===============================================
The Apache Software License, Version 1.1
Copyright (c) 1999-2002 The Apache Software Foundation.
All rights reserved.
-==========================================================
+===============================================
Redistribution and use in source and binary forms, with or without modi-
fication, are permitted provided that the following conditions are met:
@@ -51,10 +51,10 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
-==========================================================
+===============================================
This software consists of voluntary contributions made by many indivi-
duals on behalf of the Apache Software Foundation. For more information
on the Apache Software Foundation, please see <http://www.apache.org/>.
-==========================================================
+===============================================
1.3 +2 -8 jakarta-tomcat-4.0/resources/config.ini
Index: config.ini
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/resources/config.ini,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config.ini 1 Feb 2002 00:30:40 -0000 1.2
+++ config.ini 22 May 2004 17:34:57 -0000 1.3
@@ -1,17 +1,11 @@
[Settings]
NumFields=7
-Title=Test Install Setup: Testing Installer Options
-
-; uncomment this to confirm on exit.
-; CancelConfirm=Are you sure you want to cancel the install?
-
-; comment this out to hide the back button
BackEnabled=0
+CancelEnabled=0
; you can override the defaults here
-CancelButtonText=Skip
-NextButtonText=Next >
+NextButtonText=Finish
[Field 1]
1.3 +1 -0 jakarta-tomcat-4.0/resources/confinstall/server_1.xml
Index: server_1.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/resources/confinstall/server_1.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- server_1.xml 16 Apr 2002 00:16:34 -0000 1.2
+++ server_1.xml 22 May 2004 17:34:57 -0000 1.3
@@ -84,3 +84,4 @@
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+
\ No newline at end of file
1.8 +1 -0 jakarta-tomcat-4.0/resources/confinstall/server_2.xml
Index: server_2.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/resources/confinstall/server_2.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- server_2.xml 21 Jan 2004 23:59:50 -0000 1.7
+++ server_2.xml 22 May 2004 17:34:57 -0000 1.8
@@ -1,3 +1,4 @@
+
minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
1.2 +1 -0 jakarta-tomcat-4.0/resources/confinstall/tomcat-users_1.xml
Index: tomcat-users_1.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/resources/confinstall/tomcat-users_1.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tomcat-users_1.xml 1 Feb 2002 00:15:11 -0000 1.1
+++ tomcat-users_1.xml 22 May 2004 17:34:57 -0000 1.2
@@ -4,3 +4,4 @@
you must define such a user - the username and password are arbitrary.
-->
<tomcat-users>
+
\ No newline at end of file
1.2 +1 -0 jakarta-tomcat-4.0/resources/confinstall/tomcat-users_2.xml
Index: tomcat-users_2.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/resources/confinstall/tomcat-users_2.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tomcat-users_2.xml 1 Feb 2002 00:15:11 -0000 1.1
+++ tomcat-users_2.xml 22 May 2004 17:34:57 -0000 1.2
@@ -1,3 +1,4 @@
+
<user name="tomcat" password="tomcat" roles="tomcat" />
<user name="role1" password="tomcat" roles="role1" />
<user name="both" password="tomcat" roles="tomcat,role1" />
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]