integrating wdk 7.1 based osr scripts into VS2013?

Hi guys,
We have migrated to visual studio 2013+WDK 8.1 recently. We are using wdk
7.1 for building drivers for vista and 2003 with the help of OSR script.
Can we integrate these scripts into vs 2013 project configuration to build
all platforms.I don’t see NMAKE tool with .vcxproj. Could you please advice?

thanks,
suresh

Yeah, they work.

I have nmake in %ProgramFiles(x86)\Microsoft Visual Studio 12.0\VC\bin\amd64.

mm

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Suresh Chepuri
Sent: Wednesday, September 24, 2014 9:54 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] integrating wdk 7.1 based osr scripts into VS2013?

Hi guys,
We have migrated to visual studio 2013+WDK 8.1 recently. We are using wdk 7.1 for building drivers for vista and 2003 with the help of OSR script. Can we integrate these scripts into vs 2013 project configuration to build all platforms.I don’t see NMAKE tool with .vcxproj. Could you please advice?

thanks,
suresh

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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 don’t think you will be able to make this work within the same vcxproj (ie add vista or 2003 targets alongside the win7, 8 targets). You should be able to add a sibling vcxproj in the solution that calls out to the 7.1 wdk.

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Suresh Chepuri
Sent: Wednesday, September 24, 2014 9:54 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] integrating wdk 7.1 based osr scripts into VS2013?

Hi guys,
We have migrated to visual studio 2013+WDK 8.1 recently. We are using wdk 7.1 for building drivers for vista and 2003 with the help of OSR script. Can we integrate these scripts into vs 2013 project configuration to build all platforms.I don’t see NMAKE tool with .vcxproj. Could you please advice?

thanks,
suresh
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers 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

Suresh Chepuri wrote:

We have migrated to visual studio 2013+WDK 8.1 recently. We are using
wdk 7.1 for building drivers for vista and 2003 with the help of OSR
script. Can we integrate these scripts into vs 2013 project
configuration to build all platforms.I don’t see NMAKE tool with
.vcxproj. Could you please advice?

I’m not sure what you’re asking. Are you saying you just want to be
able to build all of your configurations from a command line? I use
batch files:

msbuild /p:Configuration=“Win7 Debug”,Platform=Win32
msbuild /p:Configuration=“Win7 Release”,Platform=Win32
msbuild /p:Configuration=“Win7 Debug”,Platform=x64
msbuild /p:Configuration=“Win7 Release”,Platform=x64

Actually, I’m a bit lazier than that. I wrote a Python script that
reads the current vcxproj file, and calls msbuild for each
configuration/platform combination it finds. Very handy.


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

On 24-Sep-2014 20:25, Tim Roberts wrote:

I wrote a Python script that
reads the current vcxproj file, and calls msbuild for each
configuration/platform combination it finds. Very handy.

We did something different for integration of pre-win8 WDK
into VS solutions with application or other usermode components.
We had basically a chain of three small batch files:

The 1st script maps VC++ project configuration to WDK configuration(s)
and calls ddkbuild or its analog.
This allows things like building several driver binaries for one
solution configuration. Developer can mix and match drivers with
usermode stuff in any combination.
For example, a certain configuration builds single set of usermode
binaries with three driver binaries for winxp, 2k and win7. Or, one can
choose to build x86 and x64 drivers at once, debug and release.

So the build command in the vcproj is:

BuildCommandLine=“$(BLDCMD) $(ConfigurationName) $(PlatformName)”


where BLDCMD is the 1st script.

The 2nd script is some kind of ddkbuild.bat; a wrapper around the WDK
build, in one given WDK config.

The 3rd script is a kind of binplace, it copies the build products to
the output directory of the solution and does any needed postprocessing
(signing, storing the PDBs with the package…)

The 1st script looks like this:

set a_conf=%1
set a_platf=%2
goto LABEL_%a_conf%%a_platf%


:LABEL_DEBUGX64
call :ddkbld WIN7 X64 CHK
call :filecopy WIN7 X64 CHK
goto :EOF

rem Subroutine to call ddkbuild.bat:
:ddkbld


rem Subroutine to move build products
:filecopy


Oh and we’ve put all this in a VS property sheet (.vspropt or .props)
for easy cloning projects.
These were the gloomy days before the new, VS-encumbered kit :wink:

Regards,
– pa

Thanks Doron, MM, Tim and Pavel for your response.

Doron : Yes, We have to use either makefile (OSR script) or default
configuration(WDK 8.1) to build either of the targeted WDK platforms.
Pavel : I am asking about how to build drivers starting form windows 2003
to windows 8.1 from VS 2013 along with other user applications. Like
choosing configuration “release | win32” would build all 32-bit
applications and “release” command for driver project would expand to all
supported platforms.

Thanks,
Suresh

On Thu, Sep 25, 2014 at 2:22 AM, Pavel A. wrote:

