Source code of Windows XP (NT5)
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

  1. @setlocal
  2. @if "%_echo%"=="" echo off
  3. set bldtools=%~dp0
  4. path %bldtools%;%path%
  5. call %1 %1 %2 %3 %4 %5 %6 %7 %8 %9
  6. set logfile=%logpath%\%~n0.log
  7. for %%f in (%logfile%) do mkdir %%~dpf 2>nul
  8. for %%f in (%patching%\update\z) do mkdir %%~dpf 2>nul
  9. echo %~n0: start %date% %time% > %logfile%
  10. if exist %patching%\update\update.url del %patching%\update\update.url
  11. call %bldtools%\setlog %loglinkpath% %logpath%
  12. for %%c in (%cablist%) do if not exist %newfiles%\%%c goto failed
  13. rem create url.inc
  14. if %psfname%.==. set psfname=prebuilt
  15. for %%f in (%psfname%) do echo %server%/%%~nxf> %patching%\url.inc
  16. rem build each cabinet .inc list
  17. for %%c in (%cablist%) do listcab %newfiles%\%%c " %%s" /out:%patching%\%%~nc.inc
  18. rem build [SourceDisksFiles] list
  19. for %%c in (%cablist%) do listcab %newfiles%\%%c " %%s=1" /out:%patching%\%%~nc.sdf
  20. echo. | findstr "nothere" > %patching%\all
  21. for %%c in (%cablist%) do copy %patching%\all+%patching%\%%~nc.sdf %patching%\all2 >nul & del %patching%\all & ren %patching%\all2 all
  22. sort < %patching%\all > %patching%\sorted
  23. uniq < %patching%\sorted > %patching%\sdf.inc
  24. rem compose update.url using C preprocessor
  25. echo cl -nologo -C -EP -Tc %template% -I %patching% \> %patching%\update\update.url >>%logfile%
  26. cl -nologo -C -EP -Tc %template% -I %patching% > %patching%\update\update.url 2>>%logfile%
  27. rem clean up
  28. for %%c in (%cablist%) do del %patching%\%%~nc.inc %patching%\%%~nc.sdf
  29. del %patching%\url.inc
  30. del %patching%\sdf.inc
  31. del %patching%\all
  32. del %patching%\sorted
  33. goto done
  34. :failed
  35. for %%c in (%cablist%) do if not exist %newfiles%\%%c echo %~n0: File %newfiles%\%%c not found.
  36. goto leave
  37. :done
  38. echo %~n0 finished %patching%\update\update.url
  39. :leave
  40. echo %~n0: end %date% %time% >> %logfile%
  41. endlocal