Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47086
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 2 May 2009 00:46:56 +0000 (00:46 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 2 May 2009 00:46:56 +0000 (00:46 +0000)
Include the 64-bit windows binaries in the distribution
Update the Windows installer to:
 - auto detect the platform and install the correct binary for x86/amd64/ia64
 - look for a 64-bit JVM on 64-bit platforms
 - write the service registry information to the 64 bit section of the registry (rather than Wow6432Node) on 64-bit machines

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@770876 13f79535-47bb-0310-9956-ffa450edef68

dist.xml
res/jvm.ini
res/tomcat.nsi

index 6744edd..50f4a83 100644 (file)
--- a/dist.xml
+++ b/dist.xml
     <copy file="${nsis.installoptions.dll}" todir="${tomcat.dist}" />
     <copy file="${nsis.nsexec.dll}" todir="${tomcat.dist}" />
     <copy file="${nsis.nsisdl.dll}" todir="${tomcat.dist}" />
+       <!-- 32 bit -->
     <copy file="res/procrun/tomcat${version.major}.exe"
         tofile="${tomcat.dist}/bin/tomcat${version.major}.exe" />
     <copy file="res/procrun/tomcat${version.major}w.exe"
         tofile="${tomcat.dist}/bin/tomcat${version.major}w.exe" />
+       <!-- 64 bit amd -->
+    <copy file="res/procrun/amd64/tomcat${version.major}.exe"
+        tofile="${tomcat.dist}/bin/procrun/amd64/tomcat${version.major}.exe" />
+    <copy file="res/procrun/amd64/tomcat${version.major}w.exe"
+        tofile="${tomcat.dist}/bin/procrun/amd64/tomcat${version.major}w.exe" />
+       <!-- 64 bit ia -->
+    <copy file="res/procrun/ia64/tomcat${version.major}.exe"
+        tofile="${tomcat.dist}/bin/procrun/ia64/tomcat${version.major}.exe" />
+    <copy file="res/procrun/ia64/tomcat${version.major}w.exe"
+        tofile="${tomcat.dist}/bin/procrun/ia64/tomcat${version.major}w.exe" />
+       <!-- tc native -->
     <copy file="${tomcat-native.home}/tcnative-1.dll.x86"
         tofile="${tomcat.dist}/bin/tcnative-1.dll" />
 
index f3e57e5..1ffeeb1 100644 (file)
@@ -3,11 +3,11 @@ NumFields=2
 
 [Field 1]
 Type=Label
-Text=Please select the path of a J2SE 5.0 JRE installed on your system:
+Text=Please select the path of a J2SE 5.0 or later JRE installed on your system. Note that if you have a 64-bit operating system, you must specify a 64-bit JRE:
 left=0
 right=300
 top=5
-bottom=20
+bottom=30
 
 [Field 2]
 Type=DirRequest
index 1501516..38ad307 100644 (file)
@@ -146,7 +146,6 @@ Section "Core" SecTomcatCore
   SetOutPath $INSTDIR\bin
   File bin\bootstrap.jar
   File bin\tomcat-juli.jar
-  File bin\*.exe
   SetOutPath $INSTDIR\conf
   File conf\*.*
   SetOutPath $INSTDIR\webapps\ROOT
@@ -169,6 +168,21 @@ Section "Core" SecTomcatCore
 
   DetailPrint "Using Jvm: $2"
 
+  SetOutPath $INSTDIR\bin
+  ; Get the current platform x86 / AMD64 / IA64
+  ExpandEnvStrings $0 "%PROCESSOR_ARCHITEW6432%"
+  StrCmp $0 "%PROCESSOR_ARCHITEW6432%" 0 +2
+  ExpandEnvStrings $0 "%PROCESSOR_ARCHITECTURE%"
+  StrCmp $0 "x86" 0 +3
+  File /oname=tomcat@VERSION_MAJOR@.exe bin\tomcat@VERSION_MAJOR@.exe
+  File /oname=tomcat@VERSION_MAJOR@w.exe bin\tomcat@VERSION_MAJOR@w.exe
+  StrCmp $0 "AMD64" 0 +3
+  File /oname=tomcat@VERSION_MAJOR@.exe bin\procrun\amd64\tomcat@VERSION_MAJOR@.exe
+  File /oname=tomcat@VERSION_MAJOR@w.exe bin\procrun\amd64\tomcat@VERSION_MAJOR@w.exe
+  StrCmp $0 "IA64" 0 +3
+  File /oname=tomcat@VERSION_MAJOR@.exe bin\procrun\ia64\tomcat@VERSION_MAJOR@.exe
+  File /oname=tomcat@VERSION_MAJOR@w.exe bin\procrun\ia64\tomcat@VERSION_MAJOR@w.exe
+
   InstallRetry:
   ClearErrors
   nsExec::ExecToLog '"$INSTDIR\bin\tomcat@VERSION_MAJOR@.exe" //IS//Tomcat@VERSION_MAJOR@ --DisplayName "Apache Tomcat @VERSION_MAJOR@" --Description "Apache Tomcat @VERSION@ Server - http://tomcat.apache.org/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\tomcat@VERSION_MAJOR@.exe" --Jvm "$2" --StartPath "$INSTDIR" --StopPath "$INSTDIR"'
@@ -299,6 +313,10 @@ Section -post
 SectionEnd
 
 Function .onInit
+  ;Reset install dir for 64-bit
+  ExpandEnvStrings $0 "%PROGRAMW6432%"
+  StrCmp $0 "%PROGRAMW6432%" +2 0
+  StrCpy $INSTDIR "$0\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@"
 
   ;Extract Install Options INI Files
   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "config.ini"
@@ -383,6 +401,11 @@ Function findJavaPath
 
   ClearErrors
 
+  ; Use the 64-bit registry on 64-bit machines
+  ExpandEnvStrings $0 "%PROGRAMW6432%"
+  StrCmp $0 "%PROGRAMW6432%" +2 0
+  SetRegView 64
+
   ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
   ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "JavaHome"
   ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$2" "RuntimeLib"