ACCC Home Page ACADEMIC COMPUTING and COMMUNICATIONS CENTER
Accounts / Passwords Email Labs / Classrooms Telecom Network Security Software Computing and Network Services Education / Teaching Getting Help
 
The A3C Connection, 2001-2002, Number 1 The ACCC Home Page The A3C Connection
2001-2002, Number 2 Contents CD-Writing How-Tos Tools of Stats: SYSTAT and Stata Get Started with Linux Linux: A Personal History Students: Your teachers want to send you email. About the A3C Connection

CD-Writing How-Tos

 
Tech Tips Mac Windows Everyone 

Want to put your handouts, images, movies, Web pages, or PDF files on a CD? You can do a thoroughly professional job -- create a hybrid CD that launches automatically on both PCs and Macs, with the layout and icons of your choice. It's a lot easier than you might think and you don't have to do it on your own. The ACCC Instructional Technology Lab (ITL) has all the equipment you need to create a CD, and its staff can help you accomplish the task, regardless of whether you're a novice or seasoned computer user.

This set of articles is based on how-to tips prepared by Volker Kleinschmidt of the ITL. They outline the process of creating a CD, making it launch automatically when it's inserted into a PC or Mac, and giving it the look and the icon of your choice. Have you ever had a computer game that came with separate music tracks that played on your CD player? There are how-to instructions for that too.

These how-to tips are on the Web: http://www.accc.uic.edu/itl/howto/
For answers to any question you might have on writing CDs, see Andy McFadden's CD-Recordable FAQ: http://www.cdrfaq.org/

 
   
 
     
CDs for Both PCs and Macs
 

There are two CDs-for-both choices.

Macs can read PC files, so if your CD contains only data files that need to be accessible on multiple platforms, you can follow some fairly simple rules and create a PC CD that both Macs and PCs can read. If a Linux system is used for burning, Unix file ownership and permissions can be applied, so a true multiplatform CD is possible.

These cross-platform CD-ROMs are simple to create and provide good service to PC users. PC users will be able to open a file on a cross-platform CD by double-clicking its name, and the CD can be set up to open automatically on the PC. However, cross-platform CDs do not offer those services to Mac users. You could create separate CDs for the PC and the Mac to provide these services to Mac users, or you could ignore Mac users entirely. Neither of these solutions is desirable, which brings us to hybrid CDs.

The second option is a hybrid CD-ROM. Hybrid CDs have separate sets of Macintosh- and PC-readable files. (The technical terms for "set" are "filesystem" on PCs and "volume" on Macs.) On PCs, only the PC data will be visible, whereas a Mac will be able see both sets of data, but will automatically open only the Mac data.

Creating true hybrid CDs is a much better answer when you want your CD to be available to both Mac and PC users. Only hybrid CDs preserve Mac file-creator type information, and thus only they will allow the Macintosh user to open files by double-clicking. Only on a Mac volume can a file be made to auto-open on a Mac upon CD insertion. It will also allow fine control over its appearance when it is opened (icons, layout, visibility), allowing a professional-looking CD that can be used for both PCs and Macs.

 
     
--Further considerations:
 

File Naming:

When you place hyperlinked documents (e.g., Web pages or PDF files) on a cross-platform CD that will be used on both PCs and Macs, make sure that all the hyperlinks reference the documents by their short 8.3 MS-DOS filename, which is the only name visible on the Macintosh. Also make sure to only use relative links, not absolute file:///-type links, for CD distribution.

File Sharing on hybrid CDs:

All data files such as images, movies, Web pages, or PDF files can be shared between the Mac and PC filesystems on a hybrid CD, so only executables and files with platform-specific information (e.g. a ReadMe file) need to be duplicated on the CD. This helps save space. In particular, you should keep this in mind when designing your media; create cross-platform compatible movies and sounds, e.g. RealVideo, RealAudio, or flattened Quicktime movies.

 
     
