Functions | |
bool | fwInstallation_isPatchInstalled (string patch) |
int | fwInstallation_checkPvssVersion (string reqVersion) |
float | fwInstallation_pvssVersionAsFloat (string reqVersion, int &major, int &minor, int &sp) |
int | fwInstallation_getPvssSystemProperties (string systemName, dyn_mixed &pvssSystem) |
void | fwInstallation_throw (string msg, string severity="ERROR", int code=1) |
dyn_string | fwInstallation_orderDplFiles (dyn_string files, dyn_int attribs) |
int | fwInstallation_closePanel (bool closeIfConnected=false) |
string | fwInstallation_getHostname () |
string | fwInstallation_getInstallationDp () |
bool | fwInstallation_deleteFromConfigFile () |
void | fwInstallation_flagDeprecated (string deprecated, string toBeUsed="") |
string | fwInstallation_findFileForPvssVersion (string baseFileName, dyn_string targetVersions=makeDynString(), bool considerSpLevel=FALSE) |
int | fwInstallation_getHostProperties (string hostname, dyn_mixed &pvssHostInfo) |
int | fwInstallation_sendToTrash (string filename, string trashPath="") |
int | fwInstallation_emptyTrash (string path="") |
bool | fwInstallation_fileCompareBinary (string filename1, string filename2) |
int | fwInstallation_copyFile (string source, string destination, string trashPath="", bool compare=true) |
int | fwInstallation_registerProjectPath (string sPath) |
string | fwInstallation_getComponentVersion (string component) |
bool | fwInstallation_isComponentInstalled (string component, string &version) |
int | fwInstallation_getComponentSourceDir (string component, string &sourceDir) |
string | fwInstallation_dp2name (string dp) |
fwInstallation_updateComponentDps () | |
void | fwInstallation_addLibToConfig () |
int | fwInstallation_updateDPT () |
int | fwInstallation_init (bool runPostInstall=true) |
int | fwInstallation_executePostInstallScripts () |
int | fwInstallation_createTrash (string sourceDir) |
int | fwInstallation_updateVersion () |
int | fwInstallation_getToolVersion (string &version, string systemName="") |
string | fwInstallation_getAgentDp () |
string | fwInstallation_getAgentRequestsDp () |
bool | fwInstallation_isAgentInstalled () |
int | fwInstallation_installAgent () |
int | _fwInstallation_createAgentDataPointType (string type, bool create) |
int | fwInstallation_getProjPaths (dyn_string &projPaths) |
int | fwInstallation_backupProjectConfigFile () |
int | fwInstallation_setProjPaths (dyn_string projPaths) |
int | fwInstallation_addProjPath (string projPath, int position) |
int | fwInstallation_removeProjPath (string projPath) |
string | fwInstallation_getComponentDp (string componentName) |
int | fwInstallation_getComponentInfo (string componentName, string componentProperty, dyn_anytype &componentInfo) |
dyn_string | fwInstallation_getInstalledComponentDps () |
int | fwInstallation_getInstalledComponents (dyn_dyn_string &componentsInfo) |
int | fwInstallation_getAvailableComponents (dyn_string componentPaths, dyn_dyn_string &componentsInfo, string component="*", bool scanRecursively=false) |
int | fwInstallation_popup (string popupText) |
string | paGetProjName () |
fwInstallation_getApplicationSystem (string applicationName, dyn_string &systemNames) | |
string | fwInstallation_getPvssVersion (dyn_string &patches) |
fwInstallation_showHelpFile (string componentName, string systemName="") | |
int | _fwInstallation_getConfigFile (dyn_string &configLines) |
int | fwInstallation_saveFile (dyn_string &configLines, string filename) |
_fwInstallation_DeleteComponentFromConfig (string componentName) | |
_fwInstallation_createDataPointTypes (bool create, int &result) | |
string | _fwInstallation_proposeInstallationDir () |
int | fwInstallation_getComponentsInfo (string tableName, string sourceWidget, string systemName="", bool scanRecursively=false) |
fwInstallation_componentInstalled (string componentName, string requestedComponentVersion, int &result, string systemName="", bool beStrict=false) | |
synchronized | fwInstallation_getInstalledComponentsUI (string systemName="") |
fwInstallation_showMessage (dyn_string message) | |
fwInstallation_evalScriptFile (string componentInitFile, int &iReturn) | |
int | _fwInstallation_CompareVersions (string installedComponentVersion, string requestedComponentVersion, bool beStrict=false) |
int | fwInstallation_loadProjPaths (dyn_string &proj_paths) |
int | fwInstallation_deleteFiles (dyn_string &componentFiles, string installationDirectory) |
fwInstallation_writeToMainLog (string message) | |
string | _fwInstallation_baseDir (string filePath) |
string | _fwInstallation_fileName (string filePath) |
fwInstallation_putComponentsInOrder_Install (dyn_string &componentsNames, dyn_string &componentsVersions, dyn_string &componentFiles, dyn_string &componentFilesInOrder) | |
fwInstallation_readComponentRequirements (string descFile, dyn_string &dynRequiredComponents) | |
int | fwInstallation_getPmonInfo (string &user, string &pwd) |
int | fwInstallation_forceProjectRestart () |
string | fwInstallation_getComponentPath (string componentFile) |
int | fwInstallation_getRegisterOnly (string destinationDir, string componentName, bool forceOverwriteFiles, bool isSilent) |
int | fwInstallation_installRequiredComponents (string componentName, dyn_string dynRequiredComponents, string sourceDir, bool forceInstallRequired, bool forceOverwriteFiles, bool isSilent, int &requiredInstalled, bool &actionAborted) |
int | fwInstallation_checkScript (string sourceDir, string subPath, string script) |
int | fwInstallation_verifyPackage (string sourceDir, string subPath, string componentName, string destinationDir, bool registerOnly, dyn_string dynInitFiles, dyn_string dynPostInstallFiles, dyn_string dynDeleteFiles, dyn_string dynPostDeleteFiles, dyn_string dynFileNames, int isSilent, bool &actionAborted) |
int | fwInstallation_copyComponentFiles (string componentName, string sourceDir, string subPath, string destinationDir, dyn_string dynFileNames, bool registerOnly, bool isSilent) |
int | fwInstallation_importComponentAsciiFiles (string componentName, string sourceDir, string subPath, dyn_string dynDplistFiles, bool updateTypes=true) |
int | fwInstallation_importConfigFiles (string componentName, string sourceDir, string subPath, dyn_string dynConfigFiles_general, dyn_string dynConfigFiles_linux, dyn_string dynConfigFiles_windows) |
int | fwInstallation_executeComponentInitScripts (string componentName, string sourceDir, string subPath, dyn_string dynInitFiles, int isSilent) |
int | fwInstallation_storeComponentPostInstallScripts (dyn_string dynPostInstallFiles_current) |
int | fwInstallation_createComponentInternalDp (string componentName, string componentVersion, string descFile, int isItSubComponent, string sourceDir, string date, string helpFile, string destinationDir, dyn_string dynComponentFiles, dyn_string dynConfigFiles_general, dyn_string dynConfigFiles_linux, dyn_string dynConfigFiles_windows, dyn_string dynInitFiles, dyn_string dynPostInstallFiles, dyn_string dynDeleteFiles, dyn_string dynPostDeleteFiles, dyn_string dynDplistFiles, dyn_string dynRequiredComponents, dyn_string dynSubComponents, dyn_string dynScriptsToBeAdded, int requiredInstalled, dyn_string comments) |
int | fwInstallation_checkComponentBrokenDependencies () |
int | fwInstallation_installComponent (string descFile, string sourceDir, bool isItSubComponent, string &componentName, bool &componentInstalled, string &dontRestartProject, string subPath="", bool forceInstallRequired=false, bool forceOverwriteFiles=false, bool isSilent=false, bool installSubComponents=true) |
int | fwInstallation_setComponentInstallationStatus (string componentName, bool ok) |
fwInstallation_getListOfNotProperlyInstalledComponents (dyn_string &dynNotProperlyInstalled) | |
fwInstallation_getNotInstalledComponentsFromRequiredComponents (dyn_string &dynRequiredComponents, string &strNotInstalledNames) | |
fwInstallation_AddComponentIntoConfig (string componentConfigFile, string componentName) | |
int | fwInstallation_AddComponentIntoConfigIntoMemory (dyn_string &loadedSections, dyn_dyn_string &configSectionTable, dyn_string &configLines, string fileName, string componentName) |
int | fwInstallation_addLinesIntoSection (dyn_string &configLines, string currentSection, dyn_string linesToAdd) |
int | fwInstallation_addValueIntoMemory (dyn_dyn_string &configSectionTable, string section, string parameter, string value) |
int | fwInstallation_deleteComponentFromConfigInMemory (dyn_string &loadedSections, dyn_dyn_string &configSectionTable, dyn_string &configLines, string componentName) |
int | fwInstallation_configContainsValue (dyn_dyn_string &configSectionTable, string section, string parameter, string value) |
int | fwInstallation_loadConfigIntoTables (dyn_string &loadedSections, dyn_dyn_string &configSectionTable, dyn_string &configLines, string fileName) |
int | fwInstallation_changeProjPaths (dyn_string projPaths) |
int | fwInstallation_createPath (string sPath, bool createDirectory=true) |
fwInstallation_getComponentDescriptionPVSSDB (string componentName) | |
FVR: 29/03/2006. | |
fwInstallation_putComponentsInOrder_Delete (dyn_string componentsNames, dyn_string &componentsNamesInOrder) | |
fwInstallation_getListOfDependentComponents (string strComponentName, dyn_string &dynDependentComponents) | |
int | fwInstallation_deleteComponent (string componentName, bool &componentDeleted, bool deleteAllFiles=TRUE, bool deleteSubComponents=true) |
int | fwInstallation_checkDistribution (string sourceDir, dyn_string requiredComponents, dyn_string &dsFileComponentName, dyn_string &dsFileVersions, dyn_string &dsFileComponent) |
int | fwInstallation_checkInstalledComponent (string componentName, string version="") |
int | fwInstallation_checkTargetDirectory (string destinationDir, string componentName, string &versionInstalled) |
dyn_string | fwInstallation_getFileNamesRec (string dir=".", string pattern="*") |
fwInstallation_recurserFileNames (string dir, string pattern, dyn_string &fileNames) | |
int | fwInstallation_getDescriptionFile (string componentName, string componentVersion, string sourceDir, string &descriptionFile, bool &isItSubComponent) |
int | fwInstallation_isSubComponent (string xmlFile, bool &isSubComponent) |
int | fwInstallation_getDistPort () |
string | fwInstallation_getPmonUser () |
string | fwInstallation_getPmonPwd () |
int | fwInstallation_getProjectProperties (dyn_mixed &projectInfo) |
int | fwInstallation_loadInitFile () |
int | fwInstallation_isPmonProtected () |
Variables | |
const string | csFwInstallationToolVersion = "5.0.0" |
const string | csFwInstallationLibVersion = "5.0.0" |
const string | gFwInstallationComponentName = "fwInstallation" |
const string | gFwInstallationConfigFile = "fwInstallation.config" |
const string | gFwInstallationInitFile = "fwInstallationInit.config" |
const int | gFwInstallationError = -1 |
const int | gFwInstallationOK = 0 |
bool | gFwInstallationErrorShown = FALSE |
bool | gFwYesToAll = FALSE |
string | fwInstallation_VERSION_KEYWORD = "%VERSION%" |
const string | gFwTrashPath = "/fwTrash/" |
fwInstallation.ctl: Definition of variables | |
The following variables are used by the fwInstallationManager.ctl library | |
dyn_bool | gButtonsEnabled |
string | gUserName |
string | gPassword |
string | gDebugFlag |
int | gSelectedMan |
int | gManShifted |
bool | gRefreshManagerList |
int | gRefreshSec |
int | gRefreshMilli |
int | gRefreshTime |
string | gTcpHostName |
int | gTcpPortNumber |
int | gTcpFileDescriptor |
int | gTcpFileDescriptor2 |
string | gTcpFifo |
string | gTestVariable |
bool | gShowLicenseWarning |
int | gErrorCounter |
bool | gCloseEnabled |
dyn_string | gParams |
string | gFwInstallationPmonUser |
string | gFwInstallationPmonPwd |
This package contains general functions of the FW Component Installation tool
string _fwInstallation_baseDir | ( | string | filePath | ) |
This function retrieves the path from a full filename
filePath | (in) full file name (basedir + filename) |
int _fwInstallation_CompareVersions | ( | string | installedComponentVersion, | |
string | requestedComponentVersion, | |||
bool | beStrict = false | |||
) |
This function compares two component versions
installedComponentVersion | (in) version name as string of the component installed | |
requestedComponentVersion | (in) required component version | |
beStrict | (in) if set to true, the comparison will required that both component versions as identical |
int _fwInstallation_createAgentDataPointType | ( | string | type, | |
bool | create | |||
) |
This function creates the internal dp-types of the installtation tool
type | name of the dp-type to be created | |
create | flag to indicated if the dp-type has to be overwritten (obsolete, legacy) |
_fwInstallation_createDataPointTypes | ( | bool | create, | |
int & | result | |||
) |
This function creates the Installation Component DPT and DP
create | (in) flag to indicate if an existing dp-type has to be overwritten (obsolete, legacy) | |
result | (out) result of the operation, 0 if OK, -1 if error |
_fwInstallation_DeleteComponentFromConfig | ( | string | componentName | ) |
This function deletes the information for the component from the project config file.
componentName,: | the name of a component |
string _fwInstallation_fileName | ( | string | filePath | ) |
This function retrieves the name of a file from the full path to the file
filePath | (in) full file name (basedir + filename) |
int _fwInstallation_getConfigFile | ( | dyn_string & | configLines | ) |
This function gets all entries from the config file into string structures
configLines,: | dyn_string containing the lines from the config file |
string _fwInstallation_proposeInstallationDir | ( | ) |
This function proposes an installation directory
fwInstallation_AddComponentIntoConfig | ( | string | componentConfigFile, | |
string | componentName | |||
) |
This function reads the information from the componentConfigFile and copies it into the project config file. Function uses the following functions: fwInstallation_loadConfigIntoTables, fwInstallation_AddComponentIntoConfigIntoMemory fwInstallation_saveFile
componentConfigFile,: | the name of a componentConfigFile | |
componentName,: | the name of a component |
int fwInstallation_AddComponentIntoConfigIntoMemory | ( | dyn_string & | loadedSections, | |
dyn_dyn_string & | configSectionTable, | |||
dyn_string & | configLines, | |||
string | fileName, | |||
string | componentName | |||
) |
This function reads the information from the component config file and saves the information into memory: loadedSections and configSectionTable - the tables containing the information about the sections:parameters:values configLines: the table containing the lines of a config file
loadedSections,: | the list of loaded sections | |
configSectionTable,: | the memory representation of a config file [1][i] - [section:parameter] , [i+1][j] - [value] | |
configLines,: | the dyn_string containing the lines of a config file | |
fileName,: | the name of a config file of a component | |
componentName,: | the name of a component |
void fwInstallation_addLibToConfig | ( | ) |
This function adds the main libraries of the installation tool to the config file of the project
int fwInstallation_addLinesIntoSection | ( | dyn_string & | configLines, | |
string | currentSection, | |||
dyn_string | linesToAdd | |||
) |
This function adds the lines from linesToAdd into the configLines under the section specified by currentSection
configLines,: | the dyn_string with file lines | |
currentSection,: | the name of a currentSection | |
linesToAdd,: | the lines to be added |
int fwInstallation_addProjPath | ( | string | projPath, | |
int | position | |||
) |
This function add a project path to the config file.
projPath,: | string that contains the project path to be added to the config file | |
position,: | position of the added path in the list (n = specified position, try 999 for last before main project path) |
int fwInstallation_addValueIntoMemory | ( | dyn_dyn_string & | configSectionTable, | |
string | section, | |||
string | parameter, | |||
string | value | |||
) |
This function adds [section:parameter] , [value] data into the memory representation of a config file
configSectionTable,: | the memory representation of a config file [1][i] - [section:parameter] , [i+1][j] - [value] | |
section,: | the value of a section | |
parameter,: | the value of a parameter | |
value,: | the value of a "value" |
int fwInstallation_backupProjectConfigFile | ( | ) |
This function backs up the project config file. It is intendended to be called before component installation/uninstallation
int fwInstallation_changeProjPaths | ( | dyn_string | projPaths | ) |
This function saves the new proj_path order into the config file
projPaths | (in) the value with a list of proj_paths |
int fwInstallation_checkComponentBrokenDependencies | ( | ) |
This function checks if there is any dependency broken among the installed components and sets the values of the internal dps accordingly
int fwInstallation_checkDistribution | ( | string | sourceDir, | |
dyn_string | requiredComponents, | |||
dyn_string & | dsFileComponentName, | |||
dyn_string & | dsFileVersions, | |||
dyn_string & | dsFileComponent | |||
) |
This function resolves the XML files and versions of the compoents required for installation during the installation of a particular component
sourceDir | (in) source directory | |
requiredComponents | (in) list of required components | |
dsFileComponentName | (out) list of names corresponding to the required components (obsolete, legacy) | |
dsFileVersions | (out) list versions corresponding to the required components | |
dsFileComponent | (out) list of XML files corresponding to the required components |
int fwInstallation_checkInstalledComponent | ( | string | componentName, | |
string | version = "" | |||
) |
This function checks if a given component is correctly installed
componentName,: | Name of the component to be checked | |
version,: | Version of the component to be checked. Optional parameter: if emtpy it checks for any version. |
int fwInstallation_checkPvssVersion | ( | string | reqVersion | ) |
Check if the PVSS version is equal or newer than the required PVSS version passed as argument
reqVersion | required PVSS version |
int fwInstallation_checkScript | ( | string | sourceDir, | |
string | subPath, | |||
string | script | |||
) |
This function checks the syntax of a component script
sourceDir | (in) source directory for installation | |
subPath | (in) path to the appended to the source directory | |
script | name of the script to be tested |
int fwInstallation_checkTargetDirectory | ( | string | destinationDir, | |
string | componentName, | |||
string & | versionInstalled | |||
) |
This function checks if a previous installation of a particular directory exists in the target directiory
destinationDir | (in) target directory | |
componentName | (in) name of the component to be checked | |
versionInstalled | (in) version of the component installed, if any |
int fwInstallation_closePanel | ( | bool | closeIfConnected = false |
) |
This functions is to be called from the close event of a panel. It checks whether the connection with the event manager is established or not. If the connection is down, the function will call exit() to close the actual panel. If the connection is to the event manager is still up, the calling code can decide whether the panel must closed or not. This is done through the argument closeIfConnected. Typically the argument will be set to false in the cases where the developer wants to prevent that the user closes the panel by clicking on the top-right 'x' of the window.
closeIfConnected,: | (boolean) Defines whether the current panel has to be close if the connection to the event manager is still up. The default value is false (i.e. the function will not close the panel) |
fwInstallation_componentInstalled | ( | string | componentName, | |
string | requestedComponentVersion, | |||
int & | result, | |||
string | systemName = "" , |
|||
bool | beStrict = false | |||
) |
This function checks if the component is already installed. It checks the PVSSDB.
componentName | (in) the name of a component to be checked | |
requestedComponentVersion | (in) requested version of the component | |
result | (out) result of the operation (obsolete, legacy) | |
systemName | (in) system where to check if the component is installed | |
beStrict | (in) flag to indicate an exact match of the versions installed and required |
int fwInstallation_configContainsValue | ( | dyn_dyn_string & | configSectionTable, | |
string | section, | |||
string | parameter, | |||
string | value | |||
) |
This function checks whether the section-parameter-value is defined in the memory
configSectionTable,: | the memory representation of a config file [1][i] - [section:parameter] , [i+1][j] - [value] | |
section,: | the value of a section | |
parameter,: | the value of a parameter | |
value,: | the value of a "value" |
int fwInstallation_copyComponentFiles | ( | string | componentName, | |
string | sourceDir, | |||
string | subPath, | |||
string | destinationDir, | |||
dyn_string | dynFileNames, | |||
bool | registerOnly, | |||
bool | isSilent | |||
) |
This function copies all component files
componentName | (in) name of the component being installed | |
sourceDir | (in) source directory for installation | |
subPath | (in) path to be appended to the sourceDir | |
destinationDir | (in) target directory for installation | |
dynFileNames | (in) component files | |
registerOnly | (in) flag indicating whether file copying can be avoided or not if the files already exist | |
isSilent | (in) flag to define if the installation is silent, i.e. no pop-ups |
int fwInstallation_copyFile | ( | string | source, | |
string | destination, | |||
string | trashPath = "" , |
|||
bool | compare = true | |||
) |
Function to copy files. If blind copy fails (e.g. an executable is in used), the function will try to rename the existing file and only then copy the file once again.
source | (in) name of the file to be copied | |
destination | (in) target file name including full path | |
trashPath | (in) path to trash | |
compare | (in) argument used to compare files before copying. If files are identical the file is not re-copied. |
int fwInstallation_createComponentInternalDp | ( | string | componentName, | |
string | componentVersion, | |||
string | descFile, | |||
int | isItSubComponent, | |||
string | sourceDir, | |||
string | date, | |||
string | helpFile, | |||
string | destinationDir, | |||
dyn_string | dynComponentFiles, | |||
dyn_string | dynConfigFiles_general, | |||
dyn_string | dynConfigFiles_linux, | |||
dyn_string | dynConfigFiles_windows, | |||
dyn_string | dynInitFiles, | |||
dyn_string | dynPostInstallFiles, | |||
dyn_string | dynDeleteFiles, | |||
dyn_string | dynPostDeleteFiles, | |||
dyn_string | dynDplistFiles, | |||
dyn_string | dynRequiredComponents, | |||
dyn_string | dynSubComponents, | |||
dyn_string | dynScriptsToBeAdded, | |||
int | requiredInstalled, | |||
dyn_string | comments | |||
) |
This function creates the internal dp for the installed component
componentName | (in) name of the component being installed | |
componentVersion | (in) component version | |
descFile | (in) component description file | |
isItSubComponent | (in) component description file | |
sourceDir | (in) source directory for installation | |
date | (in) source directory for installation | |
helpFile | (in) source directory for installation | |
destinationDir | (in) source directory for installation | |
dynComponentFiles | (in) source directory for installation | |
dynConfigFiles_general | (in) list of dpl files to be imported | |
dynConfigFiles_linux | (in) list of dpl files to be imported (linux only) | |
dynConfigFiles_windows | (in) list of dpl files to be imported (windows only) | |
dynInitFiles | (in) list of init scripts | |
dynPostInstallFiles | (in) list of post install scritps | |
dynDeleteFiles | (in) list of delete scripts | |
dynPostDeleteFiles | (in) list of post-delete scripts | |
dynDplistFiles | (in) list of dpl files | |
dynRequiredComponents | (in) list of required components | |
dynSubComponents | (in) list of subcomponents | |
dynScriptsToBeAdded | (in) list of scritps | |
requiredInstalled | (in) flag to indicated if the required component were installed | |
comments | (in) component comments |
int fwInstallation_createPath | ( | string | sPath, | |
bool | createDirectory = true | |||
) |
This function creates a project path, either creates the directory or just adds the path
sPath,: | project path to be created | |
createDirectory | flag to indicate if the directory has to be created if it does not exist (default value is true) |
int fwInstallation_createTrash | ( | string | sourceDir | ) |
This function creates the trash for the installation tool
sourceDir | (in) path where to create the trash as string |
int fwInstallation_deleteComponent | ( | string | componentName, | |
bool & | componentDeleted, | |||
bool | deleteAllFiles = TRUE , |
|||
bool | deleteSubComponents = true | |||
) |
this function deletes the component files, the component information from the config file and the internal DP created by the installation tool with the description of a component. This function does not delete the component data point types ( ETM is planning to add the functionality of deleting the DPT, DP from the ASCII Manager ).
componentName | (in) the name of a component to be deleted | |
componentDeleted | (out) result of the operation | |
deleteAllFiles | (in) flag indicating if the components files must also be deleted. Default value is true. | |
deleteSubComponents | flag indicating if the subcomponent must also be deleted. Default value is true. |
int fwInstallation_deleteComponentFromConfigInMemory | ( | dyn_string & | loadedSections, | |
dyn_dyn_string & | configSectionTable, | |||
dyn_string & | configLines, | |||
string | componentName | |||
) |
This function deletes the config info about a component from the memory representation of a config file - [section:parameter] , [value] and from the configLines dyn_string
loadedSections,: | the list of sections loaded from the config file | |
configSectionTable,: | the memory representation of a config file [1][i] - [section:parameter] , [i+1][j] - [value] | |
configLines,: | the dyn_string containing the lines from the config file | |
componentName,: | the name of a component to be deleted |
int fwInstallation_deleteFiles | ( | dyn_string & | componentFiles, | |
string | installationDirectory | |||
) |
this function deletes the component files
componentFiles,: | the dyn_string with the names of the files to be deleted | |
installationDirectory,: | the name of the installation directory |
bool fwInstallation_deleteFromConfigFile | ( | ) |
Returns wether the DB-agent must delete or not from the project config file during synchronization with the System Configuration DB
string fwInstallation_dp2name | ( | string | dp | ) |
This function returns the name of a component correspoding to an internal dp of the installation tool
dp | (in) name of the dp of the installation tool |
int fwInstallation_emptyTrash | ( | string | path = "" |
) |
Empty the trash of the FW Component Installation Tool
path | (in) path to the trash. Empty path means use the default path |
fwInstallation_evalScriptFile | ( | string | componentInitFile, | |
int & | iReturn | |||
) |
This function executes a script from the component .init file
componentInitFile,: | the .init file with the functions to be executed | |
iReturn,: | sucess 0, in the event of an error -1 |
int fwInstallation_executeComponentInitScripts | ( | string | componentName, | |
string | sourceDir, | |||
string | subPath, | |||
dyn_string | dynInitFiles, | |||
int | isSilent | |||
) |
This function executes the component init scripts
componentName | (in) name of the component being installed | |
sourceDir | (in) source directory for installation | |
subPath | (in) path to be appended to the sourceDir | |
dynInitFiles | (in) list of init files to be executed | |
isSilent | (in) flag to define if the installation is silent, i.e. no pop-ups |
int fwInstallation_executePostInstallScripts | ( | ) |
This function lauches the pending post-installation of scripts of installed components (if any)
bool fwInstallation_fileCompareBinary | ( | string | filename1, | |
string | filename2 | |||
) |
Function to make a binary comparison of two files. Contribution from TOTEM.
filename1 | (in) name of the first file for comparison | |
filename2 | (in) name of the second file for comparison |
string fwInstallation_findFileForPvssVersion | ( | string | baseFileName, | |
dyn_string | targetVersions = makeDynString() , |
|||
bool | considerSpLevel = FALSE | |||
) |
Function during the installation of the components to resolve the right name for a file depending on the current PVSS version
baseFileName | (in) base name of the file | |
targetVersions | (in) name of the target PVSS version | |
considerSpLevel | (in) argument that defines whether the Service Pack level has to be also taken into account |
void fwInstallation_flagDeprecated | ( | string | deprecated, | |
string | toBeUsed = "" | |||
) |
Function used to flag deprecated functions in the library
deprecated | name of the deprecated function | |
toBeUsed | name of the function to be used instaed. If an empty argument is passed, a different message will be shown, telling that the user must report its usage. |
int fwInstallation_forceProjectRestart | ( | ) |
This function forces the restart of the whole project
string fwInstallation_getAgentDp | ( | ) |
This function retrieves name of the internal dp holding the parameterization of the DB-agent
string fwInstallation_getAgentRequestsDp | ( | ) |
This function retrieves name of the internal dp holding the pending installation requests to be executed by the DB-Agent
fwInstallation_getApplicationSystem | ( | string | applicationName, | |
dyn_string & | systemNames | |||
) |
This function retrieves the system name(s) on which a certain "application" = component is installed.
applicationName | name of the application/component to be found | |
systemNames | name(s) of the system(s) with the application/component installed |
int fwInstallation_getAvailableComponents | ( | dyn_string | componentPaths, | |
dyn_dyn_string & | componentsInfo, | |||
string | component = "*" , |
|||
bool | scanRecursively = false | |||
) |
This function gets the information about all available components in the specified paths into a dyn_dyn_string structure:
componentPaths | (in) dyn_string with the paths to description files | |
componentsInfo | (out) dyn_dyn_string that will contain all installed components and their respective version numbers and their paths | |
component | (in) component pattern | |
scanRecursively | (in) flag indicating if the search must recurse over subdirectories |
fwInstallation_getComponentDescriptionPVSSDB | ( | string | componentName | ) |
FVR: 29/03/2006.
This function retrieves the component information from the PVSS DB and displays it in the panel
componentName | the name of a file with component description |
string fwInstallation_getComponentDp | ( | string | componentName | ) |
This function retrieves name of the internal dp associated with an installed component
componentName | (int) name of the component in a string |
int fwInstallation_getComponentInfo | ( | string | componentName, | |
string | componentProperty, | |||
dyn_anytype & | componentInfo | |||
) |
This function returns the following property of the installed component: list of files for this component
componentName,: | string with the name of the component | |
componentProperty,: | name of the requested property | |
componentInfo,: | variable that contains the property of the component |
string fwInstallation_getComponentPath | ( | string | componentFile | ) |
This function resolves the source path from the component description file
componentFile | (out) full path to the XML file of the component |
int fwInstallation_getComponentsInfo | ( | string | tableName, | |
string | sourceWidget, | |||
string | systemName = "" , |
|||
bool | scanRecursively = false | |||
) |
This function gets the components data from the directory specified in the textBox and fills the graphic table with it.
tableName | (in) the name of a graphic table to be filled with data | |
sourceWidget | (in) the name of a widget containing the directory from which the data about the components is taken | |
systemName | (in) name of the pvss system where to look for components | |
scanRecursively | (in) flag indicating if the search must recurse over subdirectories |
int fwInstallation_getComponentSourceDir | ( | string | component, | |
string & | sourceDir | |||
) |
This function retrieves the source directory from which a component was installed
component | (in) name of the component | |
sourceDir | (out) source directory |
string fwInstallation_getComponentVersion | ( | string | component | ) |
This function retrieves the version of an installed component
component | (in) name of the component |
int fwInstallation_getDescriptionFile | ( | string | componentName, | |
string | componentVersion, | |||
string | sourceDir, | |||
string & | descriptionFile, | |||
bool & | isItSubComponent | |||
) |
This function retrieves the full path to the XML description file of a component
componentName | (in) name of the component | |
componentVersion | (in) version of the component (legacy, not used) | |
sourceDir | (in) source directory | |
descriptionFile | (out) XML description file | |
isItSubComponent | (out) indicates if it is a subcomponent or not |
int fwInstallation_getDistPort | ( | ) |
This function returns the port used by the distribution manager of the local project
dyn_string fwInstallation_getFileNamesRec | ( | string | dir = "." , |
|
string | pattern = "*" | |||
) |
This function retrieves the files in a directory recursing over sub-directories
dir | (in) directory where to look for files | |
pattern | (in) search pattern |
string fwInstallation_getHostname | ( | ) |
Retrieves the name of the local host without network domain
int fwInstallation_getHostProperties | ( | string | hostname, | |
dyn_mixed & | pvssHostInfo | |||
) |
Function to retrieve host properties as a dyn_mixed array
hostname | (int) name of the host | |
pvssHostInfo | (out) host properties |
string fwInstallation_getInstallationDp | ( | ) |
Gets the name of the internal datapoint of the Installation Tool
dyn_string fwInstallation_getInstalledComponentDps | ( | ) |
This function returns the name of the internal dps correspoding to all components installed in the project
int fwInstallation_getInstalledComponents | ( | dyn_dyn_string & | componentsInfo | ) |
This function gets the information about all installed components into a dyn_dyn_string structure: [n][1] component name [n][2] component version [n][3] path to the installation [n][4] description file
componentsInfo,: | dyn_dyn_string that will contain all installed components and their respective version numbers |
synchronized fwInstallation_getInstalledComponentsUI | ( | string | systemName = "" |
) |
This function retrieves the installed components from the PVSS database and fills the graphic table - "tblInstalledComponents"
fwInstallation_getListOfDependentComponents | ( | string | strComponentName, | |
dyn_string & | dynDependentComponents | |||
) |
This function gets the list of dependent components. This functions from the list of all installed components retrieves the list of components that require strComponentName
strComponentName,: | the name of the component for which we would like to find dependent components | |
dynDependentComponents,: | the dyn_string of components that require the strComponentName component |
fwInstallation_getListOfNotProperlyInstalledComponents | ( | dyn_string & | dynNotProperlyInstalled | ) |
This function retrieves the list of components which were not properly installed - there was error in dependencies and the user still wanted to install the component.
dynNotProperlyInstalled,: | the list of components which were installed with broken dependencies - .requiredInstalled:_original.._value is false |
fwInstallation_getNotInstalledComponentsFromRequiredComponents | ( | dyn_string & | dynRequiredComponents, | |
string & | strNotInstalledNames | |||
) |
This function checks if all the required components are installed. It returns a string of components that are not installed and required.
dynRequiredComponents,: | the name of a componentConfigFile | |
strNotInstalledNames,: | the name of a component |
int fwInstallation_getPmonInfo | ( | string & | user, | |
string & | pwd | |||
) |
This function resolves the Pmon Information (i.e. user name and password)
user | (out) user | |
pwd | (out) password |
string fwInstallation_getPmonPwd | ( | ) |
This function returns the pmon pwd (not yet implemented)
string fwInstallation_getPmonUser | ( | ) |
This function returns the pmon user (not yet implemented)
int fwInstallation_getProjectProperties | ( | dyn_mixed & | projectInfo | ) |
This function returns the properties of the local project as a dyn_mixed array
projectInfo | (in) Project properties |
int fwInstallation_getProjPaths | ( | dyn_string & | projPaths | ) |
The function reads all project paths from the config file into a dyn_string.
projPaths,: | dyn_string which will be filled with the project paths from the config file |
int fwInstallation_getPvssSystemProperties | ( | string | systemName, | |
dyn_mixed & | pvssSystem | |||
) |
Gets the properties of a particular PVSS system as a dyn_mixed
systemName | - (in) name of the pvss system | |
pvssSystem | - (out) properties of the system |
string fwInstallation_getPvssVersion | ( | dyn_string & | patches | ) |
This function retrieves the PVSS version number as well as the installed patches
patches | (out) dyn_string array with all installed patches |
int fwInstallation_getRegisterOnly | ( | string | destinationDir, | |
string | componentName, | |||
bool | forceOverwriteFiles, | |||
bool | isSilent | |||
) |
This function retrieves whether the component can be registered only or if all component files have to be copied during installation
destinationDir | (in) target directory for installation. Note that a previous installtion of the component may exist in there. | |
componentName | (in) name of the component being installed | |
forceOverwriteFiles | (in) flag to force overwriting of existing files | |
isSilent | (in) flag to specify if the installation is silent (no windows will be pop up even during interactive installation) |
int fwInstallation_getToolVersion | ( | string & | version, | |
string | systemName = "" | |||
) |
This function retrieves the current version of the installation tool used in a particular PVSS system.
version | (out) version of the tool | |
systemName | (int) name the pvss system where to read the installation tool version from |
int fwInstallation_importComponentAsciiFiles | ( | string | componentName, | |
string | sourceDir, | |||
string | subPath, | |||
dyn_string | dynDplistFiles, | |||
bool | updateTypes = true | |||
) |
This function imports the dpl files of a component
componentName | (in) name of the component being installed | |
sourceDir | (in) source directory for installation | |
subPath | (in) path to be appended to the sourceDir | |
dynDplistFiles | (in) list of dpl files to be imported | |
updateTypes | (in) flag to indicate if existing types have to be updated or not |
int fwInstallation_importConfigFiles | ( | string | componentName, | |
string | sourceDir, | |||
string | subPath, | |||
dyn_string | dynConfigFiles_general, | |||
dyn_string | dynConfigFiles_linux, | |||
dyn_string | dynConfigFiles_windows | |||
) |
This function imports the dpl files of a component
componentName | (in) name of the component being installed | |
sourceDir | (in) source directory for installation | |
subPath | (in) path to be appended to the sourceDir | |
dynConfigFiles_general | (in) list of dpl files to be imported | |
dynConfigFiles_linux | (in) list of dpl files to be imported (linux only) | |
dynConfigFiles_windows | (in) list of dpl files to be imported (windows only) |
int fwInstallation_init | ( | bool | runPostInstall = true |
) |
This function needs to be called before the first use of the installation library and after each installation.
runPostInstall | (in) this variable specifies whether pending post-install scripts, if any, must be run during initialization |
int fwInstallation_installAgent | ( | ) |
This function installs the DB-Agent of the FW Component Installation Tool
int fwInstallation_installComponent | ( | string | descFile, | |
string | sourceDir, | |||
bool | isItSubComponent, | |||
string & | componentName, | |||
bool & | componentInstalled, | |||
string & | dontRestartProject, | |||
string | subPath = "" , |
|||
bool | forceInstallRequired = false , |
|||
bool | forceOverwriteFiles = false , |
|||
bool | isSilent = false , |
|||
bool | installSubComponents = true | |||
) |
This function installs the component. It copies the files, imports the component DPs, DPTs, updates the project config file
descFile,: | the file with the description of a component | |
sourceDir,: | the root directory with the component files | |
isItSubComponent,: | it is false - if it is the master component; it is true if it is the sub component | |
componentName,: | it is the return value - the name of the installed component | |
componentInstalled,: | set to 1 if the component is properly installed | |
dontRestartProject,: | indicates whether the project has to be restarted after installations or not | |
subPath,: | path to be appended to the source directory | |
forceInstallRequired | this flag indicates whether all required components must be installed provided that they correct versions are found in the distribution. This is a optional parameter. The default value is false to keep the tool backwards compatible. Note that the value of this parameter is set to the default value (TRUE) when a silent installation is chosen. | |
forceOverwriteFiles | this flag indicates whether the files of the component must be overwritten if a previous installation of the component is detected in the target directory This is a optional parameter. The default value is false to keep the tool backwards compatible. Note that the value of this parameter is set to the default value (FALSE) when a silent installation is chosen. | |
isSilent | flag indicating whether we are dealing with a silent installation of the packages or not. The default value is false. | |
installSubComponents | flag indicating whether subcomponents have to also be installed |
int fwInstallation_installRequiredComponents | ( | string | componentName, | |
dyn_string | dynRequiredComponents, | |||
string | sourceDir, | |||
bool | forceInstallRequired, | |||
bool | forceOverwriteFiles, | |||
bool | isSilent, | |||
int & | requiredInstalled, | |||
bool & | actionAborted | |||
) |
This function forces all required components to be installed prior to the installation of a given component if available in the distribution
componentName | (in) name of the component being installed | |
dynRequiredComponents | (in) array of required components | |
sourceDir | (in) source directory for installation | |
forceInstallRequired | (in) flag to force installation of required components | |
forceOverwriteFiles | (in) flag to force all existing files to be overwritten | |
isSilent | (in) flag to define if the installation is silent, i.e. no pop-ups | |
requiredInstalled | (out) returned argument indicating if the required components have been successfully installed or not | |
actionAborted | (out) flag that indicates if the action was aborted by the user |
bool fwInstallation_isAgentInstalled | ( | ) |
This function checks if the DB-agent of the installation tool is installed in the current project
bool fwInstallation_isComponentInstalled | ( | string | component, | |
string & | version | |||
) |
This function checks if a component is installed in the current project
component | (in) name of the component | |
version | (out) current version of the installed component |
bool fwInstallation_isPatchInstalled | ( | string | patch | ) |
Checks if a particular patch has been applied to the current installation
patch | patch name |
int fwInstallation_isPmonProtected | ( | ) |
This function checks if pmon is protected with a username and a pwd
int fwInstallation_isSubComponent | ( | string | xmlFile, | |
bool & | isSubComponent | |||
) |
This function parses the xml file of a coponent to find out if it is a sub-component
xmlFile | (in) XML file name | |
isSubComponent | (out) indicates if it is a subcomponent or not |
int fwInstallation_loadConfigIntoTables | ( | dyn_string & | loadedSections, | |
dyn_dyn_string & | configSectionTable, | |||
dyn_string & | configLines, | |||
string | fileName | |||
) |
This function builds the memory representation of a config file
loadedSections,: | the list of sections loaded from the config file | |
configSectionTable,: | the memory representation of a config file [1][i] - [section:parameter] , [i+1][j] - [value] | |
configLines,: | dyn_string containing the lines from the config file | |
fileName,: | the name of a config file |
int fwInstallation_loadInitFile | ( | ) |
This function loads the init file for the installation tool
int fwInstallation_loadProjPaths | ( | dyn_string & | proj_paths | ) |
This function reads the config file and retrieves the list of proj_paths
proj_paths,: | the return value with a list of proj_paths |
dyn_string fwInstallation_orderDplFiles | ( | dyn_string | files, | |
dyn_int | attribs | |||
) |
Order the dpl files of a component according to the attributes defined in the XML file
files | - (in) files to the ordered as a dyn_string | |
attribs | - (int) XML attributes for the files ordered as the 'files' argument |
int fwInstallation_popup | ( | string | popupText | ) |
This function allows to show a timed out popup during installation
popupText | text to be shown |
fwInstallation_putComponentsInOrder_Delete | ( | dyn_string | componentsNames, | |
dyn_string & | componentsNamesInOrder | |||
) |
This function puts the components to be deleted in order in which they should be deleted The function only checks if the component chosen for deleting depend on each other. The function operates on the component information contained in the PVSS DB
algorithm: suppose we have the following components to delete: com1, com2, com3 the dependencies are following: com1: is required by com2 com2: is required by com3 com3: is nor required by them We can first delete the com3 because it is not required by com1 i com3 the dependencies are following: com1: is required by com2 com2: is not required by any component If there is a loop: com1 is required by com2 and com2 is required by com1 the components can not be ordered
componentsNames,: | the dyn_string of the components to be put in order before deleting | |
componentsNamesInOrder,: | the dyn_string of the ordered components to be deleted |
fwInstallation_putComponentsInOrder_Install | ( | dyn_string & | componentsNames, | |
dyn_string & | componentsVersions, | |||
dyn_string & | componentFiles, | |||
dyn_string & | componentFilesInOrder | |||
) |
This function puts the components to be installed in order in which they should be installed The algorithm is similar to that used during deleting the components (see fwInstallation_putComponentsInOrder_Delete() function btn_ApplyDelete())
componentsNames,: | the names of the components to be installed | |
componentsVersions,: | the versions of components to be installed | |
componentFiles,: | the file names with the description of the components | |
componentFilesInOrder,: | the file names with the description of the components |
float fwInstallation_pvssVersionAsFloat | ( | string | reqVersion, | |
int & | major, | |||
int & | minor, | |||
int & | sp | |||
) |
Converts a PVSS version from string to float for easy comparison
reqVersion | - (in) name of the pvss version | |
major | - (out) number corresponding to the major version of the release | |
minor | - (out) number corresponding to the minor version of the release | |
sp | - (out) number corresponding to the Service Pack of the release |
fwInstallation_readComponentRequirements | ( | string | descFile, | |
dyn_string & | dynRequiredComponents | |||
) |
This function reads the requirements from the component description file
descFile | (in) the file with the description of a component | |
dynRequiredComponents | (out) the dyn_string of requiredComponents |
fwInstallation_recurserFileNames | ( | string | dir, | |
string | pattern, | |||
dyn_string & | fileNames | |||
) |
Helper function used by fwInstallation_getFileNamesRec
dir | (in) directory where to look for files | |
pattern | (in) search pattern | |
fileNames | (out) names of the files found |
int fwInstallation_registerProjectPath | ( | string | sPath | ) |
This function registers a PVSS project path
sPath,: | (in) path to be registered as string |
int fwInstallation_removeProjPath | ( | string | projPath | ) |
This function removes the given project path from the config file.
projPath,: | string that contains the project path to be removed from the config file |
int fwInstallation_saveFile | ( | dyn_string & | configLines, | |
string | filename | |||
) |
this function saves the dyn_string into PVSS project confg file
configLines,: | the dyn_string containing the lines from the file | |
filename,: | the name of a file |
int fwInstallation_sendToTrash | ( | string | filename, | |
string | trashPath = "" | |||
) |
Function to move files into the trash
filename | (in) name of the file to be moved | |
trashPath | (in) path to the trash. Empty path means use the default path |
int fwInstallation_setComponentInstallationStatus | ( | string | componentName, | |
bool | ok | |||
) |
This function sets the internal dpes of the component dp according to the status of the installation
componentName | component name | |
ok | status of installation |
int fwInstallation_setProjPaths | ( | dyn_string | projPaths | ) |
This functions writes all project paths given in a dyn_string to the config file and overwrites existing paths exept the main project path.
projPaths,: | dyn_string with the project paths for the config file |
fwInstallation_showHelpFile | ( | string | componentName, | |
string | systemName = "" | |||
) |
This function shows the help file associated to a component
componentName | (in) name of the component in the database | |
systemName | (in) name of the system where to look for the component |
fwInstallation_showMessage | ( | dyn_string | message | ) |
this functions outputs the message into the log textarea of a panel
message,: | the message to be displayed |
int fwInstallation_storeComponentPostInstallScripts | ( | dyn_string | dynPostInstallFiles_current | ) |
This function stores in the component internal dp of the installation tool the list of post install scripts to be run
dynPostInstallFiles_current | (in) list of post-install files to be stored |
void fwInstallation_throw | ( | string | msg, | |
string | severity = "ERROR" , |
|||
int | code = 1 | |||
) |
Throws a PVSS error in the log
msg | - (in) error message | |
severity | - (int) severity of the message: ERROR, WARNING, INFO | |
code | - (int) code of the error message in the fwInstallation catalog |
fwInstallation_updateComponentDps | ( | ) |
This function updates the internal dp-type used by the installation tool for the components
int fwInstallation_updateDPT | ( | ) |
This function updates the main dp-type (FwInstallationInformation) of the installation tool from previous versions
int fwInstallation_updateVersion | ( | ) |
This function updates the version number of the installation tool from previous versions
int fwInstallation_verifyPackage | ( | string | sourceDir, | |
string | subPath, | |||
string | componentName, | |||
string | destinationDir, | |||
bool | registerOnly, | |||
dyn_string | dynInitFiles, | |||
dyn_string | dynPostInstallFiles, | |||
dyn_string | dynDeleteFiles, | |||
dyn_string | dynPostDeleteFiles, | |||
dyn_string | dynFileNames, | |||
int | isSilent, | |||
bool & | actionAborted | |||
) |
This function verifies the integrity of a package
sourceDir | (in) source directory for installation | |
subPath | (in) path to be appended to the sourceDir | |
componentName | (in) name of the component being installed | |
destinationDir | (in) target directory for installation | |
registerOnly | (in) flag indicating whether file copying can be avoided or not if the files already exist | |
dynInitFiles | (in) component init scripts | |
dynPostInstallFiles | (in) component init scripts | |
dynInitFiles | (in) component post-install scripts | |
dynDeleteFiles | (in) component delete scripts | |
dynPostDeleteFiles | (in) component post-delete scripts | |
dynFileNames | (in) component files | |
isSilent | (in) flag to define if the installation is silent, i.e. no pop-ups | |
actionAborted | (out) flag that indicates if the action was aborted by the user |
fwInstallation_writeToMainLog | ( | string | message | ) |
This function writes to the main log
string paGetProjName | ( | ) |
This function returns the project name
const string csFwInstallationLibVersion = "5.0.0" |
Version of this library. Used to determine the coherency of all libraries of the installtion tool
const string csFwInstallationToolVersion = "5.0.0" |
Version of this tool. Used to determine the coherency of all libraries of the installation tool
string fwInstallation_VERSION_KEYWORD = "%VERSION%" |
keyword used to replace by the current version name
const string gFwInstallationComponentName = "fwInstallation" |
Name of this component.
const string gFwInstallationConfigFile = "fwInstallation.config" |
Name of the config file of the tool.
const int gFwInstallationError = -1 |
Returned error code in case of problems
bool gFwInstallationErrorShown = FALSE |
Constant that stores a particular error has already been shown
const string gFwInstallationInitFile = "fwInstallationInit.config" |
Name of the init file loaded at start up of the tool.
const int gFwInstallationOK = 0 |
Returned error code in case everything is OK
const string gFwTrashPath = "/fwTrash/" |
Path to the trash folder
bool gFwYesToAll = FALSE |
Constant that stores if the user has clicked in the Yes to All button during installations