home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-24 | 68.0 KB | 1,822 lines |
- '' Module Name: share32.lss
- ''
- '' Module Code: TOOLKIT
- ''
- '' Author: MZ
- ''
- '' Creation Date: Apr 12, 1995
- ''
- '' Copyright Lotus Development Corporation, (c) 1991
- ''
- ''
- ''
- '' Description:
- '' Lotus script file for common install
- ''
- ''
- '' Additional authors:
- ''
- '' Change History:
- '' $Log: //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/share32@.lss $
- ''
- '' Rev 1.89 24 May 1996 15:54:34 jdonohue
- '' Added code to uninstall "Fills" HCU key as shared component
- ''
- '' Rev 1.88 20 May 1996 14:33:02 jdonohue
- '' Only copy shared components to node if on server AND in copy list
- ''
- '' Rev 1.87 17 May 1996 12:03:12 jdonohue
- '' Ref SPR: RWIS35JHBH
- '' Added backslash to Chart "Style Directory" key and Spell "Data Path"
- '' Added backslash for HLM\S\L\C\LocalPath, Network Path and HCU\S\L\C\User Path
- ''
- '' Rev 1.86 15 May 1996 11:29:38 jdonohue
- '' Added special processing for Thesaurus data path registry key
- '' Changed filename "LTCHEN20.DLL" to "LTCHEN21.DLL"
- ''
- '' Rev 1.85 07 May 1996 16:07:54 jdonohue
- '' Ref SPR: CDWT34YRNF
- '' Fixed error with LOTUSUSERDIR source not being set if not in cinstall.ini
- ''
- '' Rev 1.84 02 May 1996 17:02:28 jdonohue
- '' Added uninstall object for System Services registry hive created
- '' Fixed filename LTSIN31.DLL (was LTSIN30.DLL)
- ''
- '' Rev 1.83 12 Apr 1996 15:43:06 jdonohue
- '' Ref SPR: LSCR34KT6H
- '' Added Append argument to Lot_CreateAndRegisterUserSubdir and Lot_CreateUserRegistryEntry
- '' which if true will first check for an existing registry entry, and if value
- '' not found in semi-colon delimited list, will add it
- ''
- '' Rev 1.82 01 Apr 1996 13:20:08 jdonohue
- '' Fixed error in setting COMPONENTSDIR -- extra backslash
- ''
- '' Rev 1.81 28 Mar 1996 10:20:26 jdonohue
- '' Ref SPR: MAS33WPUU
- '' Added System Services value ADPT=LTLRN31.DLL
- '' Changed System Services version to 3.1
- ''
- '' Rev 1.80 25 Mar 1996 12:47:58 jdonohue
- '' Ref SPR: SBRR33SSBY
- '' Test DoesDirExist not FALSE, since its return value is not equal to script TRUE
- ''
- '' Rev 1.79 12 Mar 1996 16:06:54 jdonohue
- '' Added function Lot_CreateUserRegistryEntry
- '' Don't write HLM "LocalPath" for node
- '' Removed obsolete function Lot_WriteKey
- ''
- '' Rev 1.78 07 Mar 1996 11:30:34 jdonohue
- '' Set SYM_EXISTINGLOCALPATH$ based on HCU "Local Path" value for node to support
- '' multi-user configurations
- ''
- '' Rev 1.77 04 Mar 1996 08:32:02 jdonohue
- '' Remove 16 bit shared component support -- pass 1 : eliminate LOTUSAPP
- ''
- '' Rev 1.76 26 Jan 1996 13:40:18 cmoy
- '' HISHI: Merged FE changes
- ''
- '' Rev 1.75 25 Jan 1996 16:41:00 jdonohue
- '' Make entries for shared components for Suite so that Suite uninstall will not
- '' complain about unknown shared components
- ''
- '' Rev 1.74 22 Dec 1995 10:13:40 jdonohue
- '' Removed all references to SYM_PARENTDIR$ -- is now SYM_BASEDIR$ for all
- ''
- '' Rev 1.73 14 Dec 1995 13:22:40 jdonohue
- '' Ref SPR: THAY2XTUPX
- '' Added new sub Lot_CreateAndRegisterUserSubdir that creates registry entry for
- '' user path in HCU and creates the directory if it does not exist
- ''
- '' Rev 1.72 12 Dec 1995 12:58:50 glutz
- '' In InitSHARE32(), replaced IsDriveMapped() with DoesDirExist() when
- '' checking existing local path. SPR# RMOO2XDRJY
- ''
- '' Rev 1.71 08 Nov 1995 17:02:50 tveerapp
- '' mariana's fix
- ''
- '' Rev 1.70 Oct 24 1995 16:56:20 cmoy
- '' removed eof char
- ''
- '' Rev 1.69 13 Oct 1995 14:42:24 jdonohue
- '' Added function Lot_RefreshLocalComponentDir that performs this resetting
- '' source directory for sections using symbols COMPONENTSDIR and LOTUSUSERDIR fo
- '' node installs
- ''
- '' Rev 1.68 10 Oct 1995 15:27:32 jdonohue
- '' Deleted registration of shared components for single product (SPR KHAN2WQMU4)
- ''
- '' Rev 1.67 03 Oct 1995 15:06:50 jdonohue
- '' For node, register the help registry entry under the first product
- ''
- '' Rev 1.66 02 Oct 1995 17:22:36 tveerapp
- '' Fixed spr for Spell Data path to include spell subdirectory.
- ''
- '' Rev 1.65 29 Sep 1995 14:53:44 tveerapp
- '' Fixed Spr#TBAT2WFLYM. If lotus Script or Chart is Installed, SystemServices
- '' key is written.
- ''
- '' Rev 1.64 29 Sep 1995 12:05:50 jdonohue
- '' Do not write shared component information in cinst???.ini if name or version
- '' blank
- ''
- '' Rev 1.63 29 Sep 1995 10:09:28 jdonohue
- '' Replace cinstall.ini corrupt message with "Drive not available" message if
- '' drive not mapped or UNC path invalid
- ''
- '' Rev 1.62 28 Sep 1995 13:35:32 jdonohue
- '' Don't use registry entry for validating existing network path for node
- ''
- '' Rev 1.61 25 Sep 1995 17:21:46 tveerapp
- '' Uncommented the changes I had commented out for testing.
- ''
- '' Rev 1.60 25 Sep 1995 15:23:00 tveerapp
- '' Fixed Spr# TBAT2VZL3X. Spell registry entries. Also added code to write
- '' to HCU userpath in Lot_WriteLocalNetwork.
- ''
- '' Rev 1.59 25 Sep 1995 10:21:50 tveerapp
- '' Fixed spr#DCRP2W7PD7. Lot_WriteLocalNetCompPath was incorrectly writing
- '' out NetCompPath for standalone(which is not needed) and registering it for
- '' uninstall.
- ''
- '' Rev 1.58 Sep 25 1995 09:53:30 cmoy
- '' Added function Lot_RegisterHelpFile to add help files to registry and create
- '' entry in cinstall.ini for uninstall. Set value of symbol LOTUSUSERDIR to
- '' point to components directory. Do not write dependencies to registry for NODE
- '' install
- ''
- '' Rev 1.57 22 Sep 1995 14:53:26 tveerapp
- '' Fixed the typ in SytemServices key.Spr#DCRP2WBJSE
- ''
- '' Rev 1.56 21 Sep 1995 18:12:26 tveerapp
- '' Fixed spr# TLAN2W7JNX. Registry entries for Mobil Player.
- ''
- '' Rev 1.55 19 Sep 1995 17:39:20 tveerapp
- '' Added special registry processing for Chart in Lot_WriteShare32Registry().
- ''
- '' Rev 1.54 15 Sep 1995 16:55:02 amontalv
- '' Check for UNC path before changing drive.
- ''
- '' Rev 1.53 13 Sep 1995 17:46:06 jdonohue
- '' Use top section of first product to register directories for uninstall
- ''
- '' Rev 1.52 13 Sep 1995 16:05:24 jdonohue
- '' IsDriveMapped returns true only for fixed or remote drive that exists
- ''
- '' Rev 1.51 12 Sep 1995 11:00:24 tveerapp
- '' Changes in Lot_Write32Registry for writing to cinstnod.ini for a node install
- ''
- '' Rev 1.50 12 Sep 1995 10:34:52 jdonohue
- '' Create local and network component path if they don't exist, and register
- '' them as objects for uninstall
- ''
- '' Rev 1.49 11 Sep 1995 15:58:50 jdonohue
- '' IsDriveMapped checks for UNC volumes that directory exists
- ''
- '' Rev 1.48 09 Sep 1995 16:43:24 tveerapp
- '' Fixed the suite node problem. Set the SYM_NETCOMPONENT symbol if a clean
- '' path is found with the currently mapped drive.
- ''
- '' Rev 1.47 06 Sep 1995 09:22:30 tveerapp
- '' Fixed the suite node install problem.
- ''
- '' Rev 1.46 01 Sep 1995 15:14:00 jdonohue
- '' Resourced string for drive not mapped error
- ''
- '' Rev 1.45 01 Sep 1995 12:18:34 jdonohue
- '' Don't register HLM\lotus\prod\ver\Components\comp\ver for suite
- ''
- '' Rev 1.44 31 Aug 1995 11:44:34 jdonohue
- '' Added function IsDriveMapped to determine if drive letter is mapped and
- '' available
- '' Only exit for non-available NetWorkPath if NODE install
- ''
- '' Rev 1.43 29 Aug 1995 10:52:18 jdonohue
- '' Check all drives for validating SYM_COMPONENTSDIR$
- ''
- '' Rev 1.42 28 Aug 1995 16:14:54 jdonohue
- '' Change help file procesing logic
- '' Popup message if shared component drive not mapped and exit
- ''
- '' Rev 1.42 28 Aug 1995 13:31:08 jdonohue
- '' Change help file procesing logic
- '' Popup message if shared component drive not mapped and exit
- ''
- '' Rev 1.40 25 Aug 1995 17:04:48 jdonohue
- '' Added support for node help file registration
- ''
- '' Rev 1.39 25 Aug 1995 16:04:04 jdonohue
- '' Take out print for failure to find destination path -- could happen for node
- ''
- '' Rev 1.38 24 Aug 1995 15:58:14 jdonohue
- '' Added help file registration to shared component processing
- ''
- '' Rev 1.35 23 Aug 1995 08:15:58 jdonohue
- '' Added helpfilename to shared database, read filename for language from
- '' shared.ini
- ''
- '' Rev 1.34 21 Aug 1995 15:41:06 amontalv
- '' Put name of registry keys into globals.lss
- ''
- '' Rev 1.33 21 Aug 1995 15:15:54 jdonohue
- '' Consolidated share section building for different types
- ''
- '' Rev 1.32 16 Aug 1995 20:33:34 amontalv
- '' Added code to do error messages for registry.
- ''
- '' Rev 1.31 14 Aug 1995 15:08:36 tveerapp
- '' Removed the win.ini entry for teammail because the vim-over mapi has gone
- '' away.
- ''
- '' Rev 1.30 11 Aug 1995 09:31:54 jdonohue
- '' Don't write DLL name for component
- ''
- '' Rev 1.29 01 Aug 1995 14:54:20 jdonohue
- '' Removed extraneous set of quotes on version string
- ''
- '' Rev 1.28 24 Jul 1995 09:24:58 jdonohue
- '' Increment length for traling null in call to Lot_CreateRegKeyValueEx
- ''
- '' Rev 1.27 18 Jul 1995 11:08:00 jdonohue
- '' Make the shared component entry for the product/version
- ''
- '' Rev 1.26 17 Jul 1995 17:28:02 tveerapp
- '' Added code to Lot_WriteShare32registry to write into the win.ini for
- '' TeamMail.
- ''
- '' Rev 1.25 17 Jul 1995 16:50:14 amontalv
- '' Changed code for registering dialog editor.
- ''
- '' Rev 1.24 17 Jul 1995 16:41:14 amontalv
- '' Added registration for dlg editor
- ''
- '' Rev 1.23 17 Jul 1995 15:36:24 amontalv
- '' Added Lot_AddLinkToFolder to add Dialog Editor in correct location.
- ''
- '' Rev 1.22 20 Jun 1995 17:42:50 mzgripce
- '' use trimendslash before calling the createregkeyval
- ''
- '' Rev 1.21 19 Jun 1995 19:10:40 mzgripce
- '' do the share32 operations only if share32 are supported
- ''
- '' Rev 1.20 16 Jun 1995 15:34:50 cmoy
- '' mariana fixed registration for flw build
- ''
- '' Rev 1.19 15 Jun 1995 18:08:54 mzgripce
- '' attempt to fix local/network Path in Win95 registry
- ''
- '' Rev 1.18 12 Jun 1995 18:14:46 mzgripce
- '' populate the inifilename
- ''
- '' Rev 1.17 12 Jun 1995 18:05:26 mzgripce
- '' added fileininame and fix Dependents writing when tere are no dependents
- ''
- '' Rev 1.16 08 Jun 1995 17:04:00 mzgripce
- '' write WIN32 Shared Component Information in cinstall.ini for uninstall
- ''
- '' Rev 1.15 07 Jun 1995 18:56:16 mzgripce
- '' register the dependents for the components
- ''
- '' Rev 1.14 07 Jun 1995 17:38:10 tveerapp
- '' For suite server install get the componentsdir value from response file
- '' for automation. The change is in InitShare32.
- ''
- '' Rev 1.13 07 Jun 1995 16:33:32 mzgripce
- '' fix the registry after the new script integration
- ''
- '' Rev 1.12 06 Jun 1995 17:30:12 tveerapp
- '' ADDED check for single product server install in InitShare32.
- ''
- '' Rev 1.11 06 Jun 1995 16:44:44 tveerapp
- '' Added Code to InitShare32 to read in the COMPONENTSDIR from the
- '' response file for a single products server install (automated).
- ''
- '' Rev 1.10 06 Jun 1995 15:59:12 amontalv
- '' We are experiencing problems with LotusScript when we fill buffers with
- '' nulls and then pass them to C routines. For the time being, it is suggested
- '' that we fill our buffers with spaces. To this end (and to make it
- '' easier to change back later) I have created a small LotusScript routine
- '' named CreateBuffer. You use it any time you ordinarily would use
- '' STRING$(num, 0). CreateBuffer() just needs the num, it decides what to
- '' fill the buffer with (sorry about the grammer). Right now it fill the
- '' buffer with spaces. Later we will change it back to nulls. Also look
- '' at the routine NullTrim(). It will get rid of final nulls and spaces.
- '' You can use this when getting a buffer that has been changed or filled
- '' in a external C routine.
- ''
- '' Rev 1.9 05 Jun 1995 18:03:08 tveerapp
- '' Modified InitShare32. Removed the check foe automated install.
- '' Initshare32 does the same processing for all kinds of
- '' install.
- ''
- '' Rev 1.8 04 Jun 1995 16:32:14 mzgripce
- '' debig populate and write to the registry
- ''
- '' Rev 1.7 01 Jun 1995 15:40:50 mzgripce
- '' enable the registry calls and populate the datadriver struc
- ''
- '' Rev 1.6 22 May 1995 19:16:02 mzgripce
- '' read from the registry if the components directory already exists
- ''
- '' Rev 1.5 21 May 1995 17:25:52 mzgripce
- '' set the component default value differently
- ''
- '' Rev 1.4 16 May 1995 17:09:00 glutz
- '' Changed USE to AUTOMATE
- ''
- '' Rev 1.3 13 May 1995 16:59:44 mzgripce
- '' added Lot_Save32ShareConfig... function and Populate32SharedData subroutine
- ''
- '' Rev 1.2 03 May 1995 18:16:14 mzgripce
- '' move some functions from share.lss and debug the syntax errors
- ''
- '' Rev 1.1 17 Apr 1995 16:47:38 mzgripce
- '' add more functionality
- ''
- '' Rev 1.0 13 Apr 1995 11:23:46 mzgripce
- '' Initial Revision
- ''
- '' Rev 1.0 13 Apr 1995 11:00:02 mzgripce
- '' Initial Revision
- ''
- ''
- ''----------------------------------------------------------------------
- USE "AUTOMATE"
- OPTION DECLARE
-
- 'Global variables
- PUBLIC gLotusIniPath AS STRING
- PUBLIC gLotusappIniPath AS STRING
- PUBLIC gLotusBcfDir AS STRING
- PUBLIC gLotusappDir AS STRING
- PUBLIC g32DataLensInstalled AS INTEGER
-
- 'Global Functions
- DECLARE PUBLIC FUNCTION InitSHARE32 () AS INTEGER
- DECLARE PUBLIC FUNCTION ConfigSHARE32 () AS INTEGER
- DECLARE PUBLIC FUNCTION AddSHARE32Icons () AS INTEGER
- DECLARE PUBLIC FUNCTION Lot_LocalGetPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING
- DECLARE PUBLIC FUNCTION Lot_GetLotusiniPath (s$) AS INTEGER
- DECLARE PUBLIC FUNCTION Lot_GetSharedIniPathName() AS STRING
- DECLARE PUBLIC FUNCTION Lot_GetLotusappiniPath (s1$, s2$,s3$) AS INTEGER
- DECLARE PUBLIC FUNCTION IsDriveMapped(szPath$) AS INTEGER
- DECLARE PUBLIC SUB Lot_RegisterHelpFile(szKey$, szDir$, FileName$)
- DECLARE PUBLIC FUNCTION Lot_RefreshLocalComponentDir () AS INTEGER
-
-
- 'Local Functions
- DECLARE FUNCTION Lot_GetAllShared32Installed () AS INTEGER
- DECLARE FUNCTION Lot_WriteRegistryLocalNetworkPath() AS INTEGER
- DECLARE FUNCTION Lot_Save32ShareConfigInInstallIni() AS INTEGER
- DECLARE SUB Populate32SHAREDDATA
- DECLARE SUB Lot_WriteShare32InTheRegistry
- DECLARE SUB PopupMappingErrorMsgExit(szPath$)
- DECLARE SUB Lot_CreateAndRegisterUserSubdir(szSubKey$, szValueName$, LocCompPath$, bAppend%)
- DECLARE SUB Lot_CreateUserRegistryEntry(szSubKey$, szValueName$, Value$, bAppend%)
-
-
- 'Data Structure
-
- '******************** Win 32 Shared features data driver *********
- TYPE WIN32SHARED
- SharedIniWin32SecName AS STRING
- Win32ComponentName AS STRING
- ListOfFilesInWin32Section AS STRING 'List
- DestSubdir AS STRING
- INFSharedKey AS STRING
- ListOfINFSectionKeywords AS STRING 'List
- IniFileName AS STRING
- IniSectionName AS STRING
- IniEntryName AS STRING
- KeyFileName AS STRING
- HelpFileNames AS STRING 'List
- RegistrationKey AS STRING
- Version AS STRING
- ListOfDependsOnNames AS STRING
- ListOfDependsOnVers AS STRING
- END TYPE
-
- DIM Shared32Data(gMaxNumOfSharedKeywords) AS WIN32SHARED
- DIM Shared32DataCount AS INTEGER 'The current number of structs
-
-
- DIM SectTypeList LIST AS STRING
- SUB Initialize
- SectTypeList(1) = "Program"
- SectTypeList(2) = "User"
- SectTypeList(3) = "Data"
- SectTypeList(4) = "Filters"
- END SUB
-
- PUBLIC FUNCTION InitSHARE32 () AS INTEGER
- '** Purpose: Initialize COMPONENTSDIR$ destination
- '** symbols
- '** and for automated install
- '** sets SYM_AUTO_COMPONENTSDIR$
- '** Author: MZ
- '** Arguments: None
- '** Returns: SUCCESS
- '*************************************************************************
- DIM componentsDir$, possibleDrv$
- DIM availSpace&, network$, cwd$, gInstallIniFile$, rc%, netComponent$
- DIM netComponentIni$, keyvalue$
- DIM rv%, notused%, SameFlag$
- DIM source$, FLWPath$, drive$, RCDialog$, AutoLotusapp$
- DIM KeyHandle&, RegKeyReturn&,AutoComponents$,CompPathLen&
- DIM ExistingLocalPath$, ExistingNetworkPath$
-
- CompPathLen&=CLNG(1024)
- ExistingLocalPath$ = CreateBuffer(1024)
- ExistingNetworkPath$ = CreateBuffer(1024)
- 'print "ExistingLocalPath$" ,ExistingLocalPath$
- 'print "CompPathLen&",CompPathLen&
-
- '** Execute the rest only if there is a registered product that supports
- '** share32; Prods(i%)Share32=1
- InitSHARE32 = SUCCESS
- IF Lot_AreShare32ToolsSupported() <> 1 THEN EXIT FUNCTION
-
- network$ = GetSymbolValue(SYM_NETWORK$)
-
- 'Get the local and network paths from the registry if they exist
- '***************************************************************
- '** Standard takes its value from HLM\SOFTWARE\Lotus\components\LocalPath
- '** Node takes its value from HCU\SOFTWARE\Lotus\components\User Path
- SELECT CASE network$
- CASE gSTANDARD$
- keyvalue$ = "LocalPath"
- RegKeyReturn& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, gREGLOTUSCOMP, keyvalue$, 0, _
- ExistingLocalPath$, CompPathLen&)
- CASE gNODE$
- keyvalue$ = "User Path"
- RegKeyReturn& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, gREGLOTUSCOMP, keyvalue$, 0, _
- ExistingLocalPath$, CompPathLen&)
- END SELECT
- 'print "afer calling Lot_GetRegKeyValueExRegKeyReturn&,",RegKeyReturn&
- ExistingLocalPath$=NullTrim(ExistingLocalPath$)
- ExistingLocalPath$ = Lot_TrimEndSlash(ExistingLocalPath$)
- 'print "ExistingLocalPath$,CompPathLen& **"+ExistingLocalPath$+"**",CompPathLen&
- IF RegKeyReturn& = ERROR_SUCCESS AND _
- DoesDirExist(ExistingLocalPath$) <> FALSE THEN
- SetSymbolValue SYM_EXISTINGLOCALPATH$, ExistingLocalPath$+"\"
- ELSE
- ExistingLocalPath$ = ""
- END IF
-
- 'print "before calling Lot_GetRegKeyValueEx"
- RegKeyReturn& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP,_
- "NetworkPath",REG_SZ, _
- ExistingNetworkPath$, _
- CompPathLen&)
- 'print "afer calling Lot_GetRegKeyValueExRegKeyReturn&,",RegKeyReturn&
- IF RegKeyReturn& = ERROR_SUCCESS THEN
- ExistingNetworkPath$=NullTrim(ExistingNetworkPath$)
- ExistingNetworkPath$= Lot_TrimEndSlash(ExistingNetworkPath$)+"\"
- 'print ExistingNetworkPath$,"ExistingNetworkPath$ share32.lss"
- SetSymbolValue SYM_EXISTINGNETPATH$, ExistingNetworkPath$
- ELSE
- SetSymbolValue SYM_EXISTINGNETPATH$, ""
- END IF
-
- 'Built the default components directory location
- '************************************************
- ' IN Standalone OR node single product
- ' preexisting one OR
- ' ParentDir+gCOMPONENET
- ' IN Standalone OR node suite
- ' preexisting one OR
- ' BaseDir+gCOMPONENET
- ' IN Server single product
- ' ParentDir+gCOMPONENET
- ' IN Server suite
- ' BaseDir+gCOMPONENET
- ' IN Distribution single product OR suite
- ' Do not set components directory
- 'print "building the default components dir; ExistingLocalPath$=",ExistingLocalPath$
-
- IF ExistingLocalPath$ <> "" THEN
- IF (network$ = gSTANDARD$ OR network$ = gNODE$) THEN
- 'print "in standard or node with preexisting compDir"
- componentsDir$ = LCASE$(ExistingLocalPath$)+"\"
- ELSEIF network$ = gSERVER$ THEN
- componentsDir$ = GetSymbolValue(SYM_BASEDIR)+gCOMPONENTS$+"\"
- END IF
- ELSE 'if no preexisting local component
- 'print " no preexisting comp dir"
- componentsDir$ = GetSymbolValue(SYM_BASEDIR)+gCOMPONENTS$+"\"
- END IF
- IF ExistingLocalPath$ = "" OR network$ <> gDISTRIBUTION$ THEN
- SetSymbolValue SYM_COMPONENTSDIR$,componentsDir$
- 'print "componentsDir$ in INITShare32", componentsDir$
- END IF
-
- 'print "GetSymbolValue(SYM_COMPONENTSDIR$)=", GetSymbolValue(SYM_COMPONENTSDIR$)
- 'Set the name of the component dir
- SetSymbolValue SYM_COMPONENTSDIR$+gNAME$, LdString(SID_SHARED_LOTUS_TOOLS)
- 'print "2"
-
- '*** AUTOMATION: single product & suite server install get compnent dir from
- '*** response file.
- IF GetSymbolValue (SYM_AUTOMATIONINST$) = gTRUE$ AND _
- network$ = gSERVER$ THEN
- componentsDir$ = Lot_GetKeyValFromResponseFile("Shared Components","COMPONENTSDIR")
- IF RIGHT$(componentsDir$, 1) <> "\" THEN
- componentsDir$ = componentsDir$+ "\"
- END IF
- IF ValidatePath (componentsDir$) <> FALSE THEN
- SetSymbolValue SYM_COMPONENTSDIR$,componentsDir$
- 'print "in automation"
- ELSE
- ErrorMsg SID_ERR_AUTO_INSTALL, LdString (SID_ERR_AUTO_COMPNENTSDIR)
- ERROR STFQUIT
- END IF
- END IF
-
- 'Set NETCOMPONENT symbol
- '***********************
- IF network$ = gNODE$ THEN
- 'Get the current working directory
- cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
- source$ = GetSymbolValue(SYM_STF_SRCDIR$)
- gInstallIniFile$ = cwd$+gINSTALLINI$
- rc% = DoesFileExist(gInstallIniFile$,femExists)
- IF rc% = 1 THEN
- netComponentIni$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_COMPONENTSDIR$)
- netComponent$ = Lot_LocalGetPathFromIni(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_COMPONENTSDIR$,NULLSTROK,INVALIDSTROK)
- 'print netComponent$,"netComponent$ in share32.lss"
- SameFlag$ = GetIniKeyString(gInstallIniFile$, _
- "Server Configuration of Shared Tools", _
- "SameDriveForComponent")
- 'print SameFlag$,"SameFlag$"
- IF netComponent$ = "" THEN
- '** TV: netComponent comes back empty (win32) beacuse FValidPath fails
- '** if the drive does not exist
- rv% = 0
- IF SameFlag$ = "1" THEN
- netComponent$ = GetIniKeyString(gInstallIniFile$,"Server Configuration of Shared Tools", SYM_COMPONENTSDIR$)
- IF netComponent$ <> "" AND NOT Lot_IsUnvalidatedUNCPath(netComponent$) THEN
- Lot_SplitAnyPath netComponent$, possibleDrv$, componentsDir$
- netComponent$ = Lot_GetVol(source$)+componentsDir$
- rv% = Lot_CleanPath(netComponent$)
- END IF
- END IF
- IF rv% = 0 THEN
- 'print "0", gInstallIniFile$
- ' ErrorMsg SID_ERR_INSTALLINI_CORRUPT, CHR$(10) + CHR$(10)+netComponent$
- 'gEndStatementEncountered% = TRUE
- PopupMappingErrorMsgExit(netComponentIni$)
- EXIT FUNCTION
- 'FatalErrorMsg SID_ERR_INSTALLINI_CORRUPT, netComponent$, STFQUIT
- ELSE
- SetSymbolValue SYM_NETCOMPONENT$, netComponent$
- END IF
- ELSE
- IF SameFlag$ = "1" AND NOT Lot_IsUnvalidatedUNCPath(netComponent$) THEN
- Lot_SplitAnyPath netComponent$, possibleDrv$, componentsDir$
- SetSymbolValue SYM_NETCOMPONENT$, Lot_GetVol(source$)+componentsDir$
- ELSE
- SetSymbolValue SYM_NETCOMPONENT$, netComponent$
- END IF
- END IF
-
- ELSE
- 'print "1", gInstallIniFile$
- ErrorMsg SID_ERR_INSTALLINI_MISSING, CHR$(10) + CHR$(10)+gInstallIniFile$
- gEndStatementEncountered% = TRUE
- EXIT FUNCTION
- 'FatalErrorMsg SID_ERR_INSTALLINI_MISSING, gInstallIniFile$, STFQUIT
- END IF
-
- END IF
-
- '*** Should compare SYM_EXISTINGNETPATH$ and SYM_NETCOMPONENT$ at this point
- '*** and tell the user that a previous node install will not be valid if they
- '*** choose to continue with dialog YES/EXIT INSTALL
- '!! JMD@
-
- 'Initialize global gLotusIniPath$
- gLotusIniPath$ = CreateBuffer$(256)
- notused% = Lot_GetLotusiniPath(gLotusIniPath$)
- 'print gLotusIniPath$,"gLotusIniPath$"
-
- gLotusappIniPath$=CreateBuffer(256)
- gLotusBcfDir$=CreateBuffer(256)
-
- 'print"4"
- 'print GetSymbolValue(SYM_COMPONENTSDIR$)
- 'For now, the local user directory is the local components directory,
- 'c:\lotus\compnent, e.g.
- SetSymbolValue SYM_LOTUSUSERDIR$, GetSymbolValue(SYM_COMPONENTSDIR$)
- END FUNCTION
- '*************************************************************************
-
-
- PUBLIC FUNCTION ConfigSHARE32 () AS INTEGER
- '** Purpose: Read the copy list and depending on the Shared tools
- '** installed update lotus.ini and lotusapp.ini
- '** Author: MZ
- '** Arguments: None
- '** Returns: SUCCESS
- '*************************************************************************
- DIM NetworkIns$, notused%
-
- ' this will be replaced with Populate... and WriteShare32...
- ' notused% = Lot_GetAllShared32Installed()
-
- notused% = Lot_GetLotusappiniPath(gLotusappIniPath, gLotusappDir, gLotusBcfDir)
-
- '** Execute the rest only if there is a registered product that supports
- '** share Prods(i%)Share=1
- IF Lot_AreShare32ToolsSupported()=1 THEN
- 'Write the INI files for standard and node install and save the config in server
- NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
-
- IF NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$ THEN
- 'print "before calling WriteReg"
- notused% = Lot_WriteRegistryLocalNetworkPath()
- ELSEIF NetworkIns$ = gSERVER$ THEN
- 'Save the server configuration in the install.ini (to be used by the node install)
- notused% = Lot_Save32ShareConfigInInstallIni()
- END IF
- IF Lot_IsTheFeatureInstalled("WIN32SHRDBASEPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRINFORMIXPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRIBMPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRSQLPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRPARADOXPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRNOTESSQLPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRSPREADSHEETPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRIBMDB2PRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRDB2SQLDSPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRDB2_SQL400PRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRIBM_DDCS_2PRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCDRVRPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCWKSPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCTEXTPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRORACLEPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCBTRIEVEPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCFOXBASEPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCACCESSPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCPARADOXPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCDB2PRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCORACLEPRG")=1 OR _
- Lot_IsTheFeatureInstalled("WIN32SHRODBCSQLSVRPRG")=1 THEN
- g32DataLensInstalled = 1
- ELSE
- g32DataLensInstalled = 0
- END IF
-
- 'Write lotus.bcf file
- 'print STR$(g32DataLensInstalled)
- IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gSERVER$) AND _
- g32DataLensInstalled = 1 THEN
- ' notused% = Lot_WriteLotusBcfFile()
- END IF
-
-
- IF (NetworkIns$ = gSTANDARD$ OR NetworkIns$ = gNODE$) AND _
- g32DataLensInstalled = 1 THEN
- ' notused% = Lot_WriteODBCINST()
- END IF
- 'Write the Registry
- Lot_WriteShare32InTheRegistry
-
- END IF
-
-
- ConfigSHARE32=SUCCESS
- END FUNCTION
- '*************************************************************************
-
- PUBLIC FUNCTION AddSHARE32Icons() AS INTEGER
- '** Purpose: Puts up the shared tools icons
- '** Author: MZ
- '** Returns: 1 if success
- '***************************************************
- DIM grouptitle$,Lotusappdir$,dlgeditor$,Network$, IconName$
- DIM Feature$
-
- IF Lot_AreShare32ToolsSupported()=1 THEN
-
- Network$ = GetSymbolValue(SYM_NETWORK$)
- grouptitle$ = Reg_GetProgManagerGroupName(1)
- END IF
- AddSHARE32Icons=SUCCESS
- END FUNCTION
- '*************************************************************************
-
-
- FUNCTION Lot_GetAllShared32Installed() AS INTEGER
- '** Purpose: This function searches the copy list and populates the
- '** RegEntry list with the entries that have to be updated
- '** for standalone install and reades the cinstall.ini for
- '** node install
- '** Author: MZ
- '** Arguments: None
- '** Symbols Out:RegEntry
- '** Returns: SUCCESS
- '*************************************************************************
- DIM network$,currchpt$,sharedid$
- DIM SectionPref$,SectionNumber%,SectionTag$,SectionName$
- DIM INFSecKeyWordPref$, INFSecKeyWordNum%, INFSecKeyWordTag$, INFSecKeyWordName$
- DIM INFShrKey$,gSharedIniFile$
-
- IF Lot_AreShare32ToolsSupported()=1 THEN
-
- gSharedIniFile$ = Lot_GetSharedIniPathName()
- network$ = GetSymbolValue(SYM_NETWORK$)
- IF network$ = gSTANDARD$ THEN
- 'The call to Lot_GetChapterValStr returns a comment when no value is found
-
- CurrChpt$ = Lot_GetFirst("", F_SHARE+F_INOROUT)
- WHILE (CurrChpt$ <> "")
- SharedID$ = Lot_GetChapterValStr(CurrChpt$, F_SHARE)
- IF SharedID$ <> "" THEN
- IF MID$(SharedID$,1,5) = "WIN32" THEN
- INFSecKeyWordName$ = Lot_GetChapterValStr(CurrChpt$, F_KEYWORD)
-
- 'print SharedID$,INFSecKeyWordName$,"Add KeyWord"
- AddListItem SYM_REGENTRY$,INFSecKeyWordName$
- END IF
- END IF
- CurrChpt$ = Lot_GetNext()
- WEND
- Lot_GetAllShared32Installed = SUCCESS
-
- 'End of the processing for STANDARD
-
- ELSEIF network$ = gNODE$ THEN
-
- 'Initialize the loop
- SectionPref$="Section"
- SectionNumber%=1
- SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
- 'print "SectionTag$",SectionTag$
- 'print "gSharedIniFile$ where used",gSharedIniFile$
- SectionName$ = GetIniKeyString(gSharedIniFile$,_
- "Win32 Sections",_
- SectionTag$)
- 'print "SectionName$",SectionName$
-
- 'Using the shared.ini as a data driver I find all the shared sections installed
- '
- DO
- 'Process Program section
- '***********************
- 'Process User, Data, and Filter section
- '**************************************
- FORALL SectType IN SectTypeList
-
- INFShrKey$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "INFSharedKey")
- 'print INFShrKey$,"INFShrKey$"
- IF INFShrKey$ <> "" THEN
-
- 'Initialize the loop
- INFSecKeyWordPref$="INFSectionKeyword"
- INFSecKeyWordNum%=1
- INFSecKeyWordTag$=INFSecKeyWordPref$+LTRIM$(STR(INFSecKeyWordNum%))
- 'print "INFSecKeyWordTag$",INFSecKeyWordTag$
- INFSecKeyWordName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- INFSecKeyWordTag$)
- 'print "INFSecKeyWordName$",INFSecKeyWordName$
- 'print "SectionName$", SectionName$
-
- DO
-
- IF INFSecKeyWordName$ <> "" THEN
- IF Lot_IsTheFeatureInstalled(INFSecKeyWordName$) THEN
- AddListItem SYM_REGENTRY$,INFSecKeyWordName$
- END IF
- END IF
-
- INFSecKeyWordNum%=INFSecKeyWordNum%+1
- INFSecKeyWordTag$=INFSecKeyWordPref$+LTRIM$(STR(INFSecKeyWordNum%))
- 'print "INFSecKeyWordTag$",INFSecKeyWordTag$
- INFSecKeyWordName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- INFSecKeyWordTag$)
-
- LOOP UNTIL INFSecKeyWordName$ = ""
- END IF
-
- END FORALL
-
- SectionNumber%=SectionNumber%+1
- SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
- 'print "SectionTag$",SectionTag$
- 'print "gSharedIniFile$ where used",gSharedIniFile$
- SectionName$ = GetIniKeyString(gSharedIniFile$, _
- "Win32 Sections",_
- SectionTag$)
-
- LOOP UNTIL SectionName$ = ""
-
- END IF
-
- END IF
- Lot_GetAllShared32Installed = SUCCESS
-
- END FUNCTION
-
- '*************************************************************************
- FUNCTION Lot_WriteRegistryLocalNetworkPath() AS INTEGER
- '** Purpose: This function writes into the Registry
- '** NOTE: This function should only be called for standard or node install
- '** Author: MZ
- '** Arguments: None
- '** Symbols In: SYM_COMPONENTSDIR$,SYM_NETCOMPONENT$
- '** Returns: SUCCESS
- '*************************************************************************
- DIM RegEntryListLen%,network$,EntryCount%,Entry$,notused%
- DIM s$, LocCompPath$, NetCompPath$, UserPath$, LReturn&
-
- IF Lot_AreShare32ToolsSupported()=1 THEN
-
- LocCompPath$=GetSymbolValue(SYM_COMPONENTSDIR$)
- NetCompPath$=GetSymbolValue(SYM_NETCOMPONENT$)
- UserPath$=GetSymbolValue(SYM_LOTUSUSERDIR$)
-
- 'Make sure ends in trailing backslash
- LocCompPath$=Lot_TrimEndSlash(LocCompPath$)
- NetCompPath$=Lot_TrimEndSlash(NetCompPath$)
- LocCompPath$= LocCompPath$ + "\"
- NetCompPath$= NetCompPath$ + "\"
-
- '*** TV: HCU user path for Chart,Spell, Filters,etc.
- Lot_CreateAndRegisterUserSubdir gREGLOTUSCOMP, "User Path", UserPath$, FALSE
-
- network$ = GetSymbolValue(SYM_NETWORK$)
- 'Standard install, write to "LocalPath" in HLM
- IF network$ <> gNODE$ THEN
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP, "LocalPath", REG_SZ,_
- LocCompPath$, LENBP(LocCompPath$)+1)
- IF LReturn& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+gREGLOTUSCOMP,"LocalPath",LocCompPath$
- END IF
- 'Create the paths if they don't exist
- 'and register the directory under the first product for uninstall
- IF DoesDirExist(LocCompPath$) <> TRUE THEN
- Lot_CreateDirectory(LocCompPath$)
- s$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(1) + gTOP$)
- s$ = Lot_GetChapterValStr(s$, F_KEYWORD)
- Lot_RegisterObject s$, UNIN_CLASS_DIRECTORY$, LocCompPath$
- END IF
-
- ELSE
- 'Write NetComponent Path into the registry
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP, "NetworkPath", REG_SZ,_
- NetCompPath$, LENBP(NetCompPath$)+1)
- IF LReturn& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+gREGLOTUSCOMP,"NetworkPath",NetCompPath$
- END IF
-
- END IF
-
- 'Populate the 32SHAREDATA array of WIN32SHARED structures
- Populate32SHAREDDATA
-
- END IF
-
- Lot_WriteRegistryLocalNetworkPath = SUCCESS
- END FUNCTION
- '*************************************************************************
-
- SUB Populate32SHAREDDATA
- '** Purpose: This subroutine is to populate the 32SHAREDATA array of
- '** WIN32SHARED structure by reading the data driver shared.ini
- '** Author: MZ
- '** Arguments: None
- '** Symbols In:
- '** Returns: SUCCESS
- '*************************************************************************
- DIM network$,currchpt$,sharedid$, rc%
- DIM SectionPref$,SectionNumber%,SectionTag$,SectionName$
- DIM INFSecKeyWordPref$, INFSecKeyWordNum%, INFSecKeyWordTag$
- DIM INFShrKey$,SectionExist%,INFSecKeyWordName$,gSharedIniFile$
- DIM FilePref$,FileNumber%,FileTag$,FileName$,FileList$,KeyWordList$
- DIM HelpFileNumber%
- DIM DependsOnName$,DependsOnNameNum%,DependsOnNameTag$,DependsOnNameList$
- DIM DependsOnVer$,DependsOnVerNum%, DependsOnVerTag$,DependsOnVerList$
- DIM DependsOnNamePref$, DependsOnVerPref$
-
- gSharedIniFile$ = Lot_GetSharedIniPathName()
- Shared32DataCount = 1
-
- 'print "Shared32DataCount 1", Shared32DataCount
- 'print "gSharedIniFile$", gSharedIniFile$
-
- 'Initialize the loop
- SectionPref$="Section"
- SectionNumber%=1
- SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
- 'print "SectionTag$",SectionTag$
- 'print "gSharedIniFile$ where used",gSharedIniFile$
- SectionName$ = GetIniKeyString(gSharedIniFile$,_
- "Win32 Sections",_
- SectionTag$)
- 'print "SectionName$",SectionName$
-
- 'Using the shared.ini as a data driver I find all the shared sections installed
- '
- DO
- 'Process All Section Types in SectTypeList
- '*****************************************
- FORALL SectType IN SectTypeList
-
- IF DoesIniSectionExist (gSharedIniFile$,SectionName$+" "+SectType) = 1 THEN
- 'print "result of the DoesIniSectionExist =",rc%
-
- '***Populate the SharedIniWin32SecName
- Shared32Data(Shared32DataCount).SharedIniWin32SecName=_
- SectionName$+" "+SectType
- 'print Shared32Data(Shared32DataCount).SharedIniWin32SecName,"Shared32Data(Shared32DataCount).SharedIniWin32SecName"
-
- '***Populate the Win32ComponentName
- Shared32Data(Shared32DataCount).Win32ComponentName=_
- GetIniKeyString(gSharedIniFile$,SectionName$+" "+SectType,_
- "Win32ComponentName")
- 'print Shared32Data(Shared32DataCount).Win32ComponentName,"Shared32Data(Shared32DataCount).Win32ComponentName"
-
-
- '***Populate the list ListOfFilesInWin32Section
- 'Initialize the loop
- FilePref$ = "file"
- FileNumber% = 1
- FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
-
- FileName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- FileTag$)
- 'print FileName$,"FileName$"
-
- 'make the filelist name
- FileList$ = "FileList"+LTRIM$(STR(Shared32DataCount))
- IF FileName$ <> "" THEN
-
- DO
-
- SetListItem FileList$, FileNumber%, FileName$
- FileNumber% = FileNumber% + 1
- FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
- FileName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- FileTag$)
- 'print FileName$,"FileName$"
- LOOP UNTIL FileName$ =""
- ELSE
- SetListItem FileList$, FileNumber%, FileName$
- END IF
-
- 'Determine the associated help files for the current language
- FilePref$ = "helpfile"
- FileNumber% = 1
- HelpFileNumber% = 1
- FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
- 'Save the helpfile names for the current language
- DO
- FileName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType, FileTag$)
- IF Lot_GetNthFieldFromIniString (FileName$, 1, "") = _
- GetSymbolValue(SYM_INSTALL_LANGUAGE$) THEN
- FileName$ = Lot_GetNthFieldFromIniString (FileName$, 2, "")
- Shared32Data(Shared32DataCount).HelpFileNames = "HelpFiles"+ _
- LTRIM$(STR(Shared32DataCount))
- SetListItem Shared32Data(Shared32DataCount).HelpFileNames, _
- HelpFileNumber%, FileName$
- HelpFileNumber% = HelpFileNumber% + 1
- END IF
- FileNumber% = FileNumber% + 1
- FileTag$ = FilePref$+LTRIM$(STR(FileNumber%))
- LOOP UNTIL FileName$ =""
-
- '***Populate DestSubdir
- Shared32Data(Shared32DataCount).DestSubdir=_
- GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "DestSubdir")
- 'print Shared32Data(Shared32DataCount).DestSubdir,"Shared32Data(Shared32DataCount).DestSubdir"
-
- '***Populate INFSharedKey
- Shared32Data(Shared32DataCount).INFSharedKey=_
- GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "INFSharedKey")
-
- '***Populate the list ListOfINFSectionKeywords
- 'Initialize the loop
- INFSecKeyWordPref$ = "INFSectionKeyword"
- INFSecKeyWordNum% = 1
- INFSecKeyWordTag$ = INFSecKeyWordPref$+LTRIM$(STR(INFSecKeyWordNum%))
-
- INFSecKeyWordName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- INFSecKeyWordTag$)
- 'print INFSecKeyWordName$,"INFSecKeyWordName$"
-
- 'make the KeyWordList name
- KeyWordList$ = "KeyWordList"+LTRIM$(STR(Shared32DataCount))
-
- IF INFSecKeyWordName$ <> "" THEN
- DO
-
- SetListItem KeyWordList$, INFSecKeyWordNum%, INFSecKeyWordName$
- INFSecKeyWordNum% = INFSecKeyWordNum% + 1
- INFSecKeyWordTag$ = INFSecKeyWordPref$+LTRIM$(STR(INFSecKeyWordNum%))
- INFSecKeyWordName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- INFSecKeyWordTag$)
- 'print INFSecKeyWordName$,"INFSecKeyWordName$"
- LOOP UNTIL INFSecKeyWordName$ =""
- ELSE
- SetListItem KeyWordList$, INFSecKeyWordNum%, INFSecKeyWordName$
- END IF
-
- '***Populate IniFileName
- IF SectType = "Program" THEN
- Shared32Data(Shared32DataCount).IniFileName=_
- GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "IniFileName")
- 'print Shared32Data(Shared32DataCount).IniFileName,"Shared32Data(Shared32DataCount).IniFileName"
- END IF
-
- '***Populate IniSectionName
- Shared32Data(Shared32DataCount).IniSectionName=_
- GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "IniSectionName")
- 'print Shared32Data(Shared32DataCount).IniSectionName,"Shared32Data(Shared32DataCount).IniSectionName"
-
-
- '***Populate IniEntryName
- Shared32Data(Shared32DataCount).IniEntryName=_
- GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "IniEntry")
-
- '***Populate KeyFileName
- Shared32Data(Shared32DataCount).KeyFileName=_
- GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "KeyFileName")
- 'printShared32Data(Shared32DataCount).KeyFileName,"Shared32Data(Shared32DataCount).KeyFileName"
-
-
- '***Populate the RegistrationKey
- Shared32Data(Shared32DataCount).RegistrationKey=_
- GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "RegistrationKey")
- 'printShared32Data(Shared32DataCount).RegistrationKey,"Shared32Data(Shared32DataCount).RegistrationKey"
-
- '***Populate the Version
- Shared32Data(Shared32DataCount).Version=_
- GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- "Version")
- 'printShared32Data(Shared32DataCount).Version,"Shared32Data(Shared32DataCount).Version"
-
- '***Populate the list ListOfDependsOnNames
- 'Initialize the loop
- DependsOnNamePref$ = "DependsOnName"
- DependsOnNameNum% = 1
- DependsOnNameTag$ = DependsOnNamePref$+LTRIM$(STR(DependsOnNameNum%))
-
- DependsOnName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- DependsOnNameTag$)
- 'print DependsOnName$,"DependsOnName$"
-
- 'make the DependsOnNameList name
- DependsOnNameList$ = "DependsOnNameList"+LTRIM$(STR(Shared32DataCount))
-
- IF DependsOnName$ <> "" THEN
- DO
-
- SetListItem DependsOnNameList$, DependsOnNameNum%, DependsOnName$
- DependsOnNameNum% = DependsOnNameNum% + 1
- DependsOnNameTag$ = DependsOnNamePref$+LTRIM$(STR(DependsOnNameNum%))
- DependsOnName$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- DependsOnNameTag$)
- 'print DependsOnName$,"DependsOnName$"
- LOOP UNTIL DependsOnName$ =""
- ELSE
- SetListItem DependsOnNameList$, DependsOnNameNum%, DependsOnName$
- 'print DependsOnName$,"DependsOnName$ if empty"
- END IF
-
-
- '***Populate the list ListOfDependsOnVers
- 'Initialize the loop
- DependsOnVerPref$ = "DependsOnVer"
- DependsOnVerNum% = 1
- DependsOnVerTag$ = DependsOnVerPref$+LTRIM$(STR(DependsOnVerNum%))
-
- DependsOnVer$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- DependsOnVerTag$)
- 'print DependsOnVer$,"DependsOnVer$"
-
- 'make the DependsOnVerList name
- DependsOnVerList$ = "DependsOnVerList"+LTRIM$(STR(Shared32DataCount))
-
- IF DependsOnVer$ <> "" THEN
- DO
-
- SetListItem DependsOnVerList$, DependsOnVerNum%, DependsOnVer$
- DependsOnVerNum% = DependsOnVerNum% + 1
- DependsOnVerTag$ = DependsOnVerPref$+LTRIM$(STR(DependsOnVerNum%))
- DependsOnVer$ = GetIniKeyString(gSharedIniFile$,_
- SectionName$+" "+SectType,_
- DependsOnVerTag$)
- 'print DependsOnVer$,"DependsOnVer$"
- LOOP UNTIL DependsOnVer$ =""
- ELSE
- SetListItem DependsOnVerList$, DependsOnVerNum%, DependsOnVer$
- 'print DependsOnVer$,"DependsOnVer$ if empty"
- END IF
-
-
-
- Shared32DataCount = Shared32DataCount+1
- 'print Shared32DataCount,"Shared32DataCount 2"
- END IF ' end of processing all section types
-
- END FORALL
-
- SectionNumber%=SectionNumber%+1
- SectionTag$=SectionPref$+LTRIM$(STR(SectionNumber%))
- 'print "SectionTag$",SectionTag$
- 'print "gSharedIniFile$ where used",gSharedIniFile$
- SectionName$ = GetIniKeyString(gSharedIniFile$,_
- "Win32 Sections",_
- SectionTag$)
- 'print "SectionName$",SectionName$
-
- LOOP UNTIL SectionName$ = ""
-
-
- END SUB
-
-
- '*************************************************************************
- PUBLIC FUNCTION Lot_LocalGetPathFromIni(szFile$,szSect$,szKey$,nullflag%,invalidpathflag%) AS STRING
- '** Purpose: This function is called whenever we need to retrieve a string
- '** from .ini file. Function returns a clean path (path returned from
- '** FCleanFatPath.
- '** Author: JKK/MZ
- '** Arguments: Name of the .ini file, section name in the .ini file, key we
- '** are searching for and two integer flags, nullflag% & invalidpath%.
- '** Function puts up two error messages based on the value of nullflag%, and
- '** invalidpath.
- '** Returns: Function either returns null or the value of the string.
- '**
- '*************************************************************************
- DIM rstring$, rv%, errText$
-
- Lot_LocalGetPathFromIni = ""
- rstring$ = GetIniKeyString(szFile$, szSect$, szKey$)
-
- If rstring$ <> "" Then
- rv% = Lot_CleanPath(rstring$)
-
- if rv% <> 0 Then
- Lot_LocalGetPathFromIni = rstring$
- elseif invalidpathflag% <> FALSE then
- Lot_LocalGetPathFromIni = ""
- EXIT FUNCTION
- end if
-
- elseif nullflag% <> FALSE then
- Lot_LocalGetPathFromIni = ""
- EXIT FUNCTION
-
- else
- Lot_LocalGetPathFromIni = ""
- end if
-
- END FUNCTION
-
- PUBLIC FUNCTION Lot_GetLotusiniPath(gLotusIniPath$) AS INTEGER
- '** Purpose: This function builds and sets the global for lotus.ini
- '** path
- '** Author: MZ
- '** Arguments: gLotusIniPath$
- '** Returns: SUCCESS
- '*************************************************************************
- 'Get the path to the lotus.ini
- gLotusIniPath$ = MakePath( GetWindowsDir(), gLOTUSINI$)
-
- Lot_GetLotusiniPath = SUCCESS
-
- END FUNCTION
- '*************************************************************************
-
-
- PUBLIC FUNCTION Lot_GetSharedIniPathName() AS STRING
- '** Purpose: Builds the path to the datadriver file shared.ini
- '** Author: MZ
- '** Returns: the path$ to shared.ini
- '*************************************************************************
- DIM cwd$,gSharedIniFile$
- 'Get the current working directory
- cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
- gSharedIniFile$ = MakePath(cwd$,gSHAREDINI$)
- Lot_GetSharedIniPathName=gSharedIniFile$
- END FUNCTION
- '*************************************************************************
-
-
- PUBLIC FUNCTION Lot_GetLotusappiniPath(gLotusappIniPath$, gLotusappDir$, gLotusBcfDir$) AS INTEGER
- '** Purpose: This function builds and sets the global for lotusapp.ini
- '** path and directory
- '** Author: MZ
- '** Arguments: gLotusappIniPath$, gLotusappDir$,gLotusBcfDir$
- '** Returns: SUCCESS
- '*************************************************************************
- 'Get the path to lotusapp.ini
- gLotusappIniPath$=gLotusappDir$+"lotusapp.ini"
-
- 'Get the path to lotus.BCF
- gLotusBcfDir$ = gLotusappDir$+"datalens\"+ gLOTUSBCF$
- 'print "where this is set gLotusBcfDir",gLotusBcfDir
-
- Lot_GetLotusappiniPath = SUCCESS
-
- END FUNCTION
- '*************************************************************************
-
- FUNCTION Lot_Save32ShareConfigInInstallIni() AS INTEGER
- '** Purpose: Saves the components dir and SameDriveForComponent flag
- '** into install.ini in the section [Server Configuration of
- '** Shared Tools]; This is needed at Node install time
- '** Author: MZ
- '** Arguments: None
- '** Returns: SUCCESS
- '*************************************************************************
- DIM networkins$,proddir$,ginstallinifile$,proddrv$
- DIM componentsdir$, componentsdrv$
-
- 'Identify if I am in server install
- NetworkIns$ = GetSymbolValue(SYM_NETWORK$)
- IF Lot_AreShare32ToolsSupported()=1 THEN
-
- IF NetworkIns$=gSERVER$ THEN
-
- 'Built the path to install.ini
- prodDir$ = Lot_GetInstallDir()
- gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
-
- 'Log the COMPONENT directory
- componentsDir$ = GetSymbolValue(SYM_COMPONENTSDIR$)
- CreateIniKeyValue gInstallIniFile$,_
- "Server Configuration of Shared Tools",_
- SYM_COMPONENTSDIR$, _
- componentsDir$,_
- cmoOverwrite
-
- 'Log a flag that tells if the product is in the same drive with components
- prodDrv$ = LCASE$(Lot_GetVol(prodDir$))
- componentsDrv$ = LCASE$(Lot_GetVol(componentsDir$))
- IF prodDrv$ = componentsDrv$ THEN
- CreateIniKeyValue gInstallIniFile$,_
- "Server Configuration of Shared Tools",_
- "SameDriveForComponent",_
- "1", cmoOverwrite
- ELSE
- CreateIniKeyValue gInstallIniFile$,_
- "Server Configuration of Shared Tools",_
- "SameDriveForComponent", "0", cmoOverwrite
- END IF
-
-
- END IF
- END IF
-
- Lot_Save32ShareConfigInInstallIni = SUCCESS
- END FUNCTION
-
- CONST REGSYSTEMSERVICES = "SystemServices\3.1"
-
- '*************************************************************************
-
- SUB Lot_WriteShare32InTheRegistry
- '** Purpose: This subroutine is to use the 32SHAREDATA array of
- '** WIN32SHARED structure and write the registry key if the feature was installed
- '** Author: MZ
- '** Arguments: None
- '** Symbols In:
- '** Returns: SUCCESS
- '*************************************************************************
- DIM NumOfStrucs%, StrucCount%, KeyWordListLen%, KeyWordCount%, InstalledFlag%
- DIM KWList$, KeyWordName$,Network$,LReturn&, ComponentNameAndVer$, path$, ver$
- DIM DependsOnNameList$,DependsOnVerList$,DependsOnListLen%,DependsOnCount%
- DIM ListLength%, FileName$, ListName$, Count%, s$, KeyWordList$, i%, kw$
- DIM gInstallIniFile$,cwd$,prodDir$,lenVer%, dirSym$, inidir$
- DIM LocCompPath$, file$, keyvalname1$, keyval1&, keyvalname2$, keyval2&
- DIM CompPath$, UserPath$, key$
- IF Lot_AreShare32ToolsSupported() <> 1 THEN EXIT SUB
-
- 'Get how many shared32 sections I have to process
- NumOfStrucs% = Shared32DataCount
- IF NumOfStrucs% = 0 THEN EXIT SUB
-
- Network$ = GetSymbolValue(SYM_NETWORK$)
-
- 'Built the path to install.ini
- IF Network$ = gNODE$ THEN
- 'Get the current working directory
- 'cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
- 'gInstallIniFile$ = cwd$+gINSTALLINI$
- dirSym$ = Reg_GetDirSymbolList(1) '** First product dir list
- IF GetListLength(dirSym$) >= 1 THEN
- dirSym$ = GetListItem(dirSym$, 1) '** First directory symbol
- inidir$ = GetSymbolValue(dirSym$)
- gInstallIniFile$ = MakePath(inidir$,"cinstnod.ini")
- END IF
- ELSEIF Network$=gSERVER$ OR Network$=gSTANDARD THEN
- 'Get the install directory
- prodDir$ = Lot_GetInstallDir()
- gInstallIniFile$ = MakePath(prodDir$,gINSTALLINI$)
- END IF
-
- 'print gInstallIniFile$,"gInstallIniFile$"
-
- 'Write the appropriate entries
- FOR StrucCount% = 1 TO NumOfStrucs%
- 'Make the keyWordListName
- KWList$ = "KeyWordList"+LTRIM$(STR(StrucCount%))
- 'print KWList$, "KWList$"
-
- 'Get the number of the keywords
- KeyWordListLen% = GetListLength(KWList$)
- 'print KeyWordListLen%,"KeyWordListLen%"
-
- 'See if this feature was installed
- 'This will be true if one or more sections are installed
- InstalledFlag% = 0
- IF KeyWordListLen% <> 0 THEN
- FOR KeyWordCount% = 1 TO KeyWordListLen%
- KeyWordName$ = GetListItem(KWList$,KeyWordCount%)
- keyvalname1$ = Shared32Data(StrucCount%).RegistrationKey
- keyvalname2$ = Shared32Data(StrucCount%).Version
- ' JMD: Only write the entry if registry info provided
- IF keyvalname1$ <> "" AND keyvalname2$ <> "" THEN
- ComponentNameAndVer$ = keyvalname1$ + "\" + keyvalname2$
- SELECT CASE network$
- CASE gSTANDARD$
- IF (FIsKeywordinCopyList (KeyWordName$) = 1) THEN
- 'Write it in cinstall.ini for uninstall
- 'print ComponentNameAndVer$,"ComponentNameAndVer$"
- CreateIniKeyValue gInstallIniFile$,_
- "WIN32 Shared Component Information",_
- KeyWordName$, _
- ComponentNameAndVer$,_
- cmoOverwrite
- InstalledFlag% = 1
- END IF
-
- CASE gNODE$
- IF Lot_IsTheFeatureInstalled(KeyWordName$) = 1 THEN
- 'Write it in cinstnode.ini for uninstall
- 'print ComponentNameAndVer$,"ComponentNameAndVer$"
- CreateIniKeyValue gInstallIniFile$,_
- "WIN32 Shared Component Information",_
- KeyWordName$, _
- ComponentNameAndVer$,_
- cmoOverwrite
- InstalledFlag% = 1
- END IF
- END SELECT
- END IF
- NEXT
- END IF
-
- 'Write the registry entries for this feature
- 'only if installed and node or standard
- IF InstalledFlag% = 0 THEN GOTO DONEXTONE
- IF network$ <> gSTANDARD$ AND network$ <> gNODE$ THEN GOTO DONEXTONE
-
- '**************************
- '** Registry Key Processing
- '**************************
-
- STATIC SSFlag%
-
- IF Shared32Data(StrucCount%).RegistrationKey <> "" THEN
- 'WriteTheComponent Key and Version
- ComponentNameAndVer$ = Shared32Data(StrucCount%).RegistrationKey+"\"+Shared32Data(StrucCount%).Version
- LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP+"\"+ComponentNameAndVer$)
-
- '*** TV: Special processing for System Services
- '*** Used by Lotus Script and Chart
-
- IF Shared32Data(StrucCount%).Win32ComponentName = "Lotus Script" _
- OR Shared32Data(StrucCount%).Win32ComponentName = "Chart" THEN
-
- key$ = gREGLOTUSCOMP+ "\" + REGSYSTEMSERVICES
- LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE, key$)
- ' Write entry for uninstall -- only for Lotus Script so it won't get
- ' deleted if Chart goes
- s$ = Shared32Data(StrucCount%).Win32ComponentName
- IF s$ = "Lotus Script" AND NOT SSFlag% THEN
- KWList$ = "KeyWordList"+LTRIM$(STR(StrucCount%))
- KeyWordListLen% = GetListLength(KWList$)
- IF KeyWordListLen% <> 0 THEN
- ' Find the first installed section, use for uninstall object
- FOR KeyWordCount% = 1 TO KeyWordListLen%
- KeyWordName$ = GetListItem(KWList$,KeyWordCount%)
- IF Lot_IsTheFeatureInstalled(KeyWordName$) = 1 AND NOT SSFlag% THEN
- SSFlag% = TRUE
- Lot_RegisterObject KeyWordName$, UNIN_CLASS_REGISTRY_HIVE$, _
- gHLM$ + "\" + key$
- END IF
- NEXT
- END IF
- END IF
- file$ = "LTCHEN21.DLL"
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, key$, _
- "INFO", REG_SZ, file$, LEN(file$)+1)
- file$ = "LTSIN31.DLL"
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, key$, _
- "LSI", REG_SZ, file$, LEN(file$)+1)
- file$ = "LTLRN31.DLL"
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE, key$, _
- "ADPT", REG_SZ, file$, LEN(file$)+1)
- END IF
-
- '*** TV: Special processing for Chart
- LocCompPath$=Lot_TrimEndSlash(GetSymbolValue(SYM_COMPONENTSDIR$))
- LocCompPath$ = LocCompPath$ + "\"
- '** should actually be WIN32SHRCHARTUSER
- IF Shared32Data(StrucCount%).Win32ComponentName = "Chart" THEN
- Lot_CreateAndRegisterUserSubdir gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
- "Style Directory", LocCompPath$, FALSE
- END IF
- '*** end special processing
-
- '*** TV: Special processing for Mobil Player
- IF Shared32Data(StrucCount%).Win32ComponentName = "Mobil Player" THEN
- LocCompPath$=Lot_TrimEndSlash(GetSymbolValue(SYM_COMPONENTSDIR$))
-
- keyvalname1$ = "Keep Metafile Size"
- keyval1& = 00000000
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
- keyvalname1$, REG_DWORD,_
- keyval1&, 4)
-
- keyvalname2$ = "Dither Grad Fills in Metafiles"
- keyval2& = 00000001
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
- keyvalname2$, REG_DWORD,_
- keyval2&, 4)
-
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
- "Working Directory", REG_SZ,_
- LocCompPath$, LENBP(LocCompPath$)+1)
- END IF
- '*** end special processing for Player
-
- '*** TV: Special processing for Spell Data, User and Thesaurus
- IF Shared32Data(StrucCount%).Win32ComponentName = "Spell Checker" _
- OR Shared32Data(StrucCount%).Win32ComponentName = "Thesaurus" THEN
- '*** Spell or Thesaurus Data Path
- IF network$ = gSTANDARD$ THEN
- CompPath$ = GetSymbolValue(SYM_COMPONENTSDIR$) + "spell\"
- ELSE
- '*** has to be node
- CompPath$ = GetSymbolValue(SYM_NETCOMPONENT$) + "spell\"
- END IF
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
- "Data Path", REG_SZ,_
- CompPath$, LENBP(CompPath$)+1)
-
- '*** Spell Multi User Path
- IF Shared32Data(StrucCount%).Win32ComponentName = "Spell Checker" THEN
- UserPath$ = GetSymbolValue(SYM_LOTUSUSERDIR$) + "spell"
- Lot_CreateAndRegisterUserSubdir gREGLOTUSCOMP+"\"+ComponentNameAndVer$, _
- "Multi User Path", UserPath$, TRUE
- END IF
- END IF
- '*** end special processing for Spell
-
- '*** JMD: Special processing for Fills
- ' Wordpro is creating the keys -- we just set up to uninstall them here
- IF Shared32Data(StrucCount%).Win32ComponentName = "Fills" THEN
- Lot_RegisterObject KeyWordName$, UNIN_CLASS_REGISTRY_HIVE$, _
- gHCU$ + "\" + gREGLOTUSCOMP+"\" + "Fills"
- END IF
-
- 'Make entries so that Suite uninstall will not complain about unknown
- 'shared components
- IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN _
- LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUS+_
- GetSymbolValue(SYM_REG_PRODUCTNAME$)+"\"+_
- GetSymbolValue(SYM_REG_PRODUCTVER$)+"\"+_
- "Components\"+_
- ComponentNameAndVer$)
-
- 'Write the help files into the Win95 Regisry
- '-------------------------------------------
- 'ListName will be blank if no help files exist for feature
- ListName$ = Shared32Data(StrucCount%).HelpFileNames
- IF ListName$ = "" GOTO HELPDONE
-
- SELECT CASE network$
- CASE gSERVER$
- GOTO HELPDONE
- CASE gDISTRIBUTION$
- GOTO HELPDONE
- CASE gSTANDARD$
- ' Get the destination directory corresponding to the keyword
- ' by finding it from first installed section
- KWList$ = "KeyWordList"+LTRIM$(STR(StrucCount%))
- KeyWordListLen% = GetListLength(KWList$)
- FOR KeyWordCount% = 1 TO KeyWordListLen%
- KeyWordName$ = GetListItem(KWList$,KeyWordCount%)
- s$ = Lot_GetChapterFromKeyword(KeyWordName$)
- IF s$ <> "" THEN s$ = Lot_GetChapterValStr(s$, F_DESTDIRSYM)
- IF s$ <> "" THEN s$ = GetSymbolValue(s$)
- if s$ <> "" THEN EXIT FOR
- NEXT
- CASE gNODE$
- ' Register the help registry entry under the first product
- KeyWordName$ = Reg_GetProductAcronym(1) + gTOP$
- ' For node, assume all help files are in the NETCOMPONENT on the server
- s$ = GetSymbolValue(SYM_NETCOMPONENT$)
- END SELECT
- if s$ = "" THEN GOTO HELPDONE
-
- 'Add subdirectory under main compnent directory, if any
- IF Shared32Data(StrucCount%).DestSubdir <> "" THEN _
- s$ = MakePath(s$, Shared32Data(StrucCount%).DestSubdir)
- IF RIGHT$(s$, 1) <> "\" THEN s$ = s$+ "\"
- ' Traverse the list of help files looking for installed ones
- IF s$ <> "" THEN
- ListLength% = GetListLength(ListName$)
- FOR Count% = 1 TO ListLength%
- FileName$ = GetListItem(ListName$, Count%)
- IF DoesFileExist(s$+FileName$,femExists) = 1 THEN _
- Lot_RegisterHelpFile KeyWordName$, s$, FileName$
- NEXT
- END IF
- HELPDONE:
-
- 'Writes the Dependents if they exists
- 'but not for node install, since no shared components are on node
- IF network$ <> gNODE$ THEN
- 'make the DependsOnNameList name
- DependsOnNameList$ = "DependsOnNameList"+LTRIM$(STR(StrucCount%))
- 'make the DependsOnVerList name
- DependsOnVerList$ = "DependsOnVerList"+LTRIM$(STR(StrucCount%))
- DependsOnListLen% = 0
- DependsOnListLen% = GetListLength(DependsOnNameList$)
- lenVer% =GetListLength(DependsOnVerList$)
- IF lenVer% = DependsOnListLen% AND DependsOnListLen% <> 0 AND _
- GetListItem(DependsOnNameList$,1) <> "" THEN
- FOR DependsOnCount% = 1 TO DependsOnListLen%
- ver$ = GetListItem(DependsOnVerList$,DependsOnCount%)
- LReturn& = Lot_RegCreateKeyEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP+"\"+ComponentNameAndVer$+"\Dependents\"+GetListItem(DependsOnNameList$,DependsOnCount%))
- 'print " before calling Lot_CreateRegKeyValueEx in share32"
- LReturn& = Lot_CreateRegKeyValueEx(HKEY_LOCAL_MACHINE,_
- gREGLOTUSCOMP+"\"+ComponentNameAndVer$+"\Dependents\"+GetListItem(DependsOnNameList$,DependsOnCount%),_
- "Version",_
- REG_SZ,_
- ver$, _
- LEN(ver$)+1)
- IF LReturn& <> ERROR_SUCCESS THEN
- RegErrorMsg SID_ERR_REG_GENERIC, gHLM$+"\"+gREGLOTUSCOMP+"\"+ComponentNameAndVer$+"\Dependents\"+GetListItem(DependsOnNameList$,DependsOnCount%),"Version",ver$
- END IF
- 'print " after calling Lot_CreateRegKeyValueEx in share32",LReturn&
- NEXT
- END IF
- END IF
-
- END IF ' Registry processing
-
- '**********************
- '** INI File Processing
- '**********************
- 'If there is an Ini entry write it
- IF Shared32Data(StrucCount%).IniFileName <> "" AND _
- Shared32Data(StrucCount%).IniSectionName <> "" AND _
- Shared32Data(StrucCount%).IniEntryName <> "" THEN
- IF Shared32Data(StrucCount%).DestSubdir <> "" THEN
- path$ = GetSymbolValue(SYM_COMPONENTSDIR)+Shared32Data(StrucCount%).DestSubdir
- ELSE
- path$ = Lot_TrimEndSlash(GetSymbolValue(SYM_COMPONENTSDIR$))
- END IF
- IF Shared32Data(StrucCount%).IniEntryName <> "Common Directory" THEN
- CreateIniKeyValue MakePath( GetWindowsDir(), Shared32Data(StrucCount%).IniFileName), _
- Shared32Data(StrucCount%).IniSectionName, _
- Shared32Data(StrucCount%).IniEntryName, _
- path$, cmoOverwrite
- END IF
- END IF ' end of writing the ini entry
-
-
- DONEXTONE:
- NEXT ' NumOfStrucs
-
- END SUB
-
- SUB PopupMappingErrorMsgExit(szPath$)
- '** Purpose: If components directory drive not mapped or unc path invalid,
- '** popup a dialog and exit
- '**
- '** Author: JMD
- '** Arguments: szPath$ Path
- '*************************************************************************
- DIM sz$, i%
- sz$ = LdString(SID_ERR_DRIVENOTMAPPED)
- i% = INSTR(sz$, "%")
- sz$ = MID(sz$, 1, i%-1) + szPath$ + MID(sz$, i%+2, LEN(sz$))
- i% = DoMsgBox (sz$, LdString(SID_TKT_STD_TITLE) , MB_OK)
- gEndStatementEncountered% = TRUE
- END SUB
-
- CONST DRIVE_UNKNOWN = 0
- CONST DRIVE_NO_ROOT_DIR = 1
- CONST DRIVE_REMOVABLE = 2
- CONST DRIVE_FIXED = 3
- CONST DRIVE_REMOTE = 4
- CONST DRIVE_CDROM = 5
- CONST DRIVE_RAMDISK = 6
-
-
- PUBLIC FUNCTION IsDriveMapped(szPath$) AS INTEGER
- '** Purpose: Determine if a drive letter for shared component is currently
- '** mapped or if UNC volume if the directory exists
- '** Author: JMD
- '** Arguments: Drive$ Drive letter to test
- '** Returns: TRUE if mapped
- '*************************************************************************
- DIM sz$, lDrive$, i%, length%, drivetype%, uncOff&
-
- IsDriveMapped = FALSE
- IF szPath$="" THEN EXIT FUNCTION
- uncOff& = INSTR(1, szPath$, "\\")
- ' UNC Volume, check if directory exists
- IF uncOff > 0 THEN
- IF DoesDirExist(szPath$) = 1 THEN IsDriveMapped = TRUE
- EXIT FUNCTION
- END IF
- sz$ = LCASE(Lot_ExtractDriveLetter(szPath$))
- GetValidDrivesList("Drives")
- length% = GetListLength("Drives")
- FOR i% = 1 TO length%
- lDrive$ = GetListItem("Drives", i%)
- 'See if it's really there
- IF LCASE(lDrive$) = sz$ THEN
- drivetype% = GetDriveType(LEFT(lDrive$,1)+ ":\")
- IF drivetype% = DRIVE_FIXED THEN IsDriveMapped = TRUE
- IF drivetype% = DRIVE_REMOTE THEN IsDriveMapped = TRUE
- END IF
- NEXT
- RemoveSymbol "Drives"
- END FUNCTION
-
- PUBLIC SUB Lot_RegisterHelpFile(szKey$, szDir$, FileName$)
- '** Purpose: Register help file in Windows registry and record it as an
- '** object in cinstall.ini for uninstall
- '** Author: JMD
- '** Arguments: szKey$ Section keyword
- '** szDir$ Path to help file
- '** FileName$ Help file name
- '*************************************************************************
-
- DIM Size%
- Size% = lenbp(szDir$) + 1
- Lot_CreateRegKeyValueEx HKEY_LOCAL_MACHINE, gREGWINDOWSHELP, FileName$, _
- REG_SZ, szDir$, Size%
- Lot_RegisterObject szKey$, UNIN_CLASS_REGISTRY_VALUE$,_
- gHLM$ + "\" + gREGWINDOWSHELP + "\" + FileName$
-
- END SUB
-
- PUBLIC FUNCTION Lot_RefreshLocalComponentDir () AS INTEGER
- '** Purpose: Traverses the list of shared 32 bit component sections and if
- '** any are copied to the node it resets the source directory to the
- '** corresponding value in the "cinstall.ini" file
- '** Author: JMD
- '** Arguments: None
- '** Returns: SUCCESS
- '*************************************************************************
- DIM Network$, ServerComponentPath$, KeyWordName$
- DIM ServerUserPath$, Source$, Dest$, Chapter$, ChapterSpec$, s$
-
- 'Function only valid for node installs
- Network$ = GetSymbolValue(SYM_NETWORK$)
- IF Network$ <> gNODE$ THEN EXIT FUNCTION
- 'Read the server locations corresponding to these special symbols
- ServerComponentPath$ = Lot_GetDestDirValueFromInstallini(SYM_COMPONENTSDIR$)
- ServerUserPath$ = Lot_GetDestDirValueFromInstallini(SYM_LOTUSUSERDIR$)
- 'If no entry for User Directory on Server, assume same as components
- IF ServerUserPath$ = "" THEN ServerUserPath$ = ServerComponentPath$
- 'Traverse the copy list for shared sections
- Chapter$ = Lot_GetFirst("", F_SHARE)
- WHILE (Chapter$ <> "")
- KeyWordName$ = Lot_GetChapterValStr(Chapter$, F_KEYWORD)
- ' If the feature exists on the server, and it wants to be copied now..
- IF Lot_IsTheFeatureInstalled(KeyWordName$) = 1 AND _
- (CINT(FIsKeywordinCopyList (KeyWordName$)) <> FALSE) THEN
- s$ = Lot_GetChapterValStr(Chapter$, F_DESTDIRSYM)
- 'Find out if it is a user or component section
- IF (s$ = SYM_LOTUSUSERDIR$) THEN
- Source$ = ServerUserPath$
- Dest$ = GetSymbolValue(s$)
- ELSEIF (s$ = SYM_COMPONENTSDIR$) THEN
- Source$ = ServerComponentPath$
- Dest$ = GetSymbolValue(s$)
- ELSE
- 'Could be WIN, WINSYS, don't reset
- GOTO NEXTONE
- END IF
- ChapterSpec$ = Lot_GetChapterValStr(Chapter$, F_NOTHING)
- AddSectionFilesToCopyList ChapterSpec$,Source$,Dest$
- END IF
- NEXTONE:
- Chapter$ = Lot_GetNext()
- WEND
- Lot_RefreshLocalComponentDir = SUCCESS
- END FUNCTION
-
-
- SUB Lot_CreateAndRegisterUserSubdir(szSubKey$, szValueName$, LocCompPath$, bAppend%)
- '** Purpose: Create a user registry key for a user path, and verify that the
- '** path exists; if not, create it
- '** Author: JMD
- '** Arguments:
- '** szSubKey$ Registry key (of HCU)
- '** szValueName$ Registry value name
- '** LocCompPath$ Path to register and verify existence
- '** bAppend% TRUE if append to existing entry
- '*************************************************************************
- DIM s$
- 'Make sure ends in trailing backslash
- LocCompPath$=Lot_TrimEndSlash(LocCompPath$)
- LocCompPath$= LocCompPath$ + "\"
- Lot_CreateUserRegistryEntry szSubKey$, szValueName$, LocCompPath$, bAppend%
- 'Create the paths if they don't exist
- 'and register the directory under the first product for uninstall
- IF DoesDirExist(LocCompPath$) = FALSE THEN
- Lot_CreateDirectory(LocCompPath$)
- s$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(1) + gTOP$)
- s$ = Lot_GetChapterValStr(s$, F_KEYWORD)
- Lot_RegisterObject s$, UNIN_CLASS_DIRECTORY$, LocCompPath$
- END IF
- END SUB
-
- SUB Lot_CreateUserRegistryEntry(szSubKey$, szValueName$, Value$, bAppend%)
- '** Purpose: Create a user registry key entry
- '** Author: JMD
- '** Arguments:
- '** szSubKey$ Registry key (of HCU)
- '** szValueName$ Registry value name
- '** Value$ Registry value
- '** bAppend% TRUE if append to existing entry
- '*************************************************************************
- DIM gbuf$, nsize&, ret&, NewValue$, i%, s$
- NewValue$ = Value$
- IF bAppend% THEN
- ret& = Lot_GetRegKeyValueEx(HKEY_CURRENT_USER, szSubKey$, szValueName$, _
- 0, gbuf$, nsize&)
- gbuf$ = NullTrim(gbuf$)
- 'Found the key, parse it and add to it
- IF ret& = ERROR_SUCCESS THEN
- DIM VALUELIST LIST AS INTEGER
- 'Make a list of the values already there
- i% = 1
- DO
- s$ = Lot_GetNthFieldFromIniString (gbuf$, i%, ";")
- s$ = LCASE(s$)
- VALUELIST(s$) = 1
- i% = i% + 1
- LOOP UNTIL s$=""
- 'Add it if it's not already there -- to beginning of list
- IF ISELEMENT(VALUELIST(LCASE(Value$))) THEN
- ' It's already there -- no need to do anything
- EXIT SUB
- ELSE
- NewValue = Value$ + ";" + gbuf$
- END IF
- END IF
- END IF
- ret& = Lot_CreateRegKeyValueEx(HKEY_CURRENT_USER,_
- szSubKey$, szValueName, REG_SZ, NewValue$, LENBP(NewValue$)+1)
- IF ret& <> ERROR_SUCCESS THEN _
- RegErrorMsg SID_ERR_REG_GENERIC, gHCU$+"\"+szSubKey$,szValueName,NewValue$
- END SUB
-