--How are hybrid CDs made?
 
  1. You will need at least two PCs and two Macs -- one of each to prepare the files for the CD and one or more of each to test the files before you burn your CD.

  2. On a PC, put all the files you will need for your CD to run properly on a PC in a separate directory. This will become the root directory for the CD's PC ISO9660 filesystem.

  3. Create a subdirectory named, for example, data or shared. Put in it all the data files that will be shared between Mac and PC.

  4. Copy the directory including the data subdirectory onto a portable device (a floppy disk or a CD). Test all the links in the PC files on a different PC to make sure you have everything.

  5. On a Mac, prepare a folder -- directories are called folders on Macs -- containing the Mac executables and platform-specific files needed for the CD; include a copy of the shared data directory (step 2). Write this folder on a floppy or a CD and test the links on another Mac.

  6. Write your PC directory and Mac folder on the hybrid CD. There are various software packages that can do this, some of which even run under Windows. The one most often used, however, is Roxio's Toast, a Mac application that was developed by Adaptec. Use Toast to create the hybrid CD, separately loading the PC directory and Mac folder that you've created. For step-by-step instructions, see "How to make Mac/PC hybrid CDs" on the ITL How-To Tips Web page: http://www.accc.uic.edu/itl/howto/
    (Does it sound like you'll have two copies of the shared data? Don't worry; Toast will take care of that for you.)

More about filenames, volumes, and filesystems

The Mac volume on a hybrid CD could be an HFS or HFS+ (also known as extended HFS) filesystem; the PC filesystem could be ISO9660 or MS-Joliet. ISO9660 is like the MS-DOS filesystem; it supports only short DOS 8.3, uppercase filenames. MS-Joliet is used in Windows 95 and newer Windows operating systems; it supports longer filenames with spaces and other special characters.

Note that a Mac reading data from a PC filesytem will only see the short version of a long PC filename. To avoid problems, use short filenames from the beginning. Note that in some versions of Windows, renaming a document such as mylongfile.html to a short name beginning with the same first six characters, in this case mylongfi.htm does not change the underlying DOS filename (usually mylong~1.htm) -- you need to actually change the first six letters to cause the DOS name to change.

 
     
Autolaunching CDs
 

Task:

When inserting a CD-ROM, a program should launch automatically, perhaps with a document displayed in the program.

Details:

A platform-independent solution is desired. No assumptions about installed software should be made. User preferences like default browser program should be taken into account, where possible.

Considerations:

  • The start-up procedure needs to be very quick to make it clear to the user that something is actually happening and to avoid user frustration.

  • No software installation may be done without previously asking the user for permission.

  • Automatic launching of documents such as Web pages or PDF files usually replaces the traditional readme.txt file. Nothing can be assumed from the user; everything needs to be self-explanatory.

  • However, a readme.txt file should be in the CD's root directory for those users who have the autorun feature turned off or who cancel out of an autorun process.

  • On a Mac, specifying a startup document or program requires that Quicktime 3 or newer be installed. This can safely be assumed, as Quicktime is part of the standard OS install and Quicktime 3 is included on every Mac running at least MacOS 8.

  • On a PC, specifying a startup executable running from the CD requires that the software be able to run without previous installation.
 
     
--The general solution for Macs:
 

To autolaunch a program or document on a Macintosh, the CD needs to contain a Macintosh volume (which will not appear on a PC). When creating this volume in Roxio Toast, a checkbox allows you to specify an auto-launch file, and an icon for the CD, via a simple browse dialog.

In particular, this means that the CD needs to be a true hybrid CD, not just a cross-platform CD.

 
     
--The general solution for PCs:
 

The CD's root directory needs to contain a plain text file named autorun.inf.

  1. The autorun.inf file starts with the line:
    [autorun]

  2. The line specifying the program or file that should be launched automatically is of the form:
    open=someprogram.exe options

    1. The open statement must refer to an executable, so it can't be something like: open=index.htm

    2. The open statement can refer to DOS batch files or any other 16- or 32-bit executable, with the following restrictions.

      • The executable must be findable, i.e. it should be in the CD's root directory, or you need to specify it with its relative path if it is on the CD.

      • Any registered Windows program such as notepad.exe can be called as well.

      • There are shareware programs (usually called something like autorun.exe) that allow the launching of any file via the default shell association. Simply specify the filename and path as command-option. If the file is in a subdirectory with a long filename, the path must be double-quoted.

      • Software installers (VISE, InstallShield, etc.) tend to come with their own little auto-launch programs. No further work is required. Configuration options such as filenames are usually stored in an associated data file, rather than supplied on the command line.

  3. The icon to display for the CD is also specified in autorun.inf on a line such as:
    icon=mylogo.ico
    The icon file should be in the CD's root directory. (See Icons for Windows CDs.)

