Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


integrating wdk 7.1 based osr scripts into VS2013?

ChepuriChepuri Member Posts: 42
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

Comments

  • mmmm Member - All Emails Posts: 1,411
    Yeah, they work.



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





    mm

    From: [email protected] [mailto:[email protected]] 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
  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,553
    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: [email protected] [mailto:[email protected]] 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
    d
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,767
    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, [email protected]
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Pavel_APavel_A Member Posts: 2,755
    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:

    <Tool Name="VCNMakeTool"
    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 ;)

    Regards,
    -- pa
  • ChepuriChepuri Member Posts: 42
    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 ;)
    >
    > 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
    >
  • Pavel_APavel_A Member Posts: 2,755
    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
  • Mark_RoddyMark_Roddy Member - All Emails Posts: 4,391
    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 ;)
    >>
    >> 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
    >
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE