How do you set up your build environment?

The discussion on TARGETPATH made me realize I never use setenv directly.
I used to use it all the time, and realized that with the churn that
occurred over the last several DDK’s then the WDK it is something I avoid.
Noadays I use either the Microsoft provided shortcut to a build environment,
or rely on DDKBUILD to wrap setenv.

I am currious what other people do? Microsoft is proposing to add switches
to SETENV to fix some of the problems we are talkling about, but will this
work for people? If most people use the defined shortcuts for builds this
is not a good solution. If most folks use DDKBUILD then will we need
hundreds of environment variables to cover all the bases? So as curiosity
and hopefully some guidance to Microsoft how do you set up your build
environment:

  1. setenv

  2. Predefined build environments on the start menu

  3. DDKBUILD

  4. Something else?


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

I develop printer drivers. During day-to-day development, I use the
build environments from the start menu. When I want to do a build for
release, I have a batch file which calls setenv.

So I use mostly 2, and sometimes 1.

ScottR

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Tuesday, January 20, 2009 3:35 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How do you set up your build environment?

The discussion on TARGETPATH made me realize I never use setenv
directly.
I used to use it all the time, and realized that with the churn that
occurred over the last several DDK’s then the WDK it is something I
avoid.
Noadays I use either the Microsoft provided shortcut to a build
environment, or rely on DDKBUILD to wrap setenv.

I am currious what other people do? Microsoft is proposing to add
switches to SETENV to fix some of the problems we are talkling about,
but will this work for people? If most people use the defined shortcuts
for builds this is not a good solution. If most folks use DDKBUILD then
will we need
hundreds of environment variables to cover all the bases? So as
curiosity
and hopefully some guidance to Microsoft how do you set up your build
environment:

  1. setenv

  2. Predefined build environments on the start menu

  3. DDKBUILD

  4. Something else?


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr


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

If you use DDKBuild, then by definition you control how you invoke it.
You can pass whatever you want into the command line, and you can set
whatever env vars you like using the & operator.

We use SlickEdit, and the build configs assign things appropriately and
call DDKBuild. I also have some doskey macros that invoke DDKBuild with
some predefined command line switches.

Phil

Philip D. Barila
Seagate Technology LLC
(720) 684-1842


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of “Don Burn”

Sent: Tuesday, January 20, 2009 1:35 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How do you set up your build environment?

The discussion on TARGETPATH made me realize I never use setenv
directly.
I used to use it all the time, and realized that with the churn that
occurred over the last several DDK’s then the WDK it is something I
avoid.
Noadays I use either the Microsoft provided shortcut to a build
environment,
or rely on DDKBUILD to wrap setenv.

I am currious what other people do? Microsoft is proposing to add
switches
to SETENV to fix some of the problems we are talkling about, but will
this
work for people? If most people use the defined shortcuts for builds
this
is not a good solution. If most folks use DDKBUILD then will we need
hundreds of environment variables to cover all the bases? So as
curiosity
and hopefully some guidance to Microsoft how do you set up your build
environment:

1. setenv

2. Predefined build environments on the start menu

3. DDKBUILD

4. Something else?


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr


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

Don,
The only time that I don’t use a batch file is when I run prefast. The
companies that I do work for always use batch files for the release builds.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Don Burn
Sent: Tuesday, January 20, 2009 3:35 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How do you set up your build environment?

The discussion on TARGETPATH made me realize I never use setenv directly.
I used to use it all the time, and realized that with the churn that
occurred over the last several DDK’s then the WDK it is something I avoid.
Noadays I use either the Microsoft provided shortcut to a build environment,
or rely on DDKBUILD to wrap setenv.

I am currious what other people do? Microsoft is proposing to add switches
to SETENV to fix some of the problems we are talkling about, but will this
work for people? If most people use the defined shortcuts for builds this
is not a good solution. If most folks use DDKBUILD then will we need
hundreds of environment variables to cover all the bases? So as curiosity
and hopefully some guidance to Microsoft how do you set up your build
environment:

  1. setenv

  2. Predefined build environments on the start menu

  3. DDKBUILD

  4. Something else?


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr


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

Don Burn wrote:

I am currious what other people do? Microsoft is proposing to add switches
to SETENV to fix some of the problems we are talkling about, but will this
work for people? If most people use the defined shortcuts for builds this
is not a good solution. If most folks use DDKBUILD then will we need
hundreds of environment variables to cover all the bases? So as curiosity
and hopefully some guidance to Microsoft how do you set up your build
environment:

  1. setenv

  2. Predefined build environments on the start menu

  3. DDKBUILD

  4. Something else?

