Author: kkolinko
Date: Tue Jul 21 01:11:31 2009
New Revision: 796103

URL: http://svn.apache.org/viewvc?rev=796103&view=rev
Log:
Bundle native dlls with exe installer, instead of downloading some old
(1.1.4) native version from Heanet, and install DLL according with CPU
architecture.
Ported from 6.0 (mainly from mturk's rev.791699)

Modified:
    tomcat/build/tc5.5.x/build.properties.default
    tomcat/build/tc5.5.x/build.xml
    tomcat/build/tc5.5.x/tomcat.nsi
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml
    tomcat/current/tc5.5.x/STATUS.txt

Modified: tomcat/build/tc5.5.x/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/build/tc5.5.x/build.properties.default?rev=796103&r1=796102&r2=796103&view=diff
==============================================================================
--- tomcat/build/tc5.5.x/build.properties.default (original)
+++ tomcat/build/tc5.5.x/build.properties.default Tue Jul 21 01:11:31 2009
@@ -140,9 +140,11 @@
 
jdt.loc=http://archive.eclipse.org/eclipse/downloads/drops/R-3.3.1-200709211145/eclipse-JDT-3.3.1.zip
 
 # ----- Tomcat native library -----
-tomcat-native.home=${base.path}/tomcat-native-1.1.16
+tomcat-native.version=1.1.16
+tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
-tomcat-native.loc=${base-tomcat.loc}/tomcat-connectors/native/tomcat-native-1.1.16-src.tar.gz
+tomcat-native.loc=${base-tomcat.loc}/tomcat-connectors/native/tomcat-native-${tomcat-native.version}-src.tar.gz
+tomcat-native.dll=${base-tomcat.loc}/tomcat-connectors/native/${tomcat-native.version}/binaries
 
 
 # --------------------------------------------------

Modified: tomcat/build/tc5.5.x/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/build/tc5.5.x/build.xml?rev=796103&r1=796102&r2=796103&view=diff
==============================================================================
--- tomcat/build/tc5.5.x/build.xml (original)
+++ tomcat/build/tc5.5.x/build.xml Tue Jul 21 01:11:31 2009
@@ -1508,16 +1508,25 @@
     <copy file="${nsis.nsexec.dll}" todir="${tomcat.dist}" />
     <copy file="${nsis.nsisdl.dll}" todir="${tomcat.dist}" />
     <!-- 32 bit -->
-       <copy file="${jtc.home}/procrun/bin/tomcat${version.major}.exe"
-           tofile="${tomcat.dist}/bin/tomcat${version.major}.exe" />
-       <copy file="${jtc.home}/procrun/bin/tomcat${version.major}w.exe"
+    <copy file="${jtc.home}/procrun/bin/tomcat${version.major}.exe"
+       tofile="${tomcat.dist}/bin/tomcat${version.major}.exe" />
+    <copy file="${jtc.home}/procrun/bin/tomcat${version.major}w.exe"
           tofile="${tomcat.dist}/bin/tomcat${version.major}w.exe" />
     <!-- 64 bit amd -->
-       <copy file="${jtc.home}/procrun/bin/amd64/tomcat${version.major}.exe"
-             
tofile="${tomcat.dist}/bin/procrun/amd64/tomcat${version.major}.exe" />
-       <!-- 64 bit ia -->
-       <copy file="${jtc.home}/procrun/bin/ia64/tomcat${version.major}.exe"
-             
tofile="${tomcat.dist}/bin/procrun/ia64/tomcat${version.major}.exe" />
+    <copy file="${jtc.home}/procrun/bin/amd64/tomcat${version.major}.exe"
+          tofile="${tomcat.dist}/bin/x64/tomcat${version.major}.exe" />
+    <!-- 64 bit ia -->
+    <copy file="${jtc.home}/procrun/bin/ia64/tomcat${version.major}.exe"
+          tofile="${tomcat.dist}/bin/i64/tomcat${version.major}.exe" />
+    <!-- tc native -->
+    <copy file="${tomcat-native.home}/tcnative-1.dll.x86"
+          tofile="${tomcat.dist}/bin/tcnative-1.dll" />
+    <!-- tc native 64 bit for amd/emt -->
+    <copy file="${tomcat-native.home}/tcnative-1.dll.x64"
+          tofile="${tomcat.dist}/bin/x64/tcnative-1.dll" />
+    <!-- tc native 64 bit for ia -->
+    <copy file="${tomcat-native.home}/tcnative-1.dll.i64"
+          tofile="${tomcat.dist}/bin/i64/tcnative-1.dll" />
 
     <filter token="VERSION" value="${version}"/>
     <filter token="VERSION_NUMBER" value="${version.number}"/>
@@ -2029,6 +2038,24 @@
       <param name="destdir" value="${tomcat-native.home}"/>
     </antcall>
 
+    <antcall target="downloadfile">
+      <param name="sourcefile" 
value="${tomcat-native.dll}/win32/tcnative-1.dll"/>
+      <param name="destfile" value="${tomcat-native.home}/tcnative-1.dll.x86"/>
+      <param name="destdir" value="${tomcat-native.home}"/>
+    </antcall>
+
+    <antcall target="downloadfile">
+      <param name="sourcefile" 
value="${tomcat-native.dll}/win64/x64/tcnative-1.dll"/>
+      <param name="destfile" value="${tomcat-native.home}/tcnative-1.dll.x64"/>
+      <param name="destdir" value="${tomcat-native.home}"/>
+    </antcall>
+
+    <antcall target="downloadfile">
+      <param name="sourcefile" 
value="${tomcat-native.dll}/win64/ia64/tcnative-1.dll"/>
+      <param name="destfile" value="${tomcat-native.home}/tcnative-1.dll.i64"/>
+      <param name="destdir" value="${tomcat-native.home}"/>
+    </antcall>
+
     <!-- Build the dependencies that are not yet released -->
     <antcall target="build-depends"/>
 

Modified: tomcat/build/tc5.5.x/tomcat.nsi
URL: 
http://svn.apache.org/viewvc/tomcat/build/tc5.5.x/tomcat.nsi?rev=796103&r1=796102&r2=796103&view=diff
==============================================================================
--- tomcat/build/tc5.5.x/tomcat.nsi (original)
+++ tomcat/build/tc5.5.x/tomcat.nsi Tue Jul 21 01:11:31 2009
@@ -97,7 +97,7 @@
     LangString DESC_SecTomcat ${LANG_ENGLISH} "Install the Tomcat Servlet 
container as a Windows service."
     LangString DESC_SecTomcatCore ${LANG_ENGLISH} "Install the Tomcat Servlet 
container core."
     LangString DESC_SecTomcatService ${LANG_ENGLISH} "Automatically start the 
Tomcat service when the computer is started. This requires Windows NT 4.0, 
Windows 2000 or Windows XP."
-    LangString DESC_SecTomcatNative ${LANG_ENGLISH} "Downloads and installs 
Tomcat native .dll for better performance and scalability in production 
environments."
+    LangString DESC_SecTomcatNative ${LANG_ENGLISH} "Install APR based Tomcat 
native .dll for better performance and scalability in production environments."
 ;    LangString DESC_SecTomcatSource ${LANG_ENGLISH} "Install the Tomcat 
source code."
     LangString DESC_SecMenu ${LANG_ENGLISH} "Create a Start Menu program group 
for Tomcat."
     LangString DESC_SecDocs ${LANG_ENGLISH} "Install the Tomcat documentation 
bundle. This include documentation on the servlet container and its 
configuration options, on the Jasper JSP page compiler, as well as on the 
native webserver connectors."
@@ -184,19 +184,17 @@
   DetailPrint "Using Jvm: $2"
 
   SetOutPath $INSTDIR\bin
+  File bin\tom...@version_major@w.exe
+
   ; 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
+  Call FindCpuType
+  Pop $0
+  StrCmp $0 "x86" 0 +2
   File /oname=tom...@version_major@.exe bin\tom...@version_major@.exe
-  File /oname=tom...@version_major@w.exe bin\tom...@version_major@w.exe
-  StrCmp $0 "AMD64" 0 +3
-  File /oname=tom...@version_major@.exe 
bin\procrun\amd64\tom...@version_major@.exe
-  File /oname=tom...@version_major@w.exe bin\tom...@version_major@w.exe
-  StrCmp $0 "IA64" 0 +3
-  File /oname=tom...@version_major@.exe 
bin\procrun\ia64\tom...@version_major@.exe
-  File /oname=tom...@version_major@w.exe bin\tom...@version_major@w.exe
+  StrCmp $0 "x64" 0 +2
+  File /oname=tom...@version_major@.exe bin\x64\tom...@version_major@.exe
+  StrCmp $0 "i64" 0 +2
+  File /oname=tom...@version_major@.exe bin\i64\tom...@version_major@.exe
 
   InstallRetry:
   ClearErrors
@@ -239,12 +237,16 @@
 
   SectionIn 3
 
-  NSISdl::download /TIMEOUT=30000 
http://tomcat.heanet.ie/native/1.1.4/binaries/win32/tcnative-1.dll 
$INSTDIR\bin\tcnative-1.dll
+  SetOutPath $INSTDIR\bin
+  Call FindCpuType
   Pop $0
-  StrCmp $0 success success
-    SetDetailsView show
-    DetailPrint "download failed from 
http://tomcat.heanet.ie/native/1.1.4/binaries/win32/tcnative-1.dll: $0"
-  success:
+
+  StrCmp $0 "x86" 0 +2
+  File bin\tcnative-1.dll
+  StrCmp $0 "x64" 0 +2
+  File /oname=tcnative-1.dll bin\x64\tcnative-1.dll
+  StrCmp $0 "i64" 0 +2
+  File /oname=tcnative-1.dll bin\i64\tcnative-1.dll
 
   ClearErrors
 
@@ -425,6 +427,32 @@
 
 
 ; =====================
+; FindCpuType Function
+; =====================
+;
+; Find the CPU used on the system, and put the result on the top of the
+; stack
+;
+Function FindCpuType
+
+  ClearErrors
+  ; Default CPU is always x86
+  StrCpy $1 "x86"
+  ExpandEnvStrings $0 "%PROCESSOR_ARCHITEW6432%"
+  StrCmp $0 "%PROCESSOR_ARCHITEW6432%" +5 0
+  StrCmp $0 "IA64" 0 +3
+  StrCpy $1 "i64"
+  Goto FoundCpu
+  StrCpy $1 "x64"
+
+FoundCpu:
+  ; Put the result in the stack
+  Push $1
+
+FunctionEnd
+
+
+; =====================
 ; CheckUserType Function
 ; =====================
 ;

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=796103&r1=796102&r2=796103&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Jul 21 01:11:31 2009
@@ -35,6 +35,17 @@
 <section name="Tomcat 5.5.29 (fhanik)">
   <subsection name="General">
     <changelog>
+      <fix>
+        Update the version of Tomcat Native DLL installed by the Windows
+        installer to be 1.1.16. It was using some very old (1.1.4) version
+        of it. (kkolinko)
+      </fix>
+      <update>
+        Include 32-bit and 64-bit versions of Tomcat Native DLLs into the
+        Windows installer, instead of downloading them from a web site during
+        install, and allow it to automatically select the correct one for the
+        current platform. (kkolinko/mturk)
+      </update>
     </changelog>
   </subsection>
   <subsection name="Catalina">

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=796103&r1=796102&r2=796103&view=diff
==============================================================================
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Tue Jul 21 01:11:31 2009
@@ -68,14 +68,6 @@
   +1: kkolinko
   -1:
 
-* Bundle native dlls with exe installer, instead of downloading some old
-  (1.1.4) native version from Heanet, and install DLL according with CPU
-  architecture.
-  Ported from 6.0 (mainly from Mladen's rev.791699)
-  
http://people.apache.org/~kkolinko/patches/2009-07-17_tc55_native_install_791699.patch
-  +1: kkolinko, rjung, markt
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46967
   Better handling of errors when trying to use Manager.randomFile
   Based on a patch by Kirk Wolf



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

Reply via email to