⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ddkbuild.bat

📁 经典的文件透明加解密程序
💻 BAT
📖 第 1 页 / 共 2 页
字号:
@echo OSR DDKBUILD.BAT V6.12 - OSR, Open Systems Resources, Inc.
@echo off
rem /////////////////////////////////////////////////////////////////////////////
rem //
rem //    This sofware is supplied for instructional purposes only.
rem //
rem //    OSR Open Systems Resources, Inc. (OSR) expressly disclaims any warranty
rem //    for this software.  THIS SOFTWARE IS PROVIDED  "AS IS" WITHOUT WARRANTY
rem //    OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION,
rem //    THE IMPLIED WARRANTIES OF MECHANTABILITY OR FITNESS FOR A PARTICULAR
rem //    PURPOSE.  THE ENTIRE RISK ARISING FROM THE USE OF THIS SOFTWARE REMAINS
rem //    WITH YOU.  OSR's entire liability and your exclusive remedy shall not
rem //    exceed the price paid for this material.  In no event shall OSR or its
rem //    suppliers be liable for any damages whatsoever (including, without
rem //    limitation, damages for loss of business profit, business interruption,
rem //    loss of business information, or any other pecuniary loss) arising out
rem //    of the use or inability to use this software, even if OSR has been
rem //    advised of the possibility of such damages.  Because some states/
rem //    jurisdictions do not allow the exclusion or limitation of liability for
rem //    consequential or incidental damages, the above limitation may not apply
rem //    to you.
rem //
rem //    OSR Open Systems Resources, Inc.
rem //    105 Route 101A Suite 19
rem //    Amherst, NH 03031  (603) 595-6500 FAX: (603) 595-6503
rem //    email bugs to: bugs@osr.com
rem //
rem //
rem //    MODULE:
rem //
rem //        ddkbuild.bat 
rem //
rem //    ABSTRACT:
rem //
rem //      This file allows drivers to be build with visual studio and visual studio.net
rem //
rem //    AUTHOR(S):
rem //
rem //        OSR Open Systems Resources, Inc.
rem // 
rem //    REVISION:   V6.12
rem //
rem //      Clean up batch procedure to make it easier to process.
rem //
rem //
rem //    REQUIREMENTS:  Environment variables that must be set.
rem //
rem //		NT4BASE - must be set up by user to point to NT4 DDK. (e.g. D:\NT4DDK )
rem //      W2KBASE - must be set up by user to point to W2K DDK  (e.g D:\Nt50DDK )
rem //      WXPBASE - must be set up by user to point to WXP DDK  (e.g D:\WINDDK\2600)
rem //      WNETBASE - must be set up by user to point to WNET DDK (e.g D:\WINDDK\1830) 
rem //      WLHBASE  - must be set up by user to point to WNET DDK (e.g D:\WINDDK\5112) 
rem //
rem //
rem //    COMMAND FORMAT:
rem //
rem //		ddkbuild -PLATFORM BUILDTYPE DIRECTORY [FLAGS] [-WDF] [-PREFAST]
rem //
rem //              PLATFORM is either 
rem //                   WXP, WXP64, WXP2K - builds using WXP DDK
rem //                   W2K, W2K64,  - builds using W2k DDK
rem //                   WNET, WNET64, WNET2K, WNETXP, WNETXP64 - builds using WNET DDK
rem //                   WNETAMD64  for an AMD64/EM64T WNET build using the WNET DDK
rem //                   WLH, WLHNET, WLHNETX64, WLHNETI64, WLH2K, WLHXP - builds using WLH DDK
rem //                   WLHX64 for an AMD64/EM64T WNET build using the WLH DDK
rem //                   WLHI64 for IA64 use WLH DDK 
rem //                   NT4  - build using NT4 DDK (NT4 is the default)
rem //              BUILDTYPE - free, checked, chk or fre
rem //				DIRECTORY is the path to the directory to be build.  It can be "."
rem //              FLAGS - build flags e.g. -cZ etc.   
rem //              -WDF  - allows the user to perform a Windows Driver Framework build.
rem //                      this has been tested with the 01.00.5054 version of the 
rem //                      framework.
rem //              -PREFAST - performs a prefast build, if prefast is available.
rem //
rem //	  BROWSE FILES:
rem //	
rem //       This procedure supports the building of BROWSE files to be used by 
rem //       Visual Studio 6 and by Visual Studio.Net  However, the BSCfiles created
rem //       by bscmake for the 2 studios are not compatible. When this command procedure
rem //       runs, it selects the first bscmake.exe found in the path.   So, make
rem //       sure that the correct bscmake.exe is in the path....  
rem // 
rem //       Note that if using Visual Studio.NET the .BSC must be added to the project
rem //       in order for the project to be browsed.
rem //
rem //    COMPILERS:
rem //
rem //        If you are building NT4 you should really
rem //        be using the VC 6 compiler.   Later versions of the DDK now contain the
rem //        compiler and the linker.  This procedure should use the correct compiler.
rem //       
rem //    GENERAL COMMENTS:
rem //        This procedure has been cleaned up to be modular and easy to
rem //		  understand.
rem //
rem //		  As of the Server 2003 SP1 DDK ddkbuild now clears the
rem //        NO_BROWSE_FILE and NO_BINPLACE environment variables so that users
rem //        can use these features.
rem //
rem ///////////////////////////////////////////////////////////////////////////////

set scriptDebug=off
setlocal ENABLEEXTENSIONS

rem Check whether FINDSTR is available. It's used to show warnings etc.
findstr /? > NUL 2>&1 || echo "FINDSTR is a prerequisite but wasn't found!" && goto :EOF

@echo %scriptDebug%

rem //
rem // clear the error code variable
rem //
set error_code=0
set prefast_build=0
set BUILD_DEBUG=1
set VS_UNICODE_OUTPUT=
rem //
rem // determine what type of build is to be done.
rem //
if /I %1 EQU -NT4       goto NT4Build
if /I %1 EQU -WNET2K    goto WNET2KBuild
if /I %1 EQU -WNETXP    goto WNETXPBuild
if /I %1 EQU -WNETXP64  goto WNETXP64Build
if /I %1 EQU -WNET64    goto WNET64Build
if /I %1 EQU -WNETAMD64 goto WNETAMD64Build
if /I %1 EQU -WNET      goto WNETBuild
if /I %1 EQU -WXP64     goto WXP64Build
if /I %1 EQU -WXP       goto WXPBuild
if /I %1 EQU -WXP2K     goto WXP2KBuild
if /I %1 EQU -W2K64     goto W2K64Build
if /I %1 EQU -W2K       goto W2KBuild
if /I %1 EQU -WLH       goto WLHBuild
if /I %1 EQU -WLHX64    goto WLHX64Build
if /I %1 EQU -WLHI64    goto WLHI64Build
if /I %1 EQU -WLHNETX64 goto WLHNETX64Build
if /I %1 EQU -WLHNETI64 goto WLHNETI64Build
if /I %1 EQU -WLHXP     goto WLHXPBuild
if /I %1 EQU -WLH2K     goto WLH2KBuild
if /I %1 EQU -WLHNET    goto WLHNETBuild
set error_code=1
goto ErrUnKnownBuildType

rem //
rem // NT 4 Build
rem //
:NT4Build

@echo NT4 BUILD using NT4 DDK

set BASEDIR=%NT4BASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% "%MSDEVDIR%"
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WNET Windows 2000 Build using WNET DDK
rem //

:WNET2KBuild

@echo W2K BUILD using WNET DDK

set BASEDIR=%WNETBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% W2K %mode% 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WXP Build using WNET DDK
rem //
:WNETXPBuild

@echo WXP BUILD using WNET DDK

set BASEDIR=%WNETBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% WXP 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WXP 64 bit Build using WNET DDK
rem //
:WNETXP64Build

@echo WXP 64 BIT BUILD using WNET DDK

set BASEDIR=%WNETBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% 64 WXP 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WNET IA64 bit Build using WNET DDK
rem //
:WNET64Build

@echo WNET 64 BIT BUILD using WNET DDK

set BASEDIR=%WNETBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% 64 WNET 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WNET AMD64 bit Build using WNET DDK
rem //
:WNETAMD64Build

@echo WNET 64 BIT BUILD using WNET DDK

set BASEDIR=%WNETBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% AMD64 WNET 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WNET 32 BIT BUILD using WNET DDK
rem //
:WNETBuild

@echo WNET 32 BIT BUILD using WNET DDK

set BASEDIR=%WNETBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode%
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WXP 64 BIT BUILD using WXP DDK
rem //
:WXP64Build

@echo WXP 64 BIT BUILD using WXP DDK

set BASEDIR=%WXPBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% 64
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WXP 32 BIT BUILD using WXP DDK
rem //
:WXPBuild

@echo WXP 32 BIT BUILD using WXP DDK

set BASEDIR=%WXPBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // W2K 32 BIT BUILD using WXP DDK
rem //
:WXP2KBuild

@echo W2K 32 BIT BUILD using WXP DDK

set BASEDIR=%WXPBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\w2k\set2k.bat" %BASEDIR% %mode% 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // W2K 64 BIT BUILD using W2K DDK
rem //
:W2K64Build

@echo W2K 64 BIT BUILD using W2K DDK

set BASEDIR=%W2KBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv64.bat" %BASEDIR% %mode% 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // W2K 32 BIT BUILD using W2K DDK
rem //
:W2KBuild

@echo W2K 32 BIT BUILD using W2K DDK

set BASEDIR=%W2KBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% 
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WLH 32 BIT BUILD using WLH DDK
rem //
:WLHBuild
@echo WLH 32 BIT BUILD using WLH DDK

set BASEDIR=%WLHBASE%

shift

if "%BASEDIR%"=="" goto ErrNoBASEDIR
call :MakeShort BASEDIR "%BASEDIR%"

set path=%BASEDIR%\bin;%path%

call :SetMode %1
if "%error_code%" NEQ "0" goto ErrBadMode

call :CheckTargets %2
if "%error_code%" NEQ "0" goto ErrNoDir

pushd .
call "%BASEDIR%\bin\setenv.bat" %BASEDIR% %mode% WLH
popd

@echo %scriptDebug%

goto RegularBuild

rem //
rem // WLH X64 BIT BUILD using WLH DDK
rem //
:WLHX64Build

@echo WLH X64 BIT BUILD using WLH DDK

set BASEDIR=%WLHBASE%

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -