You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2006/01/27 19:57:45 UTC

svn commit: r372945 - in /logging/log4j/trunk: build.xml src/java/org/apache/log4j/nt/EventLogCategories.h src/java/org/apache/log4j/nt/EventLogCategories.rc src/java/org/apache/log4j/nt/MSG00001.bin

Author: carnold
Date: Fri Jan 27 10:57:35 2006
New Revision: 372945

URL: http://svn.apache.org/viewcvs?rev=372945&view=rev
Log:
Bug 37866: Drop use of mc in NTEventLogAppender.dll building

Added:
    logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.h
    logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.rc
    logging/log4j/trunk/src/java/org/apache/log4j/nt/MSG00001.bin   (with props)
Modified:
    logging/log4j/trunk/build.xml

Modified: logging/log4j/trunk/build.xml
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/build.xml?rev=372945&r1=372944&r2=372945&view=diff
==============================================================================
--- logging/log4j/trunk/build.xml (original)
+++ logging/log4j/trunk/build.xml Fri Jan 27 10:57:35 2006
@@ -602,30 +602,40 @@
         </jar>
     </target>
 
+    <!--
+        Regenerates resource files from EventLogCategories.mc.  Avoids
+        need for Microsoft Platform SDK unless you are modifying EventLogCategories.mc
+    -->
+    <target name="update.nt.msg" description="Update EventLogCategories.rc from .mc">
+        <property name="msg.out.dir" location="${java.source.dir}org/apache/log4j/nt"/>
+        <exec executable="mc">
+            <arg value="-h"/>
+            <arg file="${msg.out.dir}"/>
+            <arg value="-r"/>
+            <arg file="${msg.out.dir}"/>
+            <arg file="${java.source.dir}org/apache/log4j/nt/EventLogCategories.mc"/>
+        </exec>
+    </target>
+    
     <target name="build.nt.dll" depends="log4j.jar,log4j-nt.jar" description="Build NTEventLogAppender.dll">
-		<javah class="org.apache.log4j.nt.NTEventLogAppender,org.apache.log4j.Priority"
+        <!--  requires MinGW on path.  If cygwin is on path, MinGW must be before it -->
+        <exec executable="windres" dir="${java.source.dir}/org/apache/log4j/nt/">
+            <arg value="-o"/>
+            <arg file="${javac.dest}/EventLogCategories.o"/>
+            <arg value="--include-dir=${javac.dest}"/>
+            <arg file="${java.source.dir}/org/apache/log4j/nt/EventLogCategories.rc"/>
+        </exec>
+
+        <exec executable="windres">
+            <arg value="-o"/>
+            <arg file="${javac.dest}/NTEventLogAppender.o"/>
+            <arg file="${java.source.dir}org/apache/log4j/nt/NTEventLogAppender.rc"/>
+        </exec>
+
+        <javah class="org.apache.log4j.nt.NTEventLogAppender,org.apache.log4j.Priority"
 			   destdir="${javac.dest}"
 			   classpath="${jar.dest}/${log4j.jar};${jar.dest}/${log4j-nt.jar}"/>
-		<exec executable="mc">
-			<arg value="-h"/>
-			<arg file="${javac.dest}"/>
-			<arg value="-r"/>
-			<arg file="${javac.dest}"/>
-			<arg file="${java.source.dir}org/apache/log4j/nt/EventLogCategories.mc"/>
-		</exec>
-
-		<exec executable="windres">
-			<arg value="-o"/>
-			<arg file="${javac.dest}/EventLogCategories.o"/>
-			<arg value="--include-dir=${javac.dest}"/>
-			<arg file="${javac.dest}/EventLogCategories.rc"/>
-		</exec>
 
-		<exec executable="windres">
-			<arg value="-o"/>
-			<arg file="${javac.dest}/NTEventLogAppender.o"/>
-			<arg file="${java.source.dir}org/apache/log4j/nt/NTEventLogAppender.rc"/>
-		</exec>
 
 		<property name="jni.include.dir" location="${java.home}\..\include"/>
 		<exec executable="gcc">
@@ -991,7 +1001,7 @@
  <!-- ================================================================= -->
  <!-- Build a complete distribution. Results go to ${dist.images}       -->
  <!-- ================================================================= -->
-  <target name="dist" depends="init, clean, requiredepsCheck, javadoc, jar, site">
+  <target name="dist" depends="init, clean, requiredepsCheck, javadoc, jar, site, build.nt.dll">
 
     <delete verbose="true">
       <fileset dir=".">

Added: logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.h
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.h?rev=372945&view=auto
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.h (added)
+++ logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.h Fri Jan 27 10:57:35 2006
@@ -0,0 +1,90 @@
+//
+//  Values are 32 bit values layed out as follows:
+//
+//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+//  +---+-+-+-----------------------+-------------------------------+
+//  |Sev|C|R|     Facility          |               Code            |
+//  +---+-+-+-----------------------+-------------------------------+
+//
+//  where
+//
+//      Sev - is the severity code
+//
+//          00 - Success
+//          01 - Informational
+//          10 - Warning
+//          11 - Error
+//
+//      C - is the Customer code flag
+//
+//      R - is a reserved bit
+//
+//      Facility - is the facility code
+//
+//      Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+
+//
+// Define the severity codes
+//
+
+
+//
+// MessageId: 0x0000C350L (No symbolic name defined)
+//
+// MessageText:
+//
+//  Fatal
+//
+
+
+//
+// MessageId: 0x00009C40L (No symbolic name defined)
+//
+// MessageText:
+//
+//  Error
+//
+
+
+//
+// MessageId: 0x00007530L (No symbolic name defined)
+//
+// MessageText:
+//
+//  Warn
+//
+
+
+//
+// MessageId: 0x00004E20L (No symbolic name defined)
+//
+// MessageText:
+//
+//  Info
+//
+
+
+//
+// MessageId: 0x00002710L (No symbolic name defined)
+//
+// MessageText:
+//
+//  Debug
+//
+
+
+//
+// MessageId: 0x00001000L (No symbolic name defined)
+//
+// MessageText:
+//
+//  %1
+//
+
+

Added: logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.rc
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.rc?rev=372945&view=auto
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.rc (added)
+++ logging/log4j/trunk/src/java/org/apache/log4j/nt/EventLogCategories.rc Fri Jan 27 10:57:35 2006
@@ -0,0 +1,2 @@
+LANGUAGE 0x9,0x1
+1 11 MSG00001.bin

Added: logging/log4j/trunk/src/java/org/apache/log4j/nt/MSG00001.bin
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/nt/MSG00001.bin?rev=372945&view=auto
==============================================================================
Binary file - no diff available.

Propchange: logging/log4j/trunk/src/java/org/apache/log4j/nt/MSG00001.bin
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



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