home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Complet / FreeDOS / fdbootcd.iso / isolinux / MAKEISO.BAT < prev   
DOS Batch File  |  2004-03-16  |  3KB  |  62 lines

  1. @echo off
  2. if "%OS%"=="Windows_NT" goto MakeIso
  3. if "%_CWD%"=="" buildcd\command.com /C %0
  4. if not "%_CWD%"=="" goto MakeIso
  5. pause bigtime error! Abort!
  6. exit
  7.  
  8. :MakeIso
  9. set isofile=fdbootcd.iso
  10. cd..
  11. cls
  12. if "%OS%"=="Windows_NT" set basedir=%CD%
  13. if not "%_CWD%"=="" set basedir=%_CWD%
  14. if exist \storeiso.bat call \storeiso.bat
  15.  
  16. rem ISO with filesize at least 2GB must be put on NTFS ; it may be stored in
  17. rem directory %basedir%, as MKISOFS first scans source, then creates ISO
  18. if not exist %basedir%nul cd..
  19. if not exist %basedir%nul set basedir=%basedir%\
  20.  
  21. set params=-q -l -N -R -r -boot-info-table -iso-level 4 -no-emul-boot -b isolinux/isolinux.bin
  22. SET MKISOFSRC=%basedir%isolinux\buildcd\mkisofd.rc
  23. if exist %basedir%isolinux\buildcd\mkisofs.exe set mkisoexe=%basedir%isolinux\buildcd\mkisofs.exe
  24. if "%mkisoexe%"=="" for %%d in (%path%) do if exist %%d\mkisofs.exe set mkisoexe=%%d\mkisofs.exe
  25. if "%mkisoexe%"=="" for %%d in (%path%) do if exist %%dmkisofs.exe set mkisoexe=%%dmkisofs.exe
  26. if "%mkisoexe%"=="" goto notool
  27. for %%x in ( \storeiso.bat %basedir%isolinux\buildcd\dfl.exe ) do if not exist %%x goto makedisk
  28. if not "%params2%"=="-f -cache-inodes" goto makedisk
  29. %basedir%isolinux\buildcd\dfl.exe %basedir% link -d
  30. if errorlevel 1 pause ERROR using DFL.exe - please restore duplicate files from backup
  31. goto makedisk
  32.  
  33. :makedisk
  34. for %%x in ( %CD% %_CWD% ) do if not "%%x"=="" set currdir=%%x
  35. if "%currdir%%isofile%"=="%basedir%%isofile%" del %basedir%%isofile%
  36. cls
  37. set msg=Creating cdrom imagefile %isofile% out of directory %basedir%
  38. echo %msg%
  39. if "%OS%"=="Windows_NT" title %msg%
  40. %mkisoexe% -o %isofile% %params2% %params% %BASEDIR%
  41. if "%isofile%"=="fdbootcd.iso" set isofile=%currdir%%isofile%
  42. if "%errorlevel%"=="0" set msg=Created cdrom imagefile %isofile% out of directory %basedir%
  43. if "%errorlevel%"=="0" goto end
  44. set msg=Error %errorlevel% :
  45. if "%errorlevel%"=="65535" set msg=%msg% Rename isolinux directory and isolinux.bin all lowercase!
  46. if "%errorlevel%"=="13" set msg=%msg% Please remove read-only attribute from file isolinux.bin 
  47. del %isofile%
  48. goto end
  49.  
  50. :notool
  51. echo Error: the program MKISOFS (and possibly Cygwin1.dll) was not found.
  52. echo        currently we don't allow the DOS version since the commandline
  53. echo        length is too limited. please put Cygwin version of MKISOFS in
  54. echo        one of the following directories (path):
  55. for %%x in (%path%) do echo %%x
  56. goto end
  57.  
  58. :end
  59. echo.
  60. echo %msg%
  61. if "%OS%"=="Windows_NT" title %msg%  
  62. pause