June 7, 2001 -- Publishing on the Cheap
I recently came across some early photos showing the courtship and wedding of my wife's parents. These were photos that none of the children (my wife and siblings) knew anything about even though the stories associated with them are well-known. I wanted to publish a short-run "book" (like a dozen copies) that included nearly 300 color photos and give a copy to each family member. The cost of doing it as a paper-based is prohibitive, and even doing a dozen sets of color prints from the now-faded slides is decidedly unattractive. So what are the alternatives?
Most people have computers now, and many of them have Internet access. So one solution would be to "publish" on the Web. The problem with that approach is that the number of pictures and the slow dial-up access most of the family members have would make for very tedious perusal of the book. Another problem is that any time they wanted to look at a picture they would have to connect to the Internet again (most of the family don't know how to browse their cache).
However, these computers also have CD-ROM drives. If I publish the book on CDs then the recipients could look at it any time they wanted, and the pictures would display much more quickly. The cost is nominal -- less than a dollar for the CD-R blank and a couple of stamps to mail it.
The next question is what is the best application to use to peruse the book? We have lots of choices, but a few observations let us quickly winnow them down to a small set.
Almost all computers have web browsers on them now. So that's one possibility. Most also have the ability to display PDF (Portable Document Format) files via an already-installed Acrobat reader. For those that don't, Acrobat is freely available from Adobe at www.adobe.com. Most computers also already have the ability to display video clips, but here the standard is not quite so strong -- there are several formats in common use. QuickTime is a popular format, and the player is freely available from Apple at www.apple.com.
In my case, the important part of the document is the pictures, and I wanted to make it easy for the recipient to look at each for as long (or little) time as they wished. That let out QuickTime for this project. Also, I did not care about keeping control over the font size and exact page layout, so there was no necessity to use Acrobat. That meant I could use the recipient's Web browser to display the book, which is an application that almost certainly exists on their computer and that they have some familiarity with -- a powerful combination!
A friend has been doing time-lapse photography, so in his case a much more appropriate format would be QuickTime movies.
A client produces the SCPI Standard, which is both paper-based and available in a computer-readable format. In this case it is important that the pages look exactly the same on the computer as they do in the paper-based document, so Acrobat PDF is the appropriate choice.
Often, the best choice is to use several of the formats -- my friend doing the time-lapse photography uses HTML pages which have descriptive text about the video clips, and the video clips themselves are in QuickTime format. See http://www.bmumford.com/photo/milkdrop.html for an example.
OK, so for this project we will make a CD and basically make a set of web pages on it. What else do we have to do? Well, it'd sure be nice if that CD played on everyone's computer, regardless of what kind of computer it is.
Hybrid Disks
The phrase "hybrid disk" can actually have several different meanings, but what I'm talking about here is a CD that looks "proper" and capitalizes on the strengths of each of several different computer platforms (like Linux, Macintosh, and Windows). We could just create an ISO-9660 CD and it would be readable on each platform, but there is no "Auto-Run" function available, nor any special icons, nor can we use somewhat intelligible filenames like "Run-Me" or "Double-Click Me". As you will see, even if we made just an ISO-9660 CD we still need to be cognizant of how the different platforms treat file names and links.
Before we construct a hybrid disk we need to look at the conventions used on the different kinds of computers we would like for it to play on. Because if we don't understand the problem, we probably won't solve it properly!
Naming conventions:
ISO-9660 Level 1: All files and folders (directories) are named in 8.3 format (a file name of up to 8 characters, a period, and an extension of up to 3 characters), and the characters may be ONLY A-Z, 0-9, and _ (underscore). No lower-case, no special characters! Also, ISO-9660 allows a maximum nesting of 8 levels, so be careful of how deep your directory tree gets.
Windows 95+: The file name can be up to 250 characters long. The file name can use any character EXCEPT the following: <>|\/.:*?" The special CD format known as "joliet" allows long file names of up to 64 characters, and also records an short-name version that is in 8.3 format, so that the CD may be read on DOS or Windows 3.x systems.
Macintosh: File and folder (directory) names may be up to 31 characters long, and any character except colon (:) may be used.
Linux and most recent flavors of UNIX: A file name can use any character except the following: <>(){}[]"'?|\/^!#$&~ Even though UNIX will happily accept the space character, I have often found it troublesome when communicating between UNIX and non-UNIX systems.
Note that unlike Windows and the Macintosh, CASE IS IMPORTANT in UNIX systems! Thus to UNIX the filenames INDEX.HTM and index.htm are distinct, while both Windows and the Mac consider them to be references to the same file.
This becomes very important if your CD is made to ISO-9660 standard, because your "page01.htm" file gets renamed as "PAGE01.HTM" -- if you now try to play that CD on a Linux box and you have a link named to "page01.htm" that system is NOT going to find it! However, there's more about this topic later.
Life is full of little surprises:
Where Am I?
Under Windows, a link of the form "/800X600/INDEX.HTM" refers to the current disk drive. Thus if the current drive is Z: then this link becomes "Z:/800X600/INDEX.HTM"
Under Mac OS this same link is referenced to the desktop, so if you are browsing on a CD named "AJR_1948" this link does _not_ refer to the CD, but to a folder on the desktop named "800X600". There's no such folder? Too bad!
The various flavors of UNIX (which includes Free-BSD and Linux) have a different convention -- they use "mount points". The common (but by no means universal) place for a CD is at /mnt/cdrom. Thus, if the CD has a link in it to "/800X600/INDEX.HTM" it's not going to work, because the proper path is (usually) "/mnt/cdrom/800X600/INDEX.HTM".
What all this tells us is that we cannot use absolute references (that is, ones starting with the character "/") in our links -- if we make them right for one platform they are guaranteed to fail for the others. If we ALWAYS use relative references to stuff that is on the CD we should be OK.
What Am I?
This is an important question if we want a file to automatically open when the CD is inserted into the computer. Windows uses the file extension to determine what program to run when the file is opened. So we're in pretty good shape there.
The Mac ignores the extension and instead uses the TYPE and CREATOR fields. Generally, the Mac system is better, but when making CDs it turns out to be a problem. Here's why: Netscape's creator field is "MOSS", while Microsoft's Internet Explorer is "MSIE". We can tag only one file to be opened when the CD is loaded, but we don't know whether the computer has Netscape, MSIE, or some other browser. The best we can do is pick one and realize that for many people we chose the wrong one. For that reason we need to have a easy way for them to get started if they use a different browser than what we chose.
Linux usually ignores the extension and does not have TYPE and CREATOR fields like a Mac -- instead it looks at the data in the file and tries to puzzle out what application could open it. This often works quite well, but sometimes not. Fortunately, the file types we are talking about tonight, HTML, PDF, QuickTime, JPEG, and GIF, all have special code sequences near the beginning that uniquely identify the file type, and Linux correctly figures out what to do with them.
Auto-Run
Each platform does implement an Auto-Run function which can make it much easier for the recipient of the CD to figure out how to use it. The devil, as always, is in the details.
The Mac is trivial because all you have to do is specify the file to be opened when the CD is inserted into the drive. The gotcha is that if you want to distribute HTML files, you (the developer) have to specify which web browser is to be launched on the recipient's computer. In one sense you're somewhat safe because most recent Macs have both Microsoft's Internet Explorer (MSIE) and Netscape. The problem is that the browser you choose to launch may not be the one the recipient is used to using. And there is the potentially bigger problem that the browser you chose is not available on the recipient's computer, in which case you get this nice little error message offering to open the HTML file in SmartText! QuickTime and PDF do not share this problem because in each case there is really only one application that people use: QuickTime and Acrobat, respectively.
Windows is trivial in the sense that at least it will open an HTML file in the recipient's favorite browser, but getting that to actually happen for the various flavors of Windows can be tricky. The same goes for other kinds of files, like QuickTime and PDF. My favorite way has the advantage that it uses programs that are already on the recipient's computer (nothing to install, nothing to purchase, nothing to license), but it does have two problems: (1) If the necessary application is not available the "Open With" dialog box pops up with the instruction "Click the program you want to use to open the file ...", and (2) with some versions of Windows there is a quick flash of a black box on the screen. See Jeffrey Richter's article at http://msdn.microsoft.com/library/periodic/period99/win320499.htm and look for the .BAT file method.
There are alternatives that avoid these problems, but at the expense of having to license and use another program. Unless, that is, you know all your recipients have Windows 2000 -- Microsoft made AutoRun in that version much easier to use and you (as the CD producer) don't have to go through all the contortions that the earlier versions required. I have included links to alternatives in the "Further Information" section at the end of this article.
Toast Hybrid CDs
Several different CD-ROM burner applications can write CDs with different areas for the different platforms, of which Toast is the most popular. The way Toast makes a hybrid is it splits the CD into two different areas: one for the Mac and the other for everything else. The "other" is in ISO-9660 format, so we have to accept its limitations on file name length, character set, and directory nesting depth. Even so, we can make a CD that looks and runs quite well on the Mac, Windows, and Linux. One of the great boons in the way Toast makes a hybrid is that both the Mac and the "other" part of the CD can share the same files -- so you do NOT have to have two copies of every image or video clip.
Now We're Ready!
With this background information we can construct a few rules that will assure us that not only will the CD be readable on the various platforms, but will also be usable (i.e., the links will work, the proper application will be used, and so on).
What!?
I had carefully made a hybrid CD with a bunch of HTML files on it with all the links in upper-case. Windows and the Mac don't care about case, but UNIX does. I tried the CD on Windows and it worked fine. I tried it on the Mac and it was happy there too. Then I tried it on a REd Hat Linux system and the links failed! I took a closer look and discovered that all the file names had been changed from upper-case to lower-case by the operating system. I turned to the man that knows all, Kevin Kilbride, and asked him what gives. Click here for not only a complete explanation, but the proper approach to avoid the problem.
Further Information:
A link to a compendium of CD-R FAQs (Frequently Asked Questions)
http://www.cdrfaq.org/
Roxio's glossary of CD terms and standards:
http://www.roxio.com/en/common/gloss1.html
Jeffrey Richter's articles explaining several different methods for including AutoPlay for Windows on a CD
First article:
http://msdn.microsoft.com/library/periodic/period98/win320998.htm
Second article which is specific to launching an HTML file, but works with most filetypes that have an associated application:
http://msdn.microsoft.com/library/periodic/period99/win320499.htm
Another article about how to use Windows AutoRun:
http://www.ashzfall.com/products/autorun/browsercall.html
An article on how to utilize the AutoPlay feature of a DATA CD in the
April 2000 SBPCUG (Santa Barbara PC Users Group) Newsletter
http://www.west.net/~sbpcug/pdf/apr2001.pdf
Links to several freeware AutoRun executables:
http://www.ashzfall.com/products/autorun/
http://www.geocities.co.jp/SiliconValley-Bay/2037/archive/asrun_e.html
An almost-free version ($5 license)
http://berkemeyer.com/products/autorunner.htm