home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 February
/
PCWK0297.iso
/
lotus
/
english
/
winagent
/
install.dsk
/
INST.LSS
< prev
next >
Wrap
Text File
|
1995-01-25
|
10KB
|
942 lines
USE "TOOLKIT"
OPTION DECLARE
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 FUNCTION GetINSTPathfromLotusIni() AS STRING
PUBLIC gProdsupport%
SUB Initialize
Reg_RegisterProductNames "INST", LdString(SID_BLANKTEXT)
END SUB
PUBLIC FUNCTION ProductRegINST (prodno%, network$, direction$) AS STRING
ProductRegINST = gNEXT
Reg_SetSupportedInstallTypes prodno%, 1, 1, 1
Reg_SetProdSizes prodno%, 524288, 524288
Reg_SetUIInOrOut prodno%, 1
Reg_SetShareFlags prodno%, 0, 0, 0, 0
Reg_SetAllowUserToPickInSuite prodno%, 0
Reg_SetSrvSupport prodno%, 1
Reg_SetLicenseSupport prodno%, 0
Reg_SetATMSupport prodno%, 0
END FUNCTION
PUBLIC FUNCTION DefaultUserRegINST (prodno%, network$, direction$) AS STRING
DefaultUserRegINST = gNEXT
END FUNCTION
PUBLIC FUNCTION InitINST (prodno%, network$, direction$, basedir$) AS STRING
DIM dirSym$, sym$, symname$
InitINST = direction$
If direction$ = gBACK Then
EXIT FUNCTION
End If
If network$ <> gSERVER AND network$ <> gSTANDARD Then
Reg_SetUIInOrOut prodno%, FALSE
Else
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
dirSym$ = Reg_GetDirSymbolList(1)
If GetListLength(dirSym$) >= 1 Then
dirSym$ = GetListItem(dirSym$, 1)
SetSymbolValue "INSTDIR", GetSymbolValue(dirSym$)
Else
SetSymbolValue "INSTDIR", basedir$
End If
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
PUBLIC FUNCTION PathChangeINST (prodno%, network$, direction$, destdirsym$, mainprodsonly%) AS STRING
DIM path$
PathChangeINST = gNEXT
path$ = GetSymbolValue (destdirsym$)
END FUNCTION
PUBLIC FUNCTION InitCopyListINST (prodno%, network$, direction$) AS STRING
DIM i%, sym$, chpt$
InitCopyListINST = direction$
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%
If network$ <> gSERVER$ Then
If FIsKeywordinCopyList ("INSTFILES") <> FALSE Then
chpt$ = Lot_GetChapterFromKeyword("INSTFILES")
Lot_ToggleChapterFilesInCopyList chpt$
End If
End If
END FUNCTION
PUBLIC FUNCTION UIINST (prodno%, network$, direction$) AS STRING
UIINST = direction$
If direction$ = gBACK Then
EXIT FUNCTION
End If
END FUNCTION
PUBLIC FUNCTION PreCopyConfigINST (prodno%, network$, direction$, lic%) AS STRING
DIM dirSym$
PreCopyConfigINST = gNEXT
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
Lot_RefreshDestination ("INSTDIR")
END FUNCTION
PUBLIC FUNCTION AddTheBillBoardsINST (prodno%, network$, direction$, nbytes&) AS STRING
AddTheBillBoardsINST = direction$
If direction$ = gBACK Then
EXIT FUNCTION
End If
END FUNCTION
PUBLIC FUNCTION PostCopyConfigINST (prodno%, network$, direction$, programgroup$) AS STRING
DIM ripath$, prodbaseDir$, gInstallIniFile$, cwd$, TmpInstallIni$
DIM executable$
PostCopyConfigINST = direction$
If direction$ = gBACK Then
EXIT FUNCTION
End If
prodbaseDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodbaseDir$,gINSTALLINI$)
cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
TmpInstallIni$ = MakePath(cwd$,gINSTALLINI$)
executable$ = GetIniKeyString(TmpInstallIni$, "TOOLKIT","LAUNCHEXE")
IF executable$ <> "" THEN
gProdsupport% = 1
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "LAUNCHEXE", executable$, cmoOverwrite
ELSE
gProdsupport% = 0
END IF
IF network$ = gDISTRIBUTION$ THEN
IF Lot_IsTheFeatureInstalled("INSTTOP") THEN
CreateIniKeyValue gInstallIniFile$, "TOOLKIT", "DISTRIBUTION", "YES", cmoVital
END IF
END IF
SKIPCONFIG:
END FUNCTION
PUBLIC FUNCTION AddIconsINST (prodno%, network$, direction$, programgroup$) AS STRING
DIM instdir$
AddIconsINST = direction$
If direction$ = gBACK Then
EXIT FUNCTION
End If
If network$ = gSERVER Then
instdir$ = Lot_WhereIsFeature(prodno%, "INSTFILES", "install.exe")
ASSERT instdir$ <> "", ""
CreateProgmanItem programgroup$, LdString(SID_INST_VIEWSTRING)+_
Reg_GetProductName(1), instdir$ + "install.exe", "", cmoOverwrite
End If
END FUNCTION
PUBLIC FUNCTION PostSuccessRegINST (prodno%, network$, direction$) AS STRING
DIM rc$, ExecError%, notused%, executable$, gInstallIniFile$, prodbaseDir$
DIM distribution$, automation$
PostSuccessRegINST = direction$
network$ = GetSymbolValue(SYM_NETWORK$)
automation$ = GetSymbolValue(SYM_AUTOMATIONINST$)
prodbaseDir$ = Lot_GetInstallDir()
gInstallIniFile$ = MakePath(prodbaseDir$,gINSTALLINI$)
distribution$ = GetIniKeyString(gInstallIniFile$, "TOOLKIT", "DISTRIBUTION")
IF network$ <> gNODE$ AND _
distribution$ = "" AND _
automation$ <> gTRUE$ THEN
executable$ = GetIniKeyString(gInstallIniFile$, "TOOLKIT","LAUNCHEXE")
IF executable$ <> "" THEN
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
END FUNCTION
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