home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 April A
/
Pcwk4a98.iso
/
Lotus
/
Domino46
/
INSTALL.DSK
/
INST.LSS
< prev
next >
Wrap
Text File
|
1997-08-18
|
44KB
|
1,046 lines
''/*********************************************************************
''
'' Module Name: INST.lss
''
'' Module Code: COMINST
''
'' Author:
''
'' Creation Date: Jan 26, 1994
''
'' Copyright Lotus Development Corporation, (c) 1994
''
''
''
'' Description:
''
''
'' Additional authors:
''
'' Change History:
'' $Log: //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/inst___@.lss $
''
'' Rev 1.30.1.0 15 Nov 1995 17:05:18 mhishinu
'' Merged GC5 into FE5
''
'' Rev 1.30 11 Oct 1995 15:57:22 glutz
'' AddIconINST sets working directory.
''
'' Rev 1.29 26 Sep 1995 09:01:30 jdonohue
'' Fixed preventing overwrite of cinstall.ini, .inf for language install
''
'' Rev 1.28 25 Sep 1995 12:51:28 jdonohue
'' Added placeholder function InitLanguageINST
''
'' Rev 1.27 Sep 25 1995 09:52:24 cmoy
'' Prevent overwrite of cinstall.ini, xxx.lss by supressing INSTTOP section inst
'' ead of INSTFILES section
''
'' Rev 1.26 07 Sep 1995 14:55:18 tveerapp
'' Moved the setting of INSTDIR during a language server install from
'' main.lss to fix spr# WED2SVNRDZ
''
'' Rev 1.25 01 Sep 1995 09:35:18 jdonohue
'' Turn off INSTLANG?? section for language install
''
'' Rev 1.24 18 Aug 1995 16:43:12 glutz
'' INITInst sets InitDir to SYM_PARENTDIR$.
''
'' Rev 1.23 14 Aug 1995 13:41:46 jdonohue
'' Added code to add language qualifier to node icon in AddIconsINST
''
'' Rev 1.22 14 Aug 1995 09:09:26 jdonohue
'' Added code to handle language install to server
''
'' Rev 1.21 02 Aug 1995 14:56:28 amontalv
'' Added name of product to node install shortcut.
''
'' Rev 1.20 17 Jul 1995 15:53:58 amontalv
'' Added code to put install in program folder for server install.
''
'' Rev 1.19 03 May 1995 18:14:14 mzgripce
'' replace #else with 'else
''
'' Rev 1.18 02 May 1995 12:52:42 cmoy
'' Merged c2 into cf build
''
'' Rev 1.18 10 Apr 1995 18:09:14 amontalv
'' Changed comments to reflect change of function reference.
''
'' Rev 1.17 02 Feb 1995 14:27:06 cmoy
''
'' Thangaraj added fixes for Pipeline Problem
''
'' Rev 1.16 13 Jan 1995 17:17:58 tveerapp
''
'' Removed redundant code
''
'' Rev 1.15 12 Jan 1995 15:30:42 tveerapp
''
'' 1. changed cmoVital to cmoOverwrite for making the LAUNCHEXE entry in cinstall.ini
'' 2. Removed MakePath.It cannot handle file names with paths in it. e.g. reg\foo.exe
''
'' Rev 1.14 11 Jan 1995 15:32:08 tveerapp
''
'' Fixed spr# TVEN28TJK:
'' The cinstall.ini in the temporary directory is used to determine if the product
'' being installed supports pipeline(based on the existence of the LAUNCHEXE entry)
'' If it does, a global flag is set to indicate this and an enrty is made in the
'' cinstall.ini that is installed on the machine.
'' If the flag is set and the execuatble exists, it is launched.
''
'' Rev 1.13 29 Dec 1994 12:23:14 tveerapp
''
'' Fixed AND _.
''
'' Rev 1.12 29 Dec 1994 12:15:28 tveerapp
''
'' Added a check for pipeline processing to be launched only for a non-automated
'' install.
''
'' Rev 1.11 28 Dec 1994 16:13:50 tveerapp
''
'' Added pipeline processing (electronic registration). Functions PostCopyConfig
'' and PostSuccessReg have these changes. Removed the callback for the elrctronic
'' registration dialog.
''
'' Rev 1.10 12 May 1994 11:20:52 mmeth
'' Adding Icons for Lic and Install and using DoMsgBox instead of MessageBox
''
'' Rev 1.9 02 May 1994 18:34:02 mzgripce
''
'' add AddIconsINST()
''
'' Rev 1.8 04 Apr 1994 18:10:44 mmeth
'' Now can ignore share.lss & shared.ini
''
'' Rev 1.7 22 Mar 1994 12:34:16 mmeth
'' added licdir & instdir to toolkit registration
''
'' Rev 1.6 28 Feb 1994 14:27:42 mmeth
'' Incorrectly reseting INSTDIR in PrecopyCOnfigINST
''
'' Rev 1.5 18 Feb 1994 13:29:42 mmeth
''
'' Now check for Listlength of Reg_GetDirSymbolList
''
'' Rev 1.4 17 Feb 1994 10:23:06 mmeth
'' Added Reg_SetAllowUserToChoseInSMartSUite
''
'' Rev 1.3 16 Feb 1994 11:00:22 mmeth
'' Added error message if INSTTOP sec is
''
'' Rev 1.2 15 Feb 1994 15:33:58 mmeth
'' took out a print
''
'' Rev 1.1 15 Feb 1994 14:48:30 mmeth
'' fixed BASEDIR & Reg_GetDirSymbolLIst(1)
''
'' Rev 1.0 11 Feb 1994 10:56:44 jbrodeur
'' Initial Revision
''----------------------------------------------------------------------
'' Date Vers. Pgmr SPR# Change
''----------------------------------------------------------------------
'' 2-08-94 0004 MMETH moved checking first prod for change to Initcopylist
'' 2-04-94 0003 MMETH changed PreCopyConfig to work for SmartSuite
'' 2-03-94 0002 MMETH corrected 1 prod vs smartsuite
'' 2-02-94 0001 MMETH cinstall.ini install for standard and server
'' 1-25-94 0000 Initial Check-In
'' !
''
''----------------------------------------------------------------------
''
''*********************************************************************/
USE "TOOLKIT"
USE "LANGUAGE"
OPTION DECLARE
'** These Are the Required Functions that Products must provide
'***************************************************************
DECLARE PUBLIC FUNCTION ProductRegINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION DefaultUserRegINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION InitINST (prodno%, network$, direction$, basedir$) AS STRING
DECLARE PUBLIC FUNCTION PathChangeINST (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DECLARE PUBLIC FUNCTION InitCopyListINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PreCopyConfigINST (prodno%, network$, direction$, lic%) AS STRING
DECLARE PUBLIC FUNCTION AddTheBillBoardsINST (prodno%, network$, direction$, nbytes&) AS STRING
DECLARE PUBLIC FUNCTION PostCopyConfigINST (prodno%, network$, direction$, programgroup$) AS STRING
DECLARE PUBLIC FUNCTION AddIconsINST (prodno%, network$, direction$, programgroup$) AS STRING
DECLARE PUBLIC FUNCTION UIINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION PostSuccessRegINST (prodno%, network$, direction$) AS STRING
DECLARE PUBLIC FUNCTION InitLanguageINST (prodno%, network$, direction$) AS STRING
'** Product specific functions
'*****************************
DECLARE FUNCTION GetINSTPathfromLotusIni() AS STRING
' ** Global flag for launching pipeline exe
PUBLIC gProdsupport%
'*************************************************************************
'**************************** Required Functions *************************
'*************************************************************************
'*************************************************************************
'** SUB Initialize
'**
'** Purpose: Initialize the INST product scripts. There is only one purpose
'** of this routine, it is to register **your product**. Without
'** this function, your product will not install. All you
'** you need to do in this subroutine is:
'** modify INST -> your acronmy.
'** NOTE: so as not to clutter up the INSTCUI.RC file,
'** we always use SID_INST. You of course can be more
'** creative!
'**
'** ASSUMPTIONS: Many things in the toolkit key off of your
'** Acronym. These are the constraints:
'** 1. your top level chapther in the INF must
'** have a KEYWORD of your Acronym +"TOP"
'** e.g. INSTTOP
'** Author: Marcel Meth
'** Arguments: None
'** Returns: NONE
'*************************************************************************
SUB Initialize
Reg_RegisterProductNames "INST", LdString(SID_BLANKTEXT)
END SUB
'*************************************************************************
'** FUNCTION ProductRegINST (prodno%, network$, direction$) AS INTEGER
'**
'** Purpose: This function allows your product to register itself
'** in the Install Product Registry. The toolkit squirrles
'** the information provided and will provide you with
'** various features accordingly. For example, if you support
'** shared files, the toolkit will do most of the work
'** for the LOTUSAPP directory.
'**
'** For the most part you should use only Reg_Set... Functions.
'**
'**
'** If you turn on ATM, LICENSING, or and SHARED tools, then
'** you must be sure to add the appropriate lines and files
'** in you INST.SCR and INST.LYT, respectively. See Cook book.
'**
'** If you support server, you will have to make sure that
'** you have the correct entire for the install files in your
'** INST.SCR and INST.LYT
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: UNINITIALIZED
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'*************************************************************************
PUBLIC FUNCTION ProductRegINST (prodno%, network$, direction$) AS STRING
ProductRegINST = gNEXT
Reg_SetSupportedInstallTypes prodno%, 1, 1, 1
'Reg_SetSelectedInstallType ProdNo%,TypeSelected$
Reg_SetProdSizes prodno%, 524288, 524288 ' .5 meg.
Reg_SetUIInOrOut prodno%, 1
Reg_SetShareFlags prodno%, 0, 0, 0, 0
Reg_SetAllowUserToPickInSuite prodno%, 0
'NO NEED TO SET SINCE THER IS NO CD SUPPORT.
'Reg_SetCDOption prodno%,Inst%,CDOptStr$
'Reg_SetCDOptionSelected ProdNo%,Inst%,Selection%
'DEAL WITH LATER
'Reg_SetNodeOption ProdNo%,Inst%,NodeOptStr$
'Reg_SetNodeOptionSelected ProdNo%,Inst%,Selection%
Reg_SetSrvSupport prodno%, 1
Reg_SetLicenseSupport prodno%, 0
Reg_SetATMSupport prodno%, 0
'Reg_SetProgManagerGroup prodno%, LdString(SID_INST)
END FUNCTION
'*************************************************************************
'** FUNCTION DefaultUserRegINST (prodno%, network$, direction$) AS STRING
'**
'** Purpose: **Only** the first registered product gets called.
'** For SMartSUite, this will be Smart Suite.
'** This functions allows you to set the default user reg.
'** information that the user will be shown. The toolkit
'** will provide default values from MS-Windows. If you disagree
'** with them you should modify them in this function using:
'** SetSymbolValue on SYM_NAME, SYM_COMPANY & SYM_SERIALNUM$
'**
'** It is upto you how you store registration information.
'** it will not be stored until later in PostCopyConfigINST.
'** The CIT provides functions that allow you to access .ri
'** files: Lot_ReadDefaultsfromRi(ripath$).
'**
'** If you need to write back to the floppy, do it here.
'** Most Lotus products will no longer write back to the floppy.
'** Remeber, you can't write back to a CD or network!
'**
'** In Symbols : SYM_NAME$, SYM_COMPANY$
'** Out Symbols: SYM_NAME$, SYM_COMPANY$, SYM_SERIALNUM$
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: UNINITIALIZED
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'*************************************************************************
PUBLIC FUNCTION DefaultUserRegINST (prodno%, network$, direction$) AS STRING
DefaultUserRegINST = gNEXT
END FUNCTION
'*************************************************************************
'** FUNCTION InitINST (prodno%, network$, direction$, basedir$) AS STRING
'**
'** Purpose: This is the first time you will be called when
'** the server parmater us valid. You need to use this
'** function to intialize certain things. (See the MUST DO
'** below).
'**
'** This is a good place to put up a dialog warning the user
'** of a prrevious version of your product. If there is a previous
'** version you might want to steer them twords or away from it.
'**
'**
'** Must Do: You **MUST** set inital values for all of the destination
'** ======= directories that you refer to in your INF file. If you do not,
'** then InitCopylist will fail! e.g. SetSymbolValue "INSTDIR", basedir$
'** Of course you may be more intelligent. You should preface your
'** directory with basedir$. The toolkit is finding a good drive
'** letter and basedirectory. Also, remeber all paths end in a
'** \ and are lower case.
'**
'** You should **NOT** define LOTUSAPPDIR, NETLOTUSAPPDIR, WINDIR, &
'** WINSYSDIR. The toolkit does this for you.
'**
'** Once you have defined destdir symbols, you need to register
'** them with the toolkit. (See the code below)
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards, i.e start at your last dialog
'** first.
'**
'** basedir$: The toolkit has found a good base. for your directory.
'** This is it. You should use it. This will make Smart
'** Suite work, and will pick a good drive letter for you.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION InitINST (prodno%, network$, direction$, basedir$) AS STRING
DIM dirSym$, sym$, symname$
InitINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
If network$ <> gSERVER AND network$ <> gSTANDARD AND network$ <> gDISTRIBUTION$ Then
Reg_SetUIInOrOut prodno%, FALSE
Else
'** Figure out where the first product is., put install there!
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
SetSymbolValue "INSTDIR", GetSymbolValue(SYM_PARENTDIR$)
Else
SetSymbolValue "INSTDIR", basedir$
End If
sym$ = Reg_GetDirSymbolList(prodno%)
symname$ = sym$ + gNAME
SetSymbolValue "INSTDIRNAME", " "
SetListItem sym$, 1, "INSTDIR"
SetListItem symname$, 1, "INSTDIR" + gNAME$
End If
END FUNCTION
'*************************************************************************
'** FUNCTION PathChangeINST (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
'**
'** Purpose: This function is called whenever the user proposes changes
'** to a path for your product. by the time this function calls
'** you, the paths have already been checked syntactically, and
'** the directory has been checked to see that it is in fact writeable.
'** Your obligation is to verify that the proposed new path is okay with
'** you. If, not, put up a dialog telling the user and return
'** gBACK.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** destdirsym$: The destdir symbol that has changed. e.g. "INSTDIR"
'** mainprodsonly%: (TRUE | FALSE) , when TRUE this means that only
'** your top level product directory should change,
'** probably "INSTDIR"
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION PathChangeINST (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DIM path$
PathChangeINST = gNEXT
path$ = GetSymbolValue (destdirsym$)
'' The following is a psudocode example
''''''rc$ = DetectVersionPriorToDarwin(path$)
''''''If rc$ = "BEAGLE" then
'''''' ShowPathError SID_BEAGLE_FOUND, SID_ERR_EXISTBEAGLE, path$
'''''' PathChangeINST = gBACK
''''''end if
END FUNCTION
'*************************************************************************
'** FUNCTION InitCopyListINST (prodno%, network$, direction$) AS STRING
'**
'** Purpose: Product must Initialize the copylist
'**
'** Must Do: You must initialize the copy list. However,
'** ======= if you leve the code totally untouched as is,
'** it will probably work for you.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION InitCopyListINST (prodno%, network$, direction$) AS STRING
DIM i%, sym$, chpt$
InitCopyListINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
sym$ = Reg_GetProductAcronym(prodno%) + gTOP$
chpt$ = Lot_GetChapterFromKeyWord(sym$)
if chpt$ = "" then
ErrorMsg 0, "Developers: You need to have install section with INSTTOP in INF file"
ERROR STFQUIT
end if
SELECT CASE Reg_GetProdSelectedInstallType(prodno%)
CASE gCOMPLETE$
i% = F_COMPLETE
CASE gLAPTOP$
i% = F_LAPTOP
CASE gCUSTOM$
i% = F_CUSTOM
END SELECT
Lot_InitializeCopyList chpt$, i%
'** FOR STANDARD we only want to install the cinstall.ini file
If network$ <> gSERVER$ Then
If FIsKeywordinCopyList ("INSTFILES") <> FALSE Then
chpt$ = Lot_GetChapterFromKeyword("INSTFILES")
Lot_ToggleChapterFilesInCopyList chpt$
End If
End If
'For a language install, we don't overwrite the cinstall.ini and .INF files
'by turning off the INSTTOP section
IF network$ <> gSERVER$ THEN
IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN
chpt$ = Lot_GetChapterFromKeyword("INSTTOP")
Lot_SetChapterFilesInCopyListInOrOut chpt$, 0
END IF
END iF
END FUNCTION
'*************************************************************************
'** FUNCTION UIINST (prodno%, network$, direction$) AS STRING
'**
'** Purpose: This is your chance to put up any User Interface
'** that you want. remeber, try to keep it short.
'** In Smart Suite, if every product puts up to extra
'** dialogs, then the Smart SUite will consist of 16 dialogs!
'**
'** Pay attention to the value of direction, if you are putting
'** up more than one dialog.
'**
'** The toolkit will do an acurate space computation later,
'** so you can tamper with the copy list. But you shouldn't
'** write out anything to the disk until PostCopyCofig!
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION UIINST (prodno%, network$, direction$) AS STRING
UIINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
END FUNCTION
'*************************************************************************
'** FUNCTION PreCopyConfigINST (prodno%, network$, direction$, lic%) AS STRING
'**
'** Purpose: This is the very last function called before the space is
'** acurately computed (to the last byte) and files are copied
'** by the toolkit. If you have any last minute changes to
'** do, this is the time to do them. example:
'** Test for monitor resolution, and turn on the chapter
'** in the copy list with the appropriate resoltuion.
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** lic%: TRUE | FALSE; TRUE licensing is turned on else it is off
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION PreCopyConfigINST (prodno%, network$, direction$, lic%) AS STRING
DIM dirSym$
PreCopyConfigINST = gNEXT
'* Just in case product 1 changed.
If GetSymbolValue (SYM_SINGLESMARTSUITE) = gSINGLE$ Then
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
End If
SetSymbolValue "INSTDIR", GetSymbolValue(dirSym$)
Else
SetSymbolValue "INSTDIR", GetSymbolValue (SYM_BASEDIR$)
End If
'** TV: We have to reset this symbol for language/server install
IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ AND _
GetSymbolValue(SYM_NETWORK$) =gSERVER$ THEN
SetLanguageSubdir "INSTDIR", "INSTDIR"
END IF
Lot_RefreshDestination ("INSTDIR")
'Make sure LOTUSUSERDIR still is the same as COMPONENTSDIR
SetSymbolValue SYM_LOTUSUSERDIR$, GetSymbolValue(SYM_COMPONENTSDIR$)
IF GetSymbolValue(SYM_LOTUSUSERDIR$) <> "" THEN
Lot_RefreshDestination (SYM_LOTUSUSERDIR$)
END IF
END FUNCTION
'*************************************************************************
'** FUNCTION AddTheBillBoardsINST (prodno%, network$, direction$, nbytes&)
'**
'** Purpose: This is where to add the billboards using the function:
'** AddToBillboardList. Use nbytes& as the last parameter to
'** the MS-SETUP function AddToBillboardList
'**
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** nbytes: Determines the duration of billboard timing.
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT | gBACK (If you are showing UI and you
'** allow the user to step backwards.)
'**
'*************************************************************************
PUBLIC FUNCTION AddTheBillBoardsINST (prodno%, network$, direction$, nbytes&) AS STRING
AddTheBillBoardsINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
'psudo code follows as an example
''''If network$ <> gNODE$ Then
'''' SetListItem "IDC_BMP", 1, STR$(IDD_BILLBD1_BMP)
'''' AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD1, "_FNameOrgDlgProc@16", nbytes&
' else
'''' AddToBillboardList GetSymbolValue(SYM_CUIDLL$), DB_BILLBD1, "FNameOrgDlgProc", nbytes&
''''End If
END FUNCTION
'*************************************************************************
'** FUNCTION PostCopyConfigINST (prodno%, network$, direction$, programgroup$) AS STRING
'**
'** Purpose: This is called just after file copy has completed.
'** This is your opportunity to do all the configuaration
'** you need. This includes:
'**
'** 1. Writing to all your ini files
'** 2. Writeing to OLE Reg database
'** 3. Writing to any other confi files you may support
'** 4. Writing out user registration information
'** 5. Add program manager icons of those features
'** thatwere installed.
'** 6. Create any working directories.
'** A working directory is one that does not contain any
'** files, thus the toolkit did not create it for you.
'**
'** NOTE: THERE are many subtlties in here if you are
'** dealing with node and CD installs. In particular,
'** you must be ***very*** careful to understand where the
'** things are that you are pointing to. They could
'** be on the node, server, or CD! This, in combination
'** with the INF file for Server/Node is probably the trickiest
'** part of writing a quality install. When configuring,
'** you must be careful to consider what happens if there is
'** a preexisting product on the machine, in the same location or
'** another one! This is very very tricky. What happens
'** if you had a full installation previously in location C:\FOO
'** and now the user is installing a minimum installation in loaction
'** D:\FOO.
'**
'** Each and every thing you do for configuartion needs very
'** careful thought.
'**
'** WE support a function Lot_WhereIsFeature("FeatureID")
'** This currrently tells you the location of a feature
'** If the feature appears both in the SERVER.INF and the
'** NODE.INF referred to by the same Keyword ID.
'** We do not support CDs with this command yet, but we will at some
'** time.
'**
'** Also look out for writing to a file when the directory
'** doesn't exist. If the user deselected one of your
'** you options, your install may still be running,
'** but since there were no files to copy into the directory
'** it wasn't created by the toolkit!
'**
'** Finally, remember that configuration files generally
'** hold the state that the user has customized earlier.
'** Sometimes you don't want to overwrite these!
'** You will primarily use three MS-SETUP functions
'** in here:
'** 1. CreateIniKeyValue (writing to ini files)
'** 2. SetRegKeyValue (writing to OLE reg DB)
'** 3. CreateProgmanItem (writing to progman)
'**
'** CreateProgmanGroup & ShowProgmanGroup are
'** done for you by the time you reach this
'** function.
'**
'** You will not have to do any configuration of LOTUS SHARED
'** tools. The toolkit will do this for you.
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** programgroup$: The name of the program group the user chose to
'** install the program manager icons
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION PostCopyConfigINST (prodno%, network$, direction$, programgroup$) AS STRING
PostCopyConfigINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
SKIPCONFIG:
END FUNCTION
'** PUBLIC FUNCTION AddIconsINST (prodno%, network$, direction$, programgroup$) AS STRING
'** Purpose: This is called just after file copy has completed.
'** 1. Add program manager icons of those features
'** thatwere installed.
'**
'** NOTE: THERE are many subtlties in here if you are
'** dealing with node and CD installs. In particular,
'** you must be ***very*** careful to understand where the
'** things are that you are pointing to. They could
'** be on the node, server, or CD! This, in combination
'** with the INF file for Server/Node is probably the trickiest
'** part of writing a quality install. When configuring,
'** you must be careful to consider what happens if there is
'** a preexisting product on the machine, in the same location or
'** another one! This is very very tricky. What happens
'** if you had a full installation previously in location C:\FOO
'** and now the user is installing a minimum installation in loaction
'** D:\FOO.
'**
'** Each and every thing you do for configuartion needs very
'** careful thought.
'**
'** WE support a function Lot_WhereIsFeature("FeatureID")
'** This currrently tells you the location of a feature
'** If the feature appears both in the SERVER.INF and the
'** NODE.INF referred to by the same Keyword ID.
'** We do not support CDs with this command yet, but we will at some
'** time.
'**
'** Also look out for writing to a file when the directory
'** doesn't exist. If the user deselected one of your
'** you options, your install may still be running,
'** but since there were no files to copy into the directory
'** it wasn't created by the toolkit!
'**
'** Finally, remember that configuration files generally
'** hold the state that the user has customized earlier.
'** Sometimes you don't want to overwrite these!
'** You will primarily use three MS-SETUP functions
'** in here:
'** 1. CreateProgmanItem (writing to progman)
'**
'** CreateProgmanGroup & ShowProgmanGroup are
'** done for you by the time you reach this
'** function.
'**
'** You will not have to do any configuration of LOTUS SHARED
'** tools. The toolkit will do this for you.
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT | gBACK (If gBACK, and you are showing UI)
'** then step backwards
'** programgroup$: The name of the program group the user chose to
'** install the program manager icons
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MZ
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION AddIconsINST (prodno%, network$, direction$, programgroup$) AS STRING
DIM instdir$, notused%, Caption$
DIM LanguageQualifier$, LanguageAcronym$
AddIconsINST = direction$
'' In the backwards case, keep backing up
If direction$ = gBACK Then
EXIT FUNCTION
End If
If network$ = gSERVER Then
instdir$ = Lot_WhereIsFeature(prodno%, "INSTFILES", "install.exe")
Caption$ = Reg_GetProductName(1)+ LdString(SID_NOT_VIEWSTRING)
'Add language qualifier for secondary languages
IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN
LanguageAcronym$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
LanguageQualifier$ = Lot_SetLanguageDirectory ( LanguageAcronym$ )
Caption$ = Caption$ + " " + LanguageQualifier$
END IF
ASSERT instdir$ <> "", ""
If IsNewShell() THEN
notused%=Lot_AddLinkToFolder(prodno%, instdir$ + "install.exe", _
Caption$+".lnk", _
Caption$, "", instdir$)
Lot_RegisterObject "INSTFILES",UNIN_CLASS_SHORTCUT$, Lot_GetProgFolder(prodno%) + Caption$+".lnk"
Else
CreateProgmanItem programgroup$, Caption$, _
instdir$ + "install.exe", ",,,," + instdir$, cmoOverwrite
Lot_RegisterObject "INSTFILES", UNIN_CLASS_ICON$, programgroup$ + "\" + Caption$
End If
End If
END FUNCTION
'*************************************************************************
'** FUNCTION PostSuccessRegINST (prodno%, network$, direction$) AS STRING
'**
'** Purpose: If you need to launch something after install runs
'** In Symbols :
'** Out Symbols:
'**
'** Arguments: All paremeters are **read only**.
'** prodno%: This is your prodno%. It is assigned to you by the
'** toolkit in the order in which you were registered.
'** When your product is oart of Smart Suite, Smart Suite
'** will always be product #1. (prodno% >=1)
'** network$: gSTANDARD | gSERVER | gNODE | gDISTRIBTUION
'** direction$: gNEXT
'**
'** Errors: No return code for errors, you must Raise them
'** Author: MMeth
'** Returns: return: gNEXT
'**
'*************************************************************************
PUBLIC FUNCTION PostSuccessRegINST (prodno%, network$, direction$) AS STRING
DIM rc$, ExecError%, notused%, executable$, gInstallIniFile$, prodbaseDir$
DIM distribution$, automation$
DIM cwd$, TmpInstallIni$
PostSuccessRegINST = direction$
'' In the backwards case, keep backing up
'If direction$ = gBACK Then
' EXIT FUNCTION
'End If
'Build the path to the installed cinstall.ini
prodbaseDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodbaseDir$,gINSTALLINI$)
'** the following is to identify if the product currently being installed supports
'** the electronic registration. It sets up a global flag to indicate this
'** and makes the LAUNCHEXE entry to the installed cinstall.ini
cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
TmpInstallIni$ = MakePath(cwd$,gINSTALLINI$)
executable$ = GetIniKeyString(TmpInstallIni$, "TOOLKIT","LAUNCHEXE")
IF executable$ <> "" THEN
gProdsupport% = 1
'** make the exe entry
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER THEN
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "LAUNCHEXE", "", cmoOverwrite
ELSE
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "LAUNCHEXE", gNotesInstallType$, cmoOverwrite
END IF
ELSE
'** The current product that is being installed does not support pipeline
gProdsupport% = 0
END IF
'** the following is to identify subsequent installs from a distribution install
'** to avoid launching the electronic registration. It makes an entry for
'** a distribution install
network$ = GetSymbolValue(SYM_NETWORK$)
automation$ = GetSymbolValue(SYM_AUTOMATIONINST$)
distribution$ = GetIniKeyString(gInstallIniFile$, "TOOLKIT", "DISTRIBUTION")
IF network$ <> gNODE$ AND _
distribution$ = "" AND _
automation$ <> gTRUE$ THEN
'** Notes modifies cinstall.ini to include the entire launch string, so we don't want to add the prodbase
'** and we also don't want to find out if the file exists since we already did this.
executable$ = GetIniKeyString(gInstallIniFile$, "TOOLKIT","LAUNCHEXE")
IF executable$ <> "" THEN
'*** The check below is because MakePath only works with
'** a file name of 12 characters .e.g. foo.exe and not reg\foo.exe
'** Commentd out for NOTES !! (MAC 08-18-97)
'** IF RIGHT$(prodbaseDir$, 1) <> "\" THEN
'** prodbaseDir$ = prodbaseDir$ + "\"
'** END IF
'** executable$ = prodbaseDir$ + executable$
'** IF DoesFileExist(executable$,femExists) <> 0 AND gProdsupport% = 1 THEN
ExecError% = WinExec(executable$,SW_SHOWNORMAL)
IF ExecError% < 32 THEN
ErrorMsg SID_ERR_EXECPIPELINE, executable$
END IF
'** END IF
END IF
END IF
'** Record the language of install
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "LANGUAGE",_
GetSymbolValue(SYM_INSTALL_LANGUAGE$), cmoOverwrite
IF network$ = gDISTRIBUTION$ THEN
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "DISTRIBUTION", "YES", cmoVital
END IF
END FUNCTION
'********************************
'********************************
'** Product Specific Functions **
'********************************
'********************************
'*************************************************************************
'** FUNCTION GetINSTPathfromLotusIni() AS STRING
'**
'** Purpose: Gets the product dir path from Lotus.ini file, and searches for
'** inst.exe in the dir.
'**
'** Author: JYOTI KEDIA
'** Arguments: None
'** Returns: if inst.exe does not exist in dir specified in lotus.ini, it
'** returns "", otherwise returns the full path to the product.
'*************************************************************************
FUNCTION GetINSTPathfromLotusIni() AS STRING
DIM DestDir$, lotusinipath$, defdir$, temp%, ProdDir$, fullpath$, rv%
DestDir$ = GetWindowsDir()
lotusinipath$ = DestDir$ +"lotus.ini"
if DoesFileExist(lotusinipath$,femExists) then
defdir$ = GetIniKeyString(lotusinipath$,"Lotus Applications", "inst")
if defdir$ <> "" then
temp% = INSTR(1,LCASE$(defdir$),"inst.exe")
if temp% <> 0 then
ProdDir$ = MID$(defdir$,1,(temp%-1))
if ProdDir$ <> "" then
fullpath$ = ProdDir$ + "inst.exe"
if DoesFileExist(fullpath$, femExists) then
rv% = Lot_CleanPath(fullpath$)
GetINSTPathfromLotusIni = fullpath$
EXIT FUNCTION
end if
end if
end if
end if
end if
GetINSTPathfromLotusIni = ""
END FUNCTION
'*************************************************************************
'** PUBLIC FUNCTION InitLanguageINST (prodno%, network$, direction$)
'** Purpose: Placeholder, since all products must provide a function of this
'** name, does nothing.
'*************************************************************************
PUBLIC FUNCTION InitLanguageINST (prodno%, network$, direction$) AS STRING
InitLanguages "", "", prodno%
InitLanguageINST = ""
END FUNCTION