Building with Windows 2003 DDK [PATCH]

Allen Unueco <[email protected]> Thu, 12 Jun 2003 21:48:59 -0700
Newsgroups gmane.comp.lib.cppunit.devel
Message-ID <[email protected]>
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C33167.1AD7001A
Content-Type: text/plain;
	charset="iso-8859-1"

Attached is a patch for building cppunit with the latest Windows 2003 DDK
(version 3790). The DDK is nice in that it contains all of the compilers,
headers and libs required to build Windows drivers and user mode apps. The
DDK can be downloaded if you have an MSDN subscription and you can order it
for shipping and media costs.

No need to buy or install Visual Studio.

Once you have the DDK installed just open a 'build window'
(Programs->Development Kits->Windows DDK 3790->Build Environments->Windows
2000->Windows 2000 Free Build Environment)

Then set an environment variable named CPPUNIT_ROOT to the root of your
cppunit checkout. Now you can run 'build' to build the tree. There are some
aliases for build like 'bcz' that will do a clean build without dependency
checking.

Currently the files are only setup to build the cppunit.lib (this is all we
use) but adding dirs and sources files could be done to build the rest of
the tree.

The only annoying thing about using the DDK is that you need to have a
template makefile in each directory where you are going to compile
something. This would conflict with the Makefile created by autoconf if you
were trying to build this on unix. For us that isn't a problem as we use Jam
not make for unix builds.

-allen


------_=_NextPart_000_01C33167.1AD7001A
Content-Type: application/octet-stream;
	name="cppunit-ddk.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="cppunit-ddk.patch"

diff -ruN -x CVS cppunit/dirs cppunit-asu/dirs
--- cppunit/dirs	1969-12-31 16:00:00.000000000 -0800
+++ cppunit-asu/dirs	2003-06-12 21:20:51.000000000 -0700
@@ -0,0 +1,2 @@
+DIRS=3D\
+    src
diff -ruN -x CVS cppunit/include/cppunit/plugin/TestPlugIn.h =
cppunit-asu/include/cppunit/plugin/TestPlugIn.h
--- cppunit/include/cppunit/plugin/TestPlugIn.h	2003-06-12 =
21:15:28.000000000 -0700
+++ cppunit-asu/include/cppunit/plugin/TestPlugIn.h	2003-06-12 =
20:53:16.000000000 -0700
@@ -139,7 +139,9 @@
 // Win32
 #if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER)
 #if !defined(APIENTRY)
-#define WIN32_LEAN_AND_MEAN=20
+#ifndef WIN32_LEAN_AND_MEAN
+  #define WIN32_LEAN_AND_MEAN=20
+#endif
 #define NOGDI
 #define NOUSER
 #define NOKERNEL
diff -ruN -x CVS cppunit/src/cppunit/DllMain.cpp =
cppunit-asu/src/cppunit/DllMain.cpp
--- cppunit/src/cppunit/DllMain.cpp	2003-06-12 21:15:29.000000000 -0700
+++ cppunit-asu/src/cppunit/DllMain.cpp	2003-06-12 20:52:11.000000000 =
-0700
@@ -1,4 +1,6 @@
-#define WIN32_LEAN_AND_MEAN=20
+#ifndef WIN32_LEAN_AND_MEAN
+  #define WIN32_LEAN_AND_MEAN=20
+#endif
 #define NOGDI
 #define NOUSER
 #define NOKERNEL
diff -ruN -x CVS cppunit/src/cppunit/Win32DynamicLibraryManager.cpp =
cppunit-asu/src/cppunit/Win32DynamicLibraryManager.cpp
--- cppunit/src/cppunit/Win32DynamicLibraryManager.cpp	2003-06-12 =
21:15:30.000000000 -0700
+++ cppunit-asu/src/cppunit/Win32DynamicLibraryManager.cpp	2003-06-12 =
20:54:36.000000000 -0700
@@ -3,7 +3,9 @@
 #if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER)
 #include <cppunit/plugin/DynamicLibraryManager.h>
=20
-#define WIN32_LEAN_AND_MEAN=20
+#ifndef WIN32_LEAN_AND_MEAN
+  #define WIN32_LEAN_AND_MEAN=20
+#endif
 #define NOGDI
 #define NOUSER
 #define NOKERNEL
