; ------------------------------------------------------------------------- ; creates a fli4l-isoimage __FLI4LVER__ ; ; Creation: lanspezi 2005-04-04 ; $Id$ ; ------------------------------------------------------------------------- #include-once Func mkiso () msg_lang_read ("mkiso") $message = @CRLF & $MSG_LINE & @CRLF & $MSG_06_createisoimage & " " fli4lbuild_msg ($message,1) $progressbar = GUICtrlCreateProgress (70,430,520,20) GUICtrlSetData ($progressbar,0) $icon = GUICtrlCreateIcon ("windows\scripts\ico_cd.ico",-1, 20,422,32,32) fli_DirCreate ($glob_dir_tmpbuild & "\iso") FileCopy ( "img\isolinux.bin", $glob_dir_tmpbuild & "\iso\isolinux.bin",1) FileCopy ($glob_dir_tmpbuild & "\syslinux.cfg", $glob_dir_tmpbuild & "\iso\isolinux.cfg",1) FileCopy ($glob_dir_tmpbuild & "\kernel", $glob_dir_tmpbuild & "\iso\KERNEL",1) FileCopy ($glob_dir_tmpbuild & "\rootfs.img", $glob_dir_tmpbuild & "\iso\ROOTFS.IMG",1) FileCopy ($glob_dir_tmpbuild & "\rc.cfg", $glob_dir_tmpbuild & "\iso\rc.cfg",1) FileCopy ($glob_dir_tmpbuild & "\opt.tar", $glob_dir_tmpbuild & "\iso\opt.img",1) FileCopy ($dir_build & "\boot.msg", $glob_dir_tmpbuild & "\iso\BOOT.MSG",1) GUICtrlSetData ($progressbar,50) $message = @CRLF & $MSG_06_buildisoimage & $dir_build & "\fli4l.iso'" fli4lbuild_msg ($message,0) $run_call = StringFormat ('windows\\mkisofs -A fli4l -V fli4l -J -r -o "%s\\fli4l.iso" ' & _ '-b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ' & _ '-input-charset default "%s\\iso"', $dir_build, $glob_dir_tmpbuild) $val = RunWait ($run_call, @WorkingDir, @SW_HIDE) GUICtrlSetData ($progressbar,90) DirRemove ($glob_dir_tmpbuild & "\iso", 1) If $verbose = "true" then $message = @CRLF & $MSG_06_finish1 Else $message = $MSG_finished EndIf $message = $message & @CRLF & $MSG_LINE & @CRLF & $MSG_06_finish2 & @CRLF fli4lbuild_msg ($message,1) GUICtrlSetData ($progressbar,100) sleep (2000) GUICtrlDelete ($progressbar) GUICtrlDelete ($icon) EndFunc Func mkiso_emul () msg_lang_read ("mkiso") $message = @CRLF & $MSG_LINE & @CRLF & $MSG_06_createisoimage & " " fli4lbuild_msg ($message,1) $progressbar = GUICtrlCreateProgress (70,430,520,20) GUICtrlSetData ($progressbar,0) $icon = GUICtrlCreateIcon ("windows\scripts\ico_cd.ico",-1, 20,422,32,32) fli_DirCreate ($glob_dir_tmpbuild & "\iso") FileCopy ("img\cdemul.img.gz", $glob_dir_tmpbuild & "\floppy.img.gz", 1) $run_call = StringFormat('"%s\\windows\\gzip.exe" -dqf floppy.img.gz', $dir_base) RunWait ($run_call, $glob_dir_tmpbuild, @SW_HIDE) ; These files require capitalization when build under Windows XP. ; Direct rename to the same name but capitalized is not possible. FileMove ($glob_dir_tmpbuild & "\syslinux.cfg", $glob_dir_tmpbuild & "\syslinux.tmp",1) FileMove ($glob_dir_tmpbuild & "\syslinux.tmp", $glob_dir_tmpbuild & "\SYSLINUX.CFG",1) FileMove ($glob_dir_tmpbuild & "\kernel", $glob_dir_tmpbuild & "\kernel.tmp",1) FileMove ($glob_dir_tmpbuild & "\kernel.tmp", $glob_dir_tmpbuild & "\KERNEL",1) FileMove ($glob_dir_tmpbuild & "\rootfs.img", $glob_dir_tmpbuild & "\rootfs.tmp",1) FileMove ($glob_dir_tmpbuild & "\rootfs.tmp", $glob_dir_tmpbuild & "\ROOTFS.IMG",1) FileCopy ($dir_build & "\boot.msg", $glob_dir_tmpbuild & "\BOOT.MSG",1) $run_call = StringFormat('"%s\\windows\\extract.exe" -i floppy.img SYSLINUX.CFG KERNEL ROOTFS.IMG rc.cfg BOOT.MSG', $dir_base) $res=RunWait ($run_call, $glob_dir_tmpbuild, @SW_HIDE) FileCopy ($glob_dir_tmpbuild & "\floppy.img", $glob_dir_tmpbuild & "\iso\floppy.img",1) FileCopy ($glob_dir_tmpbuild & "\rc.cfg", $glob_dir_tmpbuild & "\iso\rc.cfg",1) If FileExists ($glob_dir_tmpbuild & "\opt.tar") then FileCopy ($glob_dir_tmpbuild & "\opt.tar", $glob_dir_tmpbuild & "\iso\opt.img",1) EndIf If FileExists ($glob_dir_tmpbuild & "\opt.img") then FileCopy ($glob_dir_tmpbuild & "\opt.img", $glob_dir_tmpbuild & "\iso\opt.img",1) EndIf GUICtrlSetData ($progressbar,50) $message = @CRLF & $MSG_06_buildisoimage & $dir_build & "\fli4l.iso'" fli4lbuild_msg ($message,0) $run_call = StringFormat ('windows\\mkisofs -A fli4l -V fli4l -J -r -o "%s\\fli4l.iso" ' & _ '-b floppy.img -c boot.cat ' & _ '-input-charset default "%s\\iso"', $dir_build, $glob_dir_tmpbuild) $val = RunWait ($run_call, @WorkingDir, @SW_HIDE) GUICtrlSetData ($progressbar,90) DirRemove ($glob_dir_tmpbuild & "\iso", 1) If $verbose = "true" then $message = @CRLF & $MSG_06_finish1 Else $message = $MSG_finished EndIf $message = $message & @CRLF & $MSG_LINE & @CRLF & $MSG_06_finish2 & @CRLF fli4lbuild_msg ($message,1) GUICtrlSetData ($progressbar,100) sleep (2000) GUICtrlDelete ($progressbar) GUICtrlDelete ($icon) EndFunc