Deploying Visual FoxPro Solutions

(Example: DEPLOYFOX DEMO APP FULL SCRIPT.ISS)

Now that you created a basic script with the script wizard and added the VFP runtime files, your script is nearly complete. Before compiling it, however, there are a number of optional entries you can add that will improve the installation both functionally and appearance-wise.

All but one of the enhancements we mention here are made to the Setup section of the script. Listing 3 is the completed Setup section for the demo app ‚ s install script. We added several entries not generated by the script wizard. We won ‚ t mention all of them individually ‚ if you want to you can compare the code in Listing 3 with the Setup section code in Listing 1 to see which entries have been added. Most of the new entries are self-explanatory, but a few deserve special mention.

The final change we want to make to the setup script before compiling is to specify a working directory for the application ‚ s shortcuts. Do this by adding a WorkingDir parameter to the appropriate entries in the Icons section. This parameter can accept a constant as its value, so we use WorkingDir = {app} to specify the working directory for the application is the directory where the application is installed.

The value of the WorkingDir parameter determines the drive and pathname the installer inserts into the ‚Start In ‚ field on the shortcut ‚ s property sheet. Two shortcuts can launch the application in our setup script, so we need this parameter to both of them. The Icons section of the script now looks like this:

[Icons] Name: {group}\DeployFox Demo App; Filename: {app}\demoapp.exe; WorkingDir: {app} Name: {group}\Uninstall DeployFox Demo App; Filename: {uninstallexe} Name: {userdesktop}\DeployFox Appendix D Demo App; Filename: {app}\demoapp.exe; WorkingDir: {app}; Tasks: desktopicon

On The Web ‚  

The complete script for the demo app is included in the source code for this appendix as DEPLOYFOX DEMO APP FULL SCRIPT.ISS. The script in this file includes the enhancements discussed here

Listing 3. Complete the Setup section of the script by adding entries to improve the appearance and functionality of your installation.

[Setup] AppID=DeployFox Demo App AppName=DeployFox Demo App AppVerName=DeployFox Demo App 1.0 AppCopyright=Copyright 2003 Information Technology Associates AppMutex=DeployFox AppPublisher=Information Technology Associates AppPublisherURL=http://www.ita-software.com AppSupportURL=http://www.ita-software.com AppUpdatesURL=http://www.ita-software.com DefaultDirName={pf}\DeployFox\AppendixD\DemoApp DirExistsWarning=yes DefaultGroupName=DeployFox\AppendixD SourceDir=C:\DeployFox\DemoApp OutputDir=C:\DeployFox\DemoApp\Output OutputBaseFilename=DeployFox Demo App Setup LicenseFile=C:\DeployFox\AppendixD\license.rtf InfoBeforeFile=C:\DeployFox\AppendixD\InfoBefore.rtf InfoAfterFile=C:\DeployFox\AppendixD\InfoAfter.rtf MinVersion=4.01.1998,4.00.1381sp4 WindowVisible=no WizardImageFile=compiler:images\WizModernImage13.bmp WizardSmallImageFile=compiler:images\WizModernSmallImage13.bmp DisableStartupPrompt=yes

 

Категории