Details on autorun.inf

The Microsoft Web pages for developers, MSDN, has a library entry with a complete description of the autorun.inf file. Go to the MSDN home, http://msdn.microsoft.com/, then select MSDN Library -> User Interface Design and Development -> Windows Shell -> Shell Programmer's Guide -> Shell Basics -> Shell Basics: Extending the Shell -> Creating an AutoRun-enabled CD-ROM Application.

Auto-displaying a Multimedia Presentation

Multimedia presentations such as Flash or Shockwave files can be made with their own stand-alone player application included, as a so-called projector executable. No extra launcher application is then needed. Note that different projectors are needed for the Mac and PC volumes in the hybrid-CD case.

Auto-displaying a Web Page Web pages can simply be opened in Internet Explorer, as that automatically comes with all versions of Windows. This has the advantage that links from said Web page to executables included on the CD can actually be executed (e.g. software installers), whereas other browsers will only offer to save the executable to the hard drive. The launch command can therefore look like this:

open=iexplore.exe -k index.htm

(The -k option makes Internet Explorer launch a new process in case the user already had a browser window open.)

When it is of utmost importance to launch the user's default browser, there are two options: use an autorun program as mentioned above, or use a DOS shell to open the document in its associated program.

Auto-displaying a PDF File

To open PDF documents, you will need to include the correct version of Acrobat Reader on the CD and configure it to run without previous installation. Then the launch command can therefore look like this:

open=acrobat/acrord32 relnotes.pdf

