home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 July
/
CMCD0704.ISO
/
Software
/
Complet
/
FreeDOS
/
fdbootcd.iso
/
isolinux
/
MAKEISO.BAT
< prev
Wrap
DOS Batch File
|
2004-03-16
|
3KB
|
62 lines
@echo off
if "%OS%"=="Windows_NT" goto MakeIso
if "%_CWD%"=="" buildcd\command.com /C %0
if not "%_CWD%"=="" goto MakeIso
pause bigtime error! Abort!
exit
:MakeIso
set isofile=fdbootcd.iso
cd..
cls
if "%OS%"=="Windows_NT" set basedir=%CD%
if not "%_CWD%"=="" set basedir=%_CWD%
if exist \storeiso.bat call \storeiso.bat
rem ISO with filesize at least 2GB must be put on NTFS ; it may be stored in
rem directory %basedir%, as MKISOFS first scans source, then creates ISO
if not exist %basedir%nul cd..
if not exist %basedir%nul set basedir=%basedir%\
set params=-q -l -N -R -r -boot-info-table -iso-level 4 -no-emul-boot -b isolinux/isolinux.bin
SET MKISOFSRC=%basedir%isolinux\buildcd\mkisofd.rc
if exist %basedir%isolinux\buildcd\mkisofs.exe set mkisoexe=%basedir%isolinux\buildcd\mkisofs.exe
if "%mkisoexe%"=="" for %%d in (%path%) do if exist %%d\mkisofs.exe set mkisoexe=%%d\mkisofs.exe
if "%mkisoexe%"=="" for %%d in (%path%) do if exist %%dmkisofs.exe set mkisoexe=%%dmkisofs.exe
if "%mkisoexe%"=="" goto notool
for %%x in ( \storeiso.bat %basedir%isolinux\buildcd\dfl.exe ) do if not exist %%x goto makedisk
if not "%params2%"=="-f -cache-inodes" goto makedisk
%basedir%isolinux\buildcd\dfl.exe %basedir% link -d
if errorlevel 1 pause ERROR using DFL.exe - please restore duplicate files from backup
goto makedisk
:makedisk
for %%x in ( %CD% %_CWD% ) do if not "%%x"=="" set currdir=%%x
if "%currdir%%isofile%"=="%basedir%%isofile%" del %basedir%%isofile%
cls
set msg=Creating cdrom imagefile %isofile% out of directory %basedir%
echo %msg%
if "%OS%"=="Windows_NT" title %msg%
%mkisoexe% -o %isofile% %params2% %params% %BASEDIR%
if "%isofile%"=="fdbootcd.iso" set isofile=%currdir%%isofile%
if "%errorlevel%"=="0" set msg=Created cdrom imagefile %isofile% out of directory %basedir%
if "%errorlevel%"=="0" goto end
set msg=Error %errorlevel% :
if "%errorlevel%"=="65535" set msg=%msg% Rename isolinux directory and isolinux.bin all lowercase!
if "%errorlevel%"=="13" set msg=%msg% Please remove read-only attribute from file isolinux.bin
del %isofile%
goto end
:notool
echo Error: the program MKISOFS (and possibly Cygwin1.dll) was not found.
echo currently we don't allow the DOS version since the commandline
echo length is too limited. please put Cygwin version of MKISOFS in
echo one of the following directories (path):
for %%x in (%path%) do echo %%x
goto end
:end
echo.
echo %msg%
if "%OS%"=="Windows_NT" title %msg%
pause