home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 February
/
PCWK0297.iso
/
lotus
/
english
/
winagent
/
install.dsk
/
MAIN.LSS
< prev
next >
Wrap
Text File
|
1995-01-25
|
33KB
|
1,620 lines
OPTION DECLARE
USE "CALLBACK"
DECLARE FUNCTION DoDatalens(BYVAL direction$) AS STRING
DECLARE FUNCTION NumberOfBytesPerBillbd() AS LONG
DECLARE FUNCTION IsLotusappPromptNeeded() AS INTEGER
DECLARE SUB SetTheBaseSymbol()
DECLARE SUB InitInstall()
DECLARE SUB ConfigureAUTOEXEC()
SUB INITIALIZE
DIM network$, notused%, notused1$, nProducts%,prodIndex%, nDirs%, app_flag%, rc$,i%, cwd$
DIM inifile$, inf$, curcursor%, grouptitle$, dirSym$, lSize&, destdir$
DIM direction$, nbytes&, lic$, SameFlag$, netLotusapp$, installini$
DIM newnetpath$, automation$
ON Error STFQUIT GOTO MAINERROR
ON Error STFERR GOTO STFERR_
ON Error STFTOGGLE GOTO STFTOGGLEERR
InitInstall
nProducts% = Reg_GetNumberOfProducts()
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
SetListItem "IDC_BMP", 1, STR$(IDD_TKT_PROD_BMP)
notused1$ = PopupModelessDlg(DB_AUTOINSTWAIT, DB_AUTOINSTWAIT)
ELSE
notused1$ = Lot_CallOneProductFunction (1, "DefaultUserReg", gNEXT, TRUE, "")
END IF
notused% = Lot_ReadSerialNumber()
WELCOME:
direction$ = gNEXT
notused1$ = Lot_CallProductFunctions ("ProductReg", gNEXT, TRUE, gALLPRODUCTS$, "")
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
IF GetSymbolValue(SYM_NETWORK$) = gNODE$ THEN
notused% = RegisterCallback("CALLBACK", "WELCOMECB")
rc$ = PopupModalDlg(DB_WELCOME_NODE, DB_WELCOME_NODE)
ELSE
notused% = RegisterCallback("CALLBACK", "WELCOMECB")
IF Reg_GetProdSupportForSrv(1) OR _
Reg_GetProdSupportForDist(1) <> FALSE THEN
rc$ = PopupModalDlg(DB_WELCOME, DB_WELCOME)
ELSE
rc$ = PopupModalDlg(DB_WELCOMENOSRV, DB_WELCOMENOSRV)
END IF
END IF
direction$ = Lot_ConfirmNamesDlg ()
IF direction$ = gBACK$ THEN GOTO WELCOME
ELSE
notused% = Lot_AutoGetUserInfo()
END IF
SERVER_DISTRIBUTION:
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER$ OR network$ = gDISTRIBUTION$ THEN
IF Reg_GetProdSupportforSrv(1) <> FALSE THEN
notused% = RegisterCallback("CALLBACK","DISKCOPYMETHODCB")
direction$ = PopupModalDlg (DB_DISKCOPYMETHOD, DB_DISKCOPYMETHOD )
END IF
END IF
IF direction$ = gBACK$ GOTO WELCOME
SetTheBaseSymbol
LAUNCHNAG:
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER$ THEN
notused% = RegisterCallback("CALLBACK","LAUNCHNAGCB")
direction$ = PopupModalDlg (DB_LAUNCHNAG, DB_LAUNCHNAG )
END IF
IF direction$ = gBACK$ GOTO SERVER_DISTRIBUTION
SMARTSUITE_BASEDIR:
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ <> gDISTRIBUTION$ AND GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
notused% = RegisterCallback("SUIT", "SUITEDIRCB")
direction$ = PopupModalDlg(DB_SUITEDIR, DB_SUITEDIR)
END IF
IF direction$ = gBACK$ THEN GOTO LAUNCHNAG
SetSymbolValue SYM_SIZEOFINSTALL$, gCOMPLETE$
FOR i% = 1 to nProducts%
Reg_SetSelectedInstallType i%, gCOMPLETE$
NEXT
automation$ = GetSymbolValue(SYM_AUTOMATIONINST$)
network$ = GetSymbolValue(SYM_NETWORK$)
cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
inifile$ = MakePath(cwd$,gINSTALLINI$)
SELECT CASE network$
CASE gSTANDARD$
inf$ = GetIniKeyString (inifile$, "TOOLKIT", "STDINFFILE")
ReadInfFile inf$
notused% = Lot_CallSharedTool("InitSHARE()")
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
IF automation$ = gTRUE$ THEN
notused% = Lot_AutoGetProductDestDirSymbol ()
ELSE
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
direction$ = Lot_CallOneProductFunction (1, "PrevVersions", gNEXT, TRUE, "")
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
END IF
END IF
STDSUITPROMPTLOTUSAPP:
IF IsLotusappPromptNeeded() = 1 AND _
GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
notused% = RegisterCallback ("CALLBACK", "GETLOTUSAPPDIRCB")
direction$ = PopupModalDlg (DBM_SPECIFY_LOTUSAPPDIR, DBM_SPECIFY_LOTUSAPPDIR)
END IF
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
STDSSAPPSEL:
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("SUIT", "APPSELCB")
direction$ = PopupModalDlg (DBSUIT_APPSEL, DBSUIT_APPSEL)
ELSE
notused% = Lot_AutoSuiteAppSelect()
END IF
END IF
IF direction$ = gBACK$ GOTO STDSUITPROMPTLOTUSAPP
IF Lot_CallSharedTool("PreConfigSHARE()") = 2 THEN
direction$ = gBACK$
END IF
IF direction$ = gBACK$ GOTO STDSSAPPSEL
STDSIZEOFINSTALL:
nProducts% = Reg_GetNumberOfProducts() : app_flag% = FALSE
FOR prodIndex% = 1 to nProducts%
If Reg_GetUIInOrOut (prodIndex%) <> FALSE AND _
Reg_GetAllowUserToPickInSuite(prodIndex%) <> FALSE Then
app_flag% = TRUE
End If
NEXT
If app_flag% <> FALSE Then
If automation$ = gTRUE$ Then
notused% = Lot_AutoGetSizeOfInstall()
Else
direction$ = Lot_GetSizeOfInstall()
IF direction$ = gBACK$ GOTO STDSSAPPSEL
End If
End If
ResetCopyList
STDINITIALIZECOPYLST:
direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
IF direction$ = gBACK$ GOTO STDSIZEOFINSTALL
Lot_SetCurrentProduct(1)
STDPROMPTLOTUSAPP:
IF IsLotusappPromptNeeded() = 1 AND _
GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
notused% = RegisterCallback ("CALLBACK", "GETLOTUSAPPDIRCB")
direction$ = PopupModalDlg (DBM_SPECIFY_LOTUSAPPDIR, DBM_SPECIFY_LOTUSAPPDIR)
END IF
IF direction$ = gBACK$ GOTO STDINITIALIZECOPYLST
STDCUSTOM:
IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
notused% = RegisterCallback("CALLBACK","CUSTOM1CB")
direction$ = PopupModalDlg (DBM_CUSTOMIZEBASESINGLEPROD, _
DBM_CUSTOMIZEBASESINGLEPROD)
ELSE
If app_flag% <> FALSE Then
notused% = RegisterCallback("SUIT","CUSTOMIZEAPPSCB")
direction$ = PopupModalDlg (DBSUIT_CUSTOMIZEAPPS,_
DBSUIT_CUSTOMIZEAPPS)
End If
END IF
END IF
IF direction$ = gBACK$ GOTO STDPROMPTLOTUSAPP
STDDATALENS:
direction$ = DoDatalens(direction$)
IF direction = gBACK$ GOTO STDPROMPTLOTUSAPP
IF automation$ <> gTRUE$ THEN
STDUSERUI:
direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
IF direction$ = gBACK$ GOTO STDDATALENS
END IF
IF automation$ <> gTRUE$ THEN
STDPROGMAN:
notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
IF direction$ = gBACK$ GOTO STDUSERUI
ELSE
notused% = Lot_AutoGetProgramGroup()
END IF
UIPOP 1
notused% = Lot_AutoWriteOutDebugFile()
direction$ = PopupModalDlg (DB_BEGINCOPYING, DB_BEGINCOPYING)
IF direction$ = gBACK$ GOTO STDPROGMAN
notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
IF automation$ = gTRUE$ THEN
notused% = AutoCheckForSpace()
ELSE
SELECT CASE GetSymbolValue(SYM_SIZEOFINSTALL$)
CASE gCOMPLETE$
IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO STDSIZEOFINSTALL
CASE gLAPTOP$
IF CheckForSpace(DB_INSUFDISKSPACEMIN) = FAILURE GOTO STDSIZEOFINSTALL
CASE gCUSTOM$
IF CheckForSpace(DB_INSUFDISKSPACECUST) = FAILURE GOTO STDCUSTOM
END SELECT
END IF
notused% = SetSizeCheckMode(0)
IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
DumpCopyList GetSymbolValue(SYM_LOGFILE$)
END IF
nbytes& = NumberOfBytesPerBillbd()
notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
CopyFilesInCopyList
curcursor% = ShowWaitCursor()
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP)
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_SaveFeaturesInstaledInInstallIni()
notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
UIPOP 1
grouptitle$ = Reg_GetProgManagerGroupName(1)
CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP)
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_CallSharedTool("ConfigSHARE()")
notused% = Lot_CallSharedTool("AddSHAREIcons()")
UIPOP 1
RestoreCursor curcursor%
ConfigureAUTOEXEC
notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
CASE gSERVER$
inf$ = GetIniKeyString (inifile$, "TOOLKIT", "SRVINFFILE")
ReadInfFile inf$
notused% = Lot_CallSharedTool("InitSHARE()")
SMARTSUITE_LOTUSAPPDIR:
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ AND _
Reg_GetProdSupportforShare(1) = 1 THEN
notused% = RegisterCallback ("CALLBACK", "GETLOTUSAPPDIRCB")
direction$ = PopupModalDlg (DBM_SPECIFY_SRVLOTUSAPPDIR, DBM_SPECIFY_SRVLOTUSAPPDIR)
END IF
IF direction$ = gBACK$ THEN GOTO SMARTSUITE_BASEDIR
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
IF direction$ = gBACK$ GOTO WELCOME
IF automation$ = gTRUE$ THEN
notused% = Lot_AutoGetProductDestDirSymbol ()
END IF
ResetWinWinsysSymbols
SRVSSAPPSEL:
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("SUIT", "APPSELCB")
direction$ = PopupModalDlg (DBSUIT_SAPPSEL, DBSUIT_SAPPSEL)
ELSE
notused% = Lot_AutoSuiteAppSelect()
END IF
END IF
IF direction$ = gBACK$ GOTO SMARTSUITE_LOTUSAPPDIR
SRVSIZEOFINSTALL:
nProducts% = Reg_GetNumberOfProducts() : app_flag% = FALSE
FOR prodIndex% = 1 to nProducts%
If Reg_GetUIInOrOut (prodIndex%) <> FALSE AND _
Reg_GetAllowUserToPickInSuite(prodIndex%) <> FALSE Then
app_flag% = TRUE
End If
NEXT
If app_flag% <> FALSE Then
If automation$ = gTRUE$ Then
notused% = Lot_AutoGetSizeOfInstall()
Else
direction$ = Lot_GetSizeOfInstall ()
IF direction$ = gBACK$ GOTO SRVSSAPPSEL
End If
End If
ResetCopyList
direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
IF direction$ = gBACK$ GOTO SRVSIZEOFINSTALL
Lot_SetCurrentProduct(1)
SRVCUSTOM:
IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
notused% = RegisterCallback("CALLBACK","CUSTOM1CB")
direction$ = PopupModalDlg (DBM_CUSTOMIZEBASESINGLEPROD, _
DBM_CUSTOMIZEBASESINGLEPROD)
ELSE
If app_flag% <> FALSE Then
notused% = RegisterCallback("SUIT","CUSTOMIZEAPPSCB")
direction$ = PopupModalDlg (DBSUIT_CUSTOMIZEAPPS,_
DBSUIT_CUSTOMIZEAPPS)
End If
END IF
END IF
IF direction$ = gBACK$ GOTO SRVSIZEOFINSTALL
SRVDATALENS:
direction$ = DoDatalens(direction$)
if direction$ = gBACK$ GOTO SRVCUSTOM
SRVNODEOPTIONS:
IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ AND _
Lot_AreAnyNodeOptAvailToSrv() <> 0 AND _
app_flag% <> FALSE THEN
notused% = RegisterCallback("CALLBACK", "SRVNODEOPTIONSCB")
direction$ = PopupModalDlg (DB_SRV_NODEOPTIONS, _
DB_SRV_NODEOPTIONS)
END IF
IF direction$ = gBACK$ GOTO SRVDATALENS
SRVUI:
IF automation$ <> gTRUE$ THEN
direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
IF direction$ = gBACK$ GOTO SRVNODEOPTIONS
ELSE
notused% = Lot_AutoGetSetLicenserInfo()
END IF
IF automation$ <> gTRUE$ THEN
SRVPROGMAN:
notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
IF direction$ = gBACK$ GOTO SRVUI
ELSE
notused% = Lot_AutoGetProgramGroup()
END IF
UIPOP 1
notused% = Lot_AutoWriteOutDebugFile()
direction$ = PopupModalDlg (DB_BEGINCOPYING, DB_BEGINCOPYING)
IF direction$ = gBACK$ GOTO SRVPROGMAN
lic$ = CSTR(FALSE)
FOR i% = 1 to nProducts%
IF Reg_GetProdSupportForLicense (i%) <> FALSE AND _
Reg_IsLicenseSelected (i%) <> FALSE THEN
lic$ = CSTR(TRUE)
EXIT FOR
END IF
NEXT
notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, lic$)
IF automation$ = gTRUE$ THEN
notused% = AutoCheckForSpace()
ELSE
IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCOMPLETE$ THEN
IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO SRVSIZEOFINSTALL
ELSE
IF CheckForSpace(DB_INSUFDISKSPACECUST) = FAILURE GOTO SRVCUSTOM
END IF
END IF
notused% = SetSizeCheckMode(FALSE)
IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
DumpCopyList GetSymbolValue(SYM_LOGFILE$)
END IF
nbytes& = NumberOfBytesPerBillbd()
notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
CopyFilesInCopyList
curcursor% = ShowWaitCursor()
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP)
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_SaveFeaturesInstaledInInstallIni()
IF Lot_AreAnyNodeOptAvailToSrv() <> 0 THEN
notused% = Lot_SaveTheNodeOptionsInInstallIni()
END IF
notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS,|"|+grouptitle$+|"|)
UIPOP 1
grouptitle$ = Reg_GetProgManagerGroupName(1)
CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP)
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_CallSharedTool("ConfigSHARE()")
notused% = Lot_CallSharedTool("AddSHAREIcons()")
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) <= 0 Then
ErrorMsg SID_ERR_SRV_MUST_HAVE_MAINDIR, ""
ERROR STFQUIT
End If
dirSym$ = GetListItem(dirSym$, 1)
ELSE
dirSym$ = SYM_BASEDIR$
END IF
CreateIniKeyValue GetSymbolValue(dirSym$) + "install.lst", _
"Params", "CmdLine", _
"lsirun.exe start /S %s %s /N", cmoOverwrite
UIPOP 1
RestoreCursor curcursor%
notused% = RegisterCallback("CALLBACK","SRV_SUCCESSCB")
IF FIsKeywordInCopyList("LICTOP") <> FALSE AND _
Reg_IsLicenseSelected (1) <> FALSE THEN
rc$ = PopupModalDlg (DB_SRV_SUCCESS_LIC, DB_SUCCESS)
ELSE
rc$ = PopupModalDlg (DB_SRV_SUCCESS, DB_SUCCESS)
END IF
notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
CASE gNODE$
inf$ = GetIniKeyString (inifile$, "TOOLKIT", "NODEINFFILE")
ReadInfFile inf$
notused% = Lot_CallSharedTool("InitSHARE()")
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
IF automation$ = gTRUE$ THEN
notused% = Lot_AutoGetProductDestDirSymbol ()
ELSE
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
direction$ = Lot_CallOneProductFunction (1, "PrevVersions", gNEXT, TRUE, "")
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
END IF
END IF
NODESSAPPSEL:
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("SUIT", "APPSELCB")
direction$ = PopupModalDlg (DBSUIT_APPSEL, DBSUIT_APPSEL)
ELSE
notused% = Lot_AutoSuiteAppSelect()
END IF
END IF
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
ResetCopyList
direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
IF direction$ = gBACK$ GOTO NODESSAPPSEL
IF Lot_CallSharedTool("PreConfigSHARE()") = 2 THEN
direction$ = gBACK$
END IF
IF direction$ = gBACK$ GOTO NODESSAPPSEL
CHANGE_NODE_PATH:
IF direction$ = gBACK$ GOTO NODESSAPPSEL
NODESIGLEPDIRNOPT:
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) >= 1 Then
IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("CALLBACK", "NODENODEOPTIONSCB")
direction$ = PopupModalDlg (DB_NODE_PERSONALDIRNODEOPT, _
DB_NODE_PERSONALDIRNODEOPT)
ELSE
notused% = Lot_AutoProcessNodeoptions()
END IF
ELSE
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
If GetSymbolValue(dirSym$)<> "" Then
notused% = RegisterCallback("CALLBACK", "NODENODEOPTIONSCB")
direction$ = PopupModalDlg (DB_NODE_PERSONALDIR, _
DB_NODE_PERSONALDIR)
End If
End If
END IF
End If
END IF
IF direction$ = gBACK$ GOTO CHANGE_NODE_PATH
NODELOTUSAPP:
installini$ = Lot_GetInstallDir()+gINSTALLINI$
netLotusapp$ = GetSymbolValue(SYM_NETLOTUSAPP$)
SameFlag$ = GetIniKeyString(installini$, _
"Server Configuration of Shared Tools", _
"SameDriveFlag")
If SameFlag$ = "1" Then
If DoesDirExist(netLotusapp$) <> 1 Then
newnetpath$ = TrimNetlotusapp$(netLotusapp$)
If newnetpath$ <> "" Then
netLotusapp$ = newnetpath$
SetSymbolValue SYM_NETLOTUSAPP$, LCASE$(netLotusapp$)
End If
End If
Else
If DoesDirExist(netLotusapp$) <> 1 AND netLotusapp$ <> "" Then
newnetpath$ = TrimNetlotusapp$(netLotusapp$)
If newnetpath$ <> "" Then
netLotusapp$ = newnetpath$
SetSymbolValue SYM_NETLOTUSAPP$, LCASE$(netLotusapp$)
Else
notused% = RegisterCallback("CALLBACK","NODELOTUSAPPCB")
direction$ = PopupModalDlg (DB_NODELOTUSAPP, DB_NODELOTUSAPP)
End If
End If
End If
IF direction$ = gBACK$ GOTO NODESIGLEPDIRNOPT
NODEPROMPTLOTUSAPP:
IF IsLotusappPromptNeeded() = 1 THEN
notused% = RegisterCallback ("CALLBACK", "GETLOTUSAPPDIRCB")
direction$ = PopupModalDlg (DBM_SPECIFY_LOTUSAPPDIR, DBM_SPECIFY_LOTUSAPPDIR)
END IF
IF direction$ = gBACK$ GOTO NODELOTUSAPP
NODENODEOPTIONS:
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
notused% = RegisterCallback("CALLBACK", "NODENODEOPTIONSCB")
direction$ = PopupModalDlg (DB_NODE_NODEOPTIONS, _
DB_NODE_NODEOPTIONS)
END IF
END IF
IF direction$ = gBACK$ GOTO NODEPROMPTLOTUSAPP
IF automation$ <> gTRUE$ THEN
NODEUI:
direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
IF direction$ = gBACK$ GOTO NODENODEOPTIONS:
END IF
IF automation$ <> gTRUE$ THEN
NODEPROGMAN:
notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
IF direction$ = gBACK$ GOTO NODEUI
ELSE
notused% = Lot_AutoGetProgramGroup()
END IF
UIPOP 1
notused% = Lot_AutoWriteOutDebugFile()
direction$ = PopupModalDlg (DB_BEGINCOPYING,DB_BEGINCOPYING)
IF direction$ = gBACK$ GOTO NODEPROGMAN
notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
curcursor% = ShowWaitCursor()
notused% = SetSizeCheckMode(FALSE)
notused% = Lot_CallSharedTool ("Lot_RefreshLocalLotusapp()")
RestoreCursor curcursor%
IF automation$ = gTRUE$ THEN
notused% = AutoCheckForSpace()
ELSE
IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO CHANGE_NODE_PATH
END IF
curcursor% = ShowWaitCursor()
IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
DumpCopyList GetSymbolValue(SYM_LOGFILE$)
END IF
nbytes& = NumberOfBytesPerBillbd()
notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
CopyFilesInCopyList
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP)
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS,|"|+grouptitle$+|"|)
UIPOP 1
grouptitle$ = Reg_GetProgManagerGroupName(1)
CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP)
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_CallSharedTool("ConfigSHARE()")
notused% = Lot_CallSharedTool("AddSHAREIcons()")
UIPOP 1
RestoreCursor curcursor%
ConfigureAUTOEXEC
notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
CASE gDISTRIBUTION$
inf$ = GetIniKeyString (inifile$, "TOOLKIT", "BYWIREINFFILE")
ReadInfFile inf$
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
IF direction$ = gBACK$ GOTO WELCOME
IF automation$ = gTRUE$ THEN
notused% = Lot_AutoGetProductDestDirSymbol ()
ELSE
ChangeDistPath:
lSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
SetListItem "IDC_TEXT", 1, STR$(lSize&) + gStrK$
notused% = RegisterCallback("CALLBACK","DISTSIZEINSTALLCB")
direction$ = PopupModalDlg (DB_CHOOSEPATHDIST, DB_CHOOSEPATHDIST)
IF direction$ = gBACK$ GOTO SERVER_DISTRIBUTION
END IF
dirSym$ = Reg_GetDirSymbolList(1)
nDirs% = GetListLength(dirSym$)
IF nDirs% > 0 THEN
dirSym$ = GetListItem(dirSym$, 1)
destdir$ = GetSymbolValue(dirSym$)
AddSectionFilesToCopyList gDISTRIBUTIONFILES$,_
GetSymbolValue(SYM_STF_SRCDIR$),_
destdir$
END IF
UIPOP 1
IF automation$ = gTRUE$ THEN
notused% = AutoCheckForSpace()
ELSE
IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO ChangeDistPath
END IF
notused% = Lot_AutoWriteOutDebugFile()
direction$ = PopupModalDlg (DB_BEGINCOPYING,DB_BEGINCOPYING)
IF direction$ = gBACK$ GOTO ChangeDistPath
notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
notused% = SetSizeCheckMode(0)
IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
DumpCopyList GetSymbolValue(SYM_LOGFILE$)
END IF
nbytes& = NumberOfBytesPerBillbd()
notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
CopyFilesInCopyList
rc$ = PopupModalDlg (DB_SUCCESS, DB_SUCCESS)
notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
CASE ELSE
ERROR STFQUIT
END SELECT
MAINERROR:
UIPopAll
END
STFERR_:
RESUME NEXT
STFTOGGLEERR:
RESUME NEXT
END SUB
FUNCTION DoDatalens(BYVAL direction$) AS STRING
DIM notused%, rc$, chptname$
If direction$ = gBACK Then GOTO PARADOXUI
SQLUI:
IF Lot_CallSharedTool("Lot_IsSQLSelected()") <> FALSE THEN
notused% = RegisterCallback("SHARE", "SQLSERVERNAMECB")
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
SetSymbolValue SYM_SQLSERVERNAME$, GetSymbolValue(SYM_AUTO_SQLSERVER)
END IF
direction$ = PopupModalDlg (DBM_SQL_SERVER_NAME, DBM_SQL_SERVER_NAME)
IF direction$ = gBACK$ THEN
DoDatalens = direction$
EXIT FUNCTION
END IF
END IF
PARADOXUI:
IF Lot_CallSharedTool("Lot_IsParadoxSelected()") <> FALSE THEN
notused% = RegisterCallback("SHARE", "PARADOXNETWORKINFOCB")
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
SetSymbolValue SYM_PARADOXNETWORKINFO$, GetSymbolValue(SYM_AUTO_PARADOXINFO$)
END IF
direction$ = PopupModalDlg (DBM_PARADOX_NETWORK_INFORMATION, DBM_PARADOX_NETWORK_INFORMATION )
IF direction$ = gBACK$ THEN
IF Lot_CallSharedTool("Lot_IsSQLSelected()") <> FALSE GOTO SQLUI
DoDatalens = gBACK$
EXIT FUNCTION
END IF
END IF
DoDatalens = direction$
END FUNCTION
FUNCTION NumberOfBytesPerBillbd() AS LONG
DIM n%, i%, costs&, nBillboards%, nProducts%
costs& = LcbGetChapterCost("", "", SYM_COST$, "")
n% = GetListLength(SYM_COST$)
costs& = 0
for i% = 1 to n%
costs& = costs& + CLNG(GetListItem(SYM_COST$, i%))
next
nProducts% = Reg_GetNumberOfProducts()
nBillboards% = Reg_GetBillboardNumber(1)
If nBillboards% = 0 Then
NumberOfBytesPerBillbd = 0
Else
NumberOfBytesPerBillbd = costs&\nBillboards%
End If
END FUNCTION
FUNCTION IsLotusappPromptNeeded() AS INTEGER
DIM dirWin$,dirLotusapp$,toPrompt%
toPrompt% = 0
dirWin$ = GetSymbolValue(SYM_WINDIR$)
IF Reg_GetProdSupportforShare(Lot_GetCurrentProduct()) = 1 _
AND DoesFileExist(dirWin$ + gLOTUSINI$, femExists) = 1 THEN
dirLotusapp$ = GetIniKeyString(dirWin$ + gLOTUSINI$, "Lotus Applications", "Common Directory")
IF dirLotusapp$ <> "" AND Lot_CheckPath(dirLotusapp$) <> 0 THEN
IF DoesDirExist(dirLotusapp$) = 1 THEN
toPrompt% = 0
ELSE
toPrompt% = 1
END IF
ELSE
toPrompt% = 1
END IF
ELSEIF Reg_GetProdSupportforShare(Lot_GetCurrentProduct()) = 1 THEN
toPrompt% = 1
END IF
IsLotusappPromptNeeded = toPrompt%
END FUNCTION
SUB SetTheBaseSymbol()
DIM network$, defBase$, lcbSpace&, defDir$, i%, nProducts%, spaceneeded&
DIM autobase$
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER$ THEN
defBase$ = "lotus\"
ELSEIF network$ = gDISTRIBUTION$ THEN
defBase$ = "lotusdis\"
ELSE
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
defBase$ = ""
ELSE
defBase$ = "lotsuite\"
END IF
END IF
lcbSpace& = 0
nProducts% = Reg_GetNumberOfProducts()
FOR i% = 1 to nProducts%
lcbSpace& = lcbSpace& + Reg_GetProdMinSize(i%)
NEXT
defDir$ = Lot_GetAllHardDrive(spaceneeded&, defBase$)
IF defDir$ = "" THEN
defDir$ = LCASE$(GetListItem(SYM_LOCALHARDDRIVES$, 1)) + ":\" + defBase$
END IF
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ AND _
GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
autobase$ = Lot_AutoGetBaseDirSymbol()
IF autobase$ <> "" THEN
defDir$ = autobase$
ELSE
ErrorMsg SID_ERR_SETSYMBOLVALUE,"Base Directory entry Invalid"
ERROR STFQUIT
END IF
END IF
SetSymbolValue SYM_BASEDIR$, defDir$
END SUB
SUB InitInstall
DIM hUser%, notused%
DIM buf1 AS STRING : buf1$ = String$(80,0)
DIM buf2 AS STRING : buf2$ = String$(80,0)
DIM count%, network$
SetUpAPI
SetSymbolValue SYM_SINGLESMARTSUITE, gSINGLE$
IF ENVIRON$(gLOTUS_COPYLIST$) <> "" THEN
SetSymbolValue SYM_LOGFILE$, GetWindowsDir() + gCOPYLISTLOG$
END IF
Lot_InitializeWinWinsysSym
SetSymbolValue SYM_DOSMAXPATHDIFF$,"20"
Lot_InitializeEXTRA
hUser% = GetModuleHandle(gUSER$)
notused% = LoadString (hUser%, USERNAME, buf1$, 80)
notused% = LoadString (hUser%, COMPANYNAME, buf2$, 80)
FOR count% = (INSTR(buf1$, CHR$(0)) - 1) TO 1
IF RIGHT$(buf1$, 1) <> CHR$(20) THEN
EXIT FOR
END IF
NEXT
IF count% < 0 THEN
count% = 1
END IF
SetSymbolValue SYM_NAME$, LEFT$(buf1$, count%)
FOR count% = (INSTR(buf2$, CHR$(0)) - 1) TO 1
IF RIGHT$(buf2$, 1) <> CHR$(20) THEN
EXIT FOR
END IF
NEXT
IF count% < 0 THEN
count% = 1
END IF
SetSymbolValue SYM_COMPANY$, LEFT$(buf2$, count%)
IF GetSymbolValue(SYM_AUTOMATIONINST$) = "1" THEN
SetSymbolValue SYM_AUTOMATIONINST$, gTRUE$
ELSE
SetSymbolValue SYM_AUTOMATIONINST$, gFALSE$
END IF
IF INSTR(UCASE$(COMMAND$), "/N") <> 0 THEN
SetSymbolValue SYM_NETWORK$, gNODE$
ELSE
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
network$ = Lot_AutoGetInstallType()
SetSymbolValue SYM_NETWORK$, network$
ELSE
SetSymbolValue SYM_NETWORK$, gSTANDARD$
END IF
END IF
SetTitle LdString(SID_TKT_STD_TITLE)
SetCopyGaugePosition -1,32000
END SUB
SUB ConfigureAUTOEXEC
DIM n%, i%, notused%, notused1$, rc$
SetSymbolValue SYM_NEEDSHARE$, gFALSE$
SetSymbolValue SYM_NEEDNOTES$, gFALSE$
n% = Reg_GetNumberOfProducts()
FOR i% = 1 to n%
IF Reg_GetSHAREEXESupport(i%) <> FALSE THEN
IF IsShareInstalled() = FALSE THEN
SetSymbolValue SYM_NEEDSHARE$, gTRUE$
EXIT FOR
END IF
END IF
NEXT
FOR i% = 1 to n%
IF Reg_GetNotesSupport(i%) <> FALSE THEN
IF IsNotesInPath() = FALSE THEN
SetSymbolValue SYM_NEEDNOTES$, gTRUE$
EXIT FOR
END IF
END IF
NEXT
IF GetSymbolValue(SYM_NEEDSHARE$) = gTRUE$ OR GetSymbolValue(SYM_NEEDNOTES$) = gTRUE$ THEN
IF GetSymbolValue(SYM_AUTOMATIONINST$) <> gTRUE$ THEN
notused% = RegisterCallback("CALLBACK", "AUTOEXECCB")
notused1$ = PopupModalDlg(DB_AUTOEXEC, DB_AUTOEXEC)
notused% = RegisterCallback("CALLBACK", "INSTALLCOMPLETECB")
SELECT CASE GetSymbolValue(SYM_AUTOEXEC_CHOICE$)
CASE "AUTO"
notused1$ = PopupModalDlg(DB_SUCCESS_AUTO, DB_SUCCESS_AUTO)
CASE "AUTOCOPY"
notused1$ = PopupModalDlg(DB_SUCCESS_AUTOCOPY, DB_SUCCESS_AUTOCOPY)
CASE "MAN"
notused1$ = PopupModalDlg(DB_SUCCESS_AUTOMAN, DB_SUCCESS_AUTOMAN)
END SELECT
ELSE
notused% = Lot_AutoConfigureAutoexec()
rc$ = PopupModalDlg(DB_SUCCESS, DB_SUCCESS)
END IF
ELSE
rc$ = PopupModalDlg(DB_SUCCESS, DB_SUCCESS)
END IF
END SUB