Site Tools


documentation:development:opera:pf25:ppgfldr:smmfldr:cdmfldr:03cdm003

Preparing Simple cdrom.image Files

The first step in creating your CD-ROM is to generate a simple, nonoptimized cdrom.image file. You create the CD-ROM image file using the laytool program. This program uses a cdrom.tcl script file to create the image file. This section describes:

All files and folders needed to create the image file are in the /cdrommaster folder named after the current version of the operating system.

To step through this section, you should have already set up your files, as explained in Preparing Your Title's Files for the Layout Process.

About the cdrom.tcl File

The cdrom.tcl script file contains variables that affect the final form of the CD-ROM image file. Variables are defined with set commands in the script. If a command is preceded by an initial hash sign (#), it is considered a comment and won't execute.

Editing the cdrom.tcl File for the Simple Image

To edit the cdrom.tcl file for first-time layout, follow these steps:

<HTML><ol></HTML> <HTML><li></HTML>Launch MPW.<HTML></li></HTML> <HTML><li></HTML>From the Directory menu, choose Set Directory and select the folder inside the cdrommaster folder that is named like the most recent operating system.<HTML></li></HTML> <HTML><li></HTML><HTML><p></HTML>From the File menu, choose Open and select the cdrom.tcl file.<HTML></p></HTML> <HTML><p></HTML>Note: The cdrom.tcl file is commented extensively; if you pay attention to the comments, you should find editing the file quite easy.
<HTML></p></HTML><HTML></li></HTML> <HTML><li></HTML><HTML><p></HTML>Edit the file so the variables have the values shown in the table below:<HTML></p></HTML>

Table 1:  Variable settings for simple image creation.
--------------------------------------------------------
Variable      |Setting                                  
--------------------------------------------------------
imagefile     |Pathname of a cdrom.image file to be     
              |created on a hard disk that has at least 
              |640 MB space.                            
--------------------------------------------------------
label         |Set to "cd-rom" during initial testing of
              |the CD-ROM image.                        
--------------------------------------------------------
takedirectory |Pathname of the /takeme folder that      
              |contains the title.                      
--------------------------------------------------------
megabytes     |Rule of Thumb: Use 110% of the size of   
              |the /takeme folder (with your executable 
              |and data files), and use that number as  
              |the number of megabytes. If you allocate 
              |too little, the layout process           
              |terminates. If you allocate too much, the
              |process takes longer but there won't be  
              |other problems. The number of blocks must
              |be a multiple of 16.The number of        
              |kilobytes must be a multiple of 32.      
--------------------------------------------------------
directoryavata|The number of directory avatars defaults 
rs            |to 3 and may be safely reduced to 2.     
--------------------------------------------------------
rootavatars   |The number of root avatars defaults to 7 
              |and may be safely reduced to 2.          
--------------------------------------------------------
labelavatars  |The number of label avatars defaults to  
              |2, and must not be changed.              
--------------------------------------------------------

<HTML></li></HTML><HTML></ol></HTML>

The different avatars are discussed in some detail in the cdrom.tcl file itself.

Creating the Simple Image

To create a CD-ROM image using the layout tool, follow these steps:

<HTML><ol></HTML> <HTML><li></HTML><HTML><p></HTML>In the MPW Worksheet window, make sure /cdrommaster/_version_ is the working directory.<HTML></p></HTML> <HTML><p></HTML>The /cdrommaster/_version_ folder contains the /takeme folder with your executables and data.<HTML></p></HTML><HTML></li></HTML> <HTML><li></HTML><HTML><p></HTML>Type laytool < cdrom.tcl and press the Enter key (not the Return key).<HTML></p></HTML> <HTML><p></HTML>After you've started the image creation process, the layout tool does the following:<HTML></p></HTML> <HTML><ul></HTML> <HTML><li></HTML>Assembles the Macintosh file hierarchy of your title into a Portfolio file system.<HTML></li></HTML> <HTML><li></HTML>Creates the cdrom.image file.<HTML></li></HTML> <HTML><li></HTML>Creates the filemap.out file that is needed for creating an optimized CD-ROM image.<HTML></li></HTML><HTML></ul></HTML>

<HTML><p></HTML>At the end of the process, the MPW shell should display the line “layout successful.”<HTML></p></HTML> <HTML><p></HTML>If you don't see the line “layout successful,” or if something else goes wrong:<HTML></p></HTML> <HTML><ul></HTML> <HTML><li></HTML>Look at Layout Tool Troubleshooting below.<HTML></li></HTML> <HTML><li></HTML>If you can't solve your problems with that information, select the status messages the layout tool printed and save them to a file for use by 3DO Developer Technical Support.<HTML></li></HTML><HTML></ul></HTML> <HTML></li></HTML><HTML></ol></HTML>

Testing the Simple Image

To test the CD-ROM image file, follow these steps:

<HTML><ol></HTML> <HTML><li></HTML>Rename any additional copies of your title's executable and data folders you have on your Macintosh so they aren't accessed instead of the files in the CD-ROM image you want to test.<HTML></li></HTML> <HTML><li></HTML>Make sure there are no other cdrom.image files anywhere on your Macintosh.<HTML></li></HTML> <HTML><li></HTML>Make sure your environment is set up for debugging.<HTML></li></HTML> <HTML><li></HTML>Open the Debugger and select Cancel when prompted for a script to execute.<HTML></li></HTML> <HTML><li></HTML>From the Edit menu, choose Preferences and make sure the CD Emulation checkbox is checked.<HTML></li></HTML> <HTML><li></HTML>From the File menu, choose Directories, and then choose Setup. In the dialog that appears, click Data, then find the cdrom.image file you just created and click Select Current Directory.<HTML></li></HTML> <HTML><li></HTML>From the Target menu, select Launch.<HTML></li></HTML> <HTML><li></HTML>When prompted, select the boot script and click Execute.<HTML></li></HTML> <HTML><li></HTML>Press Command-G to start the operating system (if you didn't uncheck Set Initial Breakpoints).<HTML></li></HTML> <HTML><li></HTML><HTML><p></HTML>When you see a Mac→ prompt in the Debugger Terminal window, type the following:<HTML></p></HTML> <HTML><p></HTML>alias boot /cd-rom
<HTML></p></HTML> <HTML><p></HTML>This sets the alias boot to /cd-rom. In turn, any pathname in the application that contains $boot will properly reference the files on the CD-ROM.<HTML></p></HTML><HTML></li></HTML> <HTML><li></HTML><HTML><p></HTML>Execute the program contained in the image file by typing the following command into the Terminal window:<HTML></p></HTML> <HTML><p></HTML>$boot/launchme
<HTML></p></HTML> <HTML><p></HTML>The Debugger runs your title from the image file and you can perform the first round of testing.<HTML></p></HTML><HTML></li></HTML><HTML></ol></HTML>

documentation/development/opera/pf25/ppgfldr/smmfldr/cdmfldr/03cdm003.txt · Last modified: 2022/10/10 16:53 by 127.0.0.1