diff -ruN -x CVS cppunit/src/cppunit/makefile =
cppunit-asu/src/cppunit/makefile
--- cppunit/src/cppunit/makefile	1969-12-31 16:00:00.000000000 -0800
+++ cppunit-asu/src/cppunit/makefile	2002-09-19 12:18:09.000000000 =
-0700
@@ -0,0 +1,10 @@
+# @(#)nt/private/ntos/dd/vsm/vold/api/makefile  1.1 11 Jun 1998 =
11:26:01 -  */
+# "@(#)vxvm:nt/private/ntos/dd/vsm/vold/api/makefile   1.1"
+#
+#
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new =
source
+# file to this component.  This file merely indirects to the real make =
file
+# that is shared by all the components of NT OS/2
+#
+!INCLUDE $(NTMAKEENV)\makefile.def
+
diff -ruN -x CVS cppunit/src/cppunit/sources =
cppunit-asu/src/cppunit/sources
--- cppunit/src/cppunit/sources	1969-12-31 16:00:00.000000000 -0800
+++ cppunit-asu/src/cppunit/sources	2003-06-12 20:51:24.000000000 -0700
@@ -0,0 +1,73 @@
+#    Notes:
+#        386_STDCALL=3D0   _cdecl calling convention
+#
+#        USE_MSVCRT=3D1    dynamically MSVCRT.lib
+#        USE_NATIVE_EH=3D1 enable C++ EH - compiler option /GX[-]
+
+TARGETNAME=3D cppunit
+TARGETPATH=3D $(CPPUNIT_ROOT)
+TARGETTYPE=3D LIBRARY
+UMTYPE=3D     windows
+
+386_STDCALL=3D0
+
+USE_STL=3D1
+USE_RTTI=3D1
+USE_MSVCRT=3D1
+USE_NATIVE_EH=3D1
+
+INCLUDES=3D\
+        $(CPPUNIT_ROOT)\include
+
+SOURCES=3D\
+	DllMain.cpp \
+	RepeatedTest.cpp \
+	TestCaseDecorator.cpp \
+	TestDecorator.cpp \
+	TestSetUp.cpp \
+	TestFactoryRegistry.cpp \
+	TestNamer.cpp \
+	TestSuiteBuilderContext.cpp \
+	TypeInfoHelper.cpp \
+	AdditionalMessage.cpp \
+	Asserter.cpp \
+	Exception.cpp \
+	Message.cpp \
+	SourceLine.cpp \
+	SynchronizedObject.cpp \
+	Test.cpp \
+	TestAssert.cpp \
+	TestCase.cpp \
+	TestComposite.cpp \
+	TestFailure.cpp \
+	TestLeaf.cpp \
+	TestPath.cpp \
+	TestResult.cpp \
+	TestRunner.cpp \
+	TestSuite.cpp \
+	CompilerOutputter.cpp \
+	TestResultCollector.cpp \
+	TextOutputter.cpp \
+	XmlOutputter.cpp \
+	XmlOutputterHook.cpp \
+	TextTestRunner.cpp \
+	BriefTestProgressListener.cpp \
+	TestSuccessListener.cpp \
+	TextTestProgressListener.cpp \
+	TextTestResult.cpp \
+	BeosDynamicLibraryManager.cpp \
+	DynamicLibraryManager.cpp \
+	DynamicLibraryManagerException.cpp \
+	PlugInManager.cpp \
+	PlugInParameters.cpp \
+	TestPlugInDefaultImpl.cpp \
+	UnixDynamicLibraryManager.cpp \
+	Win32DynamicLibraryManager.cpp \
+	StringTools.cpp \
+	XmlDocument.cpp \
+	XmlElement.cpp \
+	DefaultProtector.cpp \
+	Protector.cpp \
+	ProtectorChain.cpp
+
diff -ruN -x CVS cppunit/src/dirs cppunit-asu/src/dirs
--- cppunit/src/dirs	1969-12-31 16:00:00.000000000 -0800
+++ cppunit-asu/src/dirs	2003-06-12 21:20:38.000000000 -0700
@@ -0,0 +1,2 @@
+DIRS=3D\
+    cppunit

------_=_NextPart_000_01C33167.1AD7001A--


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5