Libraryless. Click here for Pure Java version (15149L/110K).
1 | !7 |
2 | |
3 | module BurnDVD {
|
4 | S directory, tempISOFile, dvdDrive; |
5 | bool add; |
6 | |
7 | start {
|
8 | if (empty(tempISOFile)) setField(tempISOFile := f2s(javaxCaches("temp.iso"));
|
9 | if (empty(dvdDrive)) setField(dvdDrive := "/dev/dvd"); |
10 | } |
11 | |
12 | visualize {
|
13 | ret makeForm3( |
14 | "Directory:", dm_fieldTextField('directory),
|
15 | "Temp ISO file:", dm_fieldTextField('tempISOFile),
|
16 | "DVD drive:", dm_fieldTextField('dvdDrive),
|
17 | "", dm_fieldCheckBox("Add to DVD if there is data on it", 'add),
|
18 | "", jbutton("Step 1 (Make ISO)", rThread step1),
|
19 | "", jbutton("Step 2 (Burn to DVD)", rThread step2));
|
20 | } |
21 | |
22 | void step1 enter {
|
23 | assertLinux(); |
24 | assertNempty(directory); |
25 | assertAbsolutePath(directory); |
26 | backtickToConsole("mkisofs -r -o " + bashQuote2(tempISOFile) + " "
|
27 | + bashQuote2(addSlash(directory) + "*")); |
28 | infoBox("ISO made! " + fileInfo(tempISOFile));
|
29 | } |
30 | |
31 | void step2 enter {
|
32 | assertLinux(); |
33 | if (!fileExists(tempISOFile)) |
34 | ret with infoBox("ISO doesn't exist: " + tempISOFile);
|
35 | if (contains(loadTextFile(backtickToConsole("growisofs " + (add ? "-M" : "-Z") + " " + bashQuote2("/dev/dvd=" + tempISOFile))), "FATAL"))
|
36 | infoBox("Error!");
|
37 | else |
38 | infoBox("DVD made!");
|
39 | } |
40 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1020282 |
| Snippet name: | Linux: Burn Directory To DVD (old version using temp ISO) |
| Eternal ID of this version: | #1020282/9 |
| Text MD5: | 695967d761a6db17536f84f2155dbcc6 |
| Transpilation MD5: | c90fd64243bf5d54b40cd37333bde319 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-12-12 16:31:11 |
| Source code size: | 1279 bytes / 40 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 573 / 796 |
| Version history: | 8 change(s) |
| Referenced in: | [show references] |