(Assuming that Acrobat Reader is provided in the acrobat directory on the CD, and that relnotes.pdf is in the CD's root directory.)

The disadvantage of using this approach is the somewhat longer load time when compared to a Web page or a specialized autorun program. You can alleviate that by auto-launching just a very small PDF file with a table of contents and linking from it to the main document(s). The main advantage is a simplified document-creation process, where only one version needs to be prepared for on-screen viewing with full interactivity and for printout.

Using Toast to Create an Autorun Hybrid CD to Display a PDF Document

Clockwise from the right: the Mac volume, the Windows ISO 9660 volume (including the autorun.inf file), and ready to write the completed CD. You must use CD-writing software on a Mac to create a CD that will automatically run on a Mac. This demo CD automatically opens the ACROHELP.PDF file.

Mac volume in Toast
PC ISO 9660 volume in Toast
Ready to write the finished CD

 
     
CDs with Audio and Data
 

There are three standards for CD-ROMs combining CD-audio and data for playback, both on computer CD-ROM drives and on entertainment systems:

1 Mixed-mode CD-ROMs contain only a single session, with the data in the first track, followed by audio tracks. As many CD players cannot tell the data track apart from audio, this can cause severe noise and speaker damage when played back and is thus not recommended.

2 CD-Extra (blue book) combines audio tracks in a first session with associated images, lyrics, and other data in a second, data, session following a very rigid schema. It is used for high-end CD playback systems and has very limited application.

3 Finally, you can record an audio session, followed by a data session containing any type of data. This counts as a regular multisession CD, not as CD-Extra. The second session can even be a hybrid session, making this the ideal format for distributing multimedia CD-ROMs that should provide at least audio on regular home CD players.

In the following, we will only discuss the third type, regular multisession CDs.

 
     
--How the multisession audio+data CD will work:
 

When inserting a multisession disc into an audio CD player, only the first session will be found and the audio tracks will be played as normal.

When the disc is placed into a CD-ROM drive, the last session on the CD will be seen, and any autorun files in it will be executed, e.g. a multimedia projector.

Typically, only CD writers will typically be able to see any sessions other than the last data session, and then only as an alternative the last one. So be sure to import your audio into the data session as well if you want it accessible on a computer. Preparing an audio+data CD:

  1. Record your audio CD as usual. Make sure to close only the session, not the entire disc. This means you cannot write in the Disk-at-once (DAO) mode, and thus 2-second gaps between tracks will be enforced. In Roxio's Toast on a Mac, use the Write Session button, or if you are using Roxio's CDCreator on a PC, you should choose Track-at-once (TAO) recording and the Close Session option.

  2. Prepare your data session, which can be done using CDCreator if the CD is for PCs only. Make sure to automatically include the audio in the session (CD layout properties). The CD format needs to be CD-ROM XA (mode 2) and the filesystem should be MS-Joliet. Be sure to include an autorun.inf file, associated startup script or executable (General solution for PCs), and a disc icon (Icons for Windows CDs and Icons for Mac CDs).

  3. If the disk is going to be used on both PCs and Macs, you'll have to use Toast on a Mac to write it. See CDs for Both PCs and Macs for more information.

  4. Close the disc when writing the data session.
 
     
Icons for Windows CDs
 

Task:

Create an icon to be displayed in Windows Explorer and My Computer instead of the default CD icon.

Considerations:

Windows icons are 16- or 256-color bitmaps that are dynamically resized for the desired display size. The native size of small icons in Explorer is 16x16 pixels and large icons are 32x32 pixels. An icon file can contain both resolutions simultaneously; the appropriate one will automatically be displayed. The icon's background color can be transparent.

How to specify an icon for a CD:

The icon to be displayed is specified within the autorun.inf file in the [autorun] statement group, on a line starting with icon= followed by the path and name of the file containing the icon, e.g.:

icon=mylogo.ico

Icons may be contained in executables (.exe) or dynamically linked libraries (.dll), which typically hold multiple icons, or in .ico files containing a single icon. When referencing an icon that is in an executable or library, the program name is followed by a comma and the number of the icon (starting at 0); e.g. for the tree icon from the Windows shell you would use:

icon=C:\Windows\System\shell32.dll,41

How to create an icon:

There are various shareware/freeware programs for manipulating, extracting, or creating icon files. The best is probably Paraben's IconBuilder ($24.95 shareware), which can convert other formats to .ico files, manage icons in icon-resource files, and much more. If you want to draw an icon from scratch, HTML-Helper's freeware IconStudio will be sufficient.

A kludgy workaround:

If you don't have a true icon editor, draw an image in any paint/draw program, then save it as a 16- or 256-color bitmap file, .bmp. Then open the .bmp file in MSPaint and crop as needed until it is 32x32 or 16x16 pixels. If you want a transparent background, pick a color from the 16 or 256 available colors that does not occur in your picture, uncheck the Draw Opaque option in MSPaint's Image menu, and fill the background of the image with the paint bucket. Save the .bmp file, then rename the resulting image with the .ico extension. You should see the icon displayed correctly now. Place it in your CD's root folder. Note that icons made this way aren't entirely valid and its transparent background will appear black in Windows NT.

 
     
Icons for Mac CDs
 

Whatever icon you give to the temporary Mac volume will be assigned to the CD. Create an icon in your favorite graphics program and copy it onto the clipboard. Then change the icon for the temporary Mac volume by clicking once on the icon in the Finder, choosing Get Info... from the File menu, and finally choosing Paste from the Edit menu.

There are step-by-step instructions on how to make an icon on a Mac at the iconfactory: http://www.iconfactory.com/howto_home.asp

 
     
Need Help or the Right Software or Tools?
 

The ITL has it. And its mission is to help both novice and seasoned computer users, whether they're publishing their first Web page or creating sophisticated interactive hypermedia. Email the ITL at itl@uic.edu, call 312-996-9824, visit the ITL home page, http://www.accc.uic.edu/itl/, or stop by the ITL on the west side of campus in room 181 BGRC. Soon -- probably by the time this newsletter is published -- the new mini-ITL on the east side of campus, room 401 CCC, will be open.

Comments and questions are welcome; please send them
to Volker Kleinschmidt, volk@UIC.EDU

 
 

The A3C Connection, 2001-2002, Number 2 Previous: 2001-2002, Number 2 Contents Next: Tools of Stats: SYSTAT and Stata


2002-12-7  connect@uic.edu Unless otherwise stated, the clip art on these pages were obtained from The Learning Company’s ClickArt ClickEdit product, © 1998 The Learning Company, Inc. and its subsidiaries, 88 Rowland Way, Novato, CA 94945 USA. All rights reserved.
UIC Home Page Search UIC Pages Contact UIC