!7 module BurnDVD { S directory, tempISOFile, dvdDrive; start { if (empty(tempISOFile)) tempISOFile = f2s("JavaX-Caches/temp.iso"); if (empty(dvdDrive)) tempISOFile = "/dev/dvd"; } visualize { ret makeForm3( "Directory:", dm_fieldTextField('directory), "Temp ISO file:", dm_fieldTextField('tempISOFile), "DVD drive:", dm_fieldTextField('dvdDrive), "", jbutton("Step 1 (Make ISO)", rThread step1), "", jbutton("Step 2 (Burn to DVD)", rThread step2)); } void step1 enter { assertLinux(); assertNempty(directory); assertAbsolutePath(directory); backtickToConsole("mkisofs -r -o " + bashQuote(tempISOFile) + " " + bashQuote(addSlash(directory) + "*")); infoBox("ISO made! " + fileInfo(tempISOFile)); } void step2 enter { assertLinux(); if (!fileExists(tempISOFile)) ret with infoBox("ISO doesn't exist: " + tempISOFile); backtickToConsole("growisofs -Z " + bashQuote("/dev/dvd=" + tempISOFile)); infoBox("DVD made!"); } }