home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 February
/
PCWK0297.iso
/
lotus
/
english
/
winagent
/
install.dsk
/
CALLBACK.LSS
< prev
next >
Wrap
Text File
|
1995-01-25
|
52KB
|
2,175 lines
USE "TOOLKIT"
OPTION DECLARE
CONST MAX_NO_DRIVECOMBOS = 4
CONST MAX_PAGES = 8
CONST LCBITEM_ENTIRE = 0
CONST LCBITEM_SELECTED = 1
CONST LCBITEM_TEXT = 2
CONST LCBITEM_SIZE = 3
CONST LCBITEM_CHAPTER = 4
CONST SYM_CUSTOMCOST$ = "CustomCostList"
TYPE PAGEINFO
szChapter AS STRING
idPage AS INTEGER
hDlgPage AS INTEGER
nSel AS INTEGER
END TYPE
DIM ghdlg%
DIM gCurrentPageIndex%
DIM gNumPages%
DIM gPageArray(MAX_PAGES) AS PAGEINFO
DECLARE PUBLIC FUNCTION Lot_ConfirmNamesDlg () AS STRING
DECLARE PUBLIC FUNCTION Lot_GetSizeOfInstall () AS STRING
DECLARE PUBLIC SUB ResetWinWinsysSymbols()
DECLARE SUB SetCustomInfo(fOnTab%,fNewSpace%)
DECLARE FUNCTION DoesFileExistInDir (dirlist$) AS INTEGER
DECLARE SUB Lot_SetSpaceDirTip(hDlg%,chpt$,index%,ProdNum%,tiponly%)
PUBLIC FUNCTION Lot_ConfirmNamesDlg () AS STRING
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
SetListItem "IDC_TEXT", 1, GetSymbolValue(SYM_NAME$)
SetListItem "IDC_TEXT", 2, GetSymbolValue(SYM_COMPANY$)
Lot_ConfirmNamesDlg = PopupModalDlg (DB_CONFIRMNAMES, DB_CONFIRMNAMES)
END FUNCTION
PUBLIC FUNCTION Lot_GetSizeOfInstall () AS STRING
DIM idDlg%, i%, nProds%, network$, size$, notused%
size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
nProds% = Reg_GetNumberOfProducts()
FOR i% = 1 to nProds%
Reg_SetSelectedInstallType i%, size$
NEXT
network$ = GetSymbolValue(SYM_NETWORK$)
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
IF Reg_GetProdSupportForFullInstall(1) <> FALSE AND _
Reg_GetProdSupportForMinInstall (1) = FALSE AND _
Reg_GetProdSupportForCustInstall(1) = FALSE THEN
IF network$ = gSERVER$ THEN
IF Reg_GetProdSupportForShare(1) <> FALSE Then
idDlg% = DB_SIZEOFINSTALL2
ELSE
idDlg% = DB_SIZEOFINSTALL1
END IF
ELSE
idDlg% = DB_SIZEOFINSTALL1
END IF
ELSEIF network$ = gSERVER$ THEN
IF Reg_GetProdSupportForShare(1) <> FALSE Then
idDlg% = DB_SIZEOFINSTALL3
ELSE
idDlg% = DB_SIZEOFINSTALL5
END IF
ELSE
idDlg% = DB_SIZEOFINSTALL4
END IF
ELSEIF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF network$ = gSERVER$ THEN
idDlg% = DB_SIZEOFINSTALL6
ELSE
idDlg% = DB_SIZEOFINSTALL7
END IF
ELSE
idDlg% = DB_SIZEOFINSTALL4
END IF
notused% = RegisterCallback("CALLBACK", "SIZEOFINSTALLCB")
Lot_GetSizeOfInstall = PopupModalDlg (idDlg%, CLNG(idDlg%))
size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
FOR i% = 1 to nProds%
Reg_SetSelectedInstallType i%, size$
NEXT
END FUNCTION
SUB PROGMANGROUPCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM ProgManIni$, Group$, GroupId%,count%, Index%,notused%,DefaultGroup$
DIM GroupPath$,GroupName$, SelectedName$, EnteredName$,order%, failed%
DIM CheckName$
DIM targetstr$,charlen%
DIM InvChar LIST AS STRING
InvChar("*") = "1"
InvChar("+") = "1"
InvChar("|") = "1"
InvChar(":") = "1"
InvChar(|"|) = "1"
InvChar("<") = "1"
InvChar(">") = "1"
InvChar("?") = "1"
InvChar("=") = "1"
InvChar("[") = "1"
InvChar("]") = "1"
InvChar("\") = "1"
InvChar(";") = "1"
InvChar(",") = "1"
InvChar("/") = "1"
InvChar(")") = "1"
InvChar("(") = "1"
InvChar(".") = "1"
InvChar("'") = "1"
InvChar("@") = "1"
InvChar("{") = "1"
InvChar("}") = "1"
InvChar("#") = "1"
InvChar("%") = "1"
InvChar("!") = "1"
InvChar("`") = "1"
InvChar("$") = "1"
InvChar("^") = "1"
InvChar("~") = "1"
InvChar("-") = "1"
InvChar("_") = "1"
InvChar("&") = "1"
SELECT CASE Classes$
CASE "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
ProgManIni$=GetWindowsDir()+"progman.ini"
DefaultGroup$=Reg_GetProgManagerGroupName(1)
IF DefaultGroup$="" THEN
DefaultGroup$="Lotus Application"
END IF
SetListItem "IDC_EDIT", 1, DefaultGroup$
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
SetListItem "IDC_LIST1",1, DefaultGroup$
order%=2
FOR count% = 1 TO 99
GroupPath$=GetIniKeyString(ProgManIni$,"Groups","Group"+LTRIM$(STR(count%)))
IF DoesFileExist(GroupPath$,femExists)=1 THEN
GroupName$=Lot_GetGroupName(GroupPath$)
IF GroupName$ <> "" AND GroupName$<>DefaultGroup$ THEN
SetListItem "IDC_LIST1",order%, GroupName$
order%=order%+1
END IF
END IF
NEXT
AddListItem SYM_UPDATELIST$, "IDC_LIST1"
CASE "IDC_LIST1"
SelectedName$=GetListItem("IDC_LIST1",Inst%)
SetListItem "IDC_EDIT", 1, SelectedName$
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
CASE "IDC_OK"
IF LEN(GetListItem ("IDC_EDIT", 1)) < 30 THEN
EnteredName$=GetListItem("IDC_EDIT",1)
ELSE
targetstr$ = GetListItem ("IDC_EDIT", 1)
IF IsDBCSFirstAtOffset (targetstr$, 30) = 1 THEN
EnteredName$=LEFT$(GetListItem ("IDC_EDIT", 1), 29)
ELSE
EnteredName$=LEFT$(GetListItem ("IDC_EDIT", 1), 30)
END IF
END IF
IF EnteredName$ = "" THEN
EnteredName$=Reg_GetProgManagerGroupName(1)
END IF
failed% = 1
CheckName$ = EnteredName$
FOR count% = 1 TO LEN(EnteredName$)
charlen% = FDBCSCharLen(CheckName$,0)
IF ISELEMENT(InvChar(LEFT$(CheckName$,charlen%))) = FALSE THEN
failed% = 0
EXIT FOR
count% = count% + charlen% - 1
END IF
CheckName$ = RIGHT$(Checkname$,LEN(CheckName$)-charlen%)
NEXT
IF INSTR(1,EnteredName$,|"|) <> 0 THEN
failed% = 1
END IF
IF failed% <> 0 THEN
ShowPathErrorNoDlgExit SID_ERR_INVALIDGROUPNAME,SID_ERR_INVALIDGROUPNAMEDESC,EnteredName$
END IF
Reg_SetProgManagerGroup 1,EnteredName$
CASE "IDC_BACK"
CASE "IDC_HELP"
CASE "IDC_EXIT"
END SELECT
END SUB
SUB WELCOMECB (hDlg%, CtrlId%, Classes$, Inst%)
DIM lname$, company$, network$, i%, notused%
DIM targetstr$
SELECT CASE Classes$
CASE "__DLGINIT"
SetListItem "IDC_BMP", 1, STR$(IDD_TKT_PROD_BMP)
lname$ = GetSymbolValue(SYM_NAME$)
company$ = GetSymbolValue(SYM_COMPANY$)
SetListItem "IDC_EDIT", 1, lname$
SetListItem "IDC_EDIT", 2, company$
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT6)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT7)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT8)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
AddListItem SYM_UPDATELIST$, "IDC_BMP1"
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = "" THEN
SetSymbolValue SYM_NETWORK$, gSTANDARD$
ELSEIF network$ = gNODE$ Then
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_EDIT2), FALSE)
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_TEXT3), FALSE)
ELSEIF network$ = gSERVER$ OR network$ = gDISTRIBUTION$ THEN
SetListItem "IDC_B", 1, "T"
AddListItem SYM_UPDATELIST$, "IDC_B1"
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_EDIT1), FALSE)
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_TEXT2), FALSE)
END IF
IF network$ = gSTANDARD$ THEN
IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _
LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSEIF network$ = gNODE$ THEN
IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSEIF network$ = gSERVER$ THEN
IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
CASE "IDC_B"
If GetListItem("IDC_B",1) = "F" Then
SetSymbolValue SYM_NETWORK$, gSTANDARD$
Else
If Reg_GetProdSupportForSrv(1) = 1 Then
SetSymbolValue SYM_NETWORK$, gSERVER$
ElseIf Reg_GetProdSupportForDist(1) = 1 Then
SetSymbolValue SYM_NETWORK$, gDISTRIBUTION$
End If
End If
IF IsDlgButtonChecked(hDlg%,IDC_B1) <> FALSE THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_EDIT1), FALSE)
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_TEXT2), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_EDIT1), TRUE)
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_TEXT2), TRUE)
END IF
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSTANDARD$ THEN
IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _
LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSEIF network$ = gNODE$ THEN
IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSEIF network$ = gSERVER$ THEN
IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
CASE "IDC_EDIT"
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSTANDARD$ THEN
IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _
LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSEIF network$ = gNODE$ THEN
IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSEIF network$ = gSERVER$ THEN
IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), FALSE)
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
ELSE
notused% = EnableWindow(GetDlgItem(hDlg%,IDC_OK), TRUE)
END IF
CASE "IDC_OK"
network$ = GetSymbolValue(SYM_NETWORK$)
FOR i% = 1 TO 2
IF network$ = gNODE$ AND i% = 2 THEN
Exit For
END IF
IF network$ = gSERVER$ AND i% = 1 THEN
GOTO NEXTFIELD
END IF
IF LEN(GetListItem ("IDC_EDIT", i%)) < 1 THEN
ErrorMsgNoDlgExit SID_TKT_ERR_NEEDNAMES, ""
EXIT FOR
END IF
NEXTFIELD:
NEXT
IF LEN(GetListItem ("IDC_EDIT", 1)) < 30 THEN
SetSymbolValue SYM_NAME$, GetListItem ("IDC_EDIT", 1)
ELSE
targetstr$ = GetListItem ("IDC_EDIT", 1)
IF IsDBCSFirstAtOffset (targetstr$, 30) = 1 THEN
SetSymbolValue SYM_NAME$, LEFT$(GetListItem ("IDC_EDIT", 1), 29)
ELSE
SetSymbolValue SYM_NAME$, LEFT$(GetListItem ("IDC_EDIT", 1), 30)
END IF
END IF
IF LEN(GetListItem ("IDC_EDIT", 2)) < 30 THEN
SetSymbolValue SYM_COMPANY$, GetListItem ("IDC_EDIT", 2)
ELSE
targetstr$ = GetListItem ("IDC_EDIT", 2)
IF IsDBCSFirstAtOffset (targetstr$, 30) = 1 THEN
SetSymbolValue SYM_COMPANY$, LEFT$(GetListItem ("IDC_EDIT", 2), 29)
ELSE
SetSymbolValue SYM_COMPANY$, LEFT$(GetListItem ("IDC_EDIT", 2), 30)
END IF
END IF
Case "IDC_BACK"
SetListItem "__LASTSTATUS", 1, "Q"
END SELECT
END SUB
SUB CUSTOM1CB (hDlg%, CtrlId%, Classes$, Inst%)
DIM chpt$, product_name$, child$, dirsym$, network$
DIM page%, tab_handle%
DIM RC$, i%, notused%
SELECT CASE Classes$
case "__DLGINIT"
gNumPages% = 0
ghdlg% = hDlg%
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT6)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
network$ = GetSymbolValue(SYM_NETWORK$)
If network$ = gSERVER$ Then
notused% = ShowWindow (GetDlgItem(hDlg%, IDC_B1), SW_HIDE)
End If
i% = Lot_GetCurrentProduct()
chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(i%) + gTOP$)
chpt$ = Lot_GetFirstChild(chpt$, F_DISPLAY + F_CUSTOM)
WHILE (chpt$ <> "")
product_name$ = Lot_GetChapterValStr(chpt$, F_NAME)
child$ = Lot_GetFirstChild(chpt$, F_DISPLAY + F_CUSTOM)
notused% = RegisterCallback("CALLBACK","CUSTOM2CB")
page% = Lot_AddPagetoNotebook(hDlg%,IDC_NOTEBOOK1,DBNM_1,product_name$)
tab_handle% = Lot_GetPagehandle(hDlg%,IDC_NOTEBOOK1,page%)
IF FPopulateLCB(tab_handle%, child$) = FALSE THEN
ErrorMsg SID_ERR_POPULATELCB, ""
ERROR STFQUIT
END IF
gNumPages% = gNumPages% + 1
gPageArray(gNumPages%).szChapter = chpt$
gPageArray(gNumPages%).idPage = page%
gPageArray(gNumPages%).hDlgPage = tab_handle%
gPageArray(gNumPages%).nSel = 1
IF gNumPages% = 1 THEN gCurrentPageIndex% = page%
chpt$ = Lot_GetNextSibling(chpt$, F_DISPLAY + F_CUSTOM)
WEND
Lot_TurnToPage hDlg%, IDC_NOTEBOOK1, gCurrentPageIndex%
gCurrentPageIndex% = 1
SetCustomInfo TRUE, TRUE
case "IDC_B"
chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
gPageArray(gCurrentPageIndex%).nSel, _
LCBITEM_CHAPTER)
dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
SetSymbolValue SYM_CHANGEDIRSYMBOL$, dirsym$
IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
IF (dirsym$ <> SYM_LOTUSAPPDIR$ AND _
dirsym$ <> SYM_WINDIR$ AND _
dirsym$ <> SYM_WINSYSDIR$) THEN
notused% = RegisterCallback ("CALLBACK", "CHANGEPRODUCTDIRCB")
RC$ = PopupModalDlg (DBM_CHANGEDIR, DBM_CHANGEDIR)
END IF
ELSE
IF dirsym$ <> SYM_LOTUSAPPDIR$ THEN
dirSym$ = Reg_GetDirSymbolList(Lot_GetCurrentProduct())
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
SetSymbolValue SYM_CHANGEDIRSYMBOL$, dirsym$
notused% = RegisterCallback ("CALLBACK", "CHANGEPRODUCTDIRCB")
RC$ = PopupModalDlg (DBM_CHANGEDIR, DBM_CHANGEDIR)
End If
END IF
END IF
SELECT CASE RC$
case "OK"
SetCustomInfo FALSE, TRUE
notused% = SetFocus(GetDlgItem(hDlg%, IDC_B1))
case "BACK"
SetCustomInfo TRUE, TRUE
notused% = SetFocus(GetDlgItem(hDlg%, IDC_B1))
END SELECT
case "IDC_NOTEBOOK"
FOR i% = 1 TO gNumPages%
IF gPageArray(i%).idPage = Inst% THEN
gCurrentPageIndex% = i%
SetCustomInfo TRUE, FALSE
EXIT FOR
END IF
NEXT
case "IDC_OK"
ResetWinWinsysSymbols
case "__DLGDESTROY"
RemoveSymbol SYM_CUSTOMCOST$
RemoveSymbol SYM_CHANGEDIRSYMBOL$
END SELECT
END SUB
SUB CUSTOM2CB (hDlg%, CtrlId%, Classes$, Inst%)
DIM chpt$, tiponly%, index%, dirsym$, notused%
SELECT CASE Classes$
case "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
case "IDC_LCB"
SetYieldActive FALSE
IF Inst% < 0 THEN
Inst% = -Inst%
tiponly% = TRUE
ELSE
tiponly% = FALSE
END IF
index% = Inst% - IDC_LCB1 + 1
chpt$ = Lot_LCBGetItem(hDlg%, index%, LCBITEM_CHAPTER)
gPageArray(gCurrentPageIndex%).nSel = index%
IF chpt$ <> "" THEN
IF tiponly% = FALSE THEN
Lot_ToggleChapterFilesInCopyList chpt$
SetCustomInfo FALSE, TRUE
ELSE
SetCustomInfo FALSE, FALSE
END IF
END IF
IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
gPageArray(gCurrentPageIndex%).nSel, _
LCBITEM_CHAPTER)
dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
IF (dirsym$ = SYM_LOTUSAPPDIR$ OR _
dirsym$ = SYM_WINDIR$ OR _
dirsym$ = SYM_WINSYSDIR$) THEN
notused% = EnableWindow (GetDlgItem(ghdlg%, IDC_B1), FALSE)
ELSE
notused% = EnableWindow (GetDlgItem(ghdlg%, IDC_B1), TRUE)
END IF
END IF
SetYieldActive TRUE
END SELECT
END SUB
SUB CHANGEPRODUCTDIRCB (hDlg%, CtrlId%, Classes$, Inst%)
STATIC drvIndex%, dirChanged%
DIM dirSym$, dirToChange$, dirName$, rc$, i%, olddir$
SELECT CASE Classes$
case "__DLGINIT"
dirChanged% = FALSE
dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
dirToChange$ = GetSymbolValue(dirSym$)
dirName$ = GetSymbolValue(dirSym$ + gNAME$)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
SetWindowText GetDlgItem(hDlg%, IDC_GROUP1), dirName$
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
IF dirSym$ = SYM_LOTUSAPPDIR$ AND _
GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
i% = INSTR(dirToChange$, gLOTUSAPP$)
IF i% > 1 THEN dirToChange$ = LEFT$(dirToChange$, i% - 1)
END IF
SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(dirToChange$)
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
case "IDC_EDIT"
dirChanged% = TRUE
case "IDC_COMBO1"
drvIndex% = Inst%
dirChanged% = TRUE
case "IDC_OK"
IF dirChanged% = TRUE THEN
dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
olddir$ = GetSymbolValue(dirSym$)
dirToChange$ = MID$(GetListItem("IDC_COMBO1",drvIndex%), 1, 2) + _
GetListItem("IDC_EDIT", 1)
IF dirSym$ = SYM_LOTUSAPPDIR$ AND _
GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
i% = TRUE
dirToChange$ = MakePath(dirToChange$,gLOTUSAPP$)
ELSE
i% = FALSE
END IF
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
ELSE
dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
SetSymbolValue dirSym$, dirToChange$
IF i% = FALSE THEN
IF GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
dirName$ = |"| + dirSym$ + |",TRUE|
ELSE
dirName$ = |"| + dirSym$ + |",FALSE|
END IF
rc$ = Lot_CallOneProductFunction(Lot_GetCurrentProduct(), _
"PathChange", gNEXT$, _
FALSE, dirName$)
If rc$ = gBACK Then
SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(olddir$)
drvIndex% = SelectDriveCombo ("IDC_COMBO1", olddir$)
SetSymbolValue dirSym$, olddir$
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
End If
END IF
Lot_RefreshDestination(dirSym$)
END IF
END IF
END SELECT
END SUB
SUB CHANGELOTUSAPPDIRCB (hDlg%, CtrlId%, Classes$, Inst%)
STATIC drvIndex%, dirChanged%
DIM dirSym$, dirToChange$, dirName$, winLotApp$
SELECT CASE Classes$
case "__DLGINIT"
dirChanged% = FALSE
dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
dirToChange$ = GetSymbolValue(dirSym$)
dirName$ = GetSymbolValue(dirSym$ + gNAME$)
winLotApp$ = GetWindowsDir() + gLOTUSAPP$ + "\"
SetWindowText GetDlgItem(hDlg%, IDC_GROUP1), dirName$
SetWindowText GetDlgItem(hDlg%, IDC_B1), winLotApp$
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
IF dirToChange$ = winLotApp$ THEN
SetListItem "IDC_B", 1 , "T"
SetListItem "IDC_B", 2 , "F"
ELSE
SetListItem "IDC_B", 1 , "F"
SetListItem "IDC_B", 2 , "T"
END IF
AddListItem SYM_UPDATELIST$, "IDC_B1"
AddListItem SYM_UPDATELIST$, "IDC_B2"
case "IDC_COMBO1"
drvIndex% = Inst%
dirChanged% = TRUE
SetListItem "IDC_B", 1 , "F"
SetListItem "IDC_B", 2 , "T"
AddListItem SYM_UPDATELIST$, "IDC_B1"
AddListItem SYM_UPDATELIST$, "IDC_B2"
case "IDC_B"
dirChanged% = TRUE
case "IDC_OK"
IF dirChanged% = TRUE THEN
If IsDlgButtonChecked(hDlg%,IDC_B1) = FALSE Then
dirToChange$ = _
MakePath(MID$(GetListItem("IDC_COMBO1",drvIndex%), 1, 2), _
gLOTUSAPP$)
ELSE
dirToChange$ = GetWindowsDir() + gLOTUSAPP$
END IF
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
ELSE
dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
SetSymbolValue dirSym$, dirToChange$
Lot_RefreshDestination(dirSym$)
END IF
END IF
END SELECT
END SUB
SUB GETLOTUSAPPDIRCB (hDlg%, CtrlId%, Classes$, Inst%)
STATIC drvIndex%, dirChanged%
DIM dirSym$, dirToChange$, dirName$, winLotApp$
SELECT CASE Classes$
case "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
dirChanged% = FALSE
dirToChange$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
dirName$ = GetSymbolValue(dirSym$ + gNAME$)
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
AddListItem SYM_UPDATELIST$, "IDC_COMBO1"
drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(dirToChange$)
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
case "IDC_COMBO1"
drvIndex% = Inst%
dirChanged% = TRUE
case "IDC_EDIT"
dirChanged% = TRUE
case "IDC_OK"
IF dirChanged% = TRUE THEN
dirToChange$ = MID$(GetListItem("IDC_COMBO1",drvIndex%), 1, 2)+ _
GetListItem("IDC_EDIT", 1)
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
ELSE
SetSymbolValue SYM_LOTUSAPPDIR$, dirToChange$
Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
DL_SetNotesDataPath
DL_SetOraclePath
END IF
END IF
END SELECT
END SUB
SUB SIZEOFINSTALLCB (hDlg%, CtrlId%, Classes$, Inst%)
STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS), dirChanged%, size$, lDistSize&
DIM dirSym$, dirToChange$, rc$, i%, nProds%, lcb&, notused%
DIM drvItem$, drvFree&, network$
network$ = GetSymbolValue(SYM_NETWORK)
IF INSTR(Classes$, "IDC_COMBO") THEN
i% = VAL(MID$(Classes$, 10, LEN(Classes$) - 9))
drvIndex%(i%) = Inst%
dirChanged% = TRUE
EXIT SUB
END IF
SELECT CASE Classes$
CASE "__DLGINIT"
size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
SELECT CASE size$
CASE gCOMPLETE$
SetListItem "IDC_B", 1, "T"
CASE gLAPTOP$
SetListItem "IDC_B", 2, "T"
CASE gCUSTOM$
SetListItem "IDC_B", 3, "T"
END SELECT
AddListItem SYM_UPDATELIST$, "IDC_B"
lcb& = 0
nProds% = Reg_GetNumberOfProducts()
FOR i% = 1 to nProds%
IF Reg_GetUIInOrOut (i%) <> 0 THEN
lcb& = lcb& + Reg_GetProdFullSize(i%)
END IF
NEXT
SetListItem "IDC_TEXT", 2, LdString(SID_SPACENEEDED) + _
STR$((lcb& \ 1048576) + 1) + gStrMB$
lcb& = 0
FOR i% = 1 to nProds%
IF Reg_GetUIInOrOut (i%) <> 0 THEN
lcb& = lcb& + Reg_GetProdMinSize(i%)
END IF
NEXT
SetListItem "IDC_TEXT", 4, LdString(SID_SPACENEEDED) + _
STR$((lcb& \ 1048576) + 1) + gStrMB$
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT10)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
AddListItem SYM_UPDATELIST$, "IDC_TEXT4"
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
dirChanged% = FALSE
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
dirToChange$ = GetSymbolValue(dirSym$)
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
drvIndex%(1) = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(dirToChange$)
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
End If
IF GetSymbolValue(SYM_NETWORK$) = gSERVER$ THEN
dirToChange$ = GetSymbolValue(SYM_LOTUSAPPDIR$)
Lot_GetDriveFreeSpaceList "IDC_COMBO2"
drvIndex%(2) = SelectDriveCombo ("IDC_COMBO2", dirToChange$)
SetListItem "IDC_EDIT", 2, Lot_ExtractDirectory(dirToChange$)
AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
END IF
IF Reg_GetProdSupportForFullInstall(1) = FALSE THEN
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_B1), FALSE)
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_TEXT1), FALSE)
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_TEXT2), FALSE)
END IF
IF Reg_GetProdSupportForMinInstall(1) = FALSE THEN
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_B2), FALSE)
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_TEXT3), FALSE)
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_TEXT4), FALSE)
END IF
IF Reg_GetProdSupportForCustInstall(1) = FALSE THEN
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_B3), FALSE)
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_TEXT5), FALSE)
END IF
IF (Reg_GetProdSupportForFullInstall(1) <> FALSE) AND _
(Reg_GetProdSupportForMinInstall(1) = FALSE) AND _
(Reg_GetProdSupportForCustInstall(1) = FALSE) THEN
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_TEXT3), TRUE)
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_TEXT4), TRUE)
notused% = EnableWindow(GetDlgItem(hDlg%, IDC_TEXT5), TRUE)
END IF
END IF
case "IDC_B"
SELECT CASE Inst%
CASE 1
size$ = gCOMPLETE$
CASE 2
size$ = gLAPTOP$
CASE 3
size$ = gCUSTOM$
END SELECT
case "IDC_EDIT"
dirChanged% = TRUE
case "IDC_OK"
SetSymbolValue SYM_SIZEOFINSTALL$, size$
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ AND _
dirChanged% = TRUE THEN
dirToChange$ = LEFT$(GetListItem("IDC_COMBO1",drvIndex%(1)), 2) + _
GetListItem("IDC_EDIT", 1)
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
ELSE
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
SetSymbolValue dirSym$, dirToChange$
rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
FALSE, |"| + dirSym$ + |",TRUE|)
If rc$ = gBACK Then
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
End If
Lot_RefreshDestination(dirSym$)
End If
END IF
IF GetSymbolValue(SYM_NETWORK$) = gSERVER$ AND _
Reg_GetProdSupportForShare(1) = 1 THEN
dirToChange$ = LEFT$(GetListItem("IDC_COMBO2",drvIndex%(2)), 2) + _
GetListItem("IDC_EDIT", 2)
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
ELSE
SetSymbolValue SYM_LOTUSAPPDIR$, dirToChange$
Lot_RefreshDestination(SYM_LOTUSAPPDIR$)
END IF
END IF
END IF
ResetWinWinsysSymbols
END SELECT
DONESIZEOFINSTALLCB:
END SUB
SUB DISTSIZEINSTALLCB (hDlg%, CtrlId%, Classes$, Inst%)
STATIC drvIndex%, dirChanged%, size$, lDistSize&
DIM dirSym$, dirToChange$, rc$, i%, nProds%, lcb&, notused%
DIM drvItem$, drvFree&, network$
network$ = GetSymbolValue(SYM_NETWORK)
SELECT CASE Classes$
CASE "__DLGINIT"
size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
lcb& = 0
nProds% = Reg_GetNumberOfProducts()
FOR i% = 1 to nProds%
lcb& = lcb& + Reg_GetProdFullSize(i%)
NEXT
SetListItem "IDC_TEXT", 2, LdString(SID_SPACENEEDED) + _
STR$((lcb& \ 1048576) + 1) + gStrMB$
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT7)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
dirChanged% = FALSE
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
dirToChange$ = GetSymbolValue(dirSym$)
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(dirToChange$)
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
End If
drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(dirToChange$)
drvItem$ = GetListItem("IDC_COMBO1",drvIndex%)
drvFree& = CLNG(MID$(drvItem$,3,LEN(drvItem$)-5))
lDistSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
SetListItem "IDC_TEXT", 1, STR$(lDistSize&) + gStrK$
SetListItem "IDC_TEXT", 2, STR$(drvFree& - lDistSize&) + gStrK$
AddListItem SYM_UPDATELIST$, "IDC_TEXT1"
AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
case "IDC_COMBO1"
drvIndex% = Inst%
dirChanged% = TRUE
drvItem$ = GetListItem("IDC_COMBO1",Inst%)
drvFree& = CLNG(MID$(drvItem$,3,LEN(drvItem$)-5))
SetListItem "IDC_TEXT", 1, STR$(lDistSize&) + gStrK$
SetListItem "IDC_TEXT", 2, STR$(drvFree& - lDistSize&) + gStrK$
AddListItem SYM_UPDATELIST$, "IDC_TEXT1"
AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
case "IDC_EDIT"
dirChanged% = TRUE
case "IDC_OK"
SetSymbolValue SYM_SIZEOFINSTALL$, size$
IF dirChanged% = TRUE THEN
dirToChange$ = LEFT$(GetListItem("IDC_COMBO1",drvIndex%), 2) + _
GetListItem("IDC_EDIT", 1)
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
ELSE
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
SetSymbolValue dirSym$, dirToChange$
rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
FALSE, |"| + dirSym$ + |",TRUE|)
Lot_RefreshDestination(dirSym$)
End If
ResetWinWinsysSymbols
END IF
END IF
END SELECT
END SUB
SUB DISKCOPYMETHODCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM network$
SELECT CASE Classes$
CASE "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER$ THEN
SetListItem "IDC_B", 1, "T"
AddListItem SYM_UPDATELIST$, "IDC_B1"
ELSEIF network$ = gDISTRIBUTION$ THEN
SetListItem "IDC_B", 2, "T"
AddListItem SYM_UPDATELIST$, "IDC_B2"
END IF
CASE "IDC_B"
SELECT CASE Inst%
CASE 1
SetSymbolValue SYM_NETWORK$, gSERVER$
CASE 2
SetSymbolValue SYM_NETWORK$, gDISTRIBUTION$
END SELECT
END SELECT
END SUB
PUBLIC SUB SRV_SUCCESSCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM path$, exist%, ExecError%
SELECT CASE Classes$
CASE "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
CASE "IDC_B"
IF Inst% = 1 THEN
path$ = GetSymbolValue(SYM_LICDIR$)
path$ = path$ + "licenser.exe"
exist% = DoesFileExist(path$, femExists)
IF exist% = FALSE THEN
ErrorMsgNoDlgExit SID_NO_LICENSEREXE, ""
ELSE
ExecError% = WinExec (path$, SW_SHOWNORMAL)
IF ExecError% < 32 THEN
ErrorMsgNoDlgExit SID_ERR_EXECLIC, ""
END IF
END IF
END IF
END SELECT
END SUB
PUBLIC SUB LAUNCHNAGCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM cmd$, ExecError%
SELECT CASE Classes$
CASE "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
CASE "IDC_B"
cmd$ = LdString(SID_NOTEPADEXE) & " " & MakePath(GetSymbolValue(SYM_STF_SRCDIR$),LdString(SID_READNETTXT))
ExecError% = WinExec (cmd$, SW_SHOWNORMAL )
IF ExecError% < 32 THEN
ErrorMsg SID_ERR_EXECNOTEPAD, ""
END IF
END SELECT
END SUB
SUB SetCustomInfo(fOnTab%,fNewSpace%)
STATIC lckSpace&, drvSave$
DIM chpt$, dest$, dirName$, dirSym$, drv$, tips$
DIM lckCost&, lckAvail&
DIM bitmap%, n%, notused%
IF fOnTab% = FALSE THEN
chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
gPageArray(gCurrentPageIndex%).nSel, _
LCBITEM_CHAPTER)
ELSE
chpt$ = gPageArray(gCurrentPageIndex%).szChapter$
END IF
IF chpt$ = "" THEN EXIT SUB
tips$ = Lot_GetChapterValStr(chpt$, F_TIPS)
IF GetListLength(SYM_CUSTOMCOST$) = 0 OR fNewSpace% <> FALSE THEN
notused% = LcbGetChapterCost("", "", SYM_CUSTOMCOST$, "")
END IF
dirSym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
IF dirsym$ <> SYM_LOTUSAPPDIR$ AND GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
dirSym$ = Reg_GetDirSymbolList(Lot_GetCurrentProduct())
dirSym$ = GetListItem(dirSym$, 1)
END IF
dest$ = GetSymbolValue(dirSym$)
dirName$ = GetSymbolValue(dirSym$ + gNAME$)
drv$ = MID$(dest$, 1, 1)
n% = ASC(drv$) - ASC("a") + 1
lckCost& = CLNG(GetListItem(SYM_CUSTOMCOST$, n%)) \ 1024
IF drv$ = drvSave$ THEN
lckAvail& = lckSpace&
lckAvail& = GetFreeSpaceForDrive(drv$) \ 1024
ELSE
lckAvail& = GetFreeSpaceForDrive(drv$) \ 1024
lckSpace& = lckAvail&
drvSave$ = drv$
END IF
bitmap% = Lot_GetChapterValInt(chpt$, F_BITMAP)
IF bitmap% <> 0 THEN
SetListItem "IDC_BMP", 1, STR$(bitmap%)
AddListItem SYM_UPDATELIST$, "IDC_BMP1"
END IF
SetWindowText GetDlgItem(gPageArray(gCurrentPageIndex%).hDlgPage%, IDC_TEXT1), tips$
SetWindowText GetDlgItem(ghdlg%, IDC_TEXT2), Lot_MakeSizeString(lckCost&)
SetWindowText GetDlgItem(ghdlg%, IDC_TEXT3), Lot_MakeSizeString(lckAvail&)
SetWindowText GetDlgItem(ghdlg%, IDC_TEXT4), dest$
SetWindowText GetDlgItem(ghdlg%, IDC_TEXT5), dirName$
IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
IF dest$ = GetSymbolValue(SYM_LOTUSAPPDIR$) THEN
notused% = EnableWindow (GetDlgItem(ghdlg%, IDC_B1), FALSE)
ELSE
notused% = EnableWindow (GetDlgItem(ghdlg%, IDC_B1), TRUE)
END IF
END IF
END SUB
PUBLIC SUB ResetWinWinsysSymbols()
DIM network$, SymVal$
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER$ THEN
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
SymVal$ = Reg_GetDirSymbolList(1)
If GetListLength(SymVal$) >= 1 Then
SymVal$ = GetListItem(SymVal$, 1)
SymVal$ = GetSymbolValue(SymVal$)
Else
ErrorMsg SID_ERR_SRV_MUST_HAVE_MAINDIR, ""
ERROR STFQUIT
End If
ELSE
SymVal$ = GetSymbolValue(SYM_BASEDIR$)
END IF
SetSymbolValue SYM_WINDIR$, SymVal$ + "win\"
SetSymbolValue SYM_WINSYSDIR$, SymVal$ + "winsys\"
Lot_RefreshDestination(SYM_WINDIR$)
Lot_RefreshDestination(SYM_WINSYSDIR$)
END IF
END SUB
FUNCTION DoesFileExistInDir (dirlist$) AS INTEGER
DIM errstr$, n%, i%, dirname$, RC%, temp$, sz$
DoesFileExistInDir = TRUE
errstr$ = ""
n% = GetListLength(dirlist$)
for i% = 1 to n%
dirname$ = GetListItem(dirlist$,i%)
rc% = DoesDirExist(dirname$)
If DoesDirExist(dirname$)Then
temp$ = Lot_Dir(dirname$+"\*.*")
if temp$ <> "" Then
errstr$ = errstr$ + CHR$(10) + CHR$(10) + " " + dirname$
end if
end if
Next
if errstr$ <> "" Then
sz$ = LdString(SID_DIR_NOT_EMPTY) + errstr$
RC% = DoMsgBox(sz$,LdString(SID_TKT_STD_TITLE),MB_OKCANCEL + MB_ICONEXCLAMATION)
if RC% <> 1 Then
SetListItem "__LASTSTATUS",1,"Q"
EXIT FUNCTION
end if
end if
END FUNCTION
SUB NODELOTUSAPPCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM i%, netLotusapp$, dr$, ndrives%, S$, l%, newpath$, oldnetLotusapp$
STATIC drvIndex%
SELECT CASE Classes$
CASE "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
netLotusapp$ = GetSymbolValue(SYM_NETLOTUSAPP$)
dr$ = MID$(netLotusapp$,1,1)
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
drvIndex% = SelectDriveCombo ("IDC_COMBO1", dr$)
ndrives% = GetListLength("IDC_COMBO1")
FOR i% = 1 to ndrives%
S$ = GetListItem("IDC_COMBO1", i%)
SetListItem "IDC_COMBO1", i%, MID$(S$,1,2)
NEXT
case "IDC_COMBO1"
drvIndex% = Inst%
case "IDC_OK"
dr$ = MID$(GetListItem("IDC_COMBO1",drvIndex%), 1, 1)
netLotusapp$ = GetSymbolValue(SYM_NETLOTUSAPP$)
l% = LEN(netLotusapp$)
netLotusapp$ = LCASE$(dr$ & MID$(netLotusapp$, 2, l%-1) )
oldnetLotusapp$ = netLotusapp$
If DoesDirExist(netLotusapp$) = 1 Then
SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
Else
newpath$ = TrimNetlotusapp$(netLotusapp$)
If newpath$ <> "" Then
netLotusapp$ = newpath$
Else
netLotusapp$ = oldnetLotusapp$
ShowPathError SID_ERR_DIRSYNTAX, SID_NODENONEXISTLOTUSAPPDIR,_
Lot_TrimEndSlash (netLotusapp$)
SetListItem "__LASTSTATUS", 1, "Q"
GOTO DONEOK
End If
End If
DONEOK:
END SELECT
END SUB
SUB SRVNODEOPTIONSCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM chpt$, firstchpt$, ProdName$, child$, dirsym$,toggle%,Selection%,sel%,Written%
DIM NumOfProds%, OptNum%, OptName$, tiponly%,ProdNum%, Selected$, prodno$
DIM RC$, i%, j%,k%, notused%, Item$, flag$, SaveInst%, index%,OptKeyWord$
SELECT CASE Classes$
case "__DLGINIT"
NumOfProds% = Reg_GetNumberOfProducts()
IF NumOfProds%=0 THEN
EXIT SUB
END IF
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
Lot_LCBSetRedraw hDlg%, 0
Lot_LCBResetContent hDlg%
FOR i% = 1 TO NumOfProds%
Reg_ReSetAllNodeOptsSelToDefaults i%
OptNum%=Reg_GetNumofNodeOptions(i%)
IF OptNum% <> 0 THEN
chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(i%) + gTOP$)
IF firstchpt$ = "" THEN
firstchpt$ = chpt$
END IF
Lot_SetSpaceDirTip hDlg%,chpt$,1 - IDC_LCB1 + 1,i%,FALSE
ProdName$ = Lot_GetChapterValStr(chpt$, F_NAME)
Written% = 0
FOR j% = 1 TO OptNum%
OptKeyWord$ = Reg_GetNodeOptionStr(i%,j%)
chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$)
IF INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1 THEN
IF Written% = 0 THEN
Item$="1"+ProdName$+";;"+STR(OptNum%)+";"+STR(i%)+";G"
IF Lot_LCBAddItem(hDlg%, Item$) = 0 THEN
ErrorMsg SID_ERR_POPULATELCB, ""
ERROR STFQUIT
END IF
Written% = 1
END IF
OptName$ = " "+Lot_GetChapterValStr(chpt$, F_NAME)
Selected$ = Reg_IsNodeOptionSelected(i%,j%)
IF Selected$ = STR(1) THEN
Item$="1"+OptName$+";"+ _
Lot_MakeSizeString(Lot_GetInfChapterSize(chpt$)\1024) _
+";"+chpt$+";"+STR(i%)+";M;"+OptKeyWord$+";"+STR(j%)
ELSE
Item$="0"+OptName$+";"+ _
Lot_MakeSizeString(Lot_GetInfChapterSize(chpt$)\1024) _
+";"+chpt$+";"+STR(i%)+";M;"+OptKeyWord$+";"+STR(j%)
END IF
IF Lot_LCBAddItem(hDlg%, Item$) = 0 THEN
ErrorMsg SID_ERR_POPULATELCB, ""
ERROR STFQUIT
END IF
ELSE
Reg_ReSetNodeOptionSelected i%,j%,0
END IF
NEXT
END IF
NEXT
Lot_LCBSetRedraw hDlg%, 1
Lot_LCBSetSel hDlg%, 1
prodno$ = Lot_LCBGetItem(hDlg%,1,5)
Lot_SetSpaceDirTip hDlg%,firstchpt$,1,CINT(prodno$),FALSE
case "IDC_LCB"
SetYieldActive FALSE
SaveInst% = Inst%
IF Inst% < 0 THEN
Inst% = -Inst%
tiponly% = TRUE
toggle% = FALSE
ELSE
tiponly% = FALSE
toggle% = TRUE
END IF
index% = Inst% - IDC_LCB1 + 1
chpt$ = Lot_LCBGetItem(hDlg%, index%, LCBITEM_CHAPTER)
ProdNum% = CINT(Lot_LCBGetItem(hDlg%, index%, 5))
flag$ = Lot_LCBGetItem(hDlg%, index%, 6)
Selection% = CINT(Lot_LCBGetItem(hDlg%, index%, LCBITEM_SELECTED))
OptKeyWord$ = Lot_LCBGetItem(hDlg%, index%, 7)
IF flag$ = "G" AND toggle% = TRUE THEN
FOR i% = 1 TO CINT(chpt$)
IF Selection% = 0 AND _
Lot_LCBGetCount(hDlg%)+1 > index%+i% THEN
sel% = CINT(Lot_LCBGetItem(hDlg%, index%+i%, LCBITEM_SELECTED))
IF sel% = 1 AND Lot_LCBGetItem(hDlg%, index%+i%, 6) <> "G" THEN
notused% = Lot_LCBReplaceItem(hDlg%, index%+i%, LCBITEM_SELECTED,"0")
chpt$ = Lot_LCBGetItem(hDlg%, index%+i%, LCBITEM_CHAPTER)
Reg_ReSetNodeOptionSelected ProdNum%, i%, 0
END IF
ELSEIF Selection% = 1 AND _
Lot_LCBGetCount(hDlg%)+1 > index%+i% THEN
sel% = CINT(Lot_LCBGetItem(hDlg%, index%+i%, LCBITEM_SELECTED))
IF sel% = 0 AND Lot_LCBGetItem(hDlg%, index%+i%, 6) <> "G" THEN
notused% = Lot_LCBReplaceItem(hDlg%, index%+i%, LCBITEM_SELECTED,"1")
chpt$ = Lot_LCBGetItem(hDlg%, index%+i%, LCBITEM_CHAPTER)
Reg_ReSetNodeOptionSelected ProdNum%, i%, 1
END IF
END IF
NEXT
END IF
IF flag$ = "G" AND toggle% = FALSE THEN
prodno$ = Lot_LCBGetItem(hDlg%, index%,5)
chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(CINT(prodno$)) + gTOP$)
Lot_SetSpaceDirTip hDlg%,chpt$,index%,ProdNum%,TRUE
END IF
IF flag$ = "M" AND toggle% = TRUE THEN
sel% = CINT(Lot_LCBGetItem(hDlg%, index%, LCBITEM_SELECTED))
Lot_SetSpaceDirTip hDlg%,chpt$,index%,ProdNum%,FALSE
IF sel% = 0 THEN
Reg_ReSetNodeOptionSelected ProdNum%, CINT(Lot_LCBGetItem(hDlg%, index%, 8)), 0
ELSE
Reg_ReSetNodeOptionSelected ProdNum%, CINT(Lot_LCBGetItem(hDlg%, index%, 8)), 1
END IF
END IF
IF flag$ = "M" AND toggle% = FALSE THEN
Lot_SetSpaceDirTip hDlg%,chpt$,index%,ProdNum%,TRUE
END IF
SetYieldActive TRUE
END SELECT
END SUB
SUB NODENODEOPTIONSCB (hDlg%, CtrlId%, Classes$, Inst%)
STATIC drvIndex%, dirChanged%
DIM dirSym$, dirToChange$, dirName$, rc$, i%, Chapter$
DIM AllProdNum%,prodNum%,AllOptNum%,OptName$,OptNum%,notused%
SELECT CASE Classes$
case "__DLGINIT"
dirChanged% = FALSE
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
SetListItem "IDC_B", 1, "T"
Lot_GetDriveFreeSpaceList "IDC_COMBO1"
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
dirSym$ = Reg_GetDirSymbolList(1)
dirSym$ = GetListItem(dirSym$,1)
dirToChange$ = GetSymbolValue(dirSym$)
ELSE
dirToChange$ = GetSymbolValue(SYM_BASEDIR$)
END IF
SetSymbolValue SYM_CHANGEDIRSYMBOL$, dirSym$
drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(dirToChange$)
AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
AddListItem SYM_UPDATELIST$, "IDC_B1"
AllProdNum% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
IF AllOptNum% <> 0 THEN
FOR OptNum%=1 TO AllOptNum%
OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
IF Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) = 0 THEN
Chapter$ = Lot_GetChapterFromKeyword(OptName$)
notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,0)
ELSE
Chapter$ = Lot_GetChapterFromKeyword(OptName$)
notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,1)
END IF
NEXT
END IF
NEXT
END IF
case "IDC_EDIT"
dirChanged% = TRUE
case "IDC_COMBO1"
drvIndex% = Inst%
dirChanged% = TRUE
case "IDC_OK"
IF dirChanged% = TRUE THEN
dirToChange$ = MID$(GetListItem("IDC_COMBO1",drvIndex%), 1, 2) + _
GetListItem("IDC_EDIT", 1)
IF ValidatePath(dirToChange$) = FALSE THEN
SetListItem "__LASTSTATUS", 1, "Q"
ELSE
dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
SetSymbolValue dirSym$, dirToChange$
rc$ = Lot_CallOneProductFunction(Lot_GetCurrentProduct(), _
"PathChange", gNEXT$, _
FALSE, |"| + dirSym$ + |",FALSE|)
If rc$ = gBACK Then
SetListItem "__LASTSTATUS", 1, "Q"
EXIT SUB
End If
Lot_RefreshDestination(dirSym$)
END IF
END IF
IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
IF IsDlgButtonChecked(hDlg%,IDC_B1) = FALSE THEN
AllProdNum% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
IF AllOptNum% <> 0 THEN
FOR OptNum%=1 TO AllOptNum%
OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
Chapter$ = Lot_GetChapterFromKeyword(OptName$)
notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,0)
NEXT
END IF
NEXT
END IF
ELSE
AllProdNum% = 0
AllProdNum% = Reg_GetNumberOfProducts()
IF AllProdNum% <> 0 THEN
FOR prodNum%=1 TO AllProdNum%
AllOptNum% = 0
AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
IF AllOptNum% <> 0 THEN
FOR OptNum%=1 TO AllOptNum%
OptName$ = Reg_GetNodeOptionStr(prodNum%,OptNum%)
Chapter$ = Lot_GetChapterFromKeyword(OptName$)
IF Lot_IsTheNodeOptionsAvailToNode(prodNum%,OptName$) = 1 THEN
notused% = Lot_SetChapterFilesInCopyListInOrOut(Chapter$,1)
END IF
NEXT
END IF
NEXT
END IF
END IF
END IF
END SELECT
END SUB
SUB Lot_SetSpaceDirTip(hDlg%,chpt$,index%,ProdNum%,tiponly%)
STATIC lckSpace&, drvSave$
DIM dest$, dirName$, dirSym$, drv$, tips$
DIM lckCost&, lckAvail&
DIM bitmap%, n%, notused%
tips$ = Lot_GetChapterValStr(chpt$, F_TIPS)
IF GetListLength(SYM_CUSTOMCOST$) = 0 OR tiponly <> FALSE THEN
notused% = LcbGetChapterCost("", "", SYM_CUSTOMCOST$, "")
END IF
dirSym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
IF dirsym$ <> SYM_LOTUSAPPDIR$ AND GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
dirSym$ = Reg_GetDirSymbolList(ProdNum%)
dirSym$ = GetListItem(dirSym$, 1)
END IF
dest$ = GetSymbolValue(dirSym$)
dirName$ = GetSymbolValue(dirSym$ + gNAME$)
drv$ = MID$(dest$, 1, 1)
n% = ASC(drv$) - ASC("a") + 1
lckCost& = CLNG(GetListItem(SYM_CUSTOMCOST$, n%)) \ 1024
IF drv$ = drvSave$ THEN
lckAvail& = lckSpace&
ELSE
lckAvail& = GetFreeSpaceForDrive(drv$) \ 1024
lckSpace& = lckAvail&
drvSave$ = drv$
END IF
bitmap% = Lot_GetChapterValInt(chpt$, F_BITMAP)
IF bitmap% <> 0 THEN
SetListItem "IDC_BMP", 1, STR$(bitmap%)
AddListItem SYM_UPDATELIST$, "IDC_BMP1"
END IF
SetWindowText GetDlgItem(hDlg%, IDC_TEXT1), tips$
SetWindowText GetDlgItem(hDlg%, IDC_TEXT5), Lot_MakeSizeString(lckCost&)
SetWindowText GetDlgItem(hDlg%, IDC_TEXT7), Lot_MakeSizeString(lckAvail&)
SetWindowText GetDlgItem(hDlg%, IDC_TEXT9), dest$
END SUB
SUB AUTOEXECCB (hDlg%, CtrlId%, Classes$, Inst%)
DIM modflag%, notused1$
SELECT CASE Classes$
CASE "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
CASE "IDC_OK"
modflag% = 0
IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
modflag% = 1
END IF
IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
modflag% = modflag% + 2
END IF
IF modflag% <> FALSE THEN
notused1$=ModifyAutoexec(modflag%, 1, "AUTOEXEC.LTS")
END IF
SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTO$
CASE "IDC_MENU"
modflag% = 0
IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
modflag% = 1
END IF
IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
modflag% = modflag% + 2
END IF
IF modflag% <> FALSE THEN
notused1$=ModifyAutoexec(modflag%, 0, "AUTOEXEC.LTS")
END IF
SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTOCOPY$
CASE "IDC_CONTINUE"
SetSymbolValue SYM_AUTOEXEC_CHOICE$, gMAN$
END SELECT
END SUB
SUB INSTALLCOMPLETECB (hDlg%, CtrlId%, Classes$, Inst%)
DIM notused1$, hwnd%, lr%
SELECT CASE Classes$
CASE "__DLGINIT"
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
CASE "IDC_OK"
END SELECT
END SUB