I have my own wrapper batch files that call setenv with pre- and
post-processing. Not complicated, but at the very least I cannot let
the USERNAME variable remain as “WinDDK”.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I run a TCMD alias which does preprocessing on the source files and
directory structure, starts a CMD.exe session which loads a batch script
which calls setenv and builds with parameters I passed to the alias, then it
does some other things such as driver signing and copying symbols.

I am pretty flexible to changes but it’s really going to be a hassle having
to maintain different aliases and batch scripts for different versions of
the WDK so I am very glad to hear that TARGETPATH is going to stay.

I also think that WDK dir structure should remain read-only and portable.

//Daniel

“Don Burn” wrote in message news:xxxxx@ntdev…
> The discussion on TARGETPATH made me realize I never use setenv directly.
> I used to use it all the time, and realized that with the churn that
> occurred over the last several DDK’s then the WDK it is something I avoid.
> Noadays I use either the Microsoft provided shortcut to a build
> environment, or rely on DDKBUILD to wrap setenv.
>
> I am currious what other people do? Microsoft is proposing to add
> switches to SETENV to fix some of the problems we are talkling about, but
> will this work for people? If most people use the defined shortcuts for
> builds this is not a good solution. If most folks use DDKBUILD then will
> we need hundreds of environment variables to cover all the bases? So as
> curiosity and hopefully some guidance to Microsoft how do you set up your
> build environment:
>
> 1. setenv
>
> 2. Predefined build environments on the start menu
>
> 3. DDKBUILD
>
> 4. Something else?
>
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>

Batch files in front of setenv, e.g. ddkbuild. I rarely if ever use the WDK
installed shortcuts.
Mark Roddy

On Tue, Jan 20, 2009 at 4:13 PM, Tim Roberts wrote:

> Don Burn wrote:
> > I am currious what other people do? Microsoft is proposing to add
> switches
> > to SETENV to fix some of the problems we are talkling about, but will
> this
> > work for people? If most people use the defined shortcuts for builds
> this
> > is not a good solution. If most folks use DDKBUILD then will we need
> > hundreds of environment variables to cover all the bases? So as
> curiosity
> > and hopefully some guidance to Microsoft how do you set up your build
> > environment:
> >
> > 1. setenv
> >
> > 2. Predefined build environments on the start menu
> >
> > 3. DDKBUILD
> >
> > 4. Something else?
> >
>
> I have my own wrapper batch files that call setenv with pre- and
> post-processing. Not complicated, but at the very least I cannot let
> the USERNAME variable remain as “WinDDK”.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> 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
>

> 1. setenv

Used old days for NT4 DDK only, and created a desktop shortcut.

  1. Predefined build environments on the start menu

Yes, now this way. As installed.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

I build directly from Visual Studio (Ctrl+Z shortcut starts build process) -
so if I get errors, I simply click on that line and VS moves a cursor on the
error line. I use own .BAT file, which defines 5 WDK setenvs, like: BASEDIR,
DDKIFS, HOST_TARGET_DIRECTORY, _NT_TARGET_VERSION and then it runs “build”
with some parameters; simple and effective…

-pk

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: 20. ledna 2009 21:35
To: Windows System Software Devs Interest List
Subject: [ntdev] How do you set up your build environment?

The discussion on TARGETPATH made me realize I never use setenv directly.
I used to use it all the time, and realized that with the churn that
occurred over the last several DDK’s then the WDK it is something I avoid.
Noadays I use either the Microsoft provided shortcut to a build environment,

or rely on DDKBUILD to wrap setenv.

I am currious what other people do? Microsoft is proposing to add switches
to SETENV to fix some of the problems we are talkling about, but will this
work for people? If most people use the defined shortcuts for builds this
is not a good solution. If most folks use DDKBUILD then will we need
hundreds of environment variables to cover all the bases? So as curiosity
and hopefully some guidance to Microsoft how do you set up your build
environment:

  1. setenv

  2. Predefined build environments on the start menu

  3. DDKBUILD

  4. Something else?


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr


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

From: “Don Burn”
> and hopefully some guidance to Microsoft how do you set up your build
> environment:

I use VS 6 with a “makefile” project that launches a .BAT file that, in
turn, calls setenv and build. For example, the build rule for Vista-64 is
“wdkbuild chk wlh amd64 xxx”, where “xxx” is the pathname of the project
directory. WDKBUILD is this (WDKPATH is an environment variable pointing to
the base directory of the WDK I’m using – currently 6000):

@echo off
call %wdkpath%\bin\setenv.bat %wdkpath% %1 %2 %3 bscmake
cd /d %4
if “%5” == “” set flag=-ew
if not “%5” == “” set flag=%5
build %flag% -M 1 -E

