The key concept here is that MY build environment is irrelevant. What is
essential is that I can deliver to a customer a driver which they can
rebuild, at will, at any time, from a standard “checked build” or “free
build” environment, WITH NO MODIFICATIONS OR ADDITIONAL STEPS REQUIRED. I
cannot tell them to create new environment variables (which are global to
all projects and therefore destructive to modularization of projects), or
run special batch jobs to make the environment variables local to a command
session, or anything else. Therefore, EVERYTHING that affects the build
MUST be in the sources file or some equivalent configuration file which
exists in that project directory. Every output must be relative to that
project directory; there can be no “global” directories into which things
are written by default. All defaults must be project-local, and ONLY
project-local.
I face the same problem when I deliver products in user space that could
require using a special Platform SDK: I can only build with the
out-of-the-box environment that the customers use. If there’s some newer
PSDK feature that I need, I have to create a special header file in the
project that defines that feature and that feature alone, and which has
#ifdefs to detect if, for some accident of good fortune, that customer
happens to have a programmer that is using the latest PSDK. Yes, I’ve been
burned by this more than once, which is why I can only build with the OOTB
environment that my customers will have.
Therefore, no solution that involves modifying any part of the
out-of-the-box environment, including adding environment variables or adding
additional steps to the build procedure, would be acceptable. Customers can
be running multiple DDKs (or WDKs) on a per-project basis, and each
programmer might use two or three environments in the course of a week, or
even a day. Each project must build completely standalone in whatever the
selected environment is. All existing environments must be supportable
concurrently, and in fact I should be able to have two build sessions for
two completely different DDK/WDK environments compiling at exactly the same
time, each for a different project, with no problems encountered because I
have different DDK/WDK environments installed.
This illustrates once again the myth Microsoft likes to believe: that
everyone, for every driver, on every machine, in every site, uses ONLY the
very-latest-version of software, and every programmer has exactly one
project, and every project is identical. Alas, in the Real World this
doesn’t happen. Even in user space, I need to have VS6, VS2003, VS2005 and
VS2008 installed. And it is worth pointing out that Microsoft issued a
completely incompatible version of the Platform SDK for VS2005 such that if
you use it exclusively, VS2005 has an MTBF of under 5 minutes, and in some
cases, can’t work at all with some projects. Apparently PSDK and VS
environments are separate fiefdoms with little communication. Now it sounds
like the same thing is happening in the driver world.
joe
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Tuesday, January 20, 2009 2:36 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Re:WDK7 custom target path
Take a look at the new setenv, there is more to it than a post pre/post
process. Even if it was my stated goal was to come up with a schema that
would allow my clients to work the way they had in the past. Since many of
them choose a build environment by going to the start menu and pulling up
the WDK this needs to be workable. while I could pothentially live with some
post processing, the script is looking very ugly, and will break at the
first change to setenv.
You in another post objected to the build team breaking things. I do not
like it, but part of what I am trying to do is work around that. I can
forgive most changes to the environment if there is a workaround. In this
case, if the wrappers to binplace had not made things very hard to do, I
would have documented a sources file that would have done the correct thing
from DDK 3790.1830 to the new beta.
As a plea to Microsoft please as much as possible do not make these things
“add a new switch to setenv”, many people do not invoke setenv directly, we
either use the build environment shortcuts (and do not want to change them)
or use something like DDKBUILD. Most of us want any magic incorportated in
the SOURCES file, not in options in N different places.
–
Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
“McNamee, John” <john.mcnamee> wrote in message news:xxxxx@ntdev…
Modifying setenv.bat is a bad idea, but I don’t see the problem with using
another batch file to pre/post-process setenv. If setenv’s problems can be
solved by invoking it with certain command line arguments, and/or setting
certain environment variables, that seems a perfectly acceptable solution.
This batch file would be checked in to source control with the driver code,
so builds are repeatable. Am I missing something? What is your objection
to this approach?
-----Original Message-----
From: Don Burn
Sent: Tuesday, January 20, 2009 11:45 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] WDK7 custom target path
How does one set it. It looks so far like the only way is to hack
setenv. That is not an acceptable solutuon in most companies.
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
–
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.</john.mcnamee>