You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
55 lines
1.4 KiB
@REM -----------------------------------------------------------------
|
|
@REM
|
|
@REM spcab.cmd - JeremyD
|
|
@REM generates SPn.cab
|
|
@REM
|
|
@REM Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@REM
|
|
@REM -----------------------------------------------------------------
|
|
@if defined _CPCMAGIC goto CPCBegin
|
|
@perl -x "%~f0" %*
|
|
@goto :EOF
|
|
#!perl
|
|
use strict;
|
|
use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
|
|
use lib $ENV{RAZZLETOOLPATH};
|
|
use PbuildEnv;
|
|
use ParseArgs;
|
|
|
|
sub Usage { print<<USAGE; exit(1) }
|
|
spcab [-l <language>]
|
|
|
|
Generates SPn.cab using the file list build_logs\\spdrivers.txt
|
|
generated by spfilelist.cmd.
|
|
USAGE
|
|
|
|
parseargs('?' => \&Usage);
|
|
|
|
|
|
# *** TEMPLATE CODE ***
|
|
$ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
|
|
__END__
|
|
@:CPCBegin
|
|
@set _CPCMAGIC=
|
|
@setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
|
|
@if not defined DEBUG echo off
|
|
@REM *** CMD SCRIPT BELOW ***
|
|
|
|
set FILELIST=%_NTPOSTBLD%\SP\data\drivers.txt
|
|
set CABNAME=%_NTPOSTBLD%\SP\common\SP1.cab
|
|
set EVENTNAME=spcab
|
|
|
|
if not exist %FILELIST% (
|
|
call logmsg.cmd "no driver list, skipping SP1.cab"
|
|
exit /b 0
|
|
)
|
|
|
|
if not exist %_NTPOSTBLD%\SP\common mkdir %_NTPOSTBLD%\SP\common
|
|
|
|
start /min cmd /c %RazzleToolPath%\PostBuildScripts\CabWrapper.cmd %FILELIST% %CABNAME% %EVENTNAME%
|
|
perl %RazzleToolPath%\PostBuildScripts\cmdevt.pl -iwv %EVENTNAME%
|
|
|
|
if not exist %CABNAME% (
|
|
call errmsg.cmd "sp cab generation failed"
|
|
exit /b 1
|
|
)
|