httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r106313 - /httpd/httpd/trunk/include/ap_release.h /httpd/httpd/trunk/support/win32/ApacheMonitor.dsp /httpd/httpd/trunk/support/win32/ApacheMonitor.rc
Date Tue, 23 Nov 2004 16:57:20 GMT
Author: wrowe
Date: Tue Nov 23 08:57:18 2004
New Revision: 106313

Modified:
   httpd/httpd/trunk/include/ap_release.h
   httpd/httpd/trunk/support/win32/ApacheMonitor.dsp
   httpd/httpd/trunk/support/win32/ApacheMonitor.rc
Log:

  Eliminate awk autogeneration of the ApacheMonitor's .rc resource
  source file.

  By adding several macros to ap_release.h:

    - the stringize magic, in leiu of including a ton of cruft,
    - split subversion and "-dev" tokens (with a binary flag)
    - a _CSV token in the form of m,n,p (not a string)

  we are able to have use a static ApacheMonitor.rc file, which picks
  up all of the necessary values right from ap_release.h.

  If the group likes this approach, I will percolate it throughout
  the project, and we will lose the requirement of awk for everything
  -except- rewriting the installed httpd.conf script (developer builds
  always get an installed httpd.conf script - it's only 'fixed up' 
  with the correct @@ substitutions if they have awk.)

  This project was chosen because ApacheMonitor.rc already exists in svn.

  Comment please.


Modified: httpd/httpd/trunk/include/ap_release.h
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/include/ap_release.h?view=diff&rev=106313&p1=httpd/httpd/trunk/include/ap_release.h&r1=106312&p2=httpd/httpd/trunk/include/ap_release.h&r2=106313
==============================================================================
--- httpd/httpd/trunk/include/ap_release.h	(original)
+++ httpd/httpd/trunk/include/ap_release.h	Tue Nov 23 08:57:18 2004
@@ -16,7 +16,10 @@
 #ifndef AP_RELEASE_H
 #define AP_RELEASE_H
 
-#include "apr_general.h" /* stringify */
+/** Properly quote a value as a string in the C preprocessor */
+#define AP_STRINGIFY(n) AP_STRINGIFY_HELPER(n)
+/** Helper macro for AP_STRINGIFY */
+#define AP_STRINGIFY_HELPER(n) #n
 
 /*
  * The below defines the base string of the Server: header. Additional
@@ -36,17 +39,28 @@
 #define AP_SERVER_MAJORVERSION_NUMBER 2
 #define AP_SERVER_MINORVERSION_NUMBER 1
 #define AP_SERVER_PATCHLEVEL_NUMBER   2
+#define AP_SERVER_DEVBUILD_BOOLEAN    1
+
+#if AP_SERVER_DEVBUILD_BOOLEAN
 #define AP_SERVER_ADD_STRING          "-dev"
+#else
+#define AP_SERVER_ADD_STRING          ""
+#endif
 
 /* keep old macros as well */
-#define AP_SERVER_MAJORVERSION APR_STRINGIFY(AP_SERVER_MAJORVERSION_NUMBER)
-#define AP_SERVER_MINORVERSION APR_STRINGIFY(AP_SERVER_MINORVERSION_NUMBER)
-#define AP_SERVER_PATCHLEVEL APR_STRINGIFY(AP_SERVER_PATCHLEVEL_NUMBER) \
-                              AP_SERVER_ADD_STRING
+#define AP_SERVER_MAJORVERSION  AP_STRINGIFY(AP_SERVER_MAJORVERSION_NUMBER)
+#define AP_SERVER_MINORVERSION  AP_STRINGIFY(AP_SERVER_MINORVERSION_NUMBER)
+#define AP_SERVER_PATCHLEVEL    AP_STRINGIFY(AP_SERVER_PATCHLEVEL_NUMBER) \
+                                AP_SERVER_ADD_STRING
 
 #define AP_SERVER_MINORREVISION AP_SERVER_MAJORVERSION "." AP_SERVER_MINORVERSION
 #define AP_SERVER_BASEREVISION  AP_SERVER_MINORREVISION "." AP_SERVER_PATCHLEVEL
-#define AP_SERVER_BASEVERSION AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION
-#define AP_SERVER_VERSION  AP_SERVER_BASEVERSION
+#define AP_SERVER_BASEVERSION   AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION
+#define AP_SERVER_VERSION       AP_SERVER_BASEVERSION
+
+/* macro for Win32 .rc files using numeric csv representation */
+#define AP_SERVER_PATCHLEVEL_CSV AP_SERVER_MAJORVERSION_NUMBER ##, \
+                               ##AP_SERVER_MINORVERSION_NUMBER ##, \
+                               ##AP_SERVER_PATCHLEVEL_NUMBER
 
 #endif

Modified: httpd/httpd/trunk/support/win32/ApacheMonitor.dsp
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/support/win32/ApacheMonitor.dsp?view=diff&rev=106313&p1=httpd/httpd/trunk/support/win32/ApacheMonitor.dsp&r1=106312&p2=httpd/httpd/trunk/support/win32/ApacheMonitor.dsp&r2=106313
==============================================================================
--- httpd/httpd/trunk/support/win32/ApacheMonitor.dsp	(original)
+++ httpd/httpd/trunk/support/win32/ApacheMonitor.dsp	Tue Nov 23 08:57:18 2004
@@ -47,7 +47,7 @@
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /i ".\\" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "./" /i "../include" /d "NDEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
@@ -73,7 +73,7 @@
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /i ".\\" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "./" /i "../../include" /d "_DEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
@@ -96,19 +96,10 @@
 # End Source File
 # Begin Source File
 
-SOURCE=.\ApacheMonitor.h
-# End Source File
-# Begin Source File
-
 SOURCE=.\ApacheMonitor.ico
 # End Source File
 # Begin Source File
 
-SOURCE=.\ApacheMonitor.rc
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
 SOURCE=.\aprun.ico
 # End Source File
 # Begin Source File
@@ -130,46 +121,11 @@
 # End Source File
 # Begin Source File
 
-SOURCE=.\ApacheMonitorVer.rc
+SOURCE=.\ApacheMonitor.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\..\build\win32\win32ver.awk
-
-!IF  "$(CFG)" == "ApacheMonitor - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__WIN32="..\..\include\ap_release.h"	".\ApacheMonitor.rc"	
-# Begin Custom Build - Creating versioned resources
-InputPath=..\..\build\win32\win32ver.awk
-
-".\ApacheMonitorVer.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	echo /* This file is autogenerated from ApacheMonitor.rc > ApacheMonitorVer.rc 
-	echo  * DO NOT EDIT! >> ApacheMonitorVer.rc 
-	echo  */ >> ApacheMonitorVer.rc 
-	type ApacheMonitor.rc >> ApacheMonitorVer.rc 
-	awk -f ../../build/win32/win32ver.awk ApacheMonitor.exe "Apache HTTP Server Monitor" ../../include/ap_release.h
>> ApacheMonitorVer.rc 
-	
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "ApacheMonitor - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__WIN32="..\..\include\ap_release.h"	".\ApacheMonitor.rc"	
-# Begin Custom Build - Creating versioned resources
-InputPath=..\..\build\win32\win32ver.awk
-
-".\ApacheMonitorVer.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	echo /* This file is autogenerated from ApacheMonitor.rc > ApacheMonitorVer.rc 
-	echo  * DO NOT EDIT! >> ApacheMonitorVer.rc 
-	echo  */ >> ApacheMonitorVer.rc 
-	type ApacheMonitor.rc >> ApacheMonitorVer.rc 
-	awk -f ../../build/win32/win32ver.awk ApacheMonitor.exe "Apache HTTP Server Monitor" ../../include/ap_release.h
>> ApacheMonitorVer.rc 
-	
-# End Custom Build
-
-!ENDIF 
-
+SOURCE=.\ApacheMonitor.rc
 # End Source File
 # End Target
 # End Project

Modified: httpd/httpd/trunk/support/win32/ApacheMonitor.rc
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/support/win32/ApacheMonitor.rc?view=diff&rev=106313&p1=httpd/httpd/trunk/support/win32/ApacheMonitor.rc&r1=106312&p2=httpd/httpd/trunk/support/win32/ApacheMonitor.rc&r2=106313
==============================================================================
--- httpd/httpd/trunk/support/win32/ApacheMonitor.rc	(original)
+++ httpd/httpd/trunk/support/win32/ApacheMonitor.rc	Tue Nov 23 08:57:18 2004
@@ -17,6 +17,8 @@
 
 #include "ApacheMonitor.h"
 
+#include "ap_release.h"
+
 IDI_APSRVMON            ICON    DISCARDABLE     "ApacheMonitor.ico"
 IDI_ICOSTOP             ICON    DISCARDABLE     "apstop.ico"
 IDI_ICORUN              ICON    DISCARDABLE     "aprun.ico"
@@ -93,4 +95,42 @@
     IDS_MSG_SERVICES        "Ser&vices"
     IDS_MSG_CONNECT         "&Connect"
     IDS_MSG_ECONNECT        "Unable to connect to the remote registry on %s"
+END
+
+1 VERSIONINFO
+ FILEVERSION AP_SERVER_PATCHLEVEL_CSV,0
+ PRODUCTVERSION AP_SERVER_PATCHLEVEL_CSV,0
+ FILEFLAGSMASK 0x3fL
+#if defined(_DEBUG)
+ FILEFLAGS 0x03L
+#else
+#if AP_SERVER_DEVBUILD_BOOLEAN
+ FILEFLAGS 0x02L
+#else
+ FILEFLAGS 0x0L
+#endif
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904b0"
+    BEGIN
+      VALUE "Comments", "Licensed under the Apache License, Version 2.0 (the ""License"");
you may not use this file except in compliance with the License.  You may obtain a copy of
the License at\r\n\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by
applicable law or agreed to in writing, software distributed under the License is distributed
on an ""AS IS"" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and limitations under the
License.\0"
+      VALUE "CompanyName", AP_SERVER_BASEVENDOR "\0"
+      VALUE "FileDescription", "Apache HTTP Server Monitor\0"
+      VALUE "FileVersion", AP_SERVER_BASEREVISION "\0"
+      VALUE "InternalName", "ApacheMonitor.exe\0"
+      VALUE "LegalCopyright", "Copyright 2001-2004 The Apache Software Foundation\0"
+      VALUE "OriginalFilename", "ApacheMonitor.exe\0"
+      VALUE "ProductName", "Apache HTTP Server\0"
+      VALUE "ProductVersion", AP_SERVER_BASEREVISION "\0"
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x409, 1200
+  END
 END

Mime
View raw message