As we said from the beginning, InstaFox comes with the source code so you can completely customize either the InstaFox Wizard, InstaFox Installer, or both. This section covers the folder structures, classes, main application program, and other developer tools included with the source code for each application.
InstaFox Installer ‚ s folder structure is described in Table 6 .
Folder Name | Folder Description |
---|---|
APPDIR | Application folder. Where all of the files to distribute are placed |
BMPDIR | Graphics folder. Currently, this only contains the InstaFox icon |
CLSDIR | Class folder. Contains the InstaFox class library |
FRMDIR | Form folder. Contains the installer forms |
PJTDIR | Project folder. Contains the installer project files |
PRGDIR | Program folder. Contains the program (PRG) files |
INSTAFOX.PRG is the main program for the application. Its main function is to set the path , set up the class library, create the global application object, and then start the application. It also contains the error handler logic because a programming error may occur before the application object is setup.
There are two other programs included in the project ‚ SETDPATH.PRG and RESET.PRG. SETDPATH.PRG sets the development path. Run this first before opening the project to set the path for the application. Sometimes during the modification and debugging process developers ‚“escape ‚½ out of the application, this can cause classes to be left opened. When this happens the ‚“class in use ‚½ error message occurs. RESET.PRG attempts to release all open classes, forms, and programs so you can continue making changes.
Most of the Installer code is located in the INSTAFOX.VCX class library. This library contains several classes. Most of the classes used in the Installer application are sub-classed VFP base classes like cmdBase, txtBase, chkBase, etc. If you need to change a textbox ‚ s font and size change its properties in the txtBase class and all of the Installer textboxes are set to the new font and size .
CustSetUpGlobal is the main application class. This is the class the INSTAFOX.PRG uses to create its global application object. The CustSetUpGlobal class consists of three types of methods ‚ functions, commands, and queries. Table 7 and 8 list the function and command methods.
Method | Description |
---|---|
CheckRequiredFile | Accepts a file name parameter, and then checks the file name to make sure the file is present and displays a message if it is not. |
CopyFile | Accepts ‚“from ‚½ file name and ‚“to ‚½ file name parameters and copies the file to the specified location. |
CreateShorts | Creates the short cuts for the installed application. |
Method | Description |
---|---|
SetInstallType | Accepts a value parameter used to set the icInstallType property of the application object. |
SetStartDir | Accepts a value parameter used to set the icStartDir property of the application object. |
Query methods all start with the letter ‚“q ‚½ followed by the data type of the value returned. For example, a method name beginning with a ‚“qc ‚½ returns a character string and a method beginning in ‚“qn ‚½ returns a numeric value. Some queries just return the value of a custom property. For instance, QCLicenseFile method just returns the icLicenseFile property.
When you finish making changes to the installer, you can test your changes by running the main program (INSTAFOX.PRG) directly from the project. This way you can use your development tools like the debugger. To test the INSTAFOX.EXE, build the EXE, place it in the APPDIR folder, and run it from there.
InstaFox Wizard ‚ s folder structure is described in Table 9 .
Folder Name | Folder Description |
---|---|
APPDIR | Application folder. Where all of the files to distribute are placed |
BMPDIR | Graphics folder. Currently, this only contains the InstaFox icon |
CLSDIR | Class folder. Contains the InstaFox class library |
FRMDIR | Form folder. Contains the installer forms |
PJTDIR | Project folder. Contains the installer project files |
PRGDIR | Program folder. Contains the program (PRG) files |
IFWIZARD.PRG is the main program for the wizard application. Its main function is to set the wizard application ‚ s path, define where the APPDIR folder is located, start up the main form \FRMDIR\WZWIZFRM.SCX, and wait for the user to do something.
Most of the Wizard code is located in the WZWIZFRM.SCX. This form consists of a tabless page frame. All of the controls used on this form are located in the ZZWIZARD.VCX class library. You may modify this form and class to suit your personal needs.
All of the classes in InstaFox can be subclassed. According to the InstaFox developers, you do not have to worry about updates overwriting subclass changes because they send a complete set of all the files ‚ there is no ‚“component ‚½ update where only selected items are updated.
There are two other programs included in the project ‚ SETDPATH.PRG and RESET.PRG. SETDPATH.PRG sets the development path. Run this first before opening the project to set the path for the application. We are all familiar with the ‚“class in use ‚½ error message when making modifications to our applications. RESET.PRG attempts to release all open classes, forms, and programs so you can continue making changes.