It was born at Sequoia Systems, in the midst of a rather painful corporate collapse. A deviant version of ddkbuild is available at OSR. I've never used it, but I've heard it works. What does ddkbuild do? It does a lot of things, but mostly it does exactly what that crufty checked or free build environment ddk window does, that is it sets up the correct environment for executing build, and then in invokes build. What's the point? Oh, yes well ddkbuild does things in such a way that it is really easy to set up a VisualStudio project that will, through the vehicle of ddkbuild, integrate with the NT build process.
Ok, that's a really neat tool. It does have its limits though. Ddkbuild does not preclude using the DDK shell windows for building your projects, in fact it encourages it. We will also discuss very briefly how to create a new build project in the IDE. Through some sort of miracle I've actually updated this discussion to be relative to Visual Studio. Net ! Isn't that exciting?
But first a word from our sponsor: folks please remember that what drives the creation of a NT DDK Build based software project is the Sources file that describes the project components. The process I'm describing here works with the DDK build process it does not replace it. Let's take an existing W2K3 driver, in fact we will use the one pictured way up as the fugly figure 1, the isousb driver. Fire up VisualStudio. Net From the File menu select New Blank Solution, which ought to bring you to this screen:.
That directory contains a DIRS file and subdirectories named exe and sys containing auser mode test program sources and the driver sources. Our solution will build both the user mode and kernel mode components. Click OK to create the new solution. This brings up the next panel - the Makefile Application Wizard.
We will set up preliminary Debug and Release settings for our project using this panel by clicking on the Application Settings element of the panel. Note a couple of things here. We have specified build and rebuild command lines for ddkbuild.
We have no bothered with a clean command line. Finally, the Output field is meaningless. Click on the Finish button and Visual Studio sets up our initial view of the project. At this point we can build the project, and if we have done everything correctly it will build.
Lets take a look. We selected "Rebuild Solution" from the Build menu. Our Visual Studio external makefile project used ddkbuild to invoke the W2K3 ddk build utility, and rebuilt both the driver and the test program using the DDK and its built in compilation tools.
Note that oddly enough there are no source files, include files or resources configured for our project. The project simply invokes ddkbuild. Lets make our solution look more like what we are actually building. First, add the DIRS file to the isousb project. Then create project folders for exe and sys and put Source Files, Header Files, and Resource Files folders in each of these folders.
Now add the source files, include files, and resource files for the application and the driver to their appropriate folders. Here is what the project looks like after we've added all of its files to it. Notice that this is the Solution Explorer view of the project.
The Class View is also enabled. If you click on the Class View tab you will see something like this:. All of the data structures and functions defined in the project are browsable from the Class View.
Note also that you can use Visual Studios Find Symbol function to locate the definitions of variables, data structures, and functions defined in the isousb project.
Double clicking on the highlighted line will in fact navigate to the isousb. Oh, we need to enable source browsing. So it seems we just need to enable 'Build Browse Information' and we should be all set. This program builds a batch file which it then executes in a child process. To build the batch file, SetDDKgo. Here are the command line switches, environment variables and registry entries used by SetDDKgo.
Command line switches have highest precedence followed by environment variables, and finally registry settings. To edit a shortcut, right click on it, select Properties, and add the parameters to the Target line. If you have multiple DDKs you need to build against, or you want to build from the command line, you can easily create multiple shortcuts to SetDDKgo. Be sure that you have the correct DDK installed before building the libraries.
Site Search User. Everything Windows Driver Development. Thu, 14 Mar members. The Windows build environment is a wild animal that must be tamed. If you try to feed an NT V4. If you eventually manage to make your SOURCES file palatable, you may have to search for the location where the build environment hid your target files.
This article will explain how to solve these problems. Additionally, the article will present a number of ways to make the build environment a friendlier, mellower, sort of beast. Those of you who have been developing Windows NT 4. This particularly affects those of us in file system land where not enough of the infrastructure above the storage stack has changed to warrant maintaining separate source code bases for Win2K and NT 4. The new DDK insists on appending a path such as i The new library tree is an example of this inversion.
What can you do about these changes if you need to maintain a common source code base for Win2K and NT 4. A time-honored technique for dealing with seemingly arbitrary changes is to insulate yourself from them.
DEF , appears in Figure 1. Windows NT 4. Lastly, if you still support it, Windows NT 3. There are several behaviors you may desire to eliminate.
For example, when you open a Win2K build window, the system thrashes wildly for a number of seconds. When you specify a start directory for your build window shortcut, the build window opens with its current working directory set to the root of the DDK. Moreover, every time a build window is opened, the build environment searches for an updated compiler. If it finds one, it updates itself to use the latest compiler without asking for your approval.
Fortunately, there are effective solutions to all of these problems.
0コメント