; ------------------------------------------------------------------------- ; creates a direct HD-Install __FLI4LVER__ ; ; Creation: lanspezi 2005-09-11 ; $Id$ ; ------------------------------------------------------------------------- #include-once Func mkhdinstall () msg_lang_read ("mkhdinstall") Dim $hdfiles[8][3] $hdfiles[0][0] = "\syslinux.cfg" $hdfiles[0][1] = "\SYSLINUX.CFG" $hdfiles[0][2] = $MSG_09_copysyslinux $hdfiles[1][0] = "\kernel" $hdfiles[1][1] = "\KERNEL" $hdfiles[1][2] = $MSG_09_copykernel $hdfiles[2][0] = "\rootfs.img" $hdfiles[2][1] = "\ROOTFS.IMG" $hdfiles[2][2] = $MSG_09_copyrootfstgz $hdfiles[3][0] = "\rc.cfg" $hdfiles[3][1] = "\RC.CFG" $hdfiles[3][2] = $MSG_09_copyrccfg $hdfiles[4][0] = "\boot.msg" $hdfiles[4][1] = "\BOOT.MSG" $hdfiles[4][2] = "BOOTMENU_MAIN" $hdfiles[5][0] = "\boot_s.msg" $hdfiles[5][1] = "\BOOT_S.MSG" $hdfiles[5][2] = "BOOTMENU_STD" $hdfiles[6][0] = "\boot_z.msg" $hdfiles[6][1] = "\BOOT_Z.MSG" $hdfiles[6][2] = "BOOTMENU_END" $hdfiles[7][0] = "\opt.img" $hdfiles[7][1] = "\OPT.IMG" $hdfiles[7][2] = $MSG_09_copyopttarbz2 Dim $res1 Dim $bool_error = "false" Dim $bool_usercancel = "false" Dim $syslinux_option = "" $progressbar = GUICtrlCreateProgress (70,430,520,20) GUICtrlSetData ($progressbar,0) $icon = GUICtrlCreateIcon ("windows\scripts\ico_build.ico",-1, 20,422,32,32) $message = @CRLF & $MSG_LINE & @CRLF & $MSG_09_start & " " fli4lbuild_msg ($message ,1) $drive_fs = DriveGetFileSystem ($drive_hdinstall) If StringLeft ($drive_fs, 3) <> "FAT" then $msg = $MSG_09_wrongfs1 & " (" & $drive_hdinstall & ") " & $MSG_09_wrongfs2 fli4lbuild_errmsg ($msg,1) $bool_error = "true" EndIf If $bool_error = "false" then fli4lbuild_msg (@CRLF & $MSG_09_writesystem & " " ,0) If $boot_type = "hd" OR $boot_type = "integrated" then $syslinux_option = "-ma " else $syslinux_option = "" endif If @OSType = "WIN32_WINDOWS" Then $val = RunWait ("windows\syslinux.com " & $syslinux_option & $drive_hdinstall, @WorkingDir, @SW_HIDE) Else $val = RunWait ("windows\autoit\autoit3.exe windows\scripts\mkhdinstall_syslinux.au3 " & $drive_hdinstall & " " & $syslinux_option, @WorkingDir) EndIf If Not FileExists ($drive_hdinstall & "\ldlinux.sys") then $bool_error = "true" ;ERROR on syslinux else fli4lbuild_msg ($MSG_finished,0) If $boot_type = "integrated" then $n_max = 6 Else $n_max = 7 EndIf For $_n = 0 to $n_max fli4lbuild_msg (@CRLF & $hdfiles[$_n][2] & " " ,0) $res1 = FileCopy ($glob_dir_tmpbuild & $hdfiles[$_n][0], $drive_hdinstall & $hdfiles[$_n][1], 1) If $res1 = -1 then MsgBox (0, $MSG_msgbox_error, $MSG_09_errorcopy & " " & $hdfiles[$_n][0]) $bool_error = "true" ExitLoop EndIf GUICtrlSetData ($progressbar,($_n + 1) * 20 - 10) fli4lbuild_msg ($MSG_finished,0) Next If not FileExists ($drive_hdinstall & "\hd.cfg") then FileWriteLine ($drive_hdinstall & "\hd.cfg", "hd_boot=") EndIf EndIf EndIf If $bool_error = "false" AND $bool_usercancel = "false" then GUICtrlSetData ($progressbar,100) If $verbose = "true" then $msg = @CRLF & $MSG_09_finish1 Else $msg = $MSG_finished EndIf $msg = $msg & @CRLF & $MSG_LINE & @CRLF & $MSG_09_finish2 & @CRLF fli4lbuild_msg ($msg,1) EndIf If $bool_error = "true" then $msg = @CRLF & $MSG_09_error & @CRLF fli4lbuild_errmsg ($msg,0) fli4lbuild_msg ($msg,1) EndIf If $bool_usercancel = "true" then $msg = $MSG_09_cancel & @CRLF fli4lbuild_errmsg ($msg,0) fli4lbuild_msg ($MSG_cancel & @CRLF, 1) EndIf sleep (2000) GUICtrlDelete ($progressbar) GUICtrlDelete ($icon) EndFunc