> On 24-Sep-2014 20:25, Tim Roberts wrote:
>
>> I wrote a Python script that
>> reads the current vcxproj file, and calls msbuild for each
>> configuration/platform combination it finds. Very handy.
>>
>>
> We did something different for integration of pre-win8 WDK
> into VS solutions with application or other usermode components.
> We had basically a chain of three small batch files:
>
> The 1st script maps VC++ project configuration to WDK configuration(s)
> and calls ddkbuild or its analog.
> This allows things like building several driver binaries for one
> solution configuration. Developer can mix and match drivers with usermode
> stuff in any combination.
> For example, a certain configuration builds single set of usermode
> binaries with three driver binaries for winxp, 2k and win7. Or, one can
> choose to build x86 and x64 drivers at once, debug and release.
>
> So the build command in the vcproj is:
>
> > BuildCommandLine=“$(BLDCMD) $(ConfigurationName) $(PlatformName)”
> …
>
> where BLDCMD is the 1st script.
>
> The 2nd script is some kind of ddkbuild.bat; a wrapper around the WDK
> build, in one given WDK config.
>
> The 3rd script is a kind of binplace, it copies the build products to the
> output directory of the solution and does any needed postprocessing
> (signing, storing the PDBs with the package…)
>
>
> The 1st script looks like this:
>
> set a_conf=%1
> set a_platf=%2
> goto LABEL_%a_conf%%a_platf%
> …
>
> :LABEL_DEBUGX64
> call :ddkbld WIN7 X64 CHK
> call :filecopy WIN7 X64 CHK
> goto :EOF
>
> rem Subroutine to call ddkbuild.bat:
> :ddkbld
> …
>
> rem Subroutine to move build products
> :filecopy
> …
>
>
> Oh and we’ve put all this in a VS property sheet (.vspropt or .props) for
> easy cloning projects.
> These were the gloomy days before the new, VS-encumbered kit :wink:
>
> Regards,
> – pa
>
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> 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
>

On 25-Sep-2014 18:36, Suresh Chepuri wrote:

Pavel : I am asking about how to build drivers starting form windows
2003 to windows 8.1 from VS 2013 along with other user applications.
Like choosing configuration “release | win32” would build all 32-bit
applications and “release” command for driver project would expand to
all supported platforms.

Yes, this is exactly the kind of scenario that I’ve tried to describe.
– pa

VS2013 will run ddkbuild.bat just fine, so you don’t have to change
anything to continue to build WD7 based projects for platforms unsupported
by WDk8.1. So our developer solutions run a mix of VS WDK8.1 projects and
nmake ddkbuild projects. Our build system does everything from a batch
file, as others have indicated, running either ddkbuild or an equivalent
script to do msbuilld for WDK8.1 projects.

It would have been a bit less trouble if WDK8.1 supported XP->Win8.1.
Despite rumors to the contrary, XP lives on.

Mark Roddy

On Thu, Sep 25, 2014 at 11:36 AM, Suresh Chepuri
wrote:

> Thanks Doron, MM, Tim and Pavel for your response.
>
> Doron : Yes, We have to use either makefile (OSR script) or default
> configuration(WDK 8.1) to build either of the targeted WDK platforms.
> Pavel : I am asking about how to build drivers starting form windows 2003
> to windows 8.1 from VS 2013 along with other user applications. Like
> choosing configuration “release | win32” would build all 32-bit
> applications and “release” command for driver project would expand to all
> supported platforms.
>
> Thanks,
> Suresh
>
>
> On Thu, Sep 25, 2014 at 2:22 AM, Pavel A. wrote:
>
>> On 24-Sep-2014 20:25, Tim Roberts wrote:
>>
>>> I wrote a Python script that
>>> reads the current vcxproj file, and calls msbuild for each
>>> configuration/platform combination it finds. Very handy.
>>>
>>>
>> We did something different for integration of pre-win8 WDK
>> into VS solutions with application or other usermode components.
>> We had basically a chain of three small batch files:
>>
>> The 1st script maps VC++ project configuration to WDK configuration(s)
>> and calls ddkbuild or its analog.
>> This allows things like building several driver binaries for one
>> solution configuration. Developer can mix and match drivers with usermode
>> stuff in any combination.
>> For example, a certain configuration builds single set of usermode
>> binaries with three driver binaries for winxp, 2k and win7. Or, one can
>> choose to build x86 and x64 drivers at once, debug and release.
>>
>> So the build command in the vcproj is:
>>
>> >> BuildCommandLine=“$(BLDCMD) $(ConfigurationName) $(PlatformName)”
>> …
>>
>> where BLDCMD is the 1st script.
>>
>> The 2nd script is some kind of ddkbuild.bat; a wrapper around the WDK
>> build, in one given WDK config.
>>
>> The 3rd script is a kind of binplace, it copies the build products to the
>> output directory of the solution and does any needed postprocessing
>> (signing, storing the PDBs with the package…)
>>
>>
>> The 1st script looks like this:
>>
>> set a_conf=%1
>> set a_platf=%2
>> goto LABEL_%a_conf%%a_platf%
>> …
>>
>> :LABEL_DEBUGX64
>> call :ddkbld WIN7 X64 CHK
>> call :filecopy WIN7 X64 CHK
>> goto :EOF
>>
>> rem Subroutine to call ddkbuild.bat:
>> :ddkbld
>> …
>>
>> rem Subroutine to move build products
>> :filecopy
>> …
>>
>>
>> Oh and we’ve put all this in a VS property sheet (.vspropt or .props) for
>> easy cloning projects.
>> These were the gloomy days before the new, VS-encumbered kit :wink:
>>
>> Regards,
>> – pa
>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>>
>> OSR is HIRING!! See http://www.osr.com/careers
>>
>> 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
>>
>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers 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
>