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.

69 lines
1.7 KiB

  1. @echo off
  2. if DEFINED verbose set echo on
  3. if DEFINED _echo set echo on
  4. setlocal
  5. if CMDEXTVERSION 1 goto cmdok
  6. echo.
  7. echo This script requires CMD version 4.0 or better with
  8. echo CMD extensions version 1 enabled.
  9. goto end
  10. :cmdok
  11. REM
  12. REM Main hard-coded parameters
  13. REM
  14. set ARCH=%PROCESSOR_ARCHITECTURE%
  15. set TARGET=%BINARIES%\oleds
  16. set WIN95TARGET=%BINARIES%\oleds\win95
  17. if not exist %TARGET% goto badcdfdir
  18. if /i "%1" == "win95" goto do_win95
  19. REM Make the standard CDF:
  20. call :makecdf ads.cdf %TARGET% ads.exe license.txt setup\ads.cdf
  21. goto end
  22. :do_win95
  23. REM Make the Win95 and win98 CDF (on x86 only):
  24. if /i NOT "%ARCH%" == "x86" goto end
  25. call :makecdf ads95.cdf %WIN95TARGET% ads95.exe license.txt setup\ads95.cdf
  26. call :makecdf ads98.cdf %WIN95TARGET% ads98.exe license.txt setup\ads98.cdf
  27. call :makecdf ads95vc.cdf %WIN95TARGET% ads95vc.exe license.txt setup\ads95vc.cdf
  28. call :makecdf ads98vc.cdf %WIN95TARGET% ads98vc.exe license.txt setup\ads98vc.cdf
  29. goto end
  30. :makecdf
  31. if "%1" == "" goto makecdfusage
  32. if "%2" == "" goto makecdfusage
  33. if "%3" == "" goto makecdfusage
  34. if "%4" == "" goto makecdfusage
  35. if "%5" == "" goto makecdfusage
  36. set CDF_FILE=%2\%1
  37. set CDF_TARGETNAME=%2\%3
  38. set CDF_SOURCEFILES=%2\
  39. set CDF_LICENSEFILE=%2\%4
  40. set CDF_CPP=%5
  41. cl /EP /DLICENSEFILE=quote(%CDF_LICENSEFILE%) /DTARGETNAME=quote(%CDF_TARGETNAME%) /DSOURCEFILES=quote(%CDF_SOURCEFILES%) %CDF_CPP% > %CDF_FILE%
  42. if errorlevel 1 set /A ERRORCOUNT=%ERRORCOUNT%+1
  43. goto :EOF
  44. :makecdfusage
  45. echo.
  46. echo ERROR: usage: call :makecdf ^<cdf name^> ^<target dir^> ^<exe name^> ^<license name^> ^<base_cdf path^>
  47. echo.
  48. set /A ERRORCOUNT=%ERRORCOUNT%+1
  49. goto :EOF
  50. :badcdfdir
  51. echo Bad directory: %CDF_DIR%
  52. goto end
  53. :end
  54. endlocal