Packing MTB30-40 Long Description by Tim Schweizer

File location:

http://www.umich.edu/~proflame/guides/packbig.htm

 The following file is the most complete explanation on how to go about backaging Toolbook files. Although thew context is MTB 30, it applies, mutatis mutandi, to MTB40 as well. The first part ("Before you start") does not apply to FLAME applications, as we use dummys and inis, instead of hardwired links. Everything else is very much on target. Good troubleshooting and testing section.

USING SETUP MANAGER

by Tim Schweizer

Management 70

Revised 4/4/96

There are at least six sources that are available to help you use Setup Manager:

The documentation that I have written on the following pages (I borrowed heavily from the sources listed below).

John Hall’s Setup Manager Walk Through (available at the WWW site listed below) -- portions of my documentation are taken from that source.

Setup Manager Release Notes (available at the WWW site listed below) -- portions of my documentation are taken from that source.

Chapter 15 -- "Preparing Applications for Distribution" in Tom Hall’s text Utilizing Multimedia Toolbook 3.0 -- portions of my documentation are taken from that source.

On-line Help in Multimedia Toolbook

Tim Schweizer, Olin 333

The WWW address listed below is probably the best source of information. If you are curious, use Netscape to go to:

http://weber.u.washington.edu/~brianp/

 

Before you start...

Make sure all of your media files are in your Media subdirectory, one directory below your book files.

Use File Manager and Create a directory called Build, one directory below your book files.

Use Multimedia Toolbook to open the book you want to package.

Go to Clip Manager and select Check Links to make sure all of the Clip media links are valid.

Go to Tools, select and run Media Packager on your book to make sure all of the media links are valid.

Go to File and select SAVE AS EXE to save your file as an EXE file. Also check the "Optimize for CD-ROM" check box.

Exit your book and exit Multimedia Toolbook.

Open up Setup Manager (double click the Setup Manager icon in the MTB 3.0 CBT Edition group window. The first thing you should do when you launch or open up Setup Manager is to save the setup file you are creating. It will be saved as an .inf file. The .inf file will contain the instructions and options you select in Setup Manager. These instructions will be used to create the installation set according to your specifications. So go to File and select Save or Save As. Choose a name that makes sense for your application (e.g., myvac.inf). Make sure you save the file in the Build subdirectory that you created in step 2 above. The .inf file and all of the completed installation files will eventually be stored in your Build directory. Once you are sure the File Name and Directories are correct, click OK.

Now follow the Setup Manager instructions on the following pages.

 

 

General Tab

Dialog Box Title: This is what you want your user to see in the title bar of the dialog box while the gauges display (during decompression and copying) during installation of your title. This can be any string up to 50 characters. Usually it is the name of the program you are installing (e.g., "My Wacky Vacation"). This is the cool part where you get to look like you are a major manufacturer with your own setup program!

Default Directory: Type the directory where you suggest the user install the Toolbook application (your .tbk or .exe file). The default directory you type must always contain a drive letter (e.g., C:\VACATION). Note: The user will have an option to change the default directory. The files install to the default directory unless the user selects a different destination directory. $Install$ refers to the selected destination directory for the application files.

Common Directory: Leave the common directory default as is. (It should be set to $windows$\asym\runtime.) Why leave this alone? The Toolbook Runtime files are installed to this directory. This copy of the Toolbook Runtime files will be shared with future applications, so it is recommended that this directory be different than the directory for the application files. $Windows$ refers to the location of the Windows directory on the target machine. $Common$ refers to the selected destination directory for the Toolbook Runtime files.

Backdrop (optional section)

Startup Bitmap: This is "cosmetic," so you could skip this. If you want to do this, type in a name or use the Choose button to select a bitmap graphic file that will display before the installation dialog box appears (this is commonly called the splash screen). In the Duration field, select the number of seconds (try 5 seconds) that you want the graphic to display before the installation process continues. For example, if you had a company logo stored as a bitmap graphic, this might be a good time to display it. While it is not necessary, it makes sense to have this startup bitmap stored in your Media subdirectory along with your other media. Then the path will be simple, and you will know exactly where the file is. However, since the actual path to the bitmap is stored at this time, the process will work regardless of where the bitmap is located. Technical note: Setup runs in only 16 colors, so choose a 16 color graphic for your splash screen.

Background: Use the Options button to select and set attributes of an image to appear in the background during the installation process. Choose the color gradient you like best. If you want to keep things simple, change the Alignment setting to No Bitmap, then select OK. If you are more daring, you also have the option of displaying a bitmap on the background during installation. (This is not the startup bitmap you selected earlier. The startup bitmap, if you chose one, is displayed for a few seconds before the installation begins.) If you select a bitmap here, it will appear on the background during the entire installation. You may select No Bitmap, which means you will not have a bitmap on the background. If you do select a bitmap, select an alignment that will allow it to be visible. For example, Centered, is probably a poor choice, since the installation gauges will be on the center of the screen, and they may totally cover your bitmap. While it is not necessary, it makes sense to have this bitmap stored in your Media subdirectory along with your other media. Then the path will be simple, and you will know exactly where the file is. However, since the actual path to the bitmap is stored at this time, the process will work regardless of where the bitmap is located. Once you have made your choices, select OK. Technical note: Setup runs in only 16 colors, so choose a 16 color graphic.

 

Files Tab

A component is a collection of files that the user can choose to install or not install. Here you can set up the components of your application, giving each component a name and selecting the files that it comprises. Components and their sizes are shown in the list box. Buttons enable you to add and delete components, change their names, and choose the files for each component. Component names are important because the name appears in the Component Selection dialog box. The users who eventually install your title will use the component names to help them decide whether or not they wish to install them or not.

Click the Add Runtime button first to add this component. Select the CBT Edition Runtime file. In addition, if you link to any DLLs such as tbwin30.dll in your application or use Path Animation, include them now. (If in doubt, include the tbwin30.dll.) Select OK. The default destination directory for the runtime files is $Common$.

Click the Add New button. Enter a name for this component. (Your book is one component you need to add, so add this now. Name this component something like Book Files.) Then click OK. Select the Choose Files button, select your EXE book file, click Add, then Close. The default destination directory for the runtime files is $Install$.

Click the Add New button again. Enter a name for this component. Your media files are one component that needs to be added now so name this component something like Media Files. Then click OK. Click the Choose Files button to locate and add your media files. Navigate to your media subdirectory, and select all of your .avi, .wav, .bmp, .ico files, and any other files, required by your book. (Hopefully you have them all located in the Media subdirectory.) Select Add for each file you select, or select Add All to add all of the files in the media subdirectory. Be careful, to add a file you either have to double click on its name in the directory tree or click the ADD button in the lower right hand corner. Sometimes you think you have added a file, when you have not. So take your time here and check the Selected Files display at the bottom of the screen to make sure the files you selected are, in fact, selected. Also Important: Each media file listed in the File List box should be set to the $Install$\media Destination Directory, not the $Install$ directory. This is a very tricky procedure. WHY? If you set the Destination Directory for the first file in the File List box to $Install$\media, for some reason, it does not automatically do it for all of the other files in the File List box. So, you need to select each media file (you can do this one at a time, or select multiple files using Ctrl+LeftMouse, or select multiples files using Shift+LeftMouse) and make sure the Destination Directory is $Install$\media for each media file listed in the File List box.

(Of course, if you have "extra" files in the media subdirectory that you don’t want to include, don’t use the Add All option. At this point, it becomes clear why it is wise to keep your Media subdirectory clean and up to date.) Note: Icon files (.ico files) must be installed to the $Install$ directory, not the $Install$\media directory.

You will probably leave the When to Copy field alone. The When to Copy field displays options for when to copy a particular file when the component is installed. The default is Always Copy. To choose a different option, click the down arrow and make a selection from the list. The options are:

Always Copy. Always copies the file. If there is a file with the same name in the destination directory, overwrites it without prompting.

Ask User. Before copying the file, asks the user whether to copy it. If the user chooses Yes and there is a file with the same name in the destination directory, overwrites it without prompting.

If Does Not Exist. Copies the file only if a file with the same name does not exist in the destination directory.

If Newer. Copies the file if it is newer than a file with the same name in the destination directory.

If Newer Than Sys. Copies the file if it is newer than a file with the same name anywhere in the user's system. If the older file is in the destination directory, it is overwritten; if it is anywhere else in the system, it is not overwritten or deleted. In that case, the user will have two files with the same name in different directories.

Make Backup. If there is a file with the same name in the destination directory, makes a backup copy (with the extension .bak) before copying the new file.

Note: When comparing files to determine which is older, setup.exe uses the Windows version information, if there is any. If not, it uses the DOS date and time stamp.

Once done adding all of your media files to the File List box and making sure each file is set for the $Install$\media Destination Directory, click Close, and then click Close again on the Component Filelist dialog box. You should now be back at the File Tab display, with total file sizes displayed for the selected components.

The Change Name button will change the component name of the selected component.

The Remove button will remove the selected component.

The View File List button will view the file list in a selected component. I suggest you check your work by clicking on this button. This can save your hours of trouble shooting later.

ADVANCED USER NOTE: If you are going to want more than one icon in your new

program manager group, like a readme file, make the readme file and its

*.ico file a separate component so that you can later associate a different

icon with that file.

 

 

PM Icons Tab

Installed with Component: The default is Always Install, so leave it set there. (It can be changed to refer to a specific component so that, if the user chooses not to install the component, the Program Group is not installed.)

Program Group: This is the name of the Program Manager group in which you want your program Icon to be located. In other words, this will become the title in the title bar of the group window. It will also be the name of the icon in Program Manager when the group window is closed. Use something simple like "My Vacation Diary." The name of the Program Group cannot contain parentheses.

Icon Description: Of course, in the program group window (the one you just named), there will be an icon that launches your application (your book). The Icon Description is the text that you want to appear under the icon that launches your book. The Icon Description cannot contain parentheses.

Change Icon: Use this button to specify an icon for your application. The icon must have been included in a component specified under the Files Tab. If it is not, go back to the Files Tab, Click the Add New button. Enter a name for this component. (Icons would be a good name.) Then click OK. Select the Choose Files button, select your icon file, click Add, then Close.

Command Line: This is the line that launches the program (.tbk or .exe file) from the icon. This is the command line you would see if you looked at the properties of your program's icon in Program Manager. You can use the Insert Directory button to insert a directory placeholder followed by the name of the Toolbook application. If the command line is left blank, the specified icon will not appear in the Program Group.

Directory placeholders are strings that represent directories. During installation, they are replaced by the actual path and directory name as entered by the user or determined by setup.exe.

$Windows$ Path name of the Windows directory on the user's computer.

$System$ Path name of the Windows system directory on the user's computer.

$Install$ Path name of the directory in which the application will be installed.

$Source$ Path name of the directory from which setup.exe was started.

$Common$ Path name of the directory in which the Multimedia Toolbook Runtime files will be installed.

So what do you do? Make sure your command line reads as follows (where bookname.exe is the name of your .exe or .tbk book):

$install$\bookname.exe

 

ADVANCED USER NOTE: If you are installing more than one component, like the readme file mentioned earlier, things are slightly trickier. The first item of business is to specify which component you are going to deal with first. So go first to the 'Installed with Component' dropdown and choose the component. Let's say you are going to deal with your book and its associated files. Simply follow the directions above.

Now, here's the tricky part and a big-time hint: It's not real intuitive but after you have finished specing out the information on your first component, you need to click on a blank line just below the information that has appeared in the Program Icons field at the top. To repeat, go through the whole process for your first component. Then, before beginning to spec information for the second component, click on the 2nd line of the Program Icons field at the top. You'll notice when you choose your next component that the new information now appears on the second line of the Program Icons field rather than overwriting the information on the first line which you just created.

 

 

Configuration Tab

In this tab, you can specify changes that will be made to the user's autoexec.bat, config.sys, and .ini files during the installation process. Changes to .ini files are made automatically. Before making changes to autoexec.bat and config.sys files, setup.exe asks users if they want to make the change. Typically, no changes are necessary to this tab.

What should you do? Just leave this alone!

 

 

Launch Tab

Use this tab to specify commands that will be executed once installation is complete. For example, you may want to put a message in the Message Box Text area located at the bottom of the Launch Tab dialog box. Whatever you type in the Message Box Text area will be what the user sees when everything is successfully loaded. You could type a message like "This Installation Was Successful. Good Luck and Have Fun!" Well, maybe that is a little boring, but you get the idea.

Technical Note: For a more technical installation, you could add a command to tell the user to open a readme file. Commands can be associated with components, so that the command is executed only if the user chooses to install the component. Launching your Toolbook application immediately after installation is not recommended. It is not possible to launch another application called setup.exe. Rename the application file.

Another Technical Note: You can also use the Launch EXE function to install Video For Windows runtime. First, copy the Video For Window setup files under a directory called VFW in your setup path. Next, rename setup.exe and setup.lst to install.exe and install.lst, respectively, because the Setup Manager’s setup program won't run another file named setup.exe. Finally, in the setup manager, add an entry under launch EXE and put "$install\vfw\install.exe" in the command field.

Non-Technical Summary: Typically, no changes are necessary to the Launch Tab, other than adding text to the Message Box Text area.

 

Create Disks Tab

Drive and Directory: This is where you want the compressed installation files placed. To build directly to floppy disks, enter "a:\" or "b:\". To build to the hard drive, enter "c:\" followed by either an existing or new directory name. Summary: The obvious choice for you is to place your build files in the Build subdirectory you created earlier on the hard disk drive (C drive). So enter something like c:\whateveryourpathis\build.

Compressed Installation File Size: Make sure to change this from "Space Available" to the size of the disk you are using. If you are using 1.44 MB floppies to distribute your program, select the "1.44 MB" option. If you are making a CD, you could select the "Space Available" option, since a CD holds about 600MB. If you plan to distribute your application on your 100MB zip disk, you could probably use the "Space Available" option (assuming you have less than 100MB of files, media, etc.).

Create Compressed Installation Files: Click this button to create the compressed installation files. (Note: If you have not saved all of the changes you made to your .inf file, you will be notified that the file has been changed. If this happens, and you are asked if you want to save your work, choose Yes.) The first compressed installation file has the name of the .inf file with the extension .001. Subsequent files have the same name with extensions .002, .003, and so on. For example, if the .inf file you are currently using is named myvac.inf, the first compressed installation file will be named myvac.001, the second will be myvac.002, and so on. (Clarification Note: These are not the names used for the application files when they are decompressed and written to the user's disk.)

Testing Your Compressed Installation Files -- Test #1

Before you copy the compressed installation files to disk, you should test your compressed installation files.

Test #1 -- The Quick Test

This method launches the installation and will give you a general idea of whether or not your installation works. Exit Setup Manager. Go to File Manager, go to your Build directory. Double click on the setup.exe file in your Build directory. This will run your new setup.exe file right off your hard drive.

The installation process will begin.

The first menu gives the user 3 options: Full installation (installs all files), Custom installation (installs only the files the user selects), or Exit (exits the install program without installing anything). Choose the Full - Install all files option.

When the procedure is finished, you will be asked if you want to create Program Manager groups. Click on Yes.

When the installation is complete, you should see a new program group and a new program icon in your Windows Program Manager window.

Double click the icon to run your newly installed program.

If your installation fails or your Toolbook application does not work correctly, you need to fix the problem now. There is no point going any further. (The most common errors are missing media files, missing media links, and errors in your .inf file.) If you have to fix any problems or make any changes, you will also have to rerun the Create Compressed Installation Files procedure. In other words, once you make any changes to your .exe book file or your .inf file, restart Setup Manager, and reopen your .inf file. Return to the Create Disks Tab and click on the Create Compressed Installation Files button to create a new set of compressed installation files. Repeat Test #1 -- The Quick Test.

Note that even if Test #1 is successful, you may still have problems. Test #1 does not reveal a number of potential problems with a set of installation disks. It is, however, a very quick way to identify general problems and it can save you hours hunting them down. Once you successfully complete Test #1 -- The Quick Test, restart Setup Manager, and reopen your .inf file. Return to the Create Disks Tab.

Copy Compressed Installation Files To Disk: Click this button to copy your installation set of files to floppy disks or your zip disk. Select the compressed file you created earlier in the Create Compressed Installation Files step. The file should be something like FILENAME.001 (where filename is the name of your .inf file and installation files -- in the above example, it would be called myvac.001), and it should be located in your Build directory. Once you have selected the file, click OK.

The next dialog box is "Copy Compressed Files To:" In other words, you are being asked to indicate where you want the installation set stored. Assuming you want to create a set on your 1.44 MB floppies, put your first blank, formatted disk in drive a and select a: under the Drives option. Then click OK. Note: Your disks should be FORMATTED CLEAN. Do not use disks that already have information on them. You will get an error trying to copy to disks that already contain data! If you are copying to the zip disk rather than floppies, when you get the "Copy Compressed Files To:" dialog box, put your zip disk in the zip drive (e.g., drive e) and select e: (or your zip drive letter) under the Drives option. Then click OK. An alternative, if you are installing to the zip drive, is just to use File Manager to copy the entire Build subdirectory from the hard drive (C drive) to the zip drive. That’s really easy!

You will get the message Ready to copy file #1. Select OK. Then sit back and wait. If you are coping to floppies, eventually, you will get a message Ready to copy file #2. This actually means, take disk 1 out of drive a, replace it with disk 2, then select OK. Sit back and wait. Eventually, you will get a message Ready to copy file #3. Take disk 2 out of drive a, replace it with disk 3, then select OK. Repeat this whole process as many times as necessary. The number of floppy disks you need, etc., will all depend on the size of your application installation.

Technical Note: In case you are curious, or you are reading this because you simply have nothing else to do, the first diskette will contain the setup.exe file, the .inf file, the file with the extension .001, and any selected backdrop graphics files. Subsequent disks will only contain the files with the corresponding numbered extensions (.002, .003, etc.).

When the copy process is finally completed, the Setup Program simply returns you to the Create Disks Tab in your .inf file. That’s not too flashy, but I suppose that way you have the option of repeating the copy process and creating more sets of installation files. At this point you can exit your .inf file. Go to File, select Exit.

 

Really Testing Your Installation Disks -- Test #2

You should test your installation disks on your computer as well as other computer systems to make sure everything works.

Test #2 -- The Real Test

The setup (installation) program works the same as other Windows installation programs.

Place the first installation disk in the correct drive (probably drive a).

In the Windows Program Manager, select File, Run.

In the Command Line box, type a:\setup (assuming the disk is in drive a) or use Browse to find the name of the setup file.

Click OK.

The installation process will begin.

The first menu gives the user 3 options: Full installation (installs all files), Custom installation (installs only the files the user selects), or Exit (exits the install program without installing anything). Choose the Full - Install all files option.

You will be prompted to insert disk 2 when disk 1 is complete. You will be prompted to insert disk 3 when disk 2 is complete, etc.

When the procedure is finished, you will be asked if you want to create Program Manager groups. Click on Yes. (If your installation used all of the floppy disks except the last one, see the note below titled "What if my installation did not include the last disk?")

When the installation is complete, you should see a new program group and a new program icon in your Windows Program Manager window.

Double click the icon to run your newly installed program.

Note: The setup program is pretty smart. When you run setup.exe (the program that launches your installation) on a machine that already has Toolbook runtime files, those files will not reinstall under certain conditions. (Technical note: you can rename your existing asym.ini temporarily to get around this.) In addition, certain dlls may be available on such a machine though they are not really included in the setup disks. This is not a fair test of how the program will install on a clean machine. Therefore, for an important project, seek out a machine that has NEVER had Toolbook installed and start from ground zero as a check.

What if my installation did not include the last disk? If you install your disks on a PC that already has Toolbook runtime files, you will not be prompted for your last disk. Here’s why. The basic Toolbook runtime files, after compression, take up a little more than one disk. So, they occupy the last disk of your installation set, plus part of the second to the last disk. For example, if you had a set of 8 installation disks, disk # 8 and part of disk # 7 contain the Toolbook runtime files. Toolbook will not reinstall these files if they already exist on the computer. So, the installation of an 8 disk set would actually be complete part way through disk # 7, if the Toolbook runtime files do not need to be copied.

Technical Notes You Will Never Have to Read (I hope):

PROBLEM: Setup Manager doesn't install files with the same name to different directories.

Solution: If setup.exe fails to install files during install it may

be because the name of the file is used elsewhere in the file list.

When setup manager builds the archive and creates the setup disk(s) it marks

each file with a number. That number is indicated in the inf file as the

last entry in the file line. For example:

File0=autonav.tbk,$Install$\test1,c:\mtbea\mybooks,AlwaysCopy,0

The last item in the list for File0 is the reference number for the file.

Usually the number is 0. But for files of the same name it should be one

greater for each indication of the file name previous to the entry. The

second instance of the file should have a 1 and the third 2. This may need

to be updated manually because of a problem with setup manager when creating

the inf file. Simply scan the inf file for multiple entries with the same

file name. Adjust the file last entry in the file line by +1 for each file

ahead of it with the same name.

PROBLEM: Setup Manager would not allow me to package the CBT Edition

runtime as part of my runtime files. Tech Support had the following fix:

Open Setup Manager; go to Author Level

In the Book script add the following:

to handle enterBook

forward

clear sysbooks

end

Save As an EXE file

This fixed the problem that all with CBT Edition will face.

Hint: Using the New - Book Specialist option when you create a new book will also help avoid problems. Even if you select the Minimal Book Specialist option, you will still be better off than creating a new book using the New Blank Book option.