tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1142923 - in /tomcat/trunk: res/tomcat.nsi webapps/docs/changelog.xml
Date Tue, 05 Jul 2011 08:31:52 GMT
Author: kkolinko
Date: Tue Jul  5 08:31:52 2011
New Revision: 1142923

URL: http://svn.apache.org/viewvc?rev=1142923&view=rev
Log:
Further improvements to the Windows installer
1. Install into "**/Tomcat7.0_servicename" when service name differs from default,
but install into "**/Tomcat7.0" if the name is the default one.
This is to be in line with 7.0.16 and earlier versions, but
differs from 7.0.17 which used "**/Tomcat7.0/servicename".
2. Changed name of registry key for running of Tomcat Monitor
3. Do not forget to delete Tomcat Monitor running entry from HKCU in 32-bit part of registry

Modified:
    tomcat/trunk/res/tomcat.nsi
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/res/tomcat.nsi
URL: http://svn.apache.org/viewvc/tomcat/trunk/res/tomcat.nsi?rev=1142923&r1=1142922&r2=1142923&view=diff
==============================================================================
--- tomcat/trunk/res/tomcat.nsi (original)
+++ tomcat/trunk/res/tomcat.nsi Tue Jul  5 08:31:52 2011
@@ -51,6 +51,7 @@ Var TomcatPortAjp
 Var TomcatMenuEntriesEnable
 Var TomcatShortcutAllUsers
 Var TomcatServiceName
+Var TomcatServiceDefaultName
 Var TomcatServiceFileName
 Var TomcatServiceManagerFileName
 Var TomcatAdminEnable
@@ -215,11 +216,11 @@ Section "Core" SecTomcatCore
   FileSeek $ServiceInstallLog 0 END
 
   InstallRetry:
-  FileWrite $ServiceInstallLog '"$INSTDIR\bin\$TomcatServiceFileName" //IS//$TomcatServiceName
--DisplayName "Apache Tomcat @VERSION_MAJOR@ $TomcatServiceName" --Description "Apache Tomcat
@VERSION@ Server - http://tomcat.apache.org/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\$TomcatServiceFileName"
--Jvm "$JvmDll" --StartPath "$INSTDIR" --StopPath "$INSTDIR"'
+  FileWrite $ServiceInstallLog '"$INSTDIR\bin\$TomcatServiceFileName" //IS//$TomcatServiceName
--DisplayName "Apache Tomcat @VERSION_MAJOR_MINOR@ $TomcatServiceName" --Description "Apache
Tomcat @VERSION@ Server - http://tomcat.apache.org/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\$TomcatServiceFileName"
--Jvm "$JvmDll" --StartPath "$INSTDIR" --StopPath "$INSTDIR"'
   FileWrite $ServiceInstallLog "$\r$\n"
   ClearErrors
   DetailPrint "Installing $TomcatServiceName service"
-  nsExec::ExecToStack '"$INSTDIR\bin\$TomcatServiceFileName" //IS//$TomcatServiceName --DisplayName
"Apache Tomcat @VERSION_MAJOR@ $TomcatServiceName" --Description "Apache Tomcat @VERSION@
Server - http://tomcat.apache.org/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\$TomcatServiceFileName"
--Jvm "$JvmDll" --StartPath "$INSTDIR" --StopPath "$INSTDIR"'
+  nsExec::ExecToStack '"$INSTDIR\bin\$TomcatServiceFileName" //IS//$TomcatServiceName --DisplayName
"Apache Tomcat @VERSION_MAJOR_MINOR@ $TomcatServiceName" --Description "Apache Tomcat @VERSION@
Server - http://tomcat.apache.org/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\$TomcatServiceFileName"
--Jvm "$JvmDll" --StartPath "$INSTDIR" --StopPath "$INSTDIR"'
   Pop $0
   Pop $1
   StrCmp $0 "0" InstallOk
@@ -331,9 +332,9 @@ Section -post
   nsExec::ExecToLog '"$INSTDIR\bin\$TomcatServiceFileName" //US//$TomcatServiceName --StdOutput
auto --StdError auto'
 
   ${If} $TomcatShortcutAllUsers == "1"
-    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@$TomcatServiceName"
'"$INSTDIR\bin\$TomcatServiceManagerFileName" //MS//$TomcatServiceName'
+    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@_$TomcatServiceName"
'"$INSTDIR\bin\$TomcatServiceManagerFileName" //MS//$TomcatServiceName'
   ${Else}
-    WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@$TomcatServiceName"
'"$INSTDIR\bin\$TomcatServiceManagerFileName" //MS//$TomcatServiceName'
+    WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@_$TomcatServiceName"
'"$INSTDIR\bin\$TomcatServiceManagerFileName" //MS//$TomcatServiceName'
   ${EndIf}
   
   ${If} $TomcatMenuEntriesEnable == "1"
@@ -373,7 +374,8 @@ Function .onInit
   StrCpy $TomcatPortAjp "8009"
   StrCpy $TomcatMenuEntriesEnable "0"
   StrCpy $TomcatShortcutAllUsers "0"
-  StrCpy $TomcatServiceName "Tomcat@VERSION_MAJOR@"
+  StrCpy $TomcatServiceDefaultName "Tomcat@VERSION_MAJOR@"
+  StrCpy $TomcatServiceName $TomcatServiceDefaultName
   StrCpy $TomcatServiceFileName "Tomcat@VERSION_MAJOR@.exe"
   StrCpy $TomcatServiceManagerFileName "Tomcat@VERSION_MAJOR@w.exe"
   StrCpy $TomcatAdminEnable "0"
@@ -546,7 +548,13 @@ Function pageConfigurationLeave
     ${NSD_GetText} $CtlTomcatAdminPassword $TomcatAdminPassword
     ${NSD_GetText} $CtlTomcatAdminRoles $TomcatAdminRoles
   ${EndIf}
-  
+
+  ${If} $TomcatServiceName == ""
+    MessageBox MB_ICONEXCLAMATION|MB_OK 'The Service Name may not be empty'
+    Abort "Config not right"
+    Goto exit
+  ${EndIf}
+
   Push $TomcatServiceName
   Call validateServiceName
   Pop $0
@@ -736,9 +744,17 @@ DonePEHeader:
   ; The default varies depending on 32-bit or 64-bit
   ${If} "$INSTDIR" == ""
     ${If} $Arch == "x86"
-      StrCpy $INSTDIR "$PROGRAMFILES32\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@\$TomcatServiceName"
+      ${If} $TomcatServiceName == $TomcatServiceDefaultName
+        StrCpy $INSTDIR "$PROGRAMFILES32\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@"
+      ${Else}
+        StrCpy $INSTDIR "$PROGRAMFILES32\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@_$TomcatServiceName"
+      ${EndIf}
     ${Else}
-      StrCpy $INSTDIR "$PROGRAMFILES64\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@\$TomcatServiceName"
+      ${If} $TomcatServiceName == $TomcatServiceDefaultName
+        StrCpy $INSTDIR "$PROGRAMFILES64\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@"
+      ${Else}
+        StrCpy $INSTDIR "$PROGRAMFILES64\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@_$TomcatServiceName"
+      ${EndIf}
     ${EndIf}
   ${EndIf}
 
@@ -1065,13 +1081,13 @@ Section Uninstall
   SetRegView 32
   DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat @VERSION_MAJOR_MINOR@
$TomcatServiceName"
   DeleteRegKey HKLM "SOFTWARE\Apache Software Foundation\Tomcat\@VERSION_MAJOR_MINOR@ $TomcatServiceName"
-  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@$TomcatServiceName"
+  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@_$TomcatServiceName"
+  DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@_$TomcatServiceName"
   SetRegView 64
   DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat @VERSION_MAJOR_MINOR@
$TomcatServiceName"
   DeleteRegKey HKLM "SOFTWARE\Apache Software Foundation\Tomcat\@VERSION_MAJOR_MINOR@\$TomcatServiceName"
-  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@$TomcatServiceName"
-
-  DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@$TomcatServiceName"
+  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@_$TomcatServiceName"
+  DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "ApacheTomcatMonitor@VERSION_MAJOR_MINOR@_$TomcatServiceName"
 
   ; Don't know if short-cuts were created for all users, one user or not at all so, for now,
remove both
   SetShellVarContext all
@@ -1097,7 +1113,7 @@ Section Uninstall
   ; if $INSTDIR was removed, skip these next ones
   IfFileExists "$INSTDIR" 0 Removed
     MessageBox MB_YESNO|MB_ICONQUESTION \
-      "Remove all files in your Tomcat @VERSION_MAJOR_MINOR@ $TomcatServiceName directory?
(If you have anything  \
+      "Remove all files in your Apache Tomcat @VERSION_MAJOR_MINOR@ $TomcatServiceName directory?
(If you have anything  \
  you created that you want to keep, click No)" IDNO Removed
     ; these would be skipped if the user hits no
     RMDir /r "$INSTDIR\webapps"

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1142923&r1=1142922&r2=1142923&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jul  5 08:31:52 2011
@@ -90,6 +90,9 @@
         More code clean-up to remove unused code and reduce IDE warnings.
         (markt/kkolinko)
       </fix>
+      <update>
+        Further improvements to the Windows installer. (markt/kkolinko)
+      </update>
     </changelog>
   </subsection>
 </section>



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


Mime
View raw message