This procedure gives me the certainty of building using officially approved
tools with all the right options plus the ability to edit in an IDE, hop
right to error lines, etc. There are downsides: my projects aren’t movable
because I need an absolute pathname for that “cd” command, and I have to
make sure my wdkbuild.bat is in the path somewhere. Also, when moving to the
next release of the WDK, I’ll have to change all those amd64’s to x64’s and
maybe do some other tweaks that I haven’t discovered yet.

Walter Oney
Consulting and Training
www.oneysoft.com

Provided shortcut from the Start menu.

Peter
OSR

Own batch scipt; setenv then build. Invoked from command line or VS2005 in
developer environment; from ant in build environment.

“Don Burn” wrote in message news:xxxxx@ntdev…
> The discussion on TARGETPATH made me realize I never use setenv directly.
> I used to use it all the time, and realized that with the churn that
> occurred over the last several DDK’s then the WDK it is something I avoid.
> Noadays I use either the Microsoft provided shortcut to a build
> environment, or rely on DDKBUILD to wrap setenv.
>
> I am currious what other people do? Microsoft is proposing to add
> switches to SETENV to fix some of the problems we are talkling about, but
> will this work for people? If most people use the defined shortcuts for
> builds this is not a good solution. If most folks use DDKBUILD then will
> we need hundreds of environment variables to cover all the bases? So as
> curiosity and hopefully some guidance to Microsoft how do you set up your
> build environment:
>
> 1. setenv
>
> 2. Predefined build environments on the start menu
>
> 3. DDKBUILD
>
> 4. Something else?
>
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>

DDKBUILD driven by either the official build system (make based) or from
within Visual Studio for all the aforementioned productivity reasons.

I gave up on the custom batch file route long ago when I learned that Mark
was much better at it and giving it away.

But I treat DDKBUILD as a black-box too and version it in source control.

I prefer the idea of controlling how BUILD works from within the SOURCES and
related files.

I find myself using PROJECT.MK at a convenient apex in the source tree to
control project (duh) related settings and make the SOURCES/MAKEFILE.INC
files more compact across multiple-target builds.

I guess I should register a question with Tanya as to whether or not we (DDK
users) were *ever* supposed to use PROJECT.MK and whether or not it is going
to get nuked out of MAKEFILE.DEF anytime soon?

-Dave

“Don Burn” wrote in message news:xxxxx@ntdev…
> The discussion on TARGETPATH made me realize I never use setenv directly.
> I used to use it all the time, and realized that with the churn that
> occurred over the last several DDK’s then the WDK it is something I avoid.
> Noadays I use either the Microsoft provided shortcut to a build
> environment, or rely on DDKBUILD to wrap setenv.
>
> I am currious what other people do? Microsoft is proposing to add
> switches to SETENV to fix some of the problems we are talkling about, but
> will this work for people? If most people use the defined shortcuts for
> builds this is not a good solution. If most folks use DDKBUILD then will
> we need hundreds of environment variables to cover all the bases? So as
> curiosity and hopefully some guidance to Microsoft how do you set up your
> build environment:
>
> 1. setenv
>
> 2. Predefined build environments on the start menu
>
> 3. DDKBUILD
>
> 4. Something else?
>
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>

> -----Original Message-----

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Tuesday, January 20, 2009 9:35 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How do you set up your build environment?

  1. setenv

Rarely. Usually only when want to build some sample in order to create a
BSC database which allows easier browsing.

  1. Predefined build environments on the start menu

What start menu? :wink:

  1. Something else?

We have own build engine used to build virtually everything for every
platform we support (from DOS to MAC to name the weirdests). It is a set
of bash scripts and makefiles which extracts project from Perforce
archives, unpacks necessary prerequisites (SDKs, WDKs…), prepares
environment and then call builder for given project. For WDK the builder
creates a batch according to WDK version used which in turn calls setenv
with necessary parameters and finally calls build, prefast, signtool and
anything else necessary.

I start bash builder as a compiler from Multi-Edit which processes
output and shows errors and warnings in sources. Others call it from VS
and other IDEs.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

Don Burn wrote:

I am currious what other people do? Microsoft is proposing to add switches
to SETENV to fix some of the problems we are talkling about, but will this
work for people? If most people use the defined shortcuts for builds this
is not a good solution. If most folks use DDKBUILD then will we need
hundreds of environment variables to cover all the bases? So as curiosity
and hopefully some guidance to Microsoft how do you set up your build
environment:

  1. setenv

  2. Predefined build environments on the start menu

  3. DDKBUILD

  4. Something else?

Batch file which sets up private environment variables and calls setenv.

jjf

There is always one.
Mark Roddy

On Tue, Jan 20, 2009 at 5:44 PM, wrote:

>
> Provided shortcut from the Start menu.
>
> Peter
> OSR
>
> —
> 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
>

