Templates, Tools and Utilities
for Clarion Developers

   
Products - Icetips Utilities - SetupBuilder Class


SetupBuilder Class   (ITSetupBuilderClass)

The SetupBuilder Class has 22 methods (functions) that perform a variety of tasks related to SetupBuilder or installs. You can easily include these in your software (documentation that comes with the Utilities covers this in detail) The SetupBuilder class has two main functionalities.

First is to make it easy to copy files from a common install folder, such as "All Users\Application Data" to a local folder such as "User Name\Application Data" This is very important when installing on Windows Vista because the installer normally cannot install into user folders as it requires administrator access, which changes the user account.

The second is to compile SetupBuilder projects. This can be useful if you want to automate compiling your SetupBuilder project.


The following methods are used to copy installed files:

  • SetGlobalCSIDL/SetLocalCSIDL
  • This sets the CSIDL location for the source and destination respectively when copying files from a common (global) location to a user specific (local) location.

  • CopyTheFiles
  • This method copies all files and folders from the source folder to the destination folder. A partial path (PathString) is used to determine the full source path, i.e. it is appended to the CSIDL folder for both the source and the destination. For example if the CSIDL is CSIDL_COMMON_APPDATA, and the partial PathString is "Icetips Creative\Utilities" this would mean that the source folder is set to "C:\Documents and Settings\All Users\Application Data\Icetips Creative\Utilities" The same partial folder is appended to the destination CSIDL folder. The PathString is also used to update a registry key under HKCU\Software - in this case it would be "HKCU\Software\Icetips Creative\Utilities" with a value called FilesCopied. CopyTheFiles creates this key and value if it doesn't exist and sets FilesCopied to True. This method is used by the FinishTheInstall method which you would generally call before you access any files in your software to ensure that user data has been set up.

  • SetPathString
  • The PathString contains the partial path that is used in CopyTheFiles to determine source and destination folders as well as the registry key to update.

  • FinishInstall
  • This is a "do-it-all" method that takes the CSIDL values for the source and destination and the partial path string and copies the files and does all the work. This method is all you need to use to copy the data and set everything right. You would normally call this method before you do any file access in your program to ensure that all user data has been set up.


The following methods are used to compile SetupBuilder projects:

  • CompileSBProject
  • Use this method to compile a SetupBuilder project. If you set the DestinationFolder property before you call this method the project will be compiled into that folder. If the folder does not exist it will be created. Note that this only works in SetupBuilder 6.5 build 2000 or later. In earlier builds this will be ignored and the default destination used, which is the location of the project file with a new folder created with the same name as the project file.

  • CompileSBProject
  • Use this method to compile a SetupBuilder project. If you set the DestinationFolder property before you call this method the project will be compiled into that folder. If the folder does not exist it will be created. Note that this only works in SetupBuilder 6.5 build 2000 or later. In earlier builds this will be ignored and the default destination used, which is the location of the project file with a new folder created with the same name as the project file.

  • AddCompilerVariable
  • This method can be used to pass values for compiler variables to your SetupBuilder project. This is limited to the amount of data that can be passed via the command line to the SetupBuilder compiler. Under Vista this is around 2K but under XP this should be close to 8K. This allows you to pass for example version number to user in the compile process. Note that passing the compiler variables to the project does NOT update the project, it simply instructs the compiler to use the values instead of the values in the project.

The demo application (UtilDemo.app) that is installed into the "Clarion\3rdParty\Examples\ITUtilities" folder contains a procedure called TestSetupBuilderClass that demonstrates how to use these methods to compile a SetupBuilder project as well as copy the files. This class is also documented starting on page 56 in the PDF documentation as of Beta 3.1 released on November 8, 2007.

13 Files Available for Download for Icetips Utilities

File Date Description Size File Name
2011-05-04 Icetips Utilities 1.1.2397
Build 1.1.2397 Compatible with Clarion 6.0-6.3, Clarion 7.0 - 7.3 and Clarion 8.0
Installer is now compatible with Clarion 8.0 See Version history documentation for more information.
13,256,000 ITUtilities_Install_1.1.2397.exe
2010-12-21 Icetips Utilities 1.1.2394
Build 1.1.2393 Compatible with Clarion 6.0-6.3 and Clarion 7.0 - 7.3
Installer is now compatible with Clarion 7.3
13,378,624 ITUtilities_Install_1.1.2394.exe
2010-12-01 Icetips Utilities 1.1.2392
Build 1.1.2392 Compatible with Clarion 6.0-6.3 and Clarion 7.0 - 7.2
Documentation added for File Select Class and Files Class. Updated docs for Network Class. Minor fixes to install, Date Class and templates.
13,351,672 ITUtilities_Install_1.1.2392.exe
2010-09-06 Icetips Utilities 1.1.2390
Build 1.1.2390 Compatible with Clarion 6.0-6.3 and Clarion 7.0 - 7.2
12,421,120 ITUtilities_Install_1.1.2390.exe
2010-06-06 Icetips Utilities 1.1.2387
Build 1.1.2387 Compatible with Clarion 6.0-6.3 and Clarion 7.0 - 7.2
11852,032 ITUtilities_Install_1.1.2387.exe
2010-03-15 Icetips Utilities 1.1.2374
Build 1.1.2374 Compatible with Clarion 6.0-6.3 and Clarion 7.x
11499,904 ITUtilities_Install_1.1.2374.exe
2010-02-26 Icetips Utilities 1.1.2367 BETA
Build 1.1.2367 BETA Compatible with Clarion 6.0-6.3 and Clarion 7.x
11,110,656 ITUtilities_Install_1.1.2367.exe
2010-01-27 Icetips Utilities 1.1.2359
Build 1.1.2359 Compatible with Clarion 6.0-6.3 and Clarion 7.x
10,188,296 ITUtilities_Install_1.1.2359.exe
2010-01-26 Icetips Utilities 1.1.2356
Build 1.1.2356 Compatible with Clarion 6.0-6.3 and Clarion 7.x
10,189,568 ITUtilities_Install_1.1.2356.exe
2009-04-20 Icetips Utilities 1.1.2352
Build 1.1.2352 Compatible with Clarion 6.0-6.3 and Clarion 7
8,526,192 ITUtilities_Install_1.1.2352.exe
2009-04-15 Icetips Utilities 1.1.2351
Build 1.1.2351 Compatible with Clarion 6.0-6.3 and Clarion 7
7,245,608 ITUtilities_Install_1.1.2351.exe
2008-09-02 Icetips Utilities Documentation (PDF)
PDF Documentation (189 pages) for version 1.1.2319
1,627,355 ITUtility.pdf
2007-08-14 Page of Pages demo
This small demo, using the invoice.dct from the Clarion 6.3 examples, demonstrates basic use of the Page of Pages class in the Icetips Utilities. The zip includes app, dct, tps and other necessary files. It also includes a locally compiled exe.
742,438 PageOfPages.zip

This page last modified on April 21, 2009
  
 » Log in
User Name:

Password:


No subscription?
Subscribe Now!
Lost Password
Home Products Articles Order Privacy Contact Us Site Map
Copyright 2001-2012 by Icetips Alta LLC, All Rights Reserved                 Site design by Alta Web Works                 Hosted by The Illumen Group