hschumann2/TempleOS-Source-Code
0847
1 2//Make Your own Distro by #include-ing this file.3 4#define STD_DISTRO_DVD_CFG "TB\nScale2Mem(2048,0x40000)\nT \n\n\n\n"5 6U0 MakeMyISO(U8 *_out_iso_filename)7{//Does everything with current drive.8//If you have not recompiled Kernel and defined your CD/DVD drive, use Mount.9 U8 *out_iso_filename=FileNameAbs(_out_iso_filename);10 if (!DrvIsWritable) {11 "Drive must be writable. Install on Hard drive, first.\n";12 return;13 }14 DelTree("/Distro");15 Del(out_iso_filename);16 17 DirMk("/Distro");18 In(STD_DISTRO_DVD_CFG);19 BootDVDIns;20 21 Copy("/*","/Distro");22 Del("/Distro/" KERNEL_BIN_C);23 24 CopyTree(BOOT_DIR, "/Distro" BOOT_DIR);25 CopyTree("/Home", "/Distro/Home");26 CopyTree("/Adam", "/Distro/Adam");27 CopyTree("/Apps", "/Distro/Apps");28 CopyTree("/Compiler", "/Distro/Compiler");29 CopyTree("/Demo", "/Distro/Demo");30 CopyTree("/Doc", "/Distro/Doc");31 CopyTree("/Kernel", "/Distro/Kernel");32 CopyTree("/Misc", "/Distro/Misc");33 34 //To save space, optionally delete dictionary.35 //Del("/Distro/Adam/AutoComplete/ACDefs.DATA");36 CopyTree("/Linux","/Distro/Linux"); //You can leave this out.37 DirMk("/Distro/Tmp");38 DirMk("/Distro/Tmp/ScrnShots");39 ISO9660ISO(out_iso_filename,"/Distro/*",,"/Distro" BOOT_DIR_KERNEL_BIN_C);40 41 //If you want RedSea filesystem, use this instead but make it ISO.C.42 //RedSeaISO(out_iso_filename,"/Distro","/Distro" BOOT_DIR_KERNEL_BIN_C);43 44 //If CD-ROM use MT_CD instead of MT_DVD.45 //DVDImageWrite('T',out_iso_filename,MT_DVD); //Uncomment to burn.46 47 //DelTree("/Distro");48 Free(out_iso_filename);49}50 51MakeMyISO("/Tmp/MyDistro.ISO");52 53// Study my account examples Cfg Strs, Update Funs.54 