I write high performance PCI drivers; my environment is DDKBUILD (Assarbad 7.2 flavor) hosted under VS 2008 SP2. The DDK and VS are installed as they prefer, DDKBUILD is set up as it prefers and each driver project is managed as a VS solution with specific “sources” for DDKBUILD. Project paths and such are specified in the prebuild.cmd for DDKBUILD, shuffling around of binaries and such are accomplished in postbuild.cmd

This allows for interactive building of the projects (driver, DLL, usermode app, etc.) in the Studio and automated builds using VisualBuild (which supports VS). For client drops the DDK is installed on a DVD and the project on another DVD; when the client installs the drop they identify a “landing pad” for the project where the project files are copied and built from as well as the drive the DDK DVD is mounted.

I do not use the WDK shortcuts, nor do I modify in any way the client target machine’s environment (variables, paths, registry stuff, etc.) other than that … cuts down on the “I installed your stuff and now Outlook is messed up, you owe me 6 months of email!” calls …

Literally, when the client inserts the project DVD it autoruns a little “take the blue pill” which asks for the DDK DVD drive letter, the landing pad directory, the debug and free destination directories and then they press “Build” … at the end of which out pops a binary in the appropriate spots all ready for WIX to do it’s work …

Actually I use the shortcuts quite often. When I am developing I use
DDKbuild, but I also ensure that things will build with the shortcut, and in
times like this with new beta I invoke the shortcut to try the build. I
have clients who insist on people using the shortcuts.


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Mark Roddy” wrote in message news:xxxxx@ntdev…
> There is always one.
> Mark Roddy
>
>
> On Tue, Jan 20, 2009 at 5:44 PM, wrote:
>
>>
>> Provided shortcut from the Start menu.
>>
>> Peter
>> OSR
>>
>> —
>> 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
>>
>

I use a variety of options. I will use the WDK shortcuts, DDKBUILD, and our
own version of DDKBUILD that does a little more than the standard but it was
not derived from Mark’s batch file. I use SlickEdit, Visual Studio 2008,
and command line. We use the makefile.inc with targets to do some of the
work including WMI and copying some of the files to our desired destination.

“Don Burn” wrote in message news:xxxxx@ntdev…
> Actually I use the shortcuts quite often. When I am developing I use
> DDKbuild, but I also ensure that things will build with the shortcut, and
> in times like this with new beta I invoke the shortcut to try the build.
> I have clients who insist on people using the shortcuts.
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
>
> “Mark Roddy” wrote in message news:xxxxx@ntdev…
>> There is always one.
>> Mark Roddy
>>
>>
>> On Tue, Jan 20, 2009 at 5:44 PM, wrote:
>>
>>>
>>> Provided shortcut from the Start menu.
>>>
>>> Peter
>>> OSR
>>>
>>> —
>>> 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
>>>
>>
>
>
>

DDKBUILD from Hollistech and DosKey macros for quick and dirty path setting,
and free/checked.


The personal opinion of
Gary G. Little

“David R. Cattley” wrote in message news:xxxxx@ntdev…
> DDKBUILD driven by either the official build system (make based) or from
> within Visual Studio for all the aforementioned productivity reasons.
>
> I gave up on the custom batch file route long ago when I learned that Mark
> was much better at it and giving it away.
>
> But I treat DDKBUILD as a black-box too and version it in source control.
>
> I prefer the idea of controlling how BUILD works from within the SOURCES
> and related files.
>
> I find myself using PROJECT.MK at a convenient apex in the source tree to
> control project (duh) related settings and make the SOURCES/MAKEFILE.INC
> files more compact across multiple-target builds.
>
> I guess I should register a question with Tanya as to whether or not we
> (DDK users) were ever supposed to use PROJECT.MK and whether or not it
> is going to get nuked out of MAKEFILE.DEF anytime soon?
>
> -Dave
>
>
> “Don Burn” wrote in message news:xxxxx@ntdev…
>> The discussion on TARGETPATH made me realize I never use setenv directly.
>> I used to use it all the time, and realized that with the churn that
>> occurred over the last several DDK’s then the WDK it is something I
>> avoid. Noadays I use either the Microsoft provided shortcut to a build
>> environment, or rely on DDKBUILD to wrap setenv.
>>
>> I am currious what other people do? Microsoft is proposing to add
>> switches to SETENV to fix some of the problems we are talkling about, but
>> will this work for people? If most people use the defined shortcuts for
>> builds this is not a good solution. If most folks use DDKBUILD then will
>> we need hundreds of environment variables to cover all the bases? So as
>> curiosity and hopefully some guidance to Microsoft how do you set up your
>> build environment:
>>
>> 1. setenv
>>
>> 2. Predefined build environments on the start menu
>>
>> 3. DDKBUILD
>>
>> 4. Something else?
>>
>>
>>
>> –
>> Don Burn (MVP, Windows DDK)
>> Windows Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>>
>>
>>
>