isc_install_precheck()
Go Up to API Function Reference
Checks the install environment for conditions such as existing servers, disk space and access, user permissions, and option dependencies.
Syntax
MSG_NO isc_install_precheck(OPTIONS_HANDLE handle, TEXT *source_path,
TEXT *dest_path)
Parameter | Type | Description |
---|---|---|
|
|
The handle to the list of options created by isc_install_set_option(); precheck returns an error if the value of handle is NULL or zero. |
<source_path> |
TEXT* |
The path where the files to be installed are located (typically on a CDROM); this check is skipped if source_path is NULL. |
<dest_path> |
TEXT* |
The path to the desired install location; the disk space check is skipped if dest_path is NULL. |
Description
isc_install_precheck()
performs a number of checks to ensure that installation is possible. Specifically, it checks:
- That a valid operating system is present (currently, it checks for all valid Windows platforms).
- That an InterBase Classic server (version 4.1 or earlier) is not present, since the InterBase server (SuperServer) is a multithreaded architecture and cannot coexist with the Classic server.
- That source_path exists and is a directory readable by the user; no check is performed if source_path is NULL or an empty string.
- That dest_path is a directory writable by the user and that the drive contains enough space to install the selected components; no check is performed if dest_path is NULL or an empty string.
- If the
IB_SERVER
option is specified, checks whether any existing newer or older version of the SuperServer is already running or not. - On Windows server platforms, if the
IB_SERVER
option is specified, checks that the user performing the install has administrative privileges. - The dependencies of the options specified/required; these dependencies are described in the table below:
If any of these are specified: | These options must be installed also: |
---|---|
|
|
|
|
|
|
|
|
Example
The following call creates a destination directory, and checks it.
strcpy(dest, dest_path); if(access(dest, 0) == -1) { len = strlen(dest); if(dest[len - 1] == ‘\\’ || dest[len - 1] == ‘/’) dest[len - 1] = ‘\0’; status = UTIL_make_directory(dest); if(status > isc_install_success) return status; } status = isc_install_precheck(handle, source_path, dest); if(status > isc_install_success) return status;
Return value
Returns isc_install_success
if the function executes successfully, a number larger than isc_install_success if an error occurs, and a number smaller than isc_install_success
if the function completes but with warnings. Call isc_install_get_message()
to obtain the error message when the result is not equal to isc_install_success.
isc_install_precheck()
returns an error if any of the checks besides option dependencies fail. It returns a warning if necessary options have not been specified.