Chapter 26 -- Creating Distribution Disks

After you ve designed and tested an application, you can use the Setup Wizard to create a setup routine and distribution disks for your application. If you plan to distribute your application in more than one disk format, the Setup Wizard creates routines and disks for all the formats you specify.

For detailed information on preparing an application for distribution, see Chapter 25, Building an Application for Distribution. For more information on creating an application, see Chapter 13, Compiling an Application.

This chapter outlines how to create distribution disks, including:

  • Understanding the Distribution Process
  • Using the Setup Wizard

Understanding the Distribution Process

When you distribute an application, you copy all your application and support files to a distribution medium, commonly disks, and provide a method for users to install the application on their computers. Because copying and installing the right files can be complicated, use the Project Manager and the Setup Wizard to streamline this process.

In the Project Manager, you create and manage your application files and identify the files that you want to distribute.

With the Setup Wizard, you create one or more sets of distributable disks that contain a setup routine for your application. To simplify the task of creating a setup routine, the Setup Wizard asks you a series of questions about your application and how you would like the setup routine to appear. When you answer the questions, the Setup Wizard creates a customized setup routine for you.

Each time you run the Setup Wizard, the options you select for that distribution tree are recorded. That way, the next time you run the Setup Wizard, the process is even simpler.

Note   If you just copy your application s files to a user s machine, the application might not function properly. Windows setup routines, such as the one created by the Setup Wizard, require version checking and registration of various DLL and ActiveX files. To ensure proper installation, use the Setup Wizard. For more information, see The Setup Wizard later in this chapter.

The Distribution Tree

Before you create disks with the Setup Wizard, you must create a directory structure, or distribution tree, that contains all the distribution files as you d like them to appear on your user s hard drive. Place all the files that you want to be on your distribution disks into this distribution tree.

Mapping the distribution tree to the disk images

This distribution tree can assume almost any form. However, your application or executable file must reside in the root directory of the tree.

Many Visual FoxPro applications require additional resource files. For example, you might want to include a configuration or Help file. If you need to add a resource file and haven't included it in your project, place the file in the application directory structure.

The following table lists some typical files that are placed in the application directory.

If you are Add these files to your application directory
Applying a custom configuration to your application Config.fpw or other configuration file
Supplying custom settings for your application Foxuser.dbf and
Foxuser.fpt
Distributing Visual FoxPro fonts Foxfont
Foxprint
Distributing a support library LibraryName.ocx or LibraryName.fll
Including a locale-specific resource file Vfp6raaa.dll, where aaa is the three-letter language code.

When you run the Setup Wizard, it creates a separate distribution directory for each disk format you specify. These directories contain all the necessary files for your disk images.

For example, if you specify both 1.44-MB and Netsetup disk images, the Setup Wizard creates two subdirectories called DISK144 and NETSETUP. If your application requires four distribution disks, the Setup Wizard creates four subdirectories named DISK1, DISK2, DISK3, and DISK4 in the DISK144 directory.

Important   Because the Setup Wizard creates two new subdirectories on your hard disk, be sure you have enough disk space for three uncompressed copies of your application.

The Setup Wizard

The Setup Wizard creates a setup routine for your application, which includes a Setup.exe file, some information files, and the compressed or uncompressed application files (stored in .cab files). The end result is a set of files that can be put onto diskettes, a network, or a web site. Users can then install your application the way they install any Windows application. While they're installing your application, users will see options that you specify when using the Setup Wizard.

After you create the distribution tree, use the Setup Wizard to create a set of disk image subdirectories containing all the files needed to install your application. You copy the files from these subdirectories to create the distribution disks for your application.

The Setup Wizard performs the following steps:

  1. Creates a file called Wzsetup.ini that contains your Setup Wizard choices for this distribution tree.

  2. Ensures all the files needed to run your distributed application are included with the application.

  3. Copies the compressed files into subdirectories it creates in the distribution disk directory.

  4. Creates setup files in the specified image directories, including Setup.inf and Setup.stf that specify installation parameters for the setup routine.

  5. Creates files named Dkcontrl.dbf and Dkcontrl.cdx in your distribution tree. These files contain statistical information about how files were compressed and assigned to disk subdirectories.

Using the Setup Wizard

Use the Setup Wizard to create distribution disks from the files in your distribution tree. The Setup Wizard enables you to create new setup routines or use information in the distribution tree as defaults.

The Setup Wizard requires a working directory called Distrib.src. If this is the first time you are using the Setup Wizard, or if for some reason the Distrib.src directory is in a location different from where the Setup Wizard is looking for it, you will see a message indicating that the directory cannot be found.

To create a setup routine and distribution directory

  1. From the Tools menu, choose Wizards.

  2. From the Wizards submenu, choose Setup.

  3. If the Setup Wizard prompts you to create or locate the Distrib.src directory, confirm that you want to create it, or choose Locate and specify the location of the directory.

For details about the options available in each screen of the Setup Wizard click the Help button in that screen or press F1.

Specifying the Distribution Tree

To specify the distribution tree, use Step 1 of the Setup Wizard. You should identify the distribution tree directory that you created to model the user installation of your application files.

The Setup Wizard expects the specified directory to contain all files and subdirectories you want to create in a user s environment. The Setup Wizard uses this directory as the source for files that it will compress into the disk image directory.

The Setup Wizard records the options you set for each distribution tree and uses them as default values the next time you create a setup routine from the same distribution tree.

Selecting Optional Components

To specify the optional components your application uses or supports, use Step 2 of the Setup Wizard. For example, if you want to make your application available using the run-time version of Visual FoxPro, choose Visual FoxPro Runtime so that the Setup Wizard includes the necessary runtime support file (Vfp6r.dll). If you're making your application available as an Automation server, choose that option.

Note   If your application includes an Automation server, the Setup program will register it automatically on the user s computer when the user installs the application.

Specifying Disk Images

To specify the different disk types that your application can be loaded from, use Step 3 of the Setup Wizard.

The Setup Wizard asks you to specify the different types of disks that your application can be loaded from. You can choose any or all of the following options:

  • 1.44 MB (3.5 inch ) disks
  • Compress Wetsetup
  • Uncompressed Netsetup

The Setup Wizard also prompts you for the name of a distribution subdirectory containing disk images for each type of disk you specify. You can create the disk image directory before you run the Setup Wizard, or you can let the Setup Wizard create the directory for you.

If you select one of the Netsetup options, the Setup Wizard creates a single directory that will contain all the files.

Customizing Distributed Installation Dialog Boxes

To customize the distributed installation dialog boxes, use Step 4 of the Setup Wizard.

The Setup Wizard asks you to specify the setup routine dialog box titles and the contents of the copyright statement.

The Setup Wizard creates installation dialog boxes with the title you specify.

Specifying a Post-Setup Action

To specify a program or action that Setup should run when the installation is finished, use Step 4 of the Setup Wizard. Typical post-setup actions might be to display a readme file or launch the setup process for a related product.

The Setup Wizard asks you to specify the name of the executable. Enter the complete command line required to run the executable, including the full path of the executable, the name of any files to pass to the program, and any command-line switches.

Note   The program that you specify must exist on the user s system, or an error will result.

Identifying Default File Destinations

To identify the default destinations for your application files, use Step 5 of the Setup Wizard.

The Setup Wizard asks you to specify:

  • The default name of the directory in which the installation program will place your application on a user s machine.
  • The default program group in which to place the startup icon for your application on a user s machine.

The setup routine will place your application in the directory folder you specify and the default application icon (or any icon you specify) in the named program group.

You can specify whether the completed setup routine will enable the user to modify either the default program group or both the default destination directory and program group.

Reviewing the File Summary

To display the results of all your choices, use Step 6 of the Setup Wizard.

The Setup Wizard displays a summary of your files and the results of all your choices and allows you to make changes in file names, file destinations, and other specifications.

Finishing the Setup Wizard Process

To start creating the setup routine for your application, choose Finish in Step 7 of the Setup Wizard. In this step you can also can also create a dependency (.dep) file that allows you to use other setup utilities to install your application.

When you choose Finish, the Setup Wizard performs the following steps:

  • It records the configuration for use the next time you create distribution disks from the same distribution tree.
  • It launches the process of creating the application disk images.

After the Setup Wizard creates the disk images you specified, you can copy the images to master disks, then copy and combine the disks with the rest of your distribution package. After you create a set of master disks, you can delete the disk image directories.



Microsoft Visual FoxPro 6. 0 Programmer's Guide 1998
Microsoft Visual FoxPro 6. 0 Programmer's Guide 1998
ISBN: 1930919042
EAN: N/A
Year: 2004
Pages: 58

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net