mirror of https://github.com/tongzx/nt5src
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.
64 lines
2.0 KiB
64 lines
2.0 KiB
@setlocal
|
|
@if "%_echo%"=="" echo off
|
|
|
|
set bldtools=%~dp0
|
|
path %bldtools%;%path%
|
|
|
|
call %1 %1 %2 %3 %4 %5 %6 %7 %8 %9
|
|
|
|
set logfile=%logpath%\%~n0.log
|
|
|
|
for %%f in (%logfile%) do mkdir %%~dpf 2>nul
|
|
for %%f in (%patching%\update\z) do mkdir %%~dpf 2>nul
|
|
echo %~n0: start %date% %time% > %logfile%
|
|
if exist %patching%\update\update.url del %patching%\update\update.url
|
|
call %bldtools%\setlog %loglinkpath% %logpath%
|
|
|
|
for %%c in (%cablist%) do if not exist %newfiles%\%%c goto failed
|
|
|
|
rem create url.inc
|
|
|
|
if %psfname%.==. set psfname=prebuilt
|
|
for %%f in (%psfname%) do echo %server%/%%~nxf> %patching%\url.inc
|
|
|
|
rem build each cabinet .inc list
|
|
|
|
for %%c in (%cablist%) do listcab %newfiles%\%%c " %%s" /out:%patching%\%%~nc.inc
|
|
|
|
rem build [SourceDisksFiles] list
|
|
|
|
for %%c in (%cablist%) do listcab %newfiles%\%%c " %%s=1" /out:%patching%\%%~nc.sdf
|
|
echo. | findstr "nothere" > %patching%\all
|
|
for %%c in (%cablist%) do copy %patching%\all+%patching%\%%~nc.sdf %patching%\all2 >nul & del %patching%\all & ren %patching%\all2 all
|
|
sort < %patching%\all > %patching%\sorted
|
|
uniq < %patching%\sorted > %patching%\sdf.inc
|
|
|
|
rem compose update.url using C preprocessor
|
|
|
|
echo cl -nologo -C -EP -Tc %template% -I %patching% \> %patching%\update\update.url >>%logfile%
|
|
cl -nologo -C -EP -Tc %template% -I %patching% > %patching%\update\update.url 2>>%logfile%
|
|
|
|
rem clean up
|
|
|
|
for %%c in (%cablist%) do del %patching%\%%~nc.inc %patching%\%%~nc.sdf
|
|
del %patching%\url.inc
|
|
del %patching%\sdf.inc
|
|
del %patching%\all
|
|
del %patching%\sorted
|
|
|
|
goto done
|
|
|
|
:failed
|
|
|
|
for %%c in (%cablist%) do if not exist %newfiles%\%%c echo %~n0: File %newfiles%\%%c not found.
|
|
goto leave
|
|
|
|
:done
|
|
|
|
echo %~n0 finished %patching%\update\update.url
|
|
|
|
:leave
|
|
|
|
echo %~n0: end %date% %time% >> %logfile%
|
|
|
|
endlocal
|