pack .b.trick -side left -expand 1 -ipady 1 -ipadx 1
pack .b.quit -side left -expand 1
pack .b.help -side left -expand 1
pack .audio -side right -anchor n
pack .audio.la -side top
pack .audio.f -side top
pack .audio.f.lb -side left
pack .audio.f.sb -side left -fill y
pack .audio.m -side top
pack .audio.m.up -side left
pack .audio.m.dn -side left
pack .audio.ar -side top
pack .audio.ar.add -side left
pack .audio.ar.rem -side left
pack .audio.remall -side top
pack .lds -side top
pack .ds -side top -padx 5
pack .ds.none -side bottom -anchor w
pack .ds.mk -side bottom -anchor w
pack .ds.pre -side left -anchor w
pack .ds.tname -side left -anchor w
pack .ds.select -side right -anchor n
pack .lm -side top
pack .m -side top
pack .m.scan -side top -fill x
pack .m.scan.all -side left
pack .m.scan.links -side right
pack .m.file -side top -fill x
pack .m.file.joliet -side left
pack .m.file.trans -side right
pack .m.rock -side top -anchor w
pack .m.rock.l -side left
pack .m.rock.none -side left
pack .m.rock.rational -side left
pack .m.rock.literal -side left
pack .m.volid -side top -anchor w
pack .m.volid.l -side left
pack .m.volid.e -side left
pack .m.root -side top -anchor w -fill x
pack .m.root.l -side left
pack .m.root.e .m.root.p -side left
pack .m.custom -side top -fill x
pack .m.custom.use -side left
pack .m.custom.b -side right
pack .m.boot -side top -anchor w -fill x
pack .m.boot.check -side left
pack .m.boot.opts -side left -expand 1
pack .lc -side top
pack .c -side top
pack .c.flag -side top
pack .c.flag.dummy -side left
pack .c.flag.eject -side left
pack .c.flag.pad -side left
pack .c.dev -side top
pack .c.dev.l -side left
pack .c.dev.e -side left
pack .c.speed -side top
pack .c.speed.l .c.speed.1 .c.speed.2 .c.speed.4 .c.speed.6 .c.speed.8 -side left
frame .spacer -height 10
pack .spacer -side top
.c.dev.e insert 0 "/dev/sg0"
}
proc toast {} {
global apad dpad ds
if {$ds == "none"} {
set source ""
}
if {$ds == "premade"} {
set source [.ds.tname get]
if {![file isfile $source]} {
alert "Premade data track must be a regular file."
return
}
}
if {$ds == "mkisofs"} {
set source -
set mk [make_mkisofs_cmd]
if {$mk == ""} {
return
}
}
set cd [base_cdrec]
set nuke ""
set convlist ""
if {$source != ""} {
lappend cd -data
if $dpad {lappend cd "-pad"}
lappend cd $source
}
set tmp [.audio.f.lb get 0 end]
if {$tmp == ""} {
if {$ds == "none"} {
alert "No audio tracks were specified for an audio-only disk. This makes no sense."
return
}
} else {
lappend cd -audio
if $apad {lappend cd "-pad"} else {
if $dpad {lappend cd "-nopad"}
}
set warned 0
foreach i $tmp {
## Have to validate audio track type
switch [file extension $i] {
.mp2 -
.mpg -
.mp3 {
if {$warned == 0} {
# Give use opportunity to opt out. Also collect info for conversion.
set tempdir [get_mp3_burn_info]
if {$tempdir==""} {
alert "An understandable choice."
return
}
set warned 1
}
# Queue for conversion burning, and nuking.
# Yes, there are race conditions. No, I don't care too much. If
# you have a fix for the race conditions which is not too complicated,
# tell me and I'll probably add your fix. Thanks.
set tail [file tail $i]
set tempfile [file join $tempdir "###${tail}.wav"]
if [file exists $tempfile] {
alert "$tempfile already exists. I will cancel the burn and let you decide what to do."
return
}
lappend convlist $i
lappend nuke $tempfile
lappend cd $tempfile
}
.wav -
.raw -
.pcm {
# queue for burning
lappend cd $i
}
default {
# Note the offending file for the user.
alert "I don't recognize the file extention on '$i'. For safety reasons, I won't burn that file as an audio track.\n\nI'd suggest removing it and others like it from the audio track list."
alert "You don't have write permission to the device you selected. You should probably be running this as root. If that is not an option, get the system administrator to give you write privileges for the cd-writer."
return -code return
}
lappend cd "dev=$dev" "speed=$speed"
return $cd
}
proc help_clarify {} {
catch {destroy .help}
toplevel .help
wm title .help {Help!}
set helpstuff {
{All Files}
{ Ordinarily files with names contataing '#' or '~'
are backup files on Linux. CDR-Toaster will instruct
mkisofs to skip these files in the creation of a
CD. If you DON'T want to skip them, click this box.
}
{Joliet support}
{ This stores long filenames on a CD so Windows 9x/NT
machines can read them. Unlike the Joliet CDs produced
on MS-Windows, you can still see the 8.3 filenames on
MS-Dos and other systems that don't support Joliet.
Linux kernels 2.2 and up can also read Joliet names.
}
{Rock Ridge}
{ This is another way to store long filenames on a CD.
It works with all Un*x-like systems that also support
CDs. It allows file permissions, ownership info, and
symbolic links to be stored and appear as such on the
CD. If you choose "Literal", the final CD will look in
all respects identical to the directory hierarchy it
was created from, except for some reason you can't
write to it. This could be good for system backups.
If you choose "Rationalized", you get a more generally
useful CD. It sets the user and group of all files to
root, removes SUID and SGID bits, makes all files and
folders readable globally, sets all execute bits for
anything that has any execute bits, and clears all
write bits.
}
{Follow SymLinks}
{ Normally symbolic links are ignored, unless you use
Rock Ridge, when they are copied literally. If you
want the actual files and folders pointed to by the
symbolic links to show up on the CD, check this box.
}
{Translation Tables}
{ Puts a file called "TRANS.TBL" in every directory on
the CD which maps 8.3 files to their long equivalents.
Very simple, very old.
}
{MPEG Compressed Audio}
{ CDR-Toaster will extract MPEG Compressed audio (mp3)
if you have mpg123 and sox installed. This way you
can burn an audio CD from mp3 files. The sound will
not be as good quality as the original uncompressed
audio, but that's the trade off that a lossy compression
like MPEG makes to attain the high ratios that it does.
For more information, point your web browser at these:
http://www.mpeg.org/MPEG/
http://drogo.cselt.stet.it/mpeg/
}
{PCM vs. WAV}
{ WAV is a format composed of 44 bytes of header data,
then raw PCM data. PCM means only pulse code modulation,
which is to say a digitial audio format made of numbers
to signify each sample. There is no attempt made to
compress the signals beyond the decisions of sample rate
and dynamic range.
For CDR-Toaster to burn audio, you can feed it either a
raw PCM file or a WAV file. WAV files are better because
they contain enough information in the header to ensure
that the audio format is correct. To get an audio track
to burn properly, the PCM data needs to be composed of
exactly the same structure as on a CD - that is 41.1 khz
16 bit stereo. Anything else and you get an unusable
audio track.
When using WAV files ripped from a CD, (as CDPARANOIA
does) you will get files that are already correct. If
you want to use a WAV file you recorded yourself, it is
wise to ensure you recorded cd-quality (16 bit stereo
44.1khz) uncompressed audio. If you did otherwise, there
are many format converters availible which can convert to
this format without any signal loss. The other issue with
audio files you record yourself is that they must be a
precise multiple of 1/75th of a second. This is where
audio padding comes into play. If you do not have the
right number of samples, the Pad Audio option can round
up using absolute silence.
}
{Burning Bootable CDs}
{ When your computer boots from a CD, it treats part of
the CD as a floppy drive. The emulation is at the BIOS
level, so programs like the Linux Kernel operate
normally but programs like LILO or SYSLINUX are fooled.
All attempts to access the (primary) floppy drive are
mapped to the "BOOT" extent on the CD.
Step by step, the easiest way to make a bootable CD
is as follows:
1. Make a real live floppy disk that boots your computer
ok. There are many rescue disk packages which are
good for this purpose, or you can use your operating
system install disk. Make sure the floppy actually
boots properly.
2. Copy this floppy disk to an image file. Under Linux
you can type:
dd if=/dev/fd0 of=bootimage.bin bs=18k
3. Put this file in the directory you are going to make
your CD from:
mv bootimage.bin /tmp/my_cdrom/
4. Bring up CDR-Toaster. Put a check in the "El Torito
Bootable CD" box, and click the "Boot Setup" button.
5. For "Boot Image Path" type "bootimage.bin"
6. For "Boot Catalog Path" type "bootcat.bin"
7. Click OK, and set the "Root of Tree" appropriately.
From the example above, it would be "/tmp/my_cdrom"
8. Finish burning your CD as you would normally.
9. Set your bios to boot from CD, and things should
be happy.
The Boot Catalog is a place for information about the
Boot Image. It is generated automatically. It need not
exist beforehand. In fact, if it does exist, it will
be overwritten.
Both paths are interpretted relative to the root
of the CD.
For more information, see "man mkisofs". It should be on
your system for CDR-Toaster to operate properly.
}
{Using ATAPI CDR(W) Devices}
{ ATAPI CDR(W)s are special. The Linux kernel needs to be
compiled specially for them to work properly.
Basically, you must TURN OFF IDE CDROM support and
instead use both "SCSI emulation" and "SCSI generic
support".
If you have never compiled a kernel before, you are wise
to read the Kernel Howto.
I tend to use "make menuconfig" to configure the kernel,
and these are the things I did:
Under "Block devices", I set "Include IDE/ATAPI CDROM
support" to "n" and I set "SCSI emulation support" to
"Y".
Under "SCSI support", I make sure there is "SCSI CD-ROM
support" and "SCSI generic support" turned on. Since I
have no true SCSI cards, I need nothing from the "SCSI
low-level drivers" section.
I built and installed this kernel. As a result, my
CD-ROM detected as a scsi device (/dev/scd0 in my case)
during bootup and I have been able to burn to /dev/sg0
as is the default in CDR-Toaster.
For more information on the special needs of your
CDR(W), see the documentation for "cdrecord" which is
message .pad.audio.amesg -text {This option will pad audio track data to be a multiple of 2352 bytes. The padding is done with all zeroes which means complete silence. See also PCM vs. WAV in help.
}
frame .pad.data
checkbutton .pad.data.cb -text {Pad Data Track} -variable {dpad}
message .pad.data.dmesg -text {This option appends 15 sectors of zeroes to each data track. This works around a bug in very old Linux kernels.}
# Returns either the empty list, indicating a cancelation,
# or the temp directory.
global perused
set warn {\
You have chosen to burn an MPEG compressed file as an audio track. This will not be the same quality as the original from which it was made. However, the burn can proceed if given a space to uncompress the audio files.