www.icetips.com  Icetips Utilities Documentation 10/28/2008    

SetupBuilder Class Overview

Previous  Top  Next  


 

The SetupBuilder Class contains various methods to make working with SetupBuilder installs easier.  Several methods are not really SetupBuilder specific and could be used with other installation software as well.  This particularly applies to methods that copy files from a "global" location to a "local" location.  A Global location is a path that is accecssible by all users under all operating systems.  A Local location is a path that is accessible only by the current user. 

 

The SetupBuilder class has two main type of methods.  The first one serves in your application to copy files from a globally accessible location where SetupBuilder installs the files, to a locally accessible location where your application uses them.  This is particularly useful under Windows Vista where the installer can only install files into folders that are open to all users.  That location may not be appropriate, or even visible, for the users of your application, i.e. if there is user specific data.  These methods copy the data from the global folder to a local folder and update a registry key so you can check if the data has been copied. 

 

The second type are methods that you can use to call SetupBuilder to compile your projects, update compiler variables and determine destination folder for the compiled install and build report.  Please note that you must have SetupBuilder version 6.6 build 2000 or later for this to work properly.  Previous versions will be able to compile the project, but can not change the output folder or the name of the compiled install executable. 

 

Please check the TestSetupBuilderClass procedure in the UtilDemo.app that is located in your "Clarion\3rdParty\Examples\ITUtilities" folder.  It allows you to pick a source and destination CSIDLs for the copying part of the class, as well as pick a project and destination for compiling your project. 

 

 

ITSetupBuilderClass     CLASS(ITVersionClass),TYPE,Module('ITSetupBuilderClass.clw'),|

                            Link('ITSetupBuilderClass',_ITUtilLinkMode_),DLL(_ITUtilDllMode_)

CompilerVariables         &SBCompileVars

DestinationFolder         CString(2049)

FilesCopied               Byte

GlobalCSIDL               Long

LocalCSIDL                Long

PathString                CString(1025)  ! Path for CSIDL_COMMON, CSIDL_LOCAL, HKLM and HKCU

SBBuildNumber             Long

SBCommandLine             &CString

SBErrorLogFile            CString(2049)  ! Error log file if an error occurs

                                        ! during compile. If no error occurs,

                                        ! this file does not exist.

SBExecutable              CString(2049)  ! Setupbuilder.exe path and name for

                                        ! calling compiler

SBGlobalInstallPath       CString(2049)  ! CSIDL_COMMON

SBGlobalRegistryKey       CString(2049)  ! HKLM

SBHtmlLogFile             CString(2049)  ! The HTML file created after a

                                        ! compile

SBLocalInstallPath        CString(2049)  ! CSIDL_LOCAL

SBLocalRegistryKey        CString(2049)  ! HKCU

SBMajorVersion            Byte

SBMinorVersion            Byte

SBProjectToCompile        CString(2049)  ! Project name and path.

 

AddCompilerVariable       Procedure(String pVariable, |

                                   String pValue, |

                                   Byte pQuoteValue=0)

BuildCommandLine          Procedure(String pBaseCommandLine),String

CompileSBProject          Procedure(String pProjectToCompile),Long,PROC

CopyTheFiles              Procedure(),Long,PROC   ! Returns number of files copied

CreateDestinationFolder   Procedure(),Long,PROC   ! Creates the Destination Folder tree

FinishInstall             Procedure(String pPath, Long pLocal, Long pGlobal),Long,PROC

GetDestinationFolder      Procedure(),String,PROC ! Fills DestinationFolder and returns it.

GetGlobalKey              Procedure(),String

GetGlobalPath             Procedure(),String

GetLocalKey               Procedure(),String

GetLocalPath              Procedure(),String

GetSBExecutable           Procedure(),BYTE        ! Returns true if executable

                                                 ! is found

GetSBVersionInformation   Procedurex

SetDestinationFolder      Procedure(String pDestination)

SetGlobalCSIDL            Procedure(Long pCSIDL)

SetLocalCSIDL             Procedure(Long pCSIDL)

SetPathString             Procedure(String pPathString)

ShowHTMLLogFile           Procedure

ShowLogFile               Procedure(Byte pOpenInWindow=True)

ShowLogFile               Procedure(INIClass pINIMgr)

Construct                 Procedure

Destruct                  Procedure

                       END

 

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/overview_setupbuilder.htm