home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 April A
/
Pcwk4a98.iso
/
Lotus
/
Notes46
/
INSTALL.DSK
/
MAIN.LSS
< prev
next >
Wrap
Text File
|
1997-08-20
|
83KB
|
2,204 lines
''/*********************************************************************
''
'' Module Name: main.lss
''
'' Module Code: TOOLKIT
''
'' Author: Marcel Meth
''
'' Creation Date: Aug 31, 1993
''
'' Copyright Lotus Development Corporation, (c) 1991
''
''
'' Description:
'' Lotus script file for common install
'' If you are trying to create an automated install, you need to
'' remove or comment out the Calls that bring up dialogs and
'' ensure that the symbols have valid values.
'' See "AUTOMATE" comments throughout the code.
'' You should be able to easily automate a simple COMPLETE install.
''
'' SUGGESTION: You should be able to tailor an install to you users by
'' having shell variables setup for them and using the
'' the lotus script "ENVIRON$" variable.
'' e.g. suppose the user has the following line in their autoexec.bat
'' set NAME=Marcel
'' then you can pick it up with:
'' name$ = ENVIRON$("NAME")
''
'' The following diagram illustrates the basic execution path(s)
'' available in this script.
''
'' InitInstall
'' |
'' WELCOME DIALOG (SYM_NAME$, SYM_COMPANY$, SYM_NETWORK$)
'' |
'' SERVERorDISTRIBUTION DIALOG (SYM_NETWORK$)
'' |
'' IF SMARTSUITE THEN SUITE DIR DIALOG (SYM_BASEDIR$)
'' |
'' SELECT based on SYM_NETWORK$
'' |
'' gSTANDARD--.....
'' |
'' gSERVER--.....
'' |
'' gNODE--.....
'' |
'' gDISTRIBUTION--.....
''
'' The main Drive for all Installs
''
'' Tabs: 3 (In Brief do tabs 4 7)
''
'' Additional authors: Mariana Zgripcea, Dave Dupre,
'' Thangarag Veerapan, Christopher Moy
''
'' Change History:
'' $Log: //CIT/VOL1/CFLOG/logfiles/cominst/toolkit/main___@.lss $
''
'' Rev 1.176.1.0 15 Nov 1995 17:11:08 mhishinu
'' Merged GC5 into FE5
''
'' Rev 1.176 17 Oct 1995 16:08:28 jdonohue
'' Changed logic for COMPONENTSDIR and LOTUSAPPDIR defaults from cinstall.ini
''
'' Rev 1.175 17 Oct 1995 13:14:54 jdonohue
'' Fixed wrong ini section reference, moved dialog code
''
'' Rev 1.174 13 Oct 1995 14:43:56 jdonohue
'' Added call to Lot_RefreshLocalComponentDir
''
'' Rev 1.173 03 Oct 1995 16:42:18 tveerapp
'' Fixed spr#TVEN2WNS5V. Removed the conditional check for calling into the
'' product UI functions only during custom install. Lot_CallProductFunctions(UI)
'' will now be called for all types of installs (default,min and custom). This
'' check was removed from case gSTANDARD and case gSERVER.
''
'' Rev 1.172 27 Sep 1995 17:03:42 jdonohue
'' Set server defaults for LOTUSAPPDIR and COMPONENTSDIR in cinstall.ini found
''
'' Rev 1.171 27 Sep 1995 14:48:02 jdonohue
'' Language install message always based on SYM_REG_PRODUCTNAME$ (prod #1)
'' Set SYM_INSTALLKINDS$ as well as SYM_INSTALLKIND$
''
'' Rev 1.170 26 Sep 1995 16:10:12 jdonohue
'' For suite language install, dialog says "smart Suite" in product field
'' Fixed error on server/language install
''
'' Rev 1.169 25 Sep 1995 15:29:38 jdonohue
'' Call all product functions for InitLanguage
''
'' Rev 1.168 21 Sep 1995 16:22:00 jdonohue
'' Moved resetting of gINSTALLINI$ for output after reading of cinstall.ini file
''
'' Rev 1.167 21 Sep 1995 12:28:34 jdonohue
'' Don't reset gINSTALLINI$ for server language install
''
'' Rev 1.166 13 Sep 1995 14:47:22 tveerapp
'' Fixed the logic in SetTheBase. The registry is read only for a std./node
'' installs.
''
'' Rev 1.165 13 Sep 1995 14:44:46 jdonohue
'' Moved check for server language install
''
'' Rev 1.164 12 Sep 1995 13:21:38 jdonohue
'' Popup message for server language install
''
'' Rev 1.163 12 Sep 1995 10:53:14 tveerapp
'' Added Lo_SaveFeaturesInInstNodeIni() for a node install. This records
'' uinstall information in cinstnod.ini
''
'' Rev 1.162 08 Sep 1995 16:56:02 tveerapp
'' Fixed spr#KHAN2VUQVY,the change is in SetTheBase for automation.
''
'' Rev 1.161 07 Sep 1995 14:51:54 tveerapp
'' Moved the setting of INSTDIR duringa language server install to Inst.lss
'' to fix spr#WEDS2VNRDZ
''
'' Rev 1.160 02 Sep 1995 15:29:50 amontalv
'' Added check at beginning, right after initialization to determine if we have
'' enough priviledges to install.
''
'' Rev 1.159 31 Aug 1995 11:42:50 jdonohue
'' Added code to check that the parent directory obtained from the registry is
'' a valid drive, and if not, uses default
''
'' Rev 1.158 22 Aug 1995 16:13:46 tveerapp
'' For a standalone and node language installs don not reset the product symbols
'' during automation.
''
'' Rev 1.157 22 Aug 1995 13:52:42 jdonohue
'' SetBaseSymbols now looks in registry under ..\lotus\Components for default
''
'' Rev 1.156 17 Aug 1995 14:53:26 jdonohue
'' Added functions to recognize and handle node install from secondary server
'' language
''
'' Rev 1.155 17 Aug 1995 14:36:28 callanan
'' Set the bitmap display mode for billboards
''
'' Rev 1.154 17 Aug 1995 14:03:22 callanan
'' Changed the default way to handle bitmaps in dialogs
''
'' Rev 1.153 15 Aug 1995 16:40:16 mmeth
'' Part 2 of SPR# RMOO2UPTZD
'' In SUB ConfigureAUTOEXEC I have added a check as to which dialog should be
'' posted. If there were files marked "SYSTEM", that were busy, then
'' I send a message to the install.exe's window to reboot.
'' This of course is only true, if the user chooses to reebot.
''
'' Rev 1.152 15 Aug 1995 07:53:04 jdonohue
'' For a node install, if main product and install directories differ, sets
'' main directory to parent of install (secondary language install)
''
'' Rev 1.151 14 Aug 1995 11:32:12 jdonohue
'' Added code to handle server language install
''
'' Rev 1.150 14 Aug 1995 10:48:02 callanan
'' Modify SYM_CUSTOM$ to keep track of where we are in install, to decide how we display bitmaps in dialogs
''
'' Rev 1.149 09 Aug 1995 13:48:06 callanan
'' Created global SYM_CUST which keeps track of when we are in the Custom dialog
'' so we can display bitmaps correctly.
''
'' Rev 1.148 04 Aug 1995 14:54:26 amontalv
'' Added quotes around the directory name in the lsirun like written to install.lst
''
'' Rev 1.147 02 Aug 1995 17:45:26 tveerapp
'' Added Lot_AutoSetSrvOptions to gSERVER.
''
'' Rev 1.146 02 Aug 1995 16:28:04 jdonohue
'' Changed calling method for InitLanguage
''
'' Rev 1.145 27 Jul 1995 15:47:00 glutz
'' Took out some print statements.
''
'' Rev 1.144 27 Jul 1995 13:33:28 glutz
'' Added cost of unc files to NumberOfBytesPerBillbd.
''
'' Rev 1.143 27 Jul 1995 10:11:16 amontalv
'' Put a check for the new shell around the CreateProgmanGroup call -- all three
'' of them.
''
'' Rev 1.142 10 Jul 1995 14:33:06 glutz
'' If CheckForSpace fails return to Select Parent dir dialog.
''
'' Rev 1.141 07 Jul 1995 16:47:32 mzgripce
'' if lotusappdir is deleted before the node install put an error and exit
''
'' Rev 1.140 28 Jun 1995 11:42:28 tveerapp
'' Added check to customize shared components for a custom install only.
''
'' Rev 1.139 22 Jun 1995 15:34:16 tveerapp
'' Added logic to Welcome code.Install ends when the welcome dialogs returns
'' gBACK$.
''
'' Rev 1.138 21 Jun 1995 20:21:16 amontalv
'' Attempt to get User name and Company from 4 different places. The original, from
'' the Windows registry entry for Windows, the Windows registry location for Windows NT
'' and using GetUserName as last resort.
''
'' Rev 1.137 21 Jun 1995 11:33:36 tveerapp
'' When an STFQUIT error is raised, check for automation by getting the
'' SYM_AUTOMATIONINST value. Script does not store the automation$ variable's
'' value.
''
'' Rev 1.136 20 Jun 1995 13:48:24 tveerapp
'' Changed the call from Lot_AutoGetProgramGroup to Lot_GetProgramGroupOrFolder
''
'' Rev 1.135 19 Jun 1995 17:10:30 tveerapp
'' During automation allow the defaultreg function to be called for the
'' 1st product(similar to the regular install).
'' Should fix spr#KHAN2T2PCQ.
''
'' Rev 1.134 12 Jun 1995 12:46:12 amontalv
'' Added code to Server and node to display folder instead of program group if
'' on Win95. The code doesn't completely work yet as I'm waiting for some UI
'' issues to be worked out
''
'' Rev 1.133 08 Jun 1995 17:08:58 tveerapp
'' Fixed spr# CCOL2NULJ2. Moved the AutoGetProductDestDir function after
'' smartsuite appselection for a standard and node install.
''
'' Rev 1.132 08 Jun 1995 12:33:02 tveerapp
'' Modified ConfigureAUTOEXEC. The autoexec modification code has been remmed
'' out. This sub routine now brings up only the success dilaog.
'' This should fix spr#KHAN2SKKQZ.
''
'' Rev 1.131 07 Jun 1995 16:30:22 amontalv
'' Changed the Win95 start folder so that it initializes
'' earlier in the program. This should make automation
'' easier to implement for it. There are still a couple of
'' bugs that I need to work out, but I feel that I should
'' check what I have now.
''
'' Rev 1.130 06 Jun 1995 15:53:30 amontalv
'' We are experiencing problems with LotusScript when we fill buffers with
'' nulls and then pass them to C routines. For the time being, it is suggested
'' that we fill our buffers with spaces. To this end (and to make it
'' easier to change back later) I have created a small LotusScript routine
'' named CreateBuffer. You use it any time you ordinarily would use
'' STRING$(num, 0). CreateBuffer() just needs the num, it decides what to
'' fill the buffer with (sorry about the grammer). Right now it fill the
'' buffer with spaces. Later we will change it back to nulls. Also look
'' at the routine NullTrim(). It will get rid of final nulls and spaces.
'' You can use this when getting a buffer that has been changed or filled
'' in a external C routine.
''
'' Rev 1.129 05 Jun 1995 18:11:54 tveerapp
'' Changed AutoSetPArentCompDirs to AutoSetParentDir
''
'' Rev 1.128 05 Jun 1995 16:37:12 amontalv
'' Made changes for migrating to LotusScript version 3.0.37.
''
'' Rev 1.127 01 Jun 1995 11:11:34 amontalv
'' Added API function CreateLink to create shortcuts. Also added functions
'' to save and get the link path to support the CreateLink. I also changed
'' the startup program folder code to use the default dialog proc and changed
'' the default dialog proc to process directory trees.
''
'' Rev 1.126 30 May 1995 15:42:34 amontalv
'' Made a new function PopupWithFunction. PopupModalDlg now calls this. Needed to
'' do this to call dialog with my own dialog function.
''
'' Rev 1.125 30 May 1995 09:25:28 amontalv
'' Added back my changes. Had not made changes to setupapi.lss to declare
'' functions.
''
'' Rev 1.124 26 May 1995 14:36:44 cmoy
'' rolled back Andy's changes to revision 1.122
''
'' Rev 1.122 22 May 1995 23:32:20 amontalv
'' Added browse for Win 95 program folder.
''
'' Rev 1.121 22 May 1995 09:28:22 mzgripce
'' remove the function IsLotusappPromptNeeded() and the calls to it and remove
'' the tags NODEPROMPTLOTUSAPP: STDSUITPROMPTLOTUSAPP: AND STDPROMPTLOTUSAPP
'' FIXING THE GOTOs TO THEM
''
'' Rev 1.120 18 May 1995 12:17:36 tveerapp
'' Added call AutoSetParentCompDirs inside SetTheBaseSymbol for a single
'' product automated install.
''
'' Rev 1.119 18 May 1995 12:07:26 mzgripce
'' set default for baseDir to lotus and remove initlang... and use language
''
'' Rev 1.118 18 May 1995 09:54:48 mzgripce
'' display userUI in server install only in customize case.
''
'' Rev 1.117 17 May 1995 17:56:26 mzgripce
'' display user UI only in customize for standalone install
''
'' Rev 1.116 17 May 1995 08:54:12 jdonohue
'' Added call to InitLanguage
''
'' Rev 1.115 16 May 1995 13:45:30 mzgripce
'' initialize SYM_PARENDIR and call PARENTDIRCB
''
'' Rev 1.114 16 May 1995 12:56:32 tveerapp
'' Resourced the log file strings.
''
'' Rev 1.113 16 May 1995 12:39:00 tveerapp
'' Added End of log file .
''
'' Rev 1.112 15 May 1995 17:34:26 tveerapp
'' Fixed gSERVER. For an automated server install do not process the individual
'' product directories.
''
'' Rev 1.111 15 May 1995 11:18:12 jdonohue
'' Moved SetUpApi call to toolkit
''
'' Rev 1.110 11 May 1995 17:26:52 tveerapp
'' Commented out the gLOgFile$ setting in InitInstall.
''
'' Rev 1.109 11 May 1995 14:51:50 tveerapp
'' Added Status logging. Modified InitInstall.
''
'' Rev 1.108 03 May 1995 18:12:24 mzgripce
'' change cursor% to cursor& in one instance
''
'' Rev 1.107 03 May 1995 12:00:38 tveerapp
'' Fixed cfbuild-c2build merge.
''
'' Rev 1.106 02 May 1995 12:52:54 cmoy
'' Merged c2 into cf build
''
'' Rev 1.104 28 Apr 1995 15:57:44 mheerman
'' Commented out the select program manager group dialog.
'' Rev 1.103 26 Apr 1995 09:54:24 tveerapp
'' Added Customization during automation for a server install.
''
'' Rev 1.102 25 Apr 1995 11:52:52 tveerapp
'' Added Automation Customization to case gSTANDARD.
''
'' Rev 1.103 10 Apr 1995 17:52:18 amontalv
'' Changed code that removed null termination and trimmed spaces. There
'' is no longer any null termination to Script text gotten from C calls
'' Rev 1.101 06 Apr 1995 14:51:26 cmoy
'' No change.
''
'' Rev 1.102 07 Apr 1995 15:04:24 mzgripce
''
'' Rev 1.100 05 Apr 1995 19:53:30 amontalv
'' Porting to 32 bit.
''
'' Rev 1.99 16 Mar 1995 09:58:14 mhishinu
'' No change.
''
'' Rev 1.98 22 Feb 1995 02:29:06 cmoy
'' No change.
''
'' Rev 1.97 02 Feb 1995 14:29:34 cmoy
''
'' Thangaraj fixed Pipeline Problem
''
'' Rev 1.96 01 Feb 1995 17:51:18 tveerapp
''
'' Added the call to process Node Options for suite in NODENODEOPTIONS (for suite).
''
'' Rev 1.95 19 Jan 1995 12:30:20 tveerapp
''
'' Fixed the lotusapp/node install problem when the product does not support
'' lotusapp processing.
''
'' Rev 1.94 09 Jan 1995 10:12:00 tveerapp
''
'' Fixed STFQUIT problem.Added UIPopAll before ending execution.
''
'' Rev 1.93 29 Dec 1994 11:58:32 tveerapp
''
'' Commented out the call to reboot during automation.
''
'' Rev 1.92 29 Dec 1994 11:11:06 tveerapp
''
'' Added the bitmap and new dialog for automation.
''
'' Rev 1.91 23 Dec 1994 14:14:50 jplump
''
'' Added call to Lot_AutoGetSetLicenserInfo
'' Removed print statement
''
'' Rev 1.90 22 Dec 1994 15:07:00 tveerapp
''
'' Clean up print statements
''
'' Rev 1.89 21 Dec 1994 17:10:22 tveerapp
''
'' Added node options processing for an automated node install in case gNODE.
''
'' Rev 1.88 21 Dec 1994 15:01:28 tveerapp
''
'' Fixed the return value type on line 1423
''
'' Rev 1.87 21 Dec 1994 13:55:36 tveerapp
''
'' Added Suite App selection processing to STANDARD,SERVER and NODE.
''
'' Rev 1.86 21 Dec 1994 12:15:54 tveerapp
''
'' Modified SetTheBaseSymbol to add the check for a suite install.
''
'' Rev 1.85 21 Dec 1994 12:03:50 tveerapp
''
'' Added automation code to SetTheBaseSymbol.Uses response file base during automation.
''
'' Rev 1.84 12 Dec 1994 13:22:36 tveerapp
''
'' Added ResetWinWinsys call to case gSERVER$ for a server install
'' to determine the win winsysdir symbols correctly.
''
'' Rev 1.83 12 Dec 1994 13:20:00 tveerapp
'' Added %s to lsirun cmd line modification.This is to account for
'' the new automation command line arguments.
''
'' Rev 1.82 12 Dec 1994 11:49:10 mzgripce
''
'' Use the SQL and Paradox Auto symbols
''
'' Rev 1.81 08 Dec 1994 20:14:24 jplump
''
'' Added call to Lot_AutoWriteOutDebugFile
''
'' Rev 1.80 06 Dec 1994 17:17:28 tveerapp
'' Added automation processing to case gDISTRIBUTION$.
'' Added response file processing from the command line (shell).
''
'' Rev 1.79 06 Dec 1994 12:16:18 tveerapp
'' Added Automation code to cases gSERVER$ and gNODE$.
''
'' Rev 1.78 06 Dec 1994 10:21:38 tveerapp
'' Added Lot_AutoConfigure and AutoInstallReboot calls.
''
'' Rev 1.77 05 Dec 1994 16:51:44 tveerapp
'' Added call to Lot_AutoGetUserInfo.
''
'' Rev 1.76 02 Dec 1994 16:52:50 cmoy
'' merged automation files
''
'' Rev 1.75 18 Nov 1994 16:13:02 amontalv
'' Japan DBCS: Added some resources to
''
'' Rev 1.8 01 Dec 1994 17:23:14 tveerapp
'' Added AutoCheckForSpace function.
''
'' Rev 1.7 29 Nov 1994 12:49:12 tveerapp
''
'' Changed the return value of Lot_AutoGetSizeOfInstall to be an integer.
''
'' Rev 1.6 29 Nov 1994 11:43:52 jplump
''
'' Added automation$, changed return type for Lot_AutoGetProgramGroup
''
'' Rev 1.4 28 Nov 1994 15:52:46 tveerapp
'' Added Lot_AutoGetSizeofInstall and other automation code for the standalone
'' install.D
''
'' Rev 1.3 23 Nov 1994 17:03:32 tveerapp
''
'' Added automation logic to the Init Symbol processor.
''
'' Rev 1.2 23 Nov 1994 16:22:56 tveerapp
''
'' Added Lot_AutoGetInstallType to InitInstall. Added code to bring up
'' a modeless dialog during automation.
''
'' Rev 1.1 23 Nov 1994 14:50:40 tveerapp
'' Added Automation code to InitInstall and called the auto init function.
'' Also identified some of the changes to be made.
''==========
''
'' Rev 1.74 02 Aug 1994 16:34:40 mzgripce
'' No change.
''
'' Rev 1.73 01 Aug 1994 10:27:00 cmoy
'' No change.
''
'' Rev 1.72 29 Jun 1994 10:54:18 thangv
'' Moved the SYM_NETLOTUSAPP setting to inside the if statement (798,807).
'' This was previously outside. The code is in NETLOTUSAPP processing. This
'' should fix spr#31726.
''
'' Rev 1.71 24 Jun 1994 11:10:38 thangv
'' Moved the call to Initialize the product copylists during a node install
'' to after the NODESSSAPPSEL dialog (smart suite dialog). The new lines are
'' 729-733. This should fix the suite bug for node install when the user
'' deselects apps but still gets them installed. The call was in the right pla
'' for the std and server.
''
'' Rev 1.70 03 Jun 1994 12:18:32 cmoy
''
'' substituted CreateProgmanGroup for ProgmanManageGroup
''
'' Rev 1.69 02 Jun 1994 12:30:48 thangv
'' Added code to process sys.admin.mapping for node install.
''
'' Rev 1.68 31 May 1994 13:55:38 thangv
'' Added restore cursor before CheckForSpace(in case node)and Showwait
'' cursor after Checkfor space.
''
'' Rev 1.67 31 May 1994 13:40:44 mmeth
'' Added Function Calls for Suite to handle previous versions
''
'' Rev 1.66 26 May 1994 18:40:06 cmoy
''
'' Replaced CreateProgmanGroup and ShowProgmanGroup with ProgmanManageGroup
'' so that accented characters may be used.
''
'' Rev 1.65 26 May 1994 17:35:12 thangv
''
'' Fixed the back link from SRVUI to SRVNODEOPTIONS (it was SRVDATALENS before
''
'' Rev 1.64 25 May 1994 16:12:38 thangv
'' Moved CheckForSpace after share is processed for node. This fixes
'' the node install running out of space bug.
''
'' Rev 1.63 17 May 1994 10:59:20 thangv
'' Moved stdlotusappprompt to before stdcustomize.
''
'' Rev 1.62 13 May 1994 12:13:32 thangv
'' Changed the 2nd arg to ShowProgmanGroup to 1.(it is not minimized).
''
'' Rev 1.61 11 May 1994 12:35:06 thangv
'' Moved Showwaitcursor for the node further up before copying files.
''
'' Rev 1.60 11 May 1994 11:11:06 thangv
'' Bring up DB_PLESEWAIT twice (for std, server) and bring it up for node.
'' Re-arranged Lot_CallPostCopyConifg(std,server,node).
'' Added plese wait foe node install.
''
'' Rev 1.59 11 May 1994 10:31:40 mzgripce
'' sprs 29300 and 29280 (DoDatalens)
''
'' Rev 1.58 06 May 1994 14:15:20 mzgripce
'' send the prognam name to the addicons
''
'' Rev 1.57 05 May 1994 15:51:02 thangv
''
'' Fixed the prev. link from the SSAPPSEL.
''
'' Rev 1.56 03 May 1994 11:09:06 mmeth
'' Added back Confirm Dialog
''
'' Rev 1.55 02 May 1994 18:56:30 mzgripce
''
'' put the addIconsXXX as its own call
''
'' Rev 1.54 02 May 1994 14:52:42 cmoy
''
'' modified SUB AUTOEXECCONFIG to deal with different versions of windows.
''
'' Rev 1.52 02 May 1994 13:58:22 thangv
'' Added ResetCopyList calls.
''
'' Rev 1.51 28 Apr 1994 18:33:42 cmoy
'' Changed Lot_CallProductFunctions(billboards) to Lot_CallOneProductFunction
'' (billboards)
'' modified NumberOfBytesinBillboard to only check first product.
''
'' Rev 1.50 26 Apr 1994 11:16:38 mzgripce
''
'' enable previous from consolidation in node
''
'' Rev 1.49 25 Apr 1994 17:32:36 cmoy
''
'' Moved LAUNCHNAG so that it comes up after DB_DISKCOPYMETHOD dialog.
''
'' Rev 1.48 25 Apr 1994 15:42:16 cmoy
'' reset the base distribution directory to lotusdis\
'' in SUB SetTheBaseSymbol
'' main calls SetTheBaseSymbol after the DB_DISKCOPYMETHOD dialog
'' instead of before it now.
''
'' Rev 1.47 22 Apr 1994 14:34:14 mzgripce
''
'' set direction to back if consolidation returns back
''
'' Rev 1.46 20 Apr 1994 16:22:06 mzgripce
'' initialize SYM_DOSMAXPATHDIFF$
''
'' Rev 1.45 20 Apr 1994 12:44:26 thangv
'' Added the check AND app_flag<> FALSE to SRVNODEOPTIONS.
'' When everything is unselected.
''
'' Rev 1.44 19 Apr 1994 17:02:24 thangv
'' Added code to fix the bug if all the products are
'' deselected in ss dialogs in the case of standalone and
'' server install.
''
'' Rev 1.43 15 Apr 1994 11:58:26 mmeth
'' NODENODEOPTIONSCB was not being registered for Personal directory dialog
''
'' Rev 1.42 13 Apr 1994 17:06:02 mzgripce
'' do not set sym_netlotusapp$ in main
''
'' Rev 1.41 13 Apr 1994 09:31:12 cmoy
''
'' Added SUB ConfigureAUTOEXEC and implemented it
''
'' Rev 1.40 11 Apr 1994 17:49:00 thangv
'' Removed Reg_GetProdSupportforDist(1) <> TRUE check from SERVER_DISTRIBUTION
'' Dialog case. (check only for Srv support.)
'' which is correct.
''
'' Rev 1.39 11 Apr 1994 12:32:16 mmeth
''
'' Cleaned up and made it more readable
''
'' Rev 1.38 08 Apr 1994 13:53:04 thangv
'' Fixed the problem with prev. button for Distribution install.
'' Also added the lines in case gDISTRIBUTION that was nuked.
''
'' Rev 1.37 07 Apr 1994 16:40:12 mmeth
''
'' Cleaned up main.lss
''
'' Rev 1.36 06 Apr 1994 16:30:12 mmeth
'' Added a list gEXTRA. This list gets initialized with an etra 200000
'' bytes for the Windows drive. This can be modified by the product groups if
'' necessary.
''
''*********************************************************************/
OPTION DECLARE
USE "CALLBACK"
USE "LANGUAGE"
DECLARE FUNCTION DoDatalens(BYVAL direction$) AS STRING
DECLARE FUNCTION NumberOfBytesPerBillbd() AS LONG
DECLARE SUB SetTheBaseSymbol()
DECLARE SUB InitInstall()
DECLARE SUB ConfigureAUTOEXEC()
'*************************************************************************
'** SUB INITIALIZE
'**
'** Purpose: Initial entry point into Common Install
'**
'** Author:
'** Arguments: None
'** Returns: NONE
'*************************************************************************
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$,longnotused&
DIM win95proggroup$,yesno&
DIM lang$, s$, listlen%
'** Set up the error handlers
ON Error STFQUIT GOTO MAINERROR
ON Error STFERR GOTO STFERR_
ON Error STFTOGGLE GOTO STFTOGGLEERR
InitInstall
' IF NOT IsNewShell() THEN
' IF Lot_CheckPriviledges(PRIVILEDGE_CHECKFLAG_REGSYSTEMPATH) <> ERROR_SUCCESS THEN
' ErrorMsg SID_ERR_SECURITY, ""
' ERROR STFQUIT
' END IF
' END IF
nProducts% = Reg_GetNumberOfProducts()
'****************************************
'******* START THE REAL WORK HERE *******
'****************************************
'***********AUTOMATION code*************************************************
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
SetListItem "IDC_BMP", 1, STR$(IDD_TKT_PROD_BMP)
notused1$ = PopupModelessDlg(DB_AUTOINSTWAIT, DB_AUTOINSTWAIT)
END IF
'** Allow the only the 1st product to change the registration default
'** product will set symbols SYM_NAME$, SYM_COMPANY$
notused1$ = Lot_CallOneProductFunction (1, "DefaultUserReg", gNEXT, TRUE, "")
notused% = Lot_ReadSerialNumber()
WELCOME: '** WELCOME THE USER
direction$ = gNEXT
'** Call each product's "ProductReg function". Products register themselves with toolkit.
notused1$ = Lot_CallProductFunctions ("ProductReg", gNEXT, TRUE, gALLPRODUCTS$, "")
'** AUTOMATE: comment out the "PopupModalDlg" stmts and
'** and set SYM_NAME$, SYM_COMPANY$, SYM_NETWORK$.
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
'** if the welcome dialog returns gBACK end Install.
IF rc$ = gBACK$ THEN END
direction$ = Lot_ConfirmNamesDlg ()
IF direction$ = gBACK$ THEN GOTO WELCOME
ELSE
notused% = Lot_AutoGetUserInfo()
END IF
SERVER_DISTRIBUTION: '** ASK IF THIS IS A SERVER OR DIST. INSTALL
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER$ OR network$ = gDISTRIBUTION$ THEN
IF Reg_GetProdSupportforSrv(1) <> FALSE THEN
notused% = RegisterCallback("CALLBACK","DISKCOPYMETHODCB")
'** AUTOMATE: comment out next line and explicitly set SYM_NETWORK
'** SetSymbolValue SYM_NETWORK, gSERVER
'** or
'** SetSymbolValue SYM_NETWORK, gDISTRIBUTION
direction$ = PopupModalDlg (DB_DISKCOPYMETHOD, DB_DISKCOPYMETHOD )
END IF
END IF
IF direction$ = gBACK$ GOTO WELCOME
'***********AUTOMATION code*************************************************
SetTheBaseSymbol
LAUNCHNAG:
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER$ THEN
notused% = RegisterCallback("CALLBACK","LAUNCHNAGCB")
'** AUTOMATE: comment out next line and never get asked about launching NAG
direction$ = PopupModalDlg (DB_LAUNCHNAG, DB_LAUNCHNAG )
END IF
IF direction$ = gBACK$ GOTO SERVER_DISTRIBUTION
'** Find out if we're a language install -- handle UI differently if so
notused1$ = Lot_CallProductFunctions("InitLanguage", gNEXT, TRUE, gALLPRODUCTS$, "")
'***********AUTOMATION code*************************************************
SMARTSUITE_BASEDIR: '** If this is SmartSuite: Ask the user for the BASEDIR
network$ = GetSymbolValue(SYM_NETWORK$)
'Don't allow user to change parent directory for a language install
IF GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
IF network$ <> gDISTRIBUTION$ AND GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
notused% = RegisterCallback("SUIT", "SUITEDIRCB")
'** AUTOMATE: comment out next line and explicitly set SYM_BASEDIR$
'** SetSymbolValue SYM_BASEDIR$, "C:\lotsuite"
' direction$ = PopupModalDlg(DB_SUITEDIR, DB_SUITEDIR)
ELSEIF network$ <> gDISTRIBUTION$ THEN
' notused% = RegisterCallback("CALLBACK", "PARENTDIRCB")
' direction$ = PopupModalDlg(DB_PARENTDIR, DB_PARENTDIR)
END IF
END IF
IF direction$ = gBACK$ THEN GOTO LAUNCHNAG
'**************************
'** Some more intialization
'**************************
'** Default all products to complete install
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER THEN
SetSymbolValue SYM_SIZEOFINSTALL$, gCOMPLETE$
FOR i% = 1 to nProducts%
Reg_SetSelectedInstallType i%, gCOMPLETE$
NEXT
ELSE
SetSymbolValue SYM_SIZEOFINSTALL$, gLAPTOP$
FOR i% = 1 to nProducts%
Reg_SetSelectedInstallType i%, gLAPTOP$
NEXT
END IF
automation$ = GetSymbolValue(SYM_AUTOMATIONINST$)
network$ = GetSymbolValue(SYM_NETWORK$)
cwd$ = GetSymbolValue(SYM_STF_CWDDIR$)
inifile$ = MakePath(cwd$,gINSTALLINI$)
SELECT CASE network$
'**********************************************************************
'*********************** Standard Install *****************************
'**********************************************************************
CASE gSTANDARD$
'** Read the INF file and initialize the share engine
inf$ = GetIniKeyString (inifile$, "TOOLKIT", "STDINFFILE")
ReadInfFile inf$
notused% = Lot_CallSharedTool("InitSHARE()")
'** Allow the products to do their initialization
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
direction$ = Lot_CallOneProductFunction (1, "PrevVersions", gNEXT, TRUE, "")
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
END IF
'***********AUTOMATION code*************************************************
STDSSAPPSEL:
'** In this dialog, the user can select/deselect applications to be
'** installed, and also specify directories for individual apps
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("SUIT", "APPSELCB")
'** AUTOMATE: comment out to take defaults, too tricky
'** to automatically pick anything different.
direction$ = PopupModalDlg (DBSUIT_APPSEL, DBSUIT_APPSEL)
ELSE
notused% = Lot_AutoSuiteAppSelect()
END IF
END IF
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
'***********AUTOMATION code: Set The destination Dir symbols*********
IF automation$ = gTRUE$ AND _
GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
notused% = Lot_AutoGetProductDestDirSymbol ()
END IF
'** Consolidate the lotusapp if needed
IF Lot_CallSharedTool("PreConfigSHARE()") = 2 THEN
direction$ = gBACK$
END IF
IF direction$ = gBACK$ GOTO STDSSAPPSEL
'***********AUTOMATION code*************************************************
STDSIZEOFINSTALL: '** Ask the user kind of install: (COMPLETE, CUSTOM, LAPTOP)
'** AUTOMATE: comment out call to "Lot_GetSizeOfInstall"
'** Result will be a default install of "COMPLETE", anything else is too tricky.
'** For a non-suite install you can set the destination directory:
'** dirSym$ = Reg_GetDirSymbolList(1)
'** dirSym$ = GetListItem(dirSym$, 1)
'** SetSymbolValue dirSym$, "c:\foo\"
'** Lot_RefreshDestination(dirSym$)
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 '** Reset the copylist
STDINITIALIZECOPYLST: '** Make the products initialize their own copy list
direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
IF direction$ = gBACK$ GOTO STDSIZEOFINSTALL
'*****AUTOMATION code *****************************************************
IF automation$ = gTRUE$ AND _
GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
notused% = Lot_AutoCustomizeShare()
END IF
Lot_SetCurrentProduct(1)
STDCUSTOM:
IF automation$ <> gTRUE$ Then
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
ELSE
'*** Customize Suite before customizing individual products ***
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
notused% = Lot_AutoInstallSuiteCustomize()
END IF
notused% = Lot_AutoInstallCustomize()
END IF
IF direction$ = gBACK$ GOTO STDINITIALIZECOPYLST
STDDATALENS: '** Process the Datalens modules
direction$ = DoDatalens(direction$)
IF direction$ = gBACK$ GOTO STDINITIALIZECOPYLST
STDUSERUI: '** Allow product to bring up any last minute UI
'** AUTOMATE: comment out next line and avoid product specific UI.
direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
IF direction$ = gBACK$ GOTO STDDATALENS
'***********AUTOMATION code*************************************************
IF automation$ <> gTRUE$ THEN
STDPROGMAN: '** Put Progman Group UI
notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
'** AUTOMATE: comment out next line set the progman group name yourself
'** Reg_SetProgManagerGroup 1, "MY GROUP"
IF Reg_GetRootFolder() = "" THEN
direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
ELSE
direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
END IF
IF direction$ = gBACK$ GOTO STDUSERUI
ELSE
notused% = Lot_AutoGetProgramGroupOrFolder()
END IF
UIPOP 1 '** Bring down automation PLEASEWAIT
'** Start the file copy
notused% = Lot_AutoWriteOutDebugFile()
direction$ = PopupModalDlg (DB_BEGINCOPYING, DB_BEGINCOPYING)
IF direction$ = gBACK$ GOTO STDPROGMAN
'*****AUTOMATIONCODE********************************
'*** Precopy Config processor
'** Give the products a last crack at the CopyList before it gets copied
notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
'** Make sure there is enough space
IF automation$ = gTRUE$ THEN
notused% = AutoCheckForSpace()
ELSE
SELECT CASE GetSymbolValue(SYM_SIZEOFINSTALL$)
CASE gCOMPLETE$
IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO SMARTSUITE_BASEDIR 'STDSIZEOFINSTALL
CASE gLAPTOP$
IF CheckForSpace(DB_INSUFDISKSPACEMIN) = FAILURE GOTO SMARTSUITE_BASEDIR 'STDSIZEOFINSTALL
CASE gCUSTOM$
IF CheckForSpace(DB_INSUFDISKSPACECUST) = FAILURE GOTO SMARTSUITE_BASEDIR 'STDCUSTOM
END SELECT
END IF
'** Copy all the files in the copylist
longnotused& = SetSizeCheckMode(CLNG(0))
IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
DumpCopyList GetSymbolValue(SYM_LOGFILE$)
END IF
nbytes& = NumberOfBytesPerBillbd()
notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
''Display bmps centred in billboards
SetSymbolValue SYM_BMP_DISPLAY_MODE$, "CENTERED"
CopyFilesInCopyList
''Set it back to default now
SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
'** Configure the shared files
curcursor& = ShowWaitCursor()
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_SaveFeaturesInstaledInInstallIni()
'** Allow the products to configure the product after file copy
notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
UIPOP 1 '** Bring down DB_PLEASEWAIT
IF NOT IsNewShell() THEN
'** Create a program manager group for the product #1
grouptitle$ = Reg_GetProgManagerGroupName(1)
'** notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
END IF
notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
'** Bring up DB_PLEASEWAIT again
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_CallSharedTool("ConfigSHARE()")
notused% = Lot_CallSharedTool("AddSHAREIcons()")
UIPOP 1 '** Bring down DB_PLEASEWAIT
RestoreCursor curcursor&
'** Win32: This should do nothing except bring up the success dlg.
ConfigureAUTOEXEC
notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
'IF automation$ = gTRUE$ THEN
' AutoInstallReboot
'END IF
'**********************************************************************
'************************* Server Install *****************************
'**********************************************************************
CASE gSERVER$
'** Read the Server INF and initialize SHARE
inf$ = GetIniKeyString (inifile$, "TOOLKIT", "SRVINFFILE")
ReadInfFile inf$
notused% = Lot_CallSharedTool("InitSHARE()")
'***********AUTOMATION code*************************************************
SMARTSUITE_LOTUSAPPDIR:
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ AND _
Reg_GetProdSupportforShare(1) = 1 THEN
'Set defaults for components and lotusapp directories based on
'cinstall.ini found in parent directory
s$ = GetSymbolValue(SYM_BASEDIR$)
installini$ = MakePath( s$, gINSTALLINI$)
IF DoesFileExist(installini$,femExists) = 1 THEN
'** Set server defaults for LOTUSAPPDIR and COMPONENTSDIR based on entries
'** in cinstall.ini
s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
"LOTUSAPPDIR")
IF s$ <> "" THEN
SetSymbolValue SYM_LOTUSAPPDIR$, s$
SetSymbolValue SYM_LOTUSAPPEXISTS$,"1"
END IF
s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
"COMPONENTSDIR")
IF s$ <> "" THEN SetSymbolValue SYM_COMPONENTSDIR$, s$
lang$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
s$ = GetIniKeyString( installini$, "TOOLKIT", "Language")
'** Check for language install
IF s$ <> "" AND s$ <> lang$ THEN
SetSymbolValue SYM_INSTALLKIND$, gLANGUAGEINSTALL$
'For suite/server, all products are language or not
listlen% = GetListLength(SYM_INSTALLKINDS$)
FOR i% = 1 TO listlen%
SetListItem SYM_INSTALLKINDS$, i%, gLANGUAGEINSTALL$
NEXT
'** Inform the user what's happening
'** The product name is based on first product (single product name or Suite)
s$ = GetSymbolValue(SYM_REG_PRODUCTNAME$)
PopupLanguageInstallMessage( s$ )
END IF
END IF
IF GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
notused% = RegisterCallback ("CALLBACK", "GETLOTUSAPPDIRCB")
'** AUTOMATE: comment out next line and explicitly set SYM_LOTUSSAPPDIR$
'** SetSymbolValue SYM_LOTUSAPPDIR$, "C:\lotusapp"
'** Lot_RefreshDestination SYM_LOTUSAPPDIR$
direction$ = PopupModalDlg (DBM_SPECIFY_SRVLOTUSAPPDIR, DBM_SPECIFY_SRVLOTUSAPPDIR)
END IF
END IF
IF direction$ = gBACK$ THEN GOTO SMARTSUITE_BASEDIR
'** Allow the products to do their initialization
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
IF direction$ = gBACK$ GOTO WELCOME
'** TV: These were called in the callbacks. They should be called in main
'** instead.
ResetWinWinsysSymbols
SRVSSAPPSEL: '** In this dialog, the user can select/deselect applications to
'** be installed, and also specify directories for individual apps
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("SUIT", "APPSELCB")
'** AUTOMATE: comment out to take defaults, too trickey
'** to automatically pick anything different.
direction$ = PopupModalDlg (DBSUIT_SAPPSEL, DBSUIT_SAPPSEL)
ELSE
notused% = Lot_AutoSuiteAppSelect()
END IF
END IF
IF direction$ = gBACK$ GOTO SMARTSUITE_LOTUSAPPDIR
SRVSIZEOFINSTALL: '** Ask kind of install to do (COMPLETE, CUSTOM, LAPTOP)
'** AUTOMATE: comment out call to "Lot_GetSizeOfInstall"
'** Result will be a default install of "COMPLETE", anything else is too tricky.
'** For a non-suite install you can set the destination directory:
'** dirSym$ = Reg_GetDirSymbolList(1)
'** dirSym$ = GetListItem(dirSym$, 1)
'** SetSymbolValue dirSym$, "c:\foo\"
'** Lot_RefreshDestination(dirSym$)
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
'** Language Install Code
'**
s$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(1) + gTOP$)
s$ = Lot_GetChapterValStr(s$, F_DESTDIRSYM)
s$ = GetSymbolValue(s$)
installini$ = MakePath( s$, gINSTALLINI$)
lang$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
IF DoesFileExist(installini$,femExists) = 1 THEN
'** If cinstall.ini exists in the product dir, and the language is different
'** and we are a server install, then we are in a language install
'**
s$ = GetIniKeyString( installini$, "TOOLKIT", "Language")
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) <> gSMARTSUITE$ AND _
s$ <> "" AND s$ <> lang$ THEN
SetSymbolValue SYM_INSTALLKIND$, gLANGUAGEINSTALL$
SetListItem SYM_INSTALLKINDS$, 1, gLANGUAGEINSTALL$
' We have to do this again, since we are now language install
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, _
gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
'** Inform the user what's happening
'** The product name is based on first product (single product name or Suite)
s$ = GetSymbolValue(SYM_REG_PRODUCTNAME$)
PopupLanguageInstallMessage( s$ )
'** Reset server values for LOTUSAPPDIR and COMPONENTSDIR based on entries
'** in cinstall.ini
s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
"LOTUSAPPDIR")
IF s$ <> "" THEN
SetSymbolValue SYM_LOTUSAPPDIR$, s$
SetSymbolValue SYM_LOTUSAPPEXISTS$,"1"
END IF
s$ = GetIniKeyString(installini$, "Server Configuration of Shared Tools", _
"COMPONENTSDIR")
IF s$ <> "" THEN SetSymbolValue SYM_COMPONENTSDIR$, s$
END IF
END IF
ResetCopyList '** Reset the copylist
'** Make the products initialize their own copy list
direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
IF direction$ = gBACK$ GOTO SRVSIZEOFINSTALL
'*****AUTOMATION code *****************************************************
IF automation$ = gTRUE$ AND _
GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ THEN
notused% = Lot_AutoCustomizeShare()
END IF
Lot_SetCurrentProduct(1)
SRVCUSTOM:
IF automation$ <> gTRUE$ Then
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
ELSE
'*** Customize Suite before customizing individual products ***
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
notused% = Lot_AutoInstallSuiteCustomize()
END IF
notused% = Lot_AutoInstallCustomize()
END IF
IF direction$ = gBACK$ GOTO SRVSIZEOFINSTALL
SRVDATALENS: '** Process the Datalens modules
direction$ = DoDatalens(direction$)
if direction$ = gBACK$ GOTO SRVCUSTOM
SRVNODEOPTIONS: '** Process the Node Options
IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCUSTOM$ AND _
Lot_AreAnyNodeOptAvailToSrv() <> 0 AND _
app_flag% <> FALSE THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("CALLBACK", "SRVNODEOPTIONSCB")
'** AUTOMATE: comment out call toPopupmodalDlg and get default.
direction$ = PopupModalDlg (DB_SRV_NODEOPTIONS, _
DB_SRV_NODEOPTIONS)
ELSE
notused% = Lot_AutoSetSrvNodeOptions()
END IF
END IF
IF direction$ = gBACK$ GOTO SRVDATALENS
SRVUI: '** Allow product to bring up any last minute UI
'** AUTOMATE: comment out next line and avoid product specific UI.
direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
IF direction$ = gBACK$ GOTO SRVNODEOPTIONS
IF automation$ = gTRUE$ THEN
notused% = Lot_AutoGetSetLicenserInfo()
END IF
'***********AUTOMATION code*************************************************
IF automation$ <> gTRUE$ THEN
SRVPROGMAN: '** Put Progman Group UI
notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
'** AUTOMATE: comment out next line set the progman group name yourself
'** Reg_SetProgManagerGroup 1, "MY GROUP"
IF Reg_GetRootFolder() = "" THEN
direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
ELSE
direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
END IF
IF direction$ = gBACK$ GOTO SRVUI
ELSE
notused% = Lot_AutoGetProgramGroupOrFolder()
END IF
UIPOP 1 '** Bring down automation PLEASEWAIT
notused% = Lot_AutoWriteOutDebugFile()
direction$ = PopupModalDlg (DB_BEGINCOPYING, DB_BEGINCOPYING)
IF direction$ = gBACK$ GOTO SRVPROGMAN
'*****AUTOMATIONCODE********************************
'*** Precopy Config processor
'** Give the products a last crack at the CopyList before it gets copied
''* IF there is any product with licensing turned on, then
''* assume its on for all products.
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$)
'** Make sure there is enough space
IF automation$ = gTRUE$ THEN
notused% = AutoCheckForSpace()
ELSE
IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCOMPLETE$ THEN
IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO SMARTSUITE_BASEDIR 'SRVSIZEOFINSTALL
ELSE
IF CheckForSpace(DB_INSUFDISKSPACECUST) = FAILURE GOTO SMARTSUITE_BASEDIR 'SRVCUSTOM
END IF
END IF
'** Start the file copy
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
' Special case of server/language install
' Set cinstall.ini location to subdirectory for writing installed features
IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN
s$ = GetSymbolValue(SYM_INSTALL_LANGUAGE$)
gINSTALLINI$ = Lot_SetLanguageDirectory(s$) + "\" + gINSTALLINI$
END IF
'** Configure the shared files
curcursor& = ShowWaitCursor()
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_SaveFeaturesInstaledInInstallIni()
'** All the products to configure after copy
IF Lot_AreAnyNodeOptAvailToSrv() <> 0 THEN
notused% = Lot_SaveTheNodeOptionsInInstallIni()
END IF
'** Allow the products to configure the product after file copy
notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS,|"|+grouptitle$+|"|)
UIPOP 1 '** Bring Down DB_PLEASEWAIT
'** Create a program manager group for the product #1
grouptitle$ = Reg_GetProgManagerGroupName(1)
'** notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
If NOT IsNewShell() THEN
CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
End If
notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_CallSharedTool("ConfigSHARE()")
notused% = Lot_CallSharedTool("AddSHAREIcons()")
'** Change the install.ini file so we can do NODE install from server
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
' Special case of server/language install, use INSTDIR for install.lst
IF GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ THEN _
dirSym$ = "INSTDIR"
CreateIniKeyValue GetSymbolValue(dirSym$) + "install.lst", _
"Params", "CmdLine", _
|lsirun.exe start /S "%s" %s /N|, cmoOverwrite
UIPOP 1 '** Bring Down DB_PLEASEWAIT
RestoreCursor curcursor&
'** Tell user we succeeded
'* Only looks at first product! Won't work for smartsuite MMETH
notused% = RegisterCallback("CALLBACK","SRV_SUCCESSCB")
IF CINT(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,"")
'**********************************************************************
'************************* Node Install *******************************
'**********************************************************************
CASE gNODE$
'** Read in the INF file and init share
inf$ = GetIniKeyString (inifile$, "TOOLKIT", "NODEINFFILE")
ReadInfFile inf$
notused% = Lot_CallSharedTool("InitSHARE()")
'** Call the product initialization functions
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
direction$ = Lot_CallOneProductFunction (1, "PrevVersions", gNEXT, TRUE, "")
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
END IF
'************** For smart suite, Application Selection Dialog *****
NODESSAPPSEL:
'** In this dialog, the user can select/deselect applications to be
'** installed, and also specify directories for individual apps
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("SUIT", "APPSELCB")
'** AUTOMATE: comment out to take defaults, too trickey
'** to automatically pick anything different.
direction$ = PopupModalDlg (DBSUIT_APPSEL, DBSUIT_APPSEL)
ELSE
notused% = Lot_AutoSuiteAppSelect()
END IF
END IF
IF direction$ = gBACK$ GOTO SMARTSUITE_BASEDIR
'***********AUTOMATION code******************************
IF automation$ = gTRUE$ AND _
GetSymbolValue(SYM_INSTALLKIND$) <> gLANGUAGEINSTALL$ THEN
notused% = Lot_AutoGetProductDestDirSymbol ()
END IF
'** Language Install Code
' install must be in a language subdirectory and the language a
' secondary language for the server
IF IsServerSecondaryLanguage AND SrcDirResetFlag <> TRUE THEN
s$ = GetSymbolValue(SYM_STF_SRCDIR$)
i% = Len(s$) - 1 'Assume last character is \
DO
i% = i% - 1
LOOP UNTIL Mid(s$, i%, 1) = "\"
SetSymbolValue SYM_STF_SRCDIR$, Mid(s$, 1, i%)
'Doesnt work on Novell??
' SetSymbolValue SYM_STF_SRCDIR$, GetSymbolValue(SYM_STF_SRCDIR$) + "..\"
SrcDirResetFlag = TRUE
END IF
ResetCopyList '** Reset the copylist
'** Make the products initialize their own copy list
direction$ = Lot_CallProductFunctions("InitCopyList", direction$, FALSE, gALLPRODUCTS$, "")
IF direction$ = gBACK$ GOTO NODESSAPPSEL
'** Consolidate the lotusapp if needed
IF Lot_CallSharedTool("PreConfigSHARE()") = 2 THEN
direction$ = gBACK$
END IF
IF direction$ = gBACK$ GOTO NODESSAPPSEL
'************************ Change Node Path *************************
CHANGE_NODE_PATH:
IF direction$ = gBACK$ GOTO NODESSAPPSEL
NODESIGLEPDIRNOPT:
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
dirSym$ = Reg_GetDirSymbolList(1)
'** AUTOMATE: comment out calls to "PopupmodalDlg"
'** Result will be a default install of with files coming down.
'** For a non-suite install you can set the destination directory:
'** dirSym$ = Reg_GetDirSymbolList(1)
'** dirSym$ = GetListItem(dirSym$, 1)
'** SetSymbolValue dirSym$, "c:\foo\"
'** Lot_RefreshDestination(dirSym$)
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
' put a box for personal dir
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: '** This dialog asks the user for the lotusapp drive
IF Lot_AreShareToolsSupported()=1 THEN
installini$ = Lot_GetInstallDir()+gINSTALLINI$
'netLotusapp$ = GetAbsPathFromIni(installini$,"Server Configuration of Shared Tools", SYM_LOTUSAPPDIR$,NULLSTROK,INVALIDSTROK)
'SetSymbolValue SYM_NETLOTUSAPP$, netLotusapp$
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$)
Else
yesno& = DoMsgBox(LdString(SID_ERR_DIRSYNTAX) + CHR$(10) + CHR$(10) + " " + netLotusapp$ + _
CHR$(10) + CHR$(10) + LdString(SID_NODENONEXISTLOTUSAPPDIR1),LdString(SID_TKT_STD_TITLE), _
MB_OK + MB_ICONSTOP)
SetListItem "__LASTSTATUS", 1, "Q"
GOTO MAINERROR
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")
'** AUTOMATE: comment out next line and explicitly set SYM_NETLOTUSAPP$
'** SetSymbolValue SYM_NETLOTUSAPP$, "C:\lotusapp"
'** Lot_RefreshDestination SYM_LOTUSAPPDIR$
'** NOTE: This is where we can find the lotusapp on the network.
direction$ = PopupModalDlg (DB_NODELOTUSAPP, DB_NODELOTUSAPP)
End If
End If
End If
END IF
'MZ
'SetSymbolValue SYM_NETLOTUSAPP$, LCASE$(netLotusapp$)
IF direction$ = gBACK$ GOTO NODESIGLEPDIRNOPT
NODENODEOPTIONS:
'** Process the Node Options FOR SUIT
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
IF Lot_IsAnyNodeOptAvailToNode() <> 0 THEN
IF automation$ <> gTRUE$ THEN
notused% = RegisterCallback("CALLBACK", "NODENODEOPTIONSCB")
'** AUTOMATE: comment out next line and get files copied to your machine
direction$ = PopupModalDlg (DB_NODE_NODEOPTIONS, _
DB_NODE_NODEOPTIONS)
ELSE
notused% = Lot_AutoProcessNodeoptions()
END IF
END IF
END IF
IF direction$ = gBACK$ GOTO NODELOTUSAPP
NODEUI: '** Allow the product to put up its UI
direction$ = Lot_CallProductFunctions("UI", direction$, FALSE, g1PRODUCT, "")
IF direction$ = gBACK$ GOTO NODENODEOPTIONS:
'***********AUTOMATION code*************************************************
IF automation$ <> gTRUE$ THEN
NODEPROGMAN: '** Put Progman Group UI
notused% = RegisterCallback("CALLBACK","PROGMANGROUPCB")
'** AUTOMATE: comment out next line set the progman group name yourself
'** Reg_SetProgManagerGroup 1, "MY GROUP"
IF Reg_GetRootFolder() = "" THEN
direction$ = PopupModalDlg (DBM_PROGMANGROUP, DBM_PROGMANGROUP)
ELSE
direction$ = PopupModalDlg (DBM_PROGRAMFOLDER, DBM_PROGRAMFOLDER)
END IF
IF direction$ = gBACK$ GOTO NODEUI
ELSE
notused% = Lot_AutoGetProgramGroupOrFolder()
END IF
UIPOP 1 '** Bring down automation PLEASEWAIT
notused% = Lot_AutoWriteOutDebugFile()
direction$ = PopupModalDlg (DB_BEGINCOPYING,DB_BEGINCOPYING)
IF direction$ = gBACK$ GOTO NODEPROGMAN
'*****AUTOMATIONCODE********************************
'*** Precopy Config processor
'** Configuration before copying
notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
curcursor& = ShowWaitCursor()
'** Copy the files
longnotused& = SetSizeCheckMode(CLNG(FALSE))
notused% = Lot_CallSharedTool ("Lot_RefreshLocalLotusapp()")
notused% = Lot_RefreshLocalComponentDir
RestoreCursor curcursor&
'** Make sure there is enough space before continuing
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&))
'** Language Install Code
' For a server install of a secondary language, content files are in
' subdirectories of where the primary language source files are
IF IsServerSecondaryLanguage THEN RefreshLanguageSourceDirectories
CopyFilesInCopyList
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
notused% = Lot_SaveFeaturesInstaledInInstNodeIni()
notused1$ = Lot_CallProductFunctions("PostCopyConfig", gNEXT, FALSE, gALLPRODUCTS,|"|+grouptitle$+|"|)
UIPOP 1 '** Bring Down DB_PLEASEWAIT
'** Allow the products to do their initialization
grouptitle$ = Reg_GetProgManagerGroupName(1)
'** notused% = ProgmanManageGroup(grouptitle$, ADD_GRP)
If NOT IsNewShell() THEN
CreateProgmanGroup CHR$(34) + grouptitle$ + CHR$(34), "", cmoVital
End If
notused1$ = Lot_CallProductFunctions("AddIcons", gNEXT, FALSE, gALLPRODUCTS, |"|+grouptitle$+|"|)
SetListItem "IDC_BMP", 1, STR$(IDD_PLEASEWAIT_BMP) '** put up the bitmap
notused1$ = PopupModelessDlg(DB_PLEASEWAIT, DB_PLEASEWAIT)
'** Configure the shared files
notused% = Lot_CallSharedTool("ConfigSHARE()")
notused% = Lot_CallSharedTool("AddSHAREIcons()")
'** DONE
UIPOP 1 '** Bring Down DB_PLEASEWAIT
RestoreCursor curcursor&
'** Win32: This should do nothing except bring up the success dlg.
ConfigureAUTOEXEC
notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
'IF automation$ = gTRUE$ THEN
' AutoInstallReboot
'END IF
'**********************************************************************
'******************** Distribution Install ****************************
'**********************************************************************
CASE gDISTRIBUTION$
'** Initialize
inf$ = GetIniKeyString (inifile$, "TOOLKIT", "BYWIREINFFILE")
ReadInfFile inf$
'** Product initialiation
direction$ = Lot_CallProductFunctions("Init", direction$, TRUE, gALLPRODUCTS$, "GetSymbolValue(SYM_BASEDIR$)")
IF direction$ = gBACK$ GOTO WELCOME
'***********AUTOMATION code*************************************************
IF automation$ = gTRUE$ THEN
notused% = Lot_AutoGetProductDestDirSymbol ()
ELSE
'******************* Change Distribution Install *******************
ChangeDistPath:
lSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
SetListItem "IDC_TEXT", 1, STR$(lSize&) + gStrK$
notused% = RegisterCallback("CALLBACK","DISTSIZEINSTALLCB")
'** AUTOMATE: comment out next line and explicitly set directory,
'** if you are not happy with the default
'** dirSym$ = Reg_GetDirSymbolList(1)
'** dirSym$ = GetListItem(dirSym$, 1)
'** SetSymbolValue dirSym$, "c:\foo\"
'** Lot_RefreshDestination(dirSym$)
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 '** Bring down automation PLEASEWAIT
IF automation$ = gTRUE$ THEN
notused% = AutoCheckForSpace()
ELSE
IF CheckForSpace(DB_INSUFDISKSPACE) = FAILURE GOTO ChangeDistPath
END IF
'' These UI Pops have a funny interaction with CheckFOrSpace
'' When Check for SPace putsup a dialog. (DAVE LOOK AT)
'** Ask the user if we should copy files
notused% = Lot_AutoWriteOutDebugFile()
direction$ = PopupModalDlg (DB_BEGINCOPYING,DB_BEGINCOPYING)
IF direction$ = gBACK$ GOTO ChangeDistPath
'*****AUTOMATIONCODE********************************
'*** Precopy Config processor
'** Configuration before copying
notused1$ = Lot_CallProductFunctions("PreCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
'** Copy the distribution files
longnotused& = SetSizeCheckMode(CLNG(0))
IF GetSymbolValue(SYM_LOGFILE$) <> "" THEN
DumpCopyList GetSymbolValue(SYM_LOGFILE$)
END IF
nbytes& = NumberOfBytesPerBillbd()
notused1$ = Lot_CallOneProductFunction(1,"AddTheBillBoards", gNEXT, FALSE, CSTR(nbytes&))
CopyFilesInCopyList
' ** TV:
'notused1$ = Lot_CallProductFunctions("PostCopyConfig", direction$, FALSE, gALLPRODUCTS, "FALSE")
'** Tell the user you are done
rc$ = PopupModalDlg (DB_SUCCESS, DB_SUCCESS)
notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNEXT, FALSE, gALLPRODUCTS,"")
'********************* END OF INSTALL CASES ***************************
'** IF you get here then it is an error
CASE ELSE
ERROR STFQUIT
END SELECT
IF automation$ = gTRUE$ THEN
'** TV:Clean up dialogs before quitting
UIPopAll
WriteToFile gLogFile$, LdString(SID_AUTOINST_COMPLETE)
WriteToFile gLogFile$, LdString(SID_COMMLOGFILE_END)
END
END IF
'*************************************************************************
'********************** ERROR HANDLERS ***********************************
'*************************************************************************
'** If major error, this will exit the program
MAINERROR:
'** TV:Clean up dialogs before quitting
UIPopAll
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ THEN
WriteToFile gLogFile$, LdString(SID_AUTOINST_ERR)
WriteToFile gLogFile$, LdString(SID_COMMLOGFILE_END)
END IF
END
'** DND: Should we do anything else here?
STFERR_:
RESUME NEXT
STFTOGGLEERR:
RESUME NEXT
END SUB
'*************************************************************************
'** FUNCTION DoDatalens(direction$) AS STRING
'** Purpose: Take care of all the datalens stuff
'**
'**
'** Author: DND and MMETH
'** Arguments: SYM_NETWORK$
'**
'** Returns: gBACK$ or ""
'**
'*************************************************************************
FUNCTION DoDatalens(BYVAL direction$) AS STRING
DIM notused%, rc$, chptname$
If direction$ = gBACK Then GOTO PARADOXUI
%rem
'This is left over from CARMEN
IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
'** For COMPLETE installs, remove some datalens stuff from
'** the copylist.
IF GetSymbolValue(SYM_SIZEOFINSTALL$) = gCOMPLETE$ THEN
If (CINT(FIsKeywordinCopyList ("SHRPARADOXPRG")) <> FALSE) Then
chptname$ = Lot_GetChapterFromKeyword("SHRPARADOXPRG")
Lot_ToggleChapterFilesInCopyList chptname$
end if
If (CINT(FIsKeywordinCopyList ("SHRSQLPRG")) <> FALSE) Then
chptname$ = Lot_GetChapterFromKeyword("SHRSQLPRG")
Lot_ToggleChapterFilesInCopyList chptname$
end if
If (CINT(FIsKeywordinCopyList ("SHRINFORMIXPRG")) <> FALSE) Then
chptname$ = Lot_GetChapterFromKeyword("SHRINFORMIXPRG")
Lot_ToggleChapterFilesInCopyList chptname$
end if
If (CINT(FIsKeywordinCopyList ("SHRIBMPRG")) <> FALSE ) Then
chptname$ = Lot_GetChapterFromKeyword("SHRIBMPRG")
Lot_ToggleChapterFilesInCopyList chptname$
end if
If (CINT(FIsKeywordinCopyList ("SHRIBMPRG")) <> FALSE ) Then
chptname$ = Lot_GetChapterFromKeyword("SHRIBMPRG")
Lot_ToggleChapterFilesInCopyList chptname$
end if
END IF
END IF
%endrem
'************** Standard SQL Server Dialog *************************
SQLUI:
IF Lot_CallSharedTool("Lot_IsSQLSelected()") <> FALSE THEN
'** INSYMBOLS: ????
notused% = RegisterCallback("SHARE", "SQLSERVERNAMECB")
'** AUTOMATE: comment out next line and explicitly set SYM_SQLSERVERNAME$
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
'************** Standard Paradox Dialog ***************************
PARADOXUI:
IF Lot_CallSharedTool("Lot_IsParadoxSelected()") <> FALSE THEN
'** INSYMBOLS: ????
notused% = RegisterCallback("SHARE", "PARADOXNETWORKINFOCB")
'** AUTOMATE: comment out next line and explicitly set SYM_PARADOXNETWORKINFO$
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 )
'** OUTSYMBOLS: ????
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
'** Purpose: Take care of all the datalens stuff
'**
'**
'** Author: MMETH
'** Arguments: NONE
'**
'** Returns: number of bytes per billboard
'**
'*************************************************************************
FUNCTION NumberOfBytesPerBillbd() AS LONG
DIM n%, i% ,j%, costs&, nBillboards%, nProducts%, UNCSym$
''**** COMPUTE THE number of bytes for each billboard to stay up
costs& = LcbGetChapterCost("", "", SYM_COST$, "")
n% = GetListLength(SYM_COST$)
costs& = 0
for i% = 1 to n%
costs& = costs& + CLNG(GetListItem(SYM_COST$, i%))
next
j%=GetListLength("UNCVOLLIST")
FOR i% = 1 to j%
UNCSym$ = GetListItem("UNCVOLLIST",i%)
costs& = costs& + CLNG(GetListItem(UNCSym$, UNC_COST))
NEXT
nProducts% = Reg_GetNumberOfProducts()
nBillboards% = Reg_GetBillboardNumber(1)
If nBillboards% = 0 Then
NumberOfBytesPerBillbd = 0
Else
NumberOfBytesPerBillbd = costs&\nBillboards%
End If
END FUNCTION
'*************************************************************************
SUB SetTheBaseSymbol()
'** IN SYMBOLS ::: SYM_NETWORK$
'** OUT SYMBOLS::: SYM_BASEDIR$, SYM_PARENTDIR$
'*************************************************************************
DIM network$, defBase$, lcbSpace&, defDir$, i%, nProducts%, spaceneeded&
DIM autobase$
DIM keyvalue$, gbuf$, nsize&, ret&, bRegistryPath%
bRegistryPath% = FALSE
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSERVER$ THEN
defBase$ = "lotus\"
ELSEIF network$ = gDISTRIBUTION$ THEN
defBase$ = "lotus\"
ELSE
IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
defBase$ = ""
ELSE
defBase$ = "lotus\"
END IF
END IF
'** Set the ALTERNATE BASE DIRECTORY based on minimum space required
lcbSpace& = 0
nProducts% = Reg_GetNumberOfProducts()
FOR i% = 1 to nProducts%
lcbSpace& = lcbSpace& + Reg_GetProdMinSize(i%)
NEXT
defDir$ = Lot_GetAllHardDrive(lcbSpace&, defBase$)
IF defDir$ = "" THEN
defDir$ = LCASE$(GetListItem(SYM_LOCALHARDDRIVES$, 1)) + ":\" + defBase$
END IF
SetSymbolValue SYM_BASE16DIR$, defDir$
network$ = GetSymbolValue(SYM_NETWORK$)
IF network$ = gSTANDARD$ OR network$ = gNODE$ THEN
'** Find out if there's already installed products by querying registry
keyvalue$ = "LocalPath"
ret& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE, gREGLOTUSCOMP, keyvalue$, 0, gbuf$, nsize&)
END IF
nsize& = 0
IF gbuf$ <> "" AND IsDriveMapped(gbuf$) <> FALSE THEN
nsize& = INSTR(gbuf$,"compnent")
IF nsize& <> 0 THEN
defdir$ = LEFT$(gbuf, nsize&-1)
bRegistryPath% = TRUE
END IF
END IF
'*** AUTOMATION****************************************
IF bRegistryPath% <> TRUE THEN
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ AND _
GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
autobase$ = Lot_AutoGetBaseDirSymbol()
IF autobase$ <> "" THEN
defDir$ = autobase$
ELSE
'ErrorMsg "Base Directory entry Invalid"
ErrorMsg SID_ERR_SETSYMBOLVALUE, LdString(SID_ERR_AUTO_BASEDIR) + "SUIT"
ERROR STFQUIT
END IF
END IF
END IF
SetSymbolValue SYM_BASEDIR$, defDir$
SetSymbolValue SYM_PARENTDIR$, defDir$
'** Set the PARENT DIRECTORY based on minimum space required
'** if not already gotten from registry
IF bRegistryPath% = FALSE THEN
lcbSpace& = 0
defBase$ = "lotus\"
FOR i% = 1 to nProducts%
lcbSpace& = lcbSpace& + Reg_GetProdMinSize(i%)
NEXT
defDir$ = Lot_GetAllHardDrive(lcbSpace&, defBase$)
IF defDir$ = "" THEN
defDir$ = LCASE$(GetListItem(SYM_LOCALHARDDRIVES$, 1)) + ":\" + defBase$
END IF
SetSymbolValue SYM_PARENTDIR$, defDir$
END IF
'*** AUTOMATION****************************************
IF bRegistryPath% <> TRUE THEN
IF GetSymbolValue(SYM_AUTOMATIONINST$) = gTRUE$ AND _
GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
AutoSetParentDir
END IF
END IF
END SUB
SUB GetNamesFromRegistry(buf1$, buf2$, RegLoc$)
DIM ReturnVal&
buf1$=CreateBuffer(260)
ReturnVal&=260
ReturnVal& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
RegLoc$, gREGUSERNAME, 0, buf1$, ReturnVal&)
buf2$=CreateBuffer(260)
ReturnVal&=260
ReturnVal& = Lot_GetRegKeyValueEx(HKEY_LOCAL_MACHINE,_
RegLoc$, gREGORGNAME, 0, buf2$, ReturnVal&)
buf1$ = LTrim$(NullTrim(buf1$))
buf1$ = Trim$(buf1$)
buf2$ = LTrim$(NullTrim(buf2$))
buf2$ = Trim$(buf2$)
END SUB
SUB InitInstall
DIM hUser&, notused%
DIM buf1 AS STRING : buf1$ = CreateBuffer(80)
DIM buf2 AS STRING : buf2$ = CreateBuffer(80)
DIM count%, network$,ReturnVal&
'** Initialize the Setup API
'-- SetUpAPI moved to toolkit
'****************************************
'******* INITIALIZE ALL GLOBAL SYMBOLS **
'****************************************
'** Default is Single, SmartSuite will override if it is present
'** Even for single product installs there may be more that one
SetSymbolValue SYM_SINGLESMARTSUITE, gSINGLE$
'** Set up a symbol for where the copylist log will get written
IF ENVIRON$(gLOTUS_COPYLIST$) <> "" THEN
SetSymbolValue SYM_LOGFILE$, GetWindowsDir() + gCOPYLISTLOG$
END IF
'** Initialize the Win and Winsys symbols
Lot_InitializeWinWinsysSym
'** Initialize the expected len of subdirs in *.inf paths
SetSymbolValue SYM_DOSMAXPATHDIFF$,"20"
'** Initialize the gEXTRA list to allow for fudge
'** on the windows drive. A deseprate application can add to it.
Lot_InitializeEXTRA
''We show bitmaps in 3 ways, with transparent backrgound (default), streched or centred
SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
'** Get The default Name & Company
hUser& = GetModuleHandle(gUSER$)
notused% = LoadString (hUser&, USERNAME, buf1$, 80)
notused% = LoadString (hUser&, COMPANYNAME, buf2$, 80)
buf1$ = LTrim$(NullTrim(buf1$))
buf1$ = Trim$(buf1$)
buf2$ = LTrim$(NullTrim(buf2$))
buf2$ = Trim$(buf2$)
IF buf1$="" THEN
GetNamesFromRegistry buf1$, buf2$, gREGWINNAME
IF buf1$="" THEN
GetNamesFromRegistry buf1$, buf2$, gREGWINNTNAME
IF buf1$="" THEN
buf1$=CreateBuffer(260)
ReturnVal&=260
notused%=GetUserName(buf1$,ReturnVal&)
buf1$=NullTrim(buf1$)
buf2$=buf1$
END IF
END IF
END IF
SetSymbolValue SYM_NAME$, RTrim$(NullTrim(buf1$))
SetSymbolValue SYM_COMPANY$, RTrim$(NullTrim(buf2$))
'***********AUTOMATION code*************************************************
IF GetSymbolValue(SYM_AUTOMATIONINST$) = "1" THEN
SetSymbolValue SYM_AUTOMATIONINST$, gTRUE$
'*** default must be lotinst.log for automation, set in cmdline processing
'*** gLogFile$ = GetWindowsDir() + "lotinst.log"
ELSE
SetSymbolValue SYM_AUTOMATIONINST$, gFALSE$
END IF
IF GetSymbolValue(SYM_LOGGING$) = "1" THEN
IF GetSymbolValue(SYM_LOGGINGPATH$) <> "" THEN
gLogFile$ = GetSymbolValue(SYM_LOGGINGPATH$)
END IF
END IF
'** Check to see if command line asks for Node Install
'** TV: This should be independent of automation
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
'****************************************
'******* MISC TRIVIA (Initializing) *****
'****************************************
'** Even though a Window title is not shown, we need
'** to set the title, so it shows up in the task list.
SetTitle LdString(SID_TKT_STD_TITLE)
'** The default location of the copy gauge is centered at screen bottom
SetCopyGaugePosition -1,32000
END SUB
'*************************************************************************
'** SUB ConfigureAUTOEXEC
'**
'** Purpose: Configure AUTOEXEC.BAT after copying files.
'**
'** Author: CHRISTOPHER MOY
'** Arguments: None
'** Returns: NONE
'*************************************************************************
SUB ConfigureAUTOEXEC
DIM n%, i%, notused%, notused1$, rc$
DIM hwnd%, lr%
'** DETERMINE IF AUTOEXEC.BAT NEEDS MODIFICATIONS
SetSymbolValue SYM_NEEDSHARE$, gFALSE$
SetSymbolValue SYM_NEEDNOTES$, gFALSE$
'**** Win32 does not require autoexec modifictaion *********
%rem
n% = Reg_GetNumberOfProducts()
FOR i% = 1 to n%
IF Reg_GetSHAREEXESupport(i%) <> FALSE THEN
'** IF IsShareInAUTOEXEC() = FALSE THEN '** if share is not in autoexec
'** SetSymbolValue SYM_NEEDSHARE$, gTRUE$ '** use symbols?
'** EXIT FOR
'** ELSE
IF IsShareInstalled() = FALSE THEN '**if share is in autoexec
SetSymbolValue SYM_NEEDSHARE$, gTRUE$ '**but not running.
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$ '** use symbols?
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)
'** Get value in SYM_AUTOEXEC_CHOICE$ from button
'** pressed in DB_AUTOEXEC dialog.
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()
'** Tell the user we are all done
rc$ = PopupModalDlg(DB_SUCCESS, DB_SUCCESS)
END IF
ELSE
'** Tell the user we are all done
rc$ = PopupModalDlg(DB_SUCCESS, DB_SUCCESS)
END IF
%endrem
'**** Win32 does not require autoexec modifictaion *********
'** Tell the user we are all done
IF ExitExecRestart=FALSE THEN
rc$ = PopupModalDlg(DB_SUCCESS_REBOOT, DB_SUCCESS_REBOOT)
IF rc$="OK" THEN
hwnd%=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
lr%=SendMessage(hwnd%, WM_COMMAND, UM_REBOOTFLAG, 0)
END IF
ELSE
rc$ = PopupModalDlg(DB_SUCCESS, DB_SUCCESS)
END IF
END SUB