diff --git a/build/AUTO.ISO b/build/AUTO.ISO index 1516d807..3cc1fab1 100755 Binary files a/build/AUTO.ISO and b/build/AUTO.ISO differ diff --git a/src/Misc/Auto/AutoFullDistro0.ZC b/src/Misc/Auto/AutoFullDistro0.ZC index acf30208..21e8914c 100755 --- a/src/Misc/Auto/AutoFullDistro0.ZC +++ b/src/Misc/Auto/AutoFullDistro0.ZC @@ -25,7 +25,7 @@ U0 Auto() Free(in_str); in_str = MStrPrint( "BootHDIns;" "OnceFlush;" - "Once(\"#include \\\"/Misc/Auto/AutoFullDistro00\\\";;Auto;\");" + "Once(\"#include \\\"/Misc/Auto/AutoFullDistro1\\\";;Auto;\");" "Reboot;"); OnceDrive('C', in_str); OutU8(0x501,0x31); diff --git a/src/Misc/Auto/AutoFullDistro00.ZC b/src/Misc/Auto/AutoFullDistro00.ZC deleted file mode 100755 index dfdfb802..00000000 --- a/src/Misc/Auto/AutoFullDistro00.ZC +++ /dev/null @@ -1,37 +0,0 @@ -U0 Auto() -{ - I64 i, ata_port = -1; - CAHCIPort *port; - U8 *in_str; - - for (i = 0; i < AHCI_MAX_PORTS; i++) - - { - if (PCIBt(&blkdev.ahci_hba->ports_implemented, i)) - { - port = &blkdev.ahci_hba->ports[i]; - if (port->signature == AHCI_PxSIG_ATA) - { - ata_port = i; - break; - } - } - } - - WinMax; - BootMHDIns('C'); - Copy("C:/Tmp/OSBuild/Kernel/KStart16.ZC", "C:/Kernel/"); - Copy("C:/Tmp/OSBuild/Kernel/KernelA.HH", "C:/Kernel/"); - in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); - Sleep(700); - In(in_str); - BootHDIns; - OnceFlush; - Free(in_str); - in_str = MStrPrint( "OnceFlush;" - "Once(\"#include \\\"/Misc/Auto/AutoFullDistro000\\\";;Auto;\");" - "Reboot;"); - OnceDrive('C', in_str); - Reboot; -} -Auto; diff --git a/src/Misc/Auto/AutoFullDistro000.ZC b/src/Misc/Auto/AutoFullDistro000.ZC deleted file mode 100755 index df4c90ca..00000000 --- a/src/Misc/Auto/AutoFullDistro000.ZC +++ /dev/null @@ -1,36 +0,0 @@ -U0 Auto() -{ - I64 i, ata_port = -1; - CAHCIPort *port; - U8 *in_str; - - for (i = 0; i < AHCI_MAX_PORTS; i++) - - { - if (PCIBt(&blkdev.ahci_hba->ports_implemented, i)) - { - port = &blkdev.ahci_hba->ports[i]; - if (port->signature == AHCI_PxSIG_ATA) - { - ata_port = i; - break; - } - } - } - - WinMax; - BootMHDIns('C'); - CopyTree("C:/Tmp/OSBuild/Kernel/", "C:/Kernel/"); - in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); - Sleep(700); - In(in_str); - BootHDIns; - OnceFlush; - Free(in_str); - in_str = MStrPrint( "OnceFlush;" - "Once(\"#include \\\"/Misc/Auto/AutoFullDistro0000\\\";;Auto;\");" - "Reboot;"); - OnceDrive('C', in_str); - Reboot; -} -Auto; diff --git a/src/Misc/Auto/AutoFullDistro1.ZC b/src/Misc/Auto/AutoFullDistro1.ZC index 6018209f..df207faf 100755 --- a/src/Misc/Auto/AutoFullDistro1.ZC +++ b/src/Misc/Auto/AutoFullDistro1.ZC @@ -1,4 +1,37 @@ U0 Auto() { - PopUp("#include \"/Misc/Auto/AutoFullDistro2\""); -} \ No newline at end of file + I64 i, ata_port = -1; + CAHCIPort *port; + U8 *in_str; + + for (i = 0; i < AHCI_MAX_PORTS; i++) + + { + if (PCIBt(&blkdev.ahci_hba->ports_implemented, i)) + { + port = &blkdev.ahci_hba->ports[i]; + if (port->signature == AHCI_PxSIG_ATA) + { + ata_port = i; + break; + } + } + } + + WinMax; + BootMHDIns('C'); + Copy("C:/Tmp/OSBuild/Kernel/KStart16.ZC", "C:/Kernel/"); + Copy("C:/Tmp/OSBuild/Kernel/KernelA.HH", "C:/Kernel/"); + in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); + Sleep(700); + In(in_str); + BootHDIns; + OnceFlush; + Free(in_str); + in_str = MStrPrint( "OnceFlush;" + "Once(\"#include \\\"/Misc/Auto/AutoFullDistro2\\\";;Auto;\");" + "Reboot;"); + OnceDrive('C', in_str); + Reboot; +} +Auto; diff --git a/src/Misc/Auto/AutoFullDistro2.ZC b/src/Misc/Auto/AutoFullDistro2.ZC index 962128f6..4f0bd44f 100755 --- a/src/Misc/Auto/AutoFullDistro2.ZC +++ b/src/Misc/Auto/AutoFullDistro2.ZC @@ -1,74 +1,36 @@ -#define STD_DISTRO_DVD_CONFIG "TB\nScale2Mem(2048,0x40000)\nT\n\n\n\n" - -U0 MakeMyISO() +U0 Auto() { - U8 *_out_iso_filename = "/Tmp/MyDistro.ISO.C"; - U8 *out_iso_filename = FileNameAbs(_out_iso_filename); - I64 line_count = LineRep("/*", "-r") + LineRep("/System/*") + LineRep("/Compiler/*", "-S+$$") + LineRep("/Kernel/*"); + I64 i, ata_port = -1; + CAHCIPort *port; + U8 *in_str; + + for (i = 0; i < AHCI_MAX_PORTS; i++) - if (!DriveIsWritable) { - "Drive must be writable. Install on Hard drive, first.\n"; - return; + if (PCIBt(&blkdev.ahci_hba->ports_implemented, i)) + { + port = &blkdev.ahci_hba->ports[i]; + if (port->signature == AHCI_PxSIG_ATA) + { + ata_port = i; + break; + } + } } - DocTreeFWrite("/System/Define.ZC", "LineRep", "DefinePrint(\"DD_ZEALOS_LOC\",\"%,d\");\n", line_count); - DefinePrint("DD_ZEALOS_LOC", "%,d", line_count); - - "Total LOC:%12,d\n\n", line_count; - - DelTree("/Distro"); - Del(out_iso_filename); - - ProgressBarsReset; - progress1_max = 14; - StrCopy(progress1_desc, "Copying files to /Distro"); - - DirMake("/Distro"); - In(STD_DISTRO_DVD_CONFIG); - BootDVDIns; - progress1++; - - Copy("/*", "/Distro"); - progress1++; - DirMake("/Distro" BOOT_DIR); - Move(BOOT_DIR_DVD_KERNEL_ZXE, "/Distro" BOOT_DIR_KERNEL_ZXE); - progress1++; - CopyTree("/Home", "/Distro/Home"); - progress1++; - Del("/Distro/Home/Registry.ZC"); - CopyTree("/System", "/Distro/System"); - progress1++; - CopyTree("/Apps", "/Distro/Apps"); - progress1++; - CopyTree("/Compiler", "/Distro/Compiler"); - progress1++; - CopyTree("/Demo", "/Distro/Demo"); - progress1++; - CopyTree("/Doc", "/Distro/Doc"); - progress1++; - CopyTree("/Kernel", "/Distro/Kernel"); - progress1++; - CopyTree("/Misc", "/Distro/Misc"); - progress1++; - - CopyTree("/Downloads", "/Distro/Downloads"); - progress1++; - DirMake("/Distro/Tmp"); - DirMake("/Distro/Tmp/ScreenShots"); - progress1++; - StrCopy(progress1_desc, "Building ISO"); - RedSeaISO(out_iso_filename, "/Distro", "/Distro" BOOT_DIR_KERNEL_ZXE); - progress1++; - - //If CD-ROM use MT_CD instead of MT_DVD. - //DVDImageWrite('T',out_iso_filename,MT_DVD); //Uncomment to burn. - - Copy("/Distro" BOOT_DIR_KERNEL_ZXE, "/Tmp/DVD" KERNEL_ZXE); - - DelTree("/Distro"); - ProgressBarsReset; - Free(out_iso_filename); + WinMax; + BootMHDIns('C'); + CopyTree("C:/Tmp/OSBuild/Kernel/", "C:/Kernel/"); + in_str = MStrPrint("CC\n%d\n\n\n\n", ata_port); + Sleep(700); + In(in_str); + BootHDIns; + OnceFlush; + Free(in_str); + in_str = MStrPrint( "OnceFlush;" + "Once(\"#include \\\"/Misc/Auto/AutoFullDistro3\\\";;Auto;\");" + "Reboot;"); + OnceDrive('C', in_str); + Reboot; } -MakeMyISO; -OutU8(0x501,0x31); +Auto; diff --git a/src/Misc/Auto/AutoFullDistro0000.ZC b/src/Misc/Auto/AutoFullDistro3.ZC similarity index 89% rename from src/Misc/Auto/AutoFullDistro0000.ZC rename to src/Misc/Auto/AutoFullDistro3.ZC index a85d2fab..e7ec0760 100755 --- a/src/Misc/Auto/AutoFullDistro0000.ZC +++ b/src/Misc/Auto/AutoFullDistro3.ZC @@ -25,7 +25,7 @@ U0 Auto() In(in_str); BootHDIns; OnceFlush; - in_str = MStrPrint("#include \"/Misc/Auto/AutoFullDistro1\";;Auto;;"); + in_str = MStrPrint("#include \"/Misc/Auto/AutoFullDistro4\";;Auto;;"); OnceDrive('C', in_str); DelTree("C:/Tmp/OSBuild"); Reboot; diff --git a/src/Misc/Auto/AutoFullDistro4.ZC b/src/Misc/Auto/AutoFullDistro4.ZC new file mode 100755 index 00000000..bfd5ad96 --- /dev/null +++ b/src/Misc/Auto/AutoFullDistro4.ZC @@ -0,0 +1,4 @@ +U0 Auto() +{ + PopUp("#include \"/Misc/Auto/AutoFullDistro5\""); +} \ No newline at end of file diff --git a/src/Misc/Auto/AutoFullDistro5.ZC b/src/Misc/Auto/AutoFullDistro5.ZC new file mode 100755 index 00000000..962128f6 --- /dev/null +++ b/src/Misc/Auto/AutoFullDistro5.ZC @@ -0,0 +1,74 @@ +#define STD_DISTRO_DVD_CONFIG "TB\nScale2Mem(2048,0x40000)\nT\n\n\n\n" + +U0 MakeMyISO() +{ + U8 *_out_iso_filename = "/Tmp/MyDistro.ISO.C"; + U8 *out_iso_filename = FileNameAbs(_out_iso_filename); + I64 line_count = LineRep("/*", "-r") + LineRep("/System/*") + LineRep("/Compiler/*", "-S+$$") + LineRep("/Kernel/*"); + + if (!DriveIsWritable) + { + "Drive must be writable. Install on Hard drive, first.\n"; + return; + } + + DocTreeFWrite("/System/Define.ZC", "LineRep", "DefinePrint(\"DD_ZEALOS_LOC\",\"%,d\");\n", line_count); + DefinePrint("DD_ZEALOS_LOC", "%,d", line_count); + + "Total LOC:%12,d\n\n", line_count; + + DelTree("/Distro"); + Del(out_iso_filename); + + ProgressBarsReset; + progress1_max = 14; + StrCopy(progress1_desc, "Copying files to /Distro"); + + DirMake("/Distro"); + In(STD_DISTRO_DVD_CONFIG); + BootDVDIns; + progress1++; + + Copy("/*", "/Distro"); + progress1++; + DirMake("/Distro" BOOT_DIR); + Move(BOOT_DIR_DVD_KERNEL_ZXE, "/Distro" BOOT_DIR_KERNEL_ZXE); + progress1++; + CopyTree("/Home", "/Distro/Home"); + progress1++; + Del("/Distro/Home/Registry.ZC"); + CopyTree("/System", "/Distro/System"); + progress1++; + CopyTree("/Apps", "/Distro/Apps"); + progress1++; + CopyTree("/Compiler", "/Distro/Compiler"); + progress1++; + CopyTree("/Demo", "/Distro/Demo"); + progress1++; + CopyTree("/Doc", "/Distro/Doc"); + progress1++; + CopyTree("/Kernel", "/Distro/Kernel"); + progress1++; + CopyTree("/Misc", "/Distro/Misc"); + progress1++; + + CopyTree("/Downloads", "/Distro/Downloads"); + progress1++; + DirMake("/Distro/Tmp"); + DirMake("/Distro/Tmp/ScreenShots"); + progress1++; + StrCopy(progress1_desc, "Building ISO"); + RedSeaISO(out_iso_filename, "/Distro", "/Distro" BOOT_DIR_KERNEL_ZXE); + progress1++; + + //If CD-ROM use MT_CD instead of MT_DVD. + //DVDImageWrite('T',out_iso_filename,MT_DVD); //Uncomment to burn. + + Copy("/Distro" BOOT_DIR_KERNEL_ZXE, "/Tmp/DVD" KERNEL_ZXE); + + DelTree("/Distro"); + ProgressBarsReset; + Free(out_iso_filename); +} +MakeMyISO; +OutU8(0x501,0x31);