home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Bonus / lotus123rel9 / install.dsk / CALLBACK.LSS < prev    next >
Encoding:
Text File  |  1997-10-02  |  116.1 KB  |  3,501 lines

  1. ''*********************************************************************
  2. ''
  3. ''   Module Name:   cominst\toolkit\callback.lss
  4. ''
  5. ''   Module Code:   COMINST
  6. ''
  7. ''   Author:        Dave Dupre
  8. ''
  9. ''   Creation Date: Wednesday January 5, 1994
  10. ''
  11. ''   Copyright Lotus Development Corporation, (c) 1994
  12. ''
  13. ''
  14. ''   Description:
  15. ''      
  16. ''
  17. ''   Additional authors: MZ
  18. ''
  19. ''   Change History:
  20. ''   $Log:   //SS_DEV/INSTLOG/CI/cominst/toolkit/callback.lss  $
  21. '' 
  22. ''    Rev 1.197   02 Oct 1997 14:00:16   jdonohue
  23. '' Ref. SPR:  PMYS3MEMXS
  24. '' Removed commented Japanese characters causing script interpreter to choke
  25. '' Ref. SPR:  PMYS3M3H8A
  26. '' Intercept symbol table error if IME editor screws up dialog with single byte
  27. '' font, surface a warning dialog
  28. '' 
  29. ''    Rev 1.196   02 Jul 1997 11:14:50   jdonohue
  30. '' CAndo (Japan) changes:
  31. '' Window handle has LONG type
  32. '' 
  33. ''    Rev 1.195   26 Jun 1997 15:45:54   jdonohue
  34. '' Ref: RWIS36HHHN
  35. '' Allow up to 255 characters in any user entered path
  36. '' 
  37. ''    Rev 1.194   19 Jun 1996 07:41:58   jdonohue
  38. '' Added looking for readnet.wri filename w/o path since other two tests fail for
  39. '' unknown reasons in LAUNCHNAGCB
  40. '' 
  41. ''    Rev 1.193   17 Jun 1996 11:11:34   jdonohue
  42. '' Ref SPR:     KYEE36MSLU    
  43. '' Removed call to MakePath in LAUNCHNAGCB callback, since MakePath doesn't like
  44. '' embedded dots in path (LOTUSTMP.000)
  45. '' 
  46. ''    Rev 1.192   14 Jun 1996 17:53:16   dfristro
  47. '' Simplified error message for excessive path length (SID_ERR_PATHLEN) to
  48. '' fix SPR RWIS36HHHN.
  49. '' 
  50. ''    Rev 1.189   10 Jun 1996 15:06:52   mhishinu
  51. '' Replaced six LEFT calls with LEFTBP to fix DBCS bug.
  52. '' 
  53. ''    Rev 1.188   22 May 1996 15:24:36   jdonohue
  54. '' Replaced LEFTBP calls with LEFT
  55. '' 
  56. ''    Rev 1.187   16 May 1996 12:53:04   jdonohue
  57. '' Changed notepad.exe and readme.txt to write.exe and readme.wri, and changed
  58. '' corresponding string symbolic names to be consistent
  59. '' 
  60. ''    Rev 1.186   15 May 1996 13:34:32   glutz
  61. '' SrvNodeOptionsCB and NodeNodeOptionsCB were not veryfying the number
  62. '' of member check boxes accociated with each group box.
  63. '' 
  64. ''    Rev 1.185   07 May 1996 11:16:32   glutz
  65. '' Changed dirChanged% to static in nodenodeoptionscb.
  66. '' 
  67. ''    Rev 1.184   07 May 1996 10:18:36   glutz
  68. '' Fixed up logic for displaying personal dir and node options dialog 
  69. '' SPR#CDWT34NSKG
  70. '' 
  71. ''    Rev 1.183   12 Apr 1996 15:43:58   glutz
  72. '' Fixed problem in node options callbacks with member boxes being checked.
  73. '' 
  74. ''    Rev 1.182   09 Apr 1996 15:42:24   glutz
  75. '' Srvnodeoptions group boxes are not selected if no members are selected.
  76. '' 
  77. ''    Rev 1.181   09 Apr 1996 14:52:00   glutz
  78. '' in nodenodeoptions and srvnodeoptions toggling off all member boxes
  79. '' will turn off group box.
  80. '' 
  81. ''    Rev 1.180   28 Mar 1996 08:36:48   jdonohue
  82. '' Install fonts to  "win\fonts" on server
  83. '' 
  84. ''    Rev 1.178   27 Mar 1996 13:16:14   jdonohue
  85. '' Changed LOTUSFONTSDIR handling to mimic WIN/WINSYS fonts go to win directory
  86. '' on server
  87. '' 
  88. ''    Rev 1.177   14 Mar 1996 14:00:36   jdonohue
  89. '' Don't put up any node options if product not selected in NODENODEOPTIONSCB
  90. '' 
  91. ''    Rev 1.176   13 Mar 1996 13:42:26   jdonohue
  92. '' Changed GetListItem argument for "IDC_TREE" to 1 instead of Inst%, since there
  93. '' is only one list item ever
  94. '' 
  95. ''    Rev 1.175   11 Mar 1996 09:06:02   jdonohue
  96. '' Added sticky settings to SRVNODEOPTIONSCB and NODENODEOPTIONSCB
  97. '' 
  98. ''    Rev 1.174   06 Mar 1996 12:29:22   jdonohue
  99. '' Ref SPR: LSCR32FVVK  
  100. '' Caused edit control for new program group to be highlighted by tabbing out of
  101. '' and back into control
  102. '' 
  103. ''    Rev 1.173   04 Mar 1996 08:31:50   jdonohue
  104. '' Remove 16 bit shared component support -- pass 1 : eliminate LOTUSAPP
  105. '' 
  106. ''    Rev 1.172   29 Feb 1996 15:37:14   glutz
  107. '' Callbacks that have combo/edit pairs now use ComboSelChanged and 
  108. '' GetPathFromComboEdit for path handling.
  109. '' 
  110. ''    Rev 1.171   23 Jan 1996 16:02:20   cmoy
  111. '' Merged FE changes
  112. '' 
  113. ''    Rev 1.170   17 Jan 1996 14:22:54   glutz
  114. '' modified NODENODEOPTIONSCB for LCBs.
  115. '' 
  116. ''    Rev 1.169   17 Jan 1996 11:47:12   jdonohue
  117. '' Backed out shared windows handling -- copy to normal server location as well
  118. '' 
  119. ''    Rev 1.168   15 Jan 1996 15:05:34   jdonohue
  120. '' Added function Lot_SharedWindowsDlg for Shared Windows Server installs
  121. '' 
  122. ''    Rev 1.167   12 Jan 1996 14:10:56   jdonohue
  123. '' Added special handling of SYM_LOTUSFONTSDIR$ and SYM_WINSYSDIR$) in dialogs
  124. '' 
  125. ''    Rev 1.166   12 Jan 1996 10:02:08   jdonohue
  126. '' Added flag for server install to shared windows location
  127. '' 
  128. ''    Rev 1.165   22 Dec 1995 10:13:04   jdonohue
  129. '' Removed all references to SYM_PARENTDIR$ -- is now SYM_BASEDIR$ for all
  130. '' 
  131. ''    Rev 1.164   Oct 24 1995 16:54:26   cmoy
  132. '' removed eof char
  133. '' 
  134. ''    Rev 1.163   22 Oct 1995 17:40:24   cmoy
  135. '' HISHI: Changed GetGroupName and PROGMANGROUPCB
  136. '' They call GetDBCSSymbolValue and GetDBCSListItem.
  137. '' GetGroupName doesn't call FDBCSCharLen.
  138. '' 
  139. ''    Rev 1.162   28 Sep 1995 10:26:40   amontalv
  140. '' Changed how the default folder is gotten to allow clients to change it when they
  141. '' change default program group name.  This broke when I changed the UI for folders.
  142. '' 
  143. ''    Rev 1.161   27 Sep 1995 16:40:52   amontalv
  144. '' Don't allow entries of illegal characters or blank fields for program folders.
  145. '' 
  146. ''    Rev 1.160   26 Sep 1995 13:01:48   amontalv
  147. '' Having problem redisplaying item that was previously clicked on after clicking on
  148. '' tab, so reset gPrevInst% when you click on tab.
  149. '' 
  150. ''    Rev 1.159   26 Sep 1995 12:40:00   amontalv
  151. '' Changed check for invalid characters.
  152. '' 
  153. ''    Rev 1.158   25 Sep 1995 17:45:42   amontalv
  154. '' Added code to check for valid folder item.  If invalid do not allow user to
  155. '' change selection or hit okay.
  156. '' 
  157. ''    Rev 1.157   Sep 25 1995 10:58:40   cmoy
  158. '' Fixed declaration errors
  159. '' 
  160. ''    Rev 1.156   22 Sep 1995 16:44:24   tveerapp
  161. '' Fixed spr# LSCR2VZVGB. GETLOTUSAPPDIRCB changes.
  162. '' 
  163. ''    Rev 1.155   22 Sep 1995 15:07:12   jdonohue
  164. '' Remove SYM_LOTUSUSERDIR$ processing
  165. '' 
  166. ''    Rev 1.154   22 Sep 1995 12:17:10   amontalv
  167. '' Check for focus before making change to Program Folder entry in tree from edit line.
  168. '' 
  169. ''    Rev 1.153   21 Sep 1995 15:40:10   amontalv
  170. '' Fixed notebook focus issues.  Had to call text1 and bitmap window directly.
  171. '' Also changed check for updating these.
  172. '' 
  173. ''    Rev 1.152   21 Sep 1995 09:33:56   jdonohue
  174. '' Disable browse buttons 2 and 3 for a language install
  175. '' 
  176. ''    Rev 1.151   20 Sep 1995 13:38:08   glutz
  177. '' CUSTOM2CB disables the path change button if the selected component
  178. '' belongs in the component dir.
  179. '' 
  180. ''    Rev 1.150   19 Sep 1995 15:30:00   amontalv
  181. '' After creating new folder, put focus in edit box.
  182. '' 
  183. ''    Rev 1.149   Sep 14 1995 18:30:06   cmoy
  184. '' fixed focus problem (Mak Inada)
  185. '' 
  186. ''    Rev 1.148   14 Sep 1995 12:26:20   cmoy
  187. '' fixed folder to foldername
  188. '' 
  189. ''    Rev 1.147   13 Sep 1995 16:31:34   amontalv
  190. '' Resourced New folder name.
  191. '' 
  192. ''    Rev 1.146   13 Sep 1995 16:26:36   amontalv
  193. '' Changed processing for program folder input dialog.
  194. '' 
  195. ''    Rev 1.145   07 Sep 1995 15:21:50   amontalv
  196. '' Added check to make sure folders names are not blank.
  197. '' 
  198. ''    Rev 1.144   05 Sep 1995 16:39:26   amontalv
  199. '' Added logic to get readnet.txt out of temp directory if it exists.
  200. '' 
  201. ''    Rev 1.143   31 Aug 1995 15:09:22   callanan
  202. '' Displaying tip in custom dlg using the setsymbol, to avoid losing bitmap.  Also added param to SetCustomInfo
  203. '' 
  204. ''    Rev 1.142   29 Aug 1995 08:29:10   jdonohue
  205. '' Changed symbol of USERDIR to LOTUSUSERDIR
  206. '' 
  207. ''    Rev 1.141   25 Aug 1995 14:22:56   amontalv
  208. '' Always calculate size when item gets clicked.
  209. '' 
  210. ''    Rev 1.140   24 Aug 1995 07:55:18   jdonohue
  211. '' Added SYM_USERDIR and set it
  212. '' 
  213. ''    Rev 1.139   23 Aug 1995 15:33:14   cmoy
  214. '' Moved MAX_NO_DRIVECOMBOS to toolkit.lss
  215. '' 
  216. ''    Rev 1.138   21 Aug 1995 14:24:48   tveerapp
  217. '' Made MAX_NO_DRIVECOMBOS a POUBLIC CONST.
  218. '' 
  219. ''    Rev 1.137   18 Aug 1995 17:27:44   tveerapp
  220. '' Fixed ResetWinWinSys to fix spr#JHAE2V7UNL.(This involved backing out
  221. '' Jdonahue's change on July29.)
  222. '' 
  223. ''    Rev 1.136   18 Aug 1995 16:38:24   glutz
  224. '' Took out a print statement.
  225. '' 
  226. ''    Rev 1.135   18 Aug 1995 16:35:54   glutz
  227. '' Had to make sure SetCustomInfo does not enable IDC_B1 if it is not
  228. '' visible.
  229. '' 
  230. ''    Rev 1.134   18 Aug 1995 11:13:34   callanan
  231. '' If item in custom dlg has no bmp set ID_BMP1 to null string, this will cause
  232. '' the bitmap symbol handler to clear out the old bmp.
  233. '' 
  234. ''    Rev 1.133   17 Aug 1995 14:16:54   callanan
  235. '' Changed the default way to handle bitmaps in dialogs
  236. '' 
  237. ''    Rev 1.132   14 Aug 1995 10:35:00   callanan
  238. '' Changed CUSTOM2CB to only display bitmap once when select
  239. '' 
  240. ''    Rev 1.131   11 Aug 1995 10:44:16   jdonohue
  241. '' Disable path change for server language install
  242. '' 
  243. ''    Rev 1.130   08 Aug 1995 17:03:06   tveerapp
  244. '' Added the browse functionality to GETLOTUSAPPDIRCB.
  245. '' 
  246. ''    Rev 1.129   08 Aug 1995 16:18:54   glutz
  247. '' Had to make sure in sizeofinstallcb the edit boxes only get validated
  248. '' if they exist.
  249. '' 
  250. ''    Rev 1.128   07 Aug 1995 08:28:24   mmeth
  251. '' Part 2 of fix for  SPR# JHOH2M4HZL:
  252. '' In WELCOMECB changed the length of the truncations from 30 to 80.
  253. '' 
  254. ''    Rev 1.127   05 Aug 1995 15:51:36   tveerapp
  255. '' Removed a space that was put in when the second path was being validated
  256. '' in SIZEOFINSTALLCB.
  257. '' 
  258. ''    Rev 1.126   05 Aug 1995 15:05:12   tveerapp
  259. '' Fixed an spr. Changed SIZEOFINSTALLCB. For server components dir use
  260. '' IDC_EDIT3 and IDC_COMBO3 to be consistent with the dialog templates.
  261. '' 
  262. ''    Rev 1.125   04 Aug 1995 16:39:30   glutz
  263. '' ParentDirCB and SizeofInstallCB always start out with dirchanged true.
  264. '' 
  265. ''    Rev 1.124   04 Aug 1995 11:15:06   jdonohue
  266. '' Don't allow user path changes for a language install
  267. '' 
  268. ''    Rev 1.123   01 Aug 1995 16:01:30   glutz
  269. '' Commented out 4 lines in SetCustomInfo so paths would show for tabs in
  270. '' server install.
  271. '' 
  272. ''    Rev 1.122   30 Jul 1995 07:51:20   glutz
  273. '' Added unc paths to Lot_SetSpaceDirTip.
  274. '' 
  275. ''    Rev 1.121   29 Jul 1995 17:44:12   jdonohue
  276. '' Set WINDIR and WINSYSDIR back to defaults if change from server to other
  277. '' 
  278. ''    Rev 1.120   29 Jul 1995 15:39:08   jdonohue
  279. '' PARENTDIRCB set dirChanged to true always for server since we fiddle with 
  280. '' drives list
  281. '' 
  282. ''    Rev 1.119   28 Jul 1995 16:47:56   pdonahue
  283. '' modified sizeofinstall in case of server to use IDC_Edit3 for lotusapp.
  284. '' 
  285. ''    Rev 1.118   27 Jul 1995 13:00:04   amontalv
  286. '' Changed the program manager group name to not do certain check if we 
  287. '' are in Win95.
  288. '' 
  289. ''    Rev 1.117   26 Jul 1995 10:36:52   pdonahue
  290. '' added error message for invalid folder name in case of win95 install.
  291. '' 
  292. ''    Rev 1.116   25 Jul 1995 12:43:10   jdonohue
  293. '' Grey out change path when on tab and item not selected
  294. '' 
  295. ''    Rev 1.115   20 Jul 1995 15:52:00   glutz
  296. '' SetCustomInfo now calls GetFreeSpaceForDrive every time a tab changes.
  297. '' 
  298. ''    Rev 1.114   20 Jul 1995 10:55:24   glutz
  299. '' GetFreeSpaceForDrive now returns K bytes so I made changes accordingly.
  300. '' 
  301. ''    Rev 1.113   17 Jul 1995 16:39:44   glutz
  302. '' Callback functions that have browse buttons now call ValidateBrowse if 
  303. '' IDC_BROWSE is the callback message.
  304. '' 
  305. ''    Rev 1.112   17 Jul 1995 13:17:30   amontalv
  306. '' Added check to see if current folder existed after the removal of a folder.
  307. '' If the folder exists then the Remove Folder button must be disabled, which it
  308. '' is, but the focus must be moved off this disabled button.  This part was
  309. '' missing and I added it here.
  310. '' 
  311. ''    Rev 1.111   14 Jul 1995 14:50:08   glutz
  312. '' SetCustomInfo had wrong return val type for call to LcbGetChapterCost.
  313. '' 
  314. ''    Rev 1.110   11 Jul 1995 12:04:56   glutz
  315. '' In CUSTOM1CB if it's a server install IDC_TEXT4 and IDC_B1 are hidden
  316. '' and IDC_TEXT8 is made visible.
  317. '' 
  318. ''    Rev 1.109   11 Jul 1995 08:53:08   glutz
  319. '' Disable IDC_B1 in CUSTOM1CB when the control is hidden.
  320. '' 
  321. ''    Rev 1.108   10 Jul 1995 15:02:16   glutz
  322. '' Set IDC_TEXT2 after browse in DISTSIZEINSTALLCB.
  323. '' 
  324. ''    Rev 1.107   05 Jul 1995 14:24:52   amontalv
  325. '' Added test to check if path already exists before accepting it on New Folder.
  326. '' 
  327. ''    Rev 1.106   30 Jun 1995 22:11:14   amontalv
  328. '' Added code to display Current Folder in Select Folder dialog.  And ended up adding
  329. '' a hack to allow me to display this when the dialog first comes up.
  330. '' 
  331. ''    Rev 1.105   30 Jun 1995 10:49:20   glutz
  332. '' Straightend out some problems with second path in sizeofinstallcb.
  333. '' 
  334. ''    Rev 1.104   29 Jun 1995 11:47:28   jdonohue
  335. '' Took out print statement
  336. '' 
  337. ''    Rev 1.103   28 Jun 1995 19:57:30   amontalv
  338. '' Changed the possible length of program group from 30 to 254 characters.
  339. '' 
  340. ''    Rev 1.102   28 Jun 1995 19:49:22   amontalv
  341. '' Added check to make sure you couldn't create a folder
  342. '' with just spaces.
  343. '' 
  344. ''    Rev 1.101   26 Jun 1995 19:06:28   amontalv
  345. '' Added check for length of path for folders.
  346. '' 
  347. ''    Rev 1.100   22 Jun 1995 16:44:12   glutz
  348. '' SIZEOFINSTALLCB has to differentiate between dirChanged and dischanged2.
  349. '' 
  350. ''    Rev 1.99   22 Jun 1995 15:30:08   tveerapp
  351. '' Changed WELCOMECB. case IDC_BACK (which is called when the esc. key is hit).
  352. '' Allow the user to quit from the Welcome dialog when the esc. key is hit.
  353. '' 
  354. ''    Rev 1.98   22 Jun 1995 10:21:56   pdonahue
  355. '' fixed merge error
  356. '' 
  357. ''    Rev 1.97   22 Jun 1995 09:31:06   pdonahue
  358. '' fixed bug in additional directory code,
  359. '' 
  360. ''    Rev 1.96   21 Jun 1995 14:28:46   glutz
  361. '' Simplified UNC and browse validations in callbacks
  362. '' 
  363. ''    Rev 1.95   19 Jun 1995 10:25:36   amontalv
  364. '' Put in code to add function to New Folder button and Remove Folder button.  Also
  365. '' fixed some of the selection problems in the tree list.
  366. '' 
  367. ''    Rev 1.94   16 Jun 1995 13:53:36   glutz
  368. '' Don't set drvIndex if SelectDriveCombo returns false
  369. '' 
  370. ''    Rev 1.93   16 Jun 1995 11:50:02   amontalv
  371. '' Made program groups list box get entries form Common Program Groups instead of
  372. '' Current user program groups.  Also made it so that it would be easier to display
  373. '' both if necessary.
  374. '' 
  375. ''    Rev 1.92   14 Jun 1995 22:12:10   amontalv
  376. '' Gave program folder a new look.
  377. '' 
  378. ''    Rev 1.91   14 Jun 1995 16:31:38   amontalv
  379. '' Fixed problem with NT Program Groups.  Look through the registry for
  380. '' program groups and display them for the user.  Most of the code
  381. '' is in C in lotusui.c.  Put calls to registry functions in regwrap.
  382. '' 
  383. ''    Rev 1.90   12 Jun 1995 17:40:36   cmoy
  384. '' fixed bug in changing paths
  385. '' 
  386. ''    Rev 1.89   12 Jun 1995 14:36:54   amontalv
  387. '' SPR KHAN2SSMDL - Resourced name of program group and added to end.
  388. '' 
  389. ''    Rev 1.88   09 Jun 1995 16:41:04   glutz
  390. '' Fixed bug with browse not chaging drive letter
  391. '' 
  392. ''    Rev 1.87   07 Jun 1995 20:59:26   amontalv
  393. '' Moved setting of Tree item around so that it would be set correctly
  394. '' 
  395. ''    Rev 1.86   07 Jun 1995 17:51:28   amontalv
  396. '' Don't set the selected folder again at OK of callback.
  397. '' 
  398. ''    Rev 1.85   07 Jun 1995 16:30:34   amontalv
  399. '' Changed the Win95 start folder so that it initializes
  400. '' earlier in the program.  This should make automation
  401. '' easier to implement for it.  There are still a couple of
  402. '' bugs that I need to work out, but I feel that I should
  403. '' check what I have now.
  404. '' 
  405. ''    Rev 1.84   02 Jun 1995 14:51:06   tveerapp
  406. '' Changed IDC_HELP to IDC_CITHELP.
  407. '' 
  408. ''    Rev 1.83   01 Jun 1995 11:10:44   amontalv
  409. '' Added API function CreateLink to create shortcuts.  Also added functions
  410. '' to save and get the link path to support the CreateLink.  I also changed
  411. '' the startup program folder code to use the default dialog proc and changed
  412. '' the default dialog proc to process directory trees.
  413. '' 
  414. ''    Rev 1.82   30 May 1995 15:03:40   amontalv
  415. '' Needed to lower case drive letter before looking for cost.
  416. '' 
  417. ''    Rev 1.81   25 May 1995 20:54:56   amontalv
  418. '' Added Win95 Program folder dialog and supporting code.  Still need to write code
  419. '' that creates the link files.
  420. '' 
  421. ''    Rev 1.80   22 May 1995 19:19:06   mzgripce
  422. '' delete print messages 
  423. '' 
  424. ''    Rev 1.79   21 May 1995 17:21:28   mzgripce
  425. '' display the DB_SIZEOFINSTALL# depending on components support and
  426. '' set the components symbol when SIZEOFINSTALLCB runs
  427. '' 
  428. ''    Rev 1.78   20 May 1995 20:11:12   glutz
  429. '' Added UNC and Browse to DISTSIZEOFINSTALLCB and NODENODEOPTIONSCB
  430. '' 
  431. ''    Rev 1.77   19 May 1995 18:20:26   glutz
  432. '' SIZEOFINSTALLCD now supports Browse and UNC in multiple
  433. '' Combo and Edit controls
  434. '' 
  435. ''    Rev 1.76   19 May 1995 14:58:48   glutz
  436. '' Added UNC and Browse to PARENTDIRCB
  437. '' 
  438. ''    Rev 1.75   18 May 1995 12:11:26   tveerapp
  439. '' Fixed a Numdirs% in sizeofinstallcb
  440. '' 
  441. ''    Rev 1.74   18 May 1995 12:05:24   tveerapp
  442. '' 1. Added call to SetTheComponentsDir to PARENTDIRCB.
  443. '' 2. Fixed SIZEOFINSTALLCB added check for extra directory.
  444. '' 
  445. ''    Rev 1.73   17 May 1995 15:11:44   mzgripce
  446. '' change >= with > in GetListLength in SIZEOFINSTALLCB 
  447. '' 
  448. ''    Rev 1.72   16 May 1995 17:09:32   glutz
  449. '' Changed USE to AUTOMATE
  450. '' 
  451. ''    Rev 1.71   16 May 1995 12:53:00   mzgripce
  452. '' added PARENTDIRCB subroutine
  453. '' 
  454. ''    Rev 1.70   16 May 1995 11:57:50   glutz
  455. '' Added UNC paths to CHANGEPRODUCTDIRCB, SIZEOFINSTALLCB and SetCustomInfo
  456. '' 
  457. ''    Rev 1.69   16 May 1995 09:47:54   pdonahue
  458. '' fixed typo
  459. '' 
  460. ''    Rev 1.68   16 May 1995 09:39:04   pdonahue
  461. '' added support for additional directories.
  462. '' 
  463. ''    Rev 1.67   03 May 1995 13:04:58   amontalv
  464. '' Upped the number of tabs from 8 to 9.
  465. '' 
  466. ''    Rev 1.66   02 May 1995 12:52:30   cmoy
  467. '' Merged c2 into cf build
  468. '' 
  469. ''    Rev 1.68   18 Apr 1995 17:31:04   mheerman
  470. '' SetFocus now returns a long.  I changed the variables which catch its
  471. '' return value to long to avoid an overflow.
  472. '' 
  473. ''    Rev 1.67   11 Apr 1995 14:23:02   amontalv
  474. '' Deleted debug print
  475. '' 
  476. ''    Rev 1.66   07 Apr 1995 19:35:44   amontalv
  477. '' LSS 32 bit port merge changes.
  478. '' 
  479. ''    Rev 1.65   06 Apr 1995 17:43:28   tveerapp
  480. '' Script port changes to CBs and Window calls.
  481. '' 
  482. ''    Rev 1.64   05 Apr 1995 20:21:18   amontalv
  483. '' Porting to 32 bit.
  484. '' 
  485. ''    Rev 1.63   02 Feb 1995 14:32:40   cmoy
  486. '' 
  487. '' Added Thangaraj's fix to Pipeline Problem
  488. '' 
  489. ''    Rev 1.62   29 Dec 1994 10:31:08   tveerapp
  490. '' 
  491. '' Commented out the Restart processing (IDC_CONTINUE) in INSTALLCOMPLETECB.
  492. '' 
  493. ''    Rev 1.61   09 Dec 1994 14:38:38   cmoy
  494. '' No change.
  495. '' 
  496. ''    Rev 1.60   06 Dec 1994 09:48:00   cmoy
  497. '' No change.
  498. '' 
  499. ''    Rev 1.59   18 Nov 1994 16:12:56   amontalv
  500. '' Japan DBCS: Added some resources to
  501. '' 
  502. ''    Rev 1.58   14 Oct 1994 11:40:12   tveerapp
  503. '' Fixed spr#1022903. The fix is in SRVNODEOPTIONSCB.
  504. '' 
  505. ''    Rev 1.57   11 Oct 1994 15:21:20   tveerapp
  506. '' 
  507. '' Added check to see if the prod. was not deselected to account
  508. '' for the min. and max size in SIZEOFINSTALLCB. This fixes spr#
  509. '' 32162.
  510. '' 
  511. ''    Rev 1.56   30 Sep 1994 14:48:20   cmoy
  512. '' Added InvChar("(") to the list of invalid chars.
  513. '' 
  514. ''    Rev 1.55   27 Sep 1994 14:07:44   cmoy
  515. '' 
  516. '' Changed find window inside INSTALLCOMPLETECB to use resourced
  517. '' string SID_INST_WINDOW_TITLE
  518. '' the WndTitle field in install.lst must match this field for reboot
  519. '' and restart functionality to work properly.
  520. '' 
  521. ''    Rev 1.54   27 Sep 1994 13:06:22   cmoy
  522. '' 
  523. '' moved rebooting and restarting constants to toolkit.lss
  524. '' 
  525. ''    Rev 1.53   26 Sep 1994 16:30:00   cmoy
  526. '' 
  527. '' Added Constant UM_RESTARTWINDOWS=1528
  528. '' 
  529. ''    Rev 1.52   16 Sep 1994 11:53:34   tveerapp
  530. '' Changed ProgmanCB. failed% =1. This change should have been made with
  531. '' the previous change.
  532. '' 
  533. ''    Rev 1.51   15 Sep 1994 16:17:14   tveerapp
  534. '' Changed ProgmangroupCb to accept characters that can be allowed to create
  535. '' program groups. InvChar is now a list.
  536. '' 
  537. ''    Rev 1.50   25 Aug 1994 16:46:22   mzgripce
  538. '' Gray out the Change Path button for win and winsys dir 
  539. '' 
  540. ''    Rev 1.49   02 Aug 1994 16:46:52   mzgripce
  541. '' put a check for Lot_IsTheNodeOptionsAvailtoNode() bfore turning 
  542. '' the options on in NODENODEOPTIONSCB
  543. '' 
  544. ''    Rev 1.48   24 Jun 1994 11:30:08   thangv
  545. '' Reverted back to using the old value (fixedin lcb.c by james) of
  546. '' Lot_LCBGetItem(..LCBITEM_SELECTED) in SRVNODEOPTIONSCB. The change was in
  547. '' line 1991 and 1999 in the check for the Selection% variable.
  548. '' 
  549. ''    Rev 1.47   21 Jun 1994 13:00:18   thangv
  550. '' Added code(lines 2010 and 2011) to get the groups chapter$. This was not
  551. '' having the right chapter number(had only the options for the group).This
  552. '' should fix the tip not showing up.(spr# 30277).
  553. '' 
  554. ''    Rev 1.46   21 Jun 1994 10:41:20   thangv
  555. '' Added code to CHANGEPRODUCTDIRCB (981-985) to restore the original
  556. '' value of the path if the product group rejects the path in their
  557. '' PathCahnge function.
  558. '' 
  559. ''    Rev 1.45   20 Jun 1994 14:49:36   thangv
  560. '' Changed the value of Selection% being checked in line 1970,1978 in
  561. '' SRVNODEOPTIONSCB to fix spr#31525. Lot_LCBGetItem returns the present state
  562. '' and not after the checkbox has been refreshed.
  563. '' 
  564. ''    Rev 1.44   16 Jun 1994 10:16:42   thangv
  565. '' 
  566. '' Added code to ungrey IDC_TEXT4 andIDC_TEXT5 in SIZEOFINSTALLCB,
  567. '' lines 1249 and 1250 to fix the bug for organizer(product with only full
  568. '' install and lotusapp support).
  569. '' 
  570. ''    Rev 1.43   08 Jun 1994 17:19:26   thangv
  571. '' The NODENODEOPTIONSCB was not calling the pathchange function for
  572. '' the products. Added the Lot_CallOneProd... function in the callback.
  573. '' This fixes Amipro's problem.
  574. '' 
  575. ''    Rev 1.42   06 Jun 1994 14:09:04   cmoy
  576. '' In SetCustomInfo refreshed the drive space available box more often.
  577. '' 
  578. ''    Rev 1.41   05 Jun 1994 20:11:46   ptilton
  579. '' Added calls to update OracleHomeDir and NotesDataDir Symbols in copylist
  580. '' 
  581. ''    Rev 1.40   02 Jun 1994 12:49:04   thangv
  582. '' 
  583. '' Removed an extra , in line 1759.
  584. '' 
  585. ''    Rev 1.39   02 Jun 1994 12:43:38   thangv
  586. '' 
  587. '' Added TrimNetlotusapp code to NODELOTUSAPPCB.
  588. '' 
  589. ''    Rev 1.38   01 Jun 1994 16:54:36   mmeth
  590. '' Check The return code from change path, and don't bring down the
  591. '' dialog, if the calling function returns gBACK
  592. '' 
  593. ''    Rev 1.37   26 May 1994 17:14:12   thangv
  594. '' 
  595. '' Added a check to ungrey IDC_TEXT3 in SIZEOFINSTALLCB for a simple
  596. '' product (like organizer) that supports only full install.
  597. '' 
  598. ''    Rev 1.36   25 May 1994 14:32:46   cmoy
  599. '' 
  600. '' removed rebooting feature instead a msg is sent to install.c
  601. '' 
  602. ''    Rev 1.35   18 May 1994 14:56:34   tingmann
  603. '' add SetYieldActive calls around lcb handling
  604. '' 
  605. ''    Rev 1.34   09 May 1994 15:11:36   ddupre
  606. '' Moved RegisterCallback call inside while loop in Custom1cb subroutine. JG
  607. '' 
  608. ''    Rev 1.33   06 May 1994 14:17:56   mzgripce
  609. '' 
  610. '' change progmancb to work for server
  611. '' 
  612. ''    Rev 1.32   06 May 1994 08:32:38   ddupre
  613. '' Added Lot_LCBSetSel to the SRVNODEOPTIONSCB SUB to select the first lb item
  614. '' 
  615. ''    Rev 1.31   05 May 1994 15:42:50   thangv
  616. '' Fixed the problem with the size of installcb not putting
  617. '' the correct focus on the radio button.
  618. '' 
  619. ''    Rev 1.30   05 May 1994 15:35:22   mzgripce
  620. '' fixed spr #28876
  621. '' 
  622. ''    Rev 1.29   02 May 1994 13:55:26   mmeth
  623. '' Jame's fix for set focus
  624. '' 
  625. ''    Rev 1.27   26 Apr 1994 18:33:14   mzgripce
  626. '' fixed spr 28121
  627. '' 
  628. ''    Rev 1.26   15 Apr 1994 13:15:06   mmeth
  629. '' added space between notepad.exe and readme.txt
  630. '' 
  631. ''    Rev 1.25   13 Apr 1994 14:07:22   cmoy
  632. '' 
  633. '' Modified callbacks to unbold text.
  634. '' 
  635. ''    Rev 1.24   13 Apr 1994 12:40:20   thangv
  636. '' Removed the extra `character in line 2010.
  637. '' 
  638. ''    Rev 1.23   13 Apr 1994 09:24:02   cmoy
  639. '' Added AUTOEXECCB and INSTALLCOMPLETECB
  640. '' 
  641. ''    Rev 1.22   12 Apr 1994 16:51:10   thangv
  642. '' Changed SIZEOFINSTALLCB: Removed the truncation of lotusapp
  643. '' in the display.Now lotusapp will be displayed.(lines 1033,1034 old
  644. '' code.). Fixed the bug.
  645. '' 
  646. ''    Rev 1.21   31 Mar 1994 10:30:38   thangv
  647. '' 
  648. '' Size of Install Callback for a single product with no lotusapp
  649. '' was trying to validate lotusappdir. put the check to see if the
  650. '' product supported share. fixed it.
  651. '' 
  652. ''    Rev 1.20   28 Mar 1994 17:10:02   thangv
  653. '' 
  654. '' resourced Notepad.exe and readnet.txt to SID_NOTEPADEXE and
  655. '' SID_READNETTXT
  656. '' 
  657. ''    Rev 1.19   28 Mar 1994 15:39:46   mzgripce
  658. '' change SIZEOFINSTALLCB to not add lotusapp word to the lotusapp directory for
  659. '' server
  660. '' 
  661. ''    Rev 1.18   28 Mar 1994 14:29:08   mmeth
  662. '' Changes with Christopher, obsoleteing dialosg
  663. '' 
  664. ''    Rev 1.17   28 Mar 1994 10:01:12   mmeth
  665. '' Greying out Change Directory Boutton for Shared Components
  666. '' 
  667. ''    Rev 1.16   25 Mar 1994 14:14:12   mzgripce
  668. '' added getlotusappdircb
  669. '' 
  670. ''    Rev 1.15   15 Mar 1994 12:30:18   jbrodeur
  671. '' Fix Node Inst Error
  672. '' 
  673. ''    Rev 1.14   11 Mar 1994 17:07:26   thangv
  674. '' 
  675. '' Set the SYM_NETWORK symbol to gDISTRIBUTION and checked
  676. '' to incorporate this WELCOMECB
  677. '' 
  678. ''    Rev 1.13   08 Mar 1994 14:47:22   mmeth
  679. '' 
  680. '' Hide the path button in custom1cb
  681. '' 
  682. ''    Rev 1.12   08 Mar 1994 14:35:14   mzgripce
  683. '' move ResetWinWinsys... call out of single prod if in SIZEOFINSTALLCB
  684. '' 
  685. ''    Rev 1.11   08 Mar 1994 10:55:28   mmeth
  686. '' fixed the Welcome Box
  687. '' 
  688. ''    Rev 1.10   07 Mar 1994 18:08:38   cmoy
  689. '' Added DISTSIZEINSTALLCB callback
  690. '' 
  691. ''    Rev 1.9   07 Mar 1994 17:56:04   mzgripce
  692. '' make resetWinWinsys SUB public
  693. '' 
  694. ''    Rev 1.8   07 Mar 1994 15:31:12   mzgripce
  695. '' fixed NODENODEDEOPTIONSCB
  696. '' 
  697. ''    Rev 1.7   02 Mar 1994 09:18:14   mzgripce
  698. '' Fixed SRVNODEOPTIONSCB using Reg_ReSet... and counting for customize
  699. '' 
  700. ''    Rev 1.6   01 Mar 1994 11:29:46   mmeth
  701. '' Fixed misspelling in SYM_SMARTSUITE....
  702. '' 
  703. ''    Rev 1.5   01 Mar 1994 10:33:06   mmeth
  704. '' ELSE IF --> ELSEIF
  705. '' 
  706. ''    Rev 1.4   28 Feb 1994 17:21:10   cmoy
  707. '' Added DB_SIZEOFINSTALL6 & 7 for server and standard
  708. '' installs in Lot_GetSizeofInstall
  709. '' 
  710. ''    Rev 1.3   25 Feb 1994 18:37:12   mzgripce
  711. '' add Lot_SetSpaceDirTip(), SRVNODEOPTIONSCB AND NODENODEOPTIONSCB
  712. '' 
  713. ''    Rev 1.2   18 Feb 1994 13:29:52   mmeth
  714. '' 
  715. '' Now check for Listlength of Reg_GetDirSymbolList
  716. '' 
  717. ''    Rev 1.1   15 Feb 1994 15:01:50   mmeth
  718. '' added pvcs line for toolkit.lss &
  719. '' 
  720. ''    Rev 1.0   11 Feb 1994 10:56:22   jbrodeur
  721. '' Initial Revision
  722. ''----------------------------------------------------------------------
  723. ''   Date     Vers. Pgmr  SPR#  Change
  724. ''----------------------------------------------------------------------
  725. '' 02-04-94   0018  MMETH      changed characters allowed in progrmangroup
  726. '' 02-04-94   0017  MMETH      SIZEOFINSTALLCB now support distribtuin dialog also
  727. ''!
  728. '' 02-01-94   0016  MZ         Added PROGMANGROUPCB
  729. '' 02-02-94   0015  MMETH      added NODELOTUSAPP stuff
  730. '' 01-24-94   0014  TQI        Capture all function returns (lsi36)
  731. '' 01-21-94   0013  DND         Custom2 shows the tips in normal text.
  732. '' 01-21-94   0012  MZ          Add SRV_SUCCESSCB
  733. '' 01-21-94   0011  MMETH       Added gNext parm to Lot_Call1Product
  734. '' 01-21-94   0010  DND         The path change dialogs now work correctly
  735. ''                              for server.
  736. '' 01-20-94   0009  DND         SIZEOFINSTALL should work for SmartSuite.
  737. ''                              Call the PathChange callbacks
  738. '' 01-19-94   0008  DND         Finish SINGLESIZEOFINSTALLCB. Added
  739. ''                              Lot_GetSizeOfInstall
  740. '' 01-19-94   0007  MMeth       Move SYM_UPDATELIST$ abd SYM_NORMALFONT
  741. '' 01-13-94   0006  DND         Add ability to change the currently shown
  742. ''                              path. Removed CHNGPATHBASE, PROGRAMPATHCB,
  743. ''                              Lot_DetectVersionPriorToDarwinA,
  744. ''                              PathChange123A, Lot_CheckProductDirs.
  745. '' 01-12-94   0005  DND         The custom dialogs now show the path
  746. ''                              based on what LCB item is selected.
  747. ''                              IN PROCESS
  748. '' 01-12-94   0004  MMETH       Changed Return code of CallProd to string
  749. '' 01-12-94   0003  MMETH       Commented out call to PathChang123A
  750. '' 01-11-94   0002  TQI         Option declare
  751. '' 01-10-94   0001  MZ          Make all symbols Constants and put them
  752. ''                              in GLOBALS.LSS
  753. '' 01-05-94   0000  DND         Initial checkin
  754. ''----------------------------------------------------------------------
  755. ''
  756. ''**********************************************************************
  757.  
  758. USE "AUTOMATE"
  759. OPTION DECLARE
  760.  
  761. '** Constants ----------------------------------------------------------
  762.  
  763.  
  764. CONST MAX_PAGES          = 9     '** Match LT_MAXPAGES from notebook.h
  765. CONST LCBITEM_ENTIRE     = 0
  766. CONST LCBITEM_SELECTED   = 1
  767. CONST LCBITEM_TEXT       = 2
  768. CONST LCBITEM_SIZE       = 3
  769. CONST LCBITEM_CHAPTER    = 4
  770.  
  771. CONST SYM_CUSTOMCOST$    = "CustomCostList"  '** Use only in this module
  772.  
  773. CONST UM_SETBITMAP       = WM_USER+100
  774.  
  775. '** Module globals -----------------------------------------------------
  776.  
  777. '** Structure to contain static information of a page (Custom)
  778. TYPE PAGEINFO
  779.    szChapter AS STRING     '** Chapter that started the page
  780.    idPage    AS INTEGER    '** Page ID
  781.    hDlgPage  AS LONG       '** Page dialog handle
  782.    nSel      AS INTEGER    '** Current Selection in page
  783. END TYPE
  784.  
  785. '** These module globals are used for CUSTOM1 and CUSTOM2
  786. DIM ghdlg&                             '** Save the parent dialog
  787. DIM gCurrentPageIndex%                 '** The current page index (into array)
  788. DIM gNumPages%                         '** Number of pages in gPageArray
  789. DIM gPageArray(MAX_PAGES) AS PAGEINFO  '** Page info for up to 8 pages
  790. '** Folder
  791. DIM gEntered$
  792. '** Focus problems
  793. DIM gPrevInst%
  794.  
  795. '** Declares -----------------------------------------------------------
  796.  
  797. DECLARE PUBLIC FUNCTION Lot_ConfirmNamesDlg  () AS STRING
  798. DECLARE PUBLIC FUNCTION Lot_GetSizeOfInstall () AS STRING
  799. DECLARE PUBLIC SUB      ResetWinWinsysSymbols()
  800. DECLARE PUBLIC FUNCTION Lot_SharedWindowsDlg (Id%) AS STRING
  801.  
  802. DECLARE SUB      SetCustomInfo(fOnTab%,fNewSpace%,fUpdateAll%)
  803. DECLARE FUNCTION DoesFileExistInDir (dirlist$) AS INTEGER
  804. DECLARE SUB      Lot_SetSpaceDirTip(hDlg&,chpt$,index%,ProdNum%,tiponly%)
  805.  
  806. '*************************************************************************
  807. '************************* Public Functions ******************************
  808. '*************************************************************************
  809.  
  810. '*************************************************************************
  811. '** PUBLIC FUNCTION Lot_ConfirmNamesDlg () AS STRING
  812. '** Purpose:   This function puts up the DB_CONFIRMNAME dlg box.
  813. '**     
  814. '**     
  815. '** Author:
  816. '** Arguments:
  817. '**     
  818. '** Returns:
  819. '**     
  820. '*************************************************************************
  821.  
  822. PUBLIC FUNCTION Lot_ConfirmNamesDlg () AS STRING
  823.  
  824.    AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
  825.    AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  826.    AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  827.     
  828.    SetListItem "IDC_TEXT", 1, GetSymbolValue(SYM_NAME$)
  829.    SetListItem "IDC_TEXT", 2, GetSymbolValue(SYM_COMPANY$)
  830.  
  831.    Lot_ConfirmNamesDlg = PopupModalDlg (DB_CONFIRMNAMES, DB_CONFIRMNAMES)
  832.  
  833. END FUNCTION
  834.  
  835. '*************************************************************************
  836. '** PUBLIC FUNCTION Lot_GetSizeOfInstall () AS STRING
  837. '** Purpose:   Bring up the appropriate size dialog. When this dialog
  838. '**            comes in, all products are set to the value in
  839. '**            SYM_SIZEOFINSTALL$. Before leaving all products are
  840. '**            set again to the value in SYM_SIZEOFINSTALL$
  841. '**     
  842. '** Author: DND
  843. '** Arguments:
  844. '** Symbols:   SYM_SIZEOFINSTALL$ - The default install type. Reset
  845. '**                                 to the selected when done.
  846. '**     
  847. '** Returns: Value from PopupModalDlg
  848. '**     
  849. '*************************************************************************
  850. PUBLIC FUNCTION Lot_GetSizeOfInstall () AS STRING
  851.  
  852.    DIM   IdDlg%, i%, nProds%, network$, size$, notused%, NumDirs%
  853.  
  854.    '** Set all the applications to start with the default
  855.    size$   = GetSymbolValue(SYM_SIZEOFINSTALL$)
  856.    nProds% = Reg_GetNumberOfProducts()
  857.    FOR i% = 1 to nProds%
  858.       Reg_SetSelectedInstallType i%, size$
  859.    NEXT
  860.  
  861.    '** Bring up the size of install dialog
  862.    network$ = GetSymbolValue(SYM_NETWORK$)
  863.  
  864.    NumDirs% = Reg_GetProdSupportForExtraProdDirs(1)
  865.  
  866.  IF NumDirs < 1 Then
  867.    IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  868.       '** Check for the case where the product only does full install
  869.       IF Reg_GetProdSupportForFullInstall(1) <> FALSE AND _
  870.      Reg_GetProdSupportForMinInstall (1) =  FALSE AND _
  871.      Reg_GetProdSupportForCustInstall(1) =  FALSE THEN
  872.      '** This product only allows full install. If server then
  873.      '** Ask for two paths. If not, then ask for one.
  874.      IF network$ = gSERVER$ THEN
  875.     IF Reg_GetProdSupportForShare32(1) <> FALSE Then
  876.        IdDlg% = DB_SIZEOFINSTALL2
  877.     ELSE
  878.        IdDlg% = DB_SIZEOFINSTALL1
  879.     END IF
  880.  
  881.      ELSE
  882.     IdDlg% = DB_SIZEOFINSTALL1
  883.      END IF
  884.       ELSEIF network$ = gSERVER$ THEN
  885.  
  886.      '** For server, only Full and Custom are allowed. Both the
  887.      '** main path and lotusapp are asked for
  888.      IF Reg_GetProdSupportForShare32(1) <> FALSE Then
  889.     IdDlg% = DB_SIZEOFINSTALL3
  890.      ELSE
  891.     IdDlg% = DB_SIZEOFINSTALL5
  892.      END IF
  893.  
  894.       ELSE
  895.  
  896.      '** Use the dialog with three choices and choices are grayed.
  897.      '** Only the main path is asked for.
  898.      IdDlg% = DB_SIZEOFINSTALL4
  899.  
  900.       END IF
  901.  
  902.     '** SmartSuite
  903.    ELSEIF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  904.  
  905.     IF network$ = gSERVER$ THEN
  906.         IdDlg% = DB_SIZEOFINSTALL6 '** server
  907.     ELSE
  908.         IdDlg% = DB_SIZEOFINSTALL7 '** standard or node
  909.     END IF
  910.  
  911.     ELSE
  912.       '** TEMPORARY ???MMETH
  913.       IdDlg% = DB_SIZEOFINSTALL4
  914.  
  915.    END IF
  916.  
  917.  ELSE
  918.  
  919.    IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  920.  
  921.       '** Check for the case where the product only does full install
  922.       IF Reg_GetProdSupportForFullInstall(1) <> FALSE AND _
  923.      Reg_GetProdSupportForMinInstall (1) =  FALSE AND _
  924.      Reg_GetProdSupportForCustInstall(1) =  FALSE THEN
  925.  
  926.      '** This product only allows full install. If server then
  927.      '** Ask for two paths. If not, then ask for one.
  928.  
  929.      IF network$ = gSERVER$ THEN
  930.     IF Reg_GetProdSupportForShare32(1) <> FALSE Then
  931.        IdDlg% = DB_SIZEOFINSTALL9
  932.     ELSE
  933.        IdDlg% = DB_SIZEOFINSTALL8
  934.     END IF
  935.      ELSE
  936.     IdDlg% = DB_SIZEOFINSTALL8
  937.      END IF
  938.  
  939.       ELSEIF network$ = gSERVER$ THEN
  940.  
  941.      '** For server, only Full and Custom are allowed. Both the
  942.      '** main path and lotusapp are asked for
  943.      IF Reg_GetProdSupportForShare32(1) <> FALSE Then
  944.     IdDlg% = DB_SIZEOFINSTALL10
  945.      ELSE
  946.     IdDlg% = DB_SIZEOFINSTALL12
  947.      END IF
  948.  
  949.       ELSE
  950.  
  951.      '** Use the dialog with three choices and choices are grayed.
  952.      '** Only the main path is asked for.
  953.      IdDlg% = DB_SIZEOFINSTALL11
  954.  
  955.       END IF
  956.  
  957.     '** SmartSuite
  958.    ELSEIF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  959.     IF network$ = gSERVER$ THEN
  960.         IdDlg% = DB_SIZEOFINSTALL6 '** server
  961.     ELSE
  962.         IdDlg% = DB_SIZEOFINSTALL7 '** standard or node
  963.     END IF
  964.  
  965.     ELSE
  966.       '** TEMPORARY ???MMETH
  967.       IdDlg% = DB_SIZEOFINSTALL11
  968.      END IF
  969.  
  970.  END IF
  971.  
  972.    '** Ask the user for the selected size
  973.    notused% = RegisterCallback("CALLBACK", "SIZEOFINSTALLCB")
  974.    Lot_GetSizeOfInstall = PopupModalDlg (IdDlg%, CLNG(IdDlg%))
  975.  
  976.    '** Reset all the sizes
  977.    size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
  978.    FOR i% = 1 to nProds%
  979.       Reg_SetSelectedInstallType i%, size$
  980.    NEXT
  981.  
  982. END FUNCTION
  983.  
  984. '*************************************************************************
  985. '** PUBLIC FUNCTION GetGroupName () AS STRING
  986. '** Purpose:   Get the group name from the dialog and verify it.
  987. '**     
  988. '** Author: 
  989. '** Arguments:
  990. '**             fDisplayErr%            - TRUE if the error needs to be displayed.
  991. '** Symbols:   
  992. '**     
  993. '** Returns: Program Group Name
  994. '**     
  995. '*************************************************************************
  996. FUNCTION GetGroupName () AS STRING
  997.     DIM count%, charlen%, failed%, inloopset%
  998.     DIM CheckName$, targetstr$, EnteredName$
  999.  
  1000.    DIM InvChar LIST AS STRING
  1001.    
  1002.    IF LENBP(GetListItem ("IDC_EDIT", 1)) < 254 THEN
  1003.         EnteredName$=GetListItem("IDC_EDIT",1)
  1004.    ELSE
  1005.         targetstr$ = GetListItem ("IDC_EDIT", 1)
  1006.  
  1007.         IF IsDBCSFirstAtOffset (targetstr$, 254) = 1 THEN
  1008.         EnteredName$=LEFTBP(GetListItem ("IDC_EDIT", 1), 253)
  1009.         ELSE
  1010.         EnteredName$=LEFTBP(GetListItem ("IDC_EDIT", 1), 254)
  1011.         END IF
  1012.     END IF
  1013.  
  1014.     IF EnteredName$ = "" AND NOT IsNewShell() THEN
  1015.        EnteredName$=Reg_GetProgManagerGroupName(1)
  1016.     END IF
  1017.  
  1018.     
  1019.    InvChar("\") = "1"
  1020.    InvChar("/") = "1"
  1021.    InvChar("<") = "1"
  1022.    InvChar(">") = "1"
  1023.    InvChar("*") = "1"
  1024.    InvChar("?") = "1"
  1025.    InvChar(|"|) = "1"
  1026.    InvChar("|") = "1"
  1027.    InvChar(":") = "1"
  1028.  
  1029.    failed% = 0
  1030.  
  1031.    IF IsNewShell() THEN
  1032.       ' Look for invalid char.  Fail if any are invalid
  1033.  
  1034.       CheckName$ = EnteredName$  
  1035.       FOR count% = 1 TO LEN(EnteredName$)
  1036. '                       charlen% = FDBCSCharLen(CheckName$,0)
  1037.             IF ISELEMENT(InvChar(LEFT$(CheckName$,1))) = TRUE THEN
  1038.             failed% = 1
  1039.             EXIT FOR
  1040.             END IF 
  1041. '                       count% = count% + charlen% - 1
  1042.             CheckName$ = RIGHT$(Checkname$,LEN(CheckName$)-1)
  1043.       NEXT
  1044.  
  1045.       InvChar(" ") = "1"
  1046.    END IF
  1047.  
  1048.    IF NOT IsNewShell() THEN
  1049.      InvChar("+") = "1"
  1050.      InvChar("=") = "1"
  1051.      InvChar("[") = "1"
  1052.      InvChar("]") = "1"
  1053.      InvChar(";") = "1"
  1054.      InvChar(",") = "1"
  1055.      InvChar(")") = "1"
  1056.      InvChar("(") = "1"
  1057.      InvChar(".") = "1"  '* MMETH; I believe that this is a valid character
  1058.  
  1059.      'TV: These are also invalid characters.
  1060.      InvChar("'") = "1" 
  1061.      InvChar("@") = "1" 
  1062.      InvChar("{") = "1" 
  1063.      InvChar("}") = "1" 
  1064.      InvChar("#") = "1" 
  1065.      InvChar("%") = "1" 
  1066.      InvChar("!") = "1" 
  1067.      InvChar("`") = "1" 
  1068.      InvChar("$") = "1" 
  1069.      InvChar("^") = "1" 
  1070.      InvChar("~") = "1" 
  1071.      InvChar("-") = "1" 
  1072.      InvChar("_") = "1" 
  1073.      InvChar("&") = "1" 
  1074.    END IF
  1075.  
  1076.    IF failed% = 0 THEN
  1077.       failed% = 1
  1078.  
  1079.       ' Validate the name if it is a new one
  1080.       ' The ilegal characters in the name are:
  1081.       ' * + | : " < > ? + { } \ ; ,  /  MMETH removed the period
  1082.       ' if the path consists only of " then the group name will be )]
  1083.       ' if the path consists only of ) or ] or , the group is not created
  1084.  
  1085.       '** TV: Reject only if the group name consists entirely of Invalid 
  1086.       '**characters
  1087.       CheckName$ = EnteredName$  
  1088.       FOR count% = 1 TO LEN(EnteredName$)
  1089. '        charlen% = FDBCSCharLen(CheckName$,0)
  1090.      IF ISELEMENT(InvChar(LEFT$(CheckName$,1))) = FALSE THEN
  1091.         failed% = 0
  1092.         EXIT FOR
  1093.      END IF 
  1094. '        count% = count% + charlen% - 1
  1095.      CheckName$ = RIGHT$(Checkname$,LEN(CheckName$)-1)
  1096.       NEXT
  1097.    END IF
  1098.  
  1099.    '*** TV: The " character cannot be permitted.
  1100.    '** This breaks the script execution later!!
  1101.    IF INSTR(1,EnteredName$,|"|) <> 0 THEN
  1102.       failed% = 1
  1103.    END IF 
  1104.  
  1105.  
  1106.  IF IsNewShell() THEN
  1107.    IF failed% <> 0 THEN
  1108.       ShowPathErrorNoDlgExit SID_ERR_INVALIDFOLDERNAME,SID_ERR_INVALIDFOLDERNAMEDESC95,EnteredName$
  1109.       GetGroupName = ""
  1110.    ELSE
  1111.       GetGroupName = EnteredName$
  1112.    END IF
  1113.  ELSE   
  1114.    IF failed% <> 0 THEN
  1115.        ShowPathErrorNoDlgExit SID_ERR_INVALIDGROUPNAME,SID_ERR_INVALIDGROUPNAMEDESC,EnteredName$
  1116.       GetGroupName = ""
  1117.    ELSE
  1118.       GetGroupName = EnteredName$
  1119.    END IF
  1120.  END IF
  1121.  
  1122. END FUNCTION
  1123.  
  1124. PUBLIC CONST WM_NEXTDLGCTL = 40 ' 0x0028
  1125.  
  1126. '*************************************************************************
  1127. '************************* Callbacks *************************************
  1128. '*************************************************************************
  1129. '*************************************************************************
  1130. '** PROGMANGROUPCB
  1131. '** Purpose:    This is a for the Program Group selection
  1132. '** IN SYMBOLS  
  1133. '**     
  1134. '** Author:
  1135. '** Arguments:
  1136. '**     
  1137. '**     
  1138. '** Returns:
  1139. '**     
  1140. '*************************************************************************
  1141. SUB PROGMANGROUPCB (hDlg&, CtrlId%, Classes$, LInst&)
  1142.    DIM ProgManIni$, Group$, GroupId%, Index%,notused%,DefaultGroup$
  1143.    DIM EnteredName$,order%,RootFolder$
  1144.    DIM Inst%
  1145.  
  1146.    ' *** script port to win32
  1147.    Inst% = CINT(LInst&) 
  1148.  
  1149.    SELECT CASE Classes$
  1150.  
  1151.    CASE "__DLGINIT"
  1152.  
  1153.     AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  1154.     AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  1155.  
  1156.     IF NOT IsNewShell() THEN
  1157.     ProgManIni$=GetWindowsDir()+"progman.ini"
  1158.     END IF
  1159.     DefaultGroup$=Reg_GetProgManagerGroupName(1)
  1160.     IF DefaultGroup$="" THEN
  1161.        DefaultGroup$=LdString(SID_TKT_DEF_PROGMANGRP)
  1162.     END IF
  1163.  
  1164.     SetListItem "IDC_EDIT", 1, DefaultGroup$
  1165.     IF IsNewShell() THEN
  1166.     SetListItem "IDC_TREE",1, Reg_GetSelectedFolder(1)
  1167.     AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1168.     AddListItem SYM_UPDATELIST$, "IDC_TREE"
  1169.     AddListItem SYM_UPDATELIST$, "IDC_B1"
  1170.     AddListItem SYM_UPDATELIST$, "IDC_B2"
  1171.     AddListItem SYM_UPDATELIST$, "IDC_B3"
  1172.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B1), TRUE))
  1173.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B2), FALSE))
  1174.     ELSE
  1175.     if (GetListLength("IDC_LIST1") > 1) THEN
  1176.         RemoveSymbol("IDC_LIST1")
  1177.     END IF
  1178.     SetListItem "IDC_LIST1",1, DefaultGroup$
  1179.     notused% = CInt(FAddProgramGroupsToList(HKEY_LOCAL_MACHINE&, gPROGMANREGNAME, "IDC_LIST1", DefaultGroup$))
  1180.     AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1181.     AddListItem SYM_UPDATELIST$, "IDC_LIST1"
  1182.     END IF
  1183.  
  1184.    CASE "IDC_EDIT"
  1185.     IF IsNewShell() THEN
  1186.         IF GetFocus() = GetDlgItem(hDlg, IDC_EDIT1) THEN
  1187.             EnteredName$ = GetGroupName()
  1188.             IF EnteredName$ = "" THEN
  1189.                 notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B1), FALSE))
  1190.                 notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1191.                 SetFocus(GetDlgItem(hDlg&,IDC_EDIT1))
  1192.             ELSE
  1193.                 notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B1), TRUE))
  1194.                 notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1195.                 gEntered$=GetListItem("IDC_EDIT",1)
  1196.                 notused%=FChangeNameCurrTreeItem(hDlg&, gEntered$)
  1197.                 Reg_SetProgManagerGroup 1,gEntered
  1198.             END IF
  1199.       END IF
  1200.     END IF
  1201.  
  1202.    CASE "IDC_TREE"
  1203.         EnteredName$=GetGroupName()
  1204.         IF EnteredName$ = "" THEN
  1205.           SetListItem "__LASTSTATUS", 1, "Q"
  1206.             SetFocus(GetDlgItem(hDlg&,IDC_EDIT1))
  1207.             EXIT SUB
  1208.         END IF
  1209.  
  1210.    DISPLAYTEXT:
  1211.     EnteredName$ = GetListItem("IDC_TREE", 1)
  1212.     Reg_SetSelectedFolder 1,EnteredName$
  1213.         IF DoesDirExist (Reg_GetSelectedFolder(1)) THEN
  1214.             notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), FALSE))
  1215.             notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B2), FALSE))
  1216.     ELSE
  1217.             notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), TRUE))
  1218.             notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B2), TRUE))
  1219.     END IF
  1220.     RootFolder = Reg_GetRootFolder()
  1221.     order% = 1
  1222.     DO
  1223.     Index% = order%
  1224.     order% = InStr(Index%+1,RootFolder,"\")
  1225.     LOOP UNTIL order% = 0
  1226.     Group$ = RIGHT$(EnteredName$,LEN(EnteredName$)-Index%)
  1227.     SetListItem "IDC_TEXT",3,Group$
  1228.     AddListItem SYM_UPDATELIST$, "IDC_TEXT3"
  1229.         gEntered = GetLastPathComponent(Group$)
  1230.     SetListItem "IDC_EDIT", 1, gEntered
  1231.     AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1232.  
  1233.    CASE "IDC_LIST1"
  1234.     EnteredName$=GetListItem("IDC_LIST1",Inst%)
  1235.     SetListItem "IDC_EDIT", 1, EnteredName$
  1236.     AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1237.  
  1238.    CASE "IDC_B"
  1239.     IF CtrlId% = cIDC_B1 THEN
  1240.         IF GetSymbolValue("USEDEFAULTGRP")<>"" THEN
  1241.             EnteredName$=Reg_GetProgManagerGroupName(1)
  1242.             IF EnteredName$="" THEN
  1243.          EnteredName$=LdString(SID_TKT_DEF_PROGMANGRP)
  1244.             END IF
  1245.             RemoveSymbol("USEDEFAULTGRP")
  1246.          ELSE
  1247.             EnteredName$=LdString(SID_TKT_DEF_NEWFOLDERNAME)
  1248.         END IF
  1249.       Group$ = GetListItem("IDC_TREE", 1)
  1250.         Group$ = Group$ + "\"+EnteredName$
  1251.       IF LENBP(Group$) > MAX_DIR_PATH THEN
  1252.         '** This is only about the path length and might need a new message
  1253.             ErrorMsg SID_ERR_PATHLEN, ""
  1254.       ELSE
  1255.            Index% = 0
  1256.             DO WHILE DoesDirExist (Group$)
  1257.                Index% = Index%+1
  1258.               Group$ = GetListItem("IDC_TREE", 1)+"\"+EnteredName$+"("+CSTR(Index%)+")"
  1259.             LOOP
  1260.             If Index% > 0 Then
  1261.                 EnteredName$ = EnteredName$+"("+CSTR(Index%)+")"
  1262.             End If
  1263.             Reg_SetProgManagerGroup 1,EnteredName$
  1264.             notused% = FAddItemToTree(hDlg&, EnteredName$)
  1265.             SetFocus(GetDlgItem(hDlg&,IDC_EDIT1))
  1266. 'JMD: LSCR32FVVK: Change focus off and back will highlight selection
  1267.             notused% = SendMessage (hDlg&,WM_NEXTDLGCTL, 1, 0)
  1268.             notused% = SendMessage (hDlg&,WM_NEXTDLGCTL, 0, 0)
  1269.         END IF
  1270.     ELSEIF CtrlId% = cIDC_B1+1 THEN
  1271.         notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_B1), TRUE))
  1272.         notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1273.         notused%=FDeleteCurrTreeItem(hDlg&)
  1274.         IF DoesDirExist(GetListItem("IDC_TREE",1)) THEN
  1275.             SetFocus(GetDlgItem(hDlg&,IDC_B1))
  1276.         END IF
  1277.     ELSE
  1278.         Inst% = 1
  1279.         GOTO DISPLAYTEXT
  1280.    END IF
  1281.  
  1282.    CASE "IDC_OK"
  1283.     IF IsNewShell() THEN
  1284.         Reg_SetSelectedFolder 1,GetListItem("IDC_TREE", 1)
  1285.     ELSE
  1286.     Reg_SetProgManagerGroup 1,GetGroupName()
  1287.     END IF
  1288.  
  1289.    CASE "IDC_BACK"
  1290.    CASE "IDC_CITHELP"
  1291.    CASE "IDC_EXIT"
  1292.  
  1293.    END SELECT   
  1294.  
  1295. END SUB
  1296.  
  1297. '*************************************************************************
  1298. '** WELCOMECB
  1299. '** Purpose:    This is a for the Welcome Dialog Boxes
  1300. '**             there are two distinct types of dialogs:
  1301. '**             A STANDARD/SERVER dialog vs a NODE dialog.
  1302. '**
  1303. '** IN SYMBOLS  NAME, COMPANY, NETWORK  
  1304. '**     
  1305. '** Author:
  1306. '** Arguments:
  1307. '**     
  1308. '**     
  1309. '** Returns:
  1310. '**     
  1311. '*************************************************************************
  1312. SUB WELCOMECB (hDlg&, CtrlId%, Classes$, LInst&)
  1313.    DIM lname$, company$, network$, i%, notused%
  1314.    DIM sz$
  1315.  
  1316.    ' Changes from Japan for DBCS        
  1317.    DIM targetstr$, Inst%
  1318.  
  1319.    Inst% = CINT(LInst&)
  1320.    ' End: Changes from Japan for DBCS   
  1321.  
  1322.    SELECT CASE Classes$
  1323.  
  1324.    CASE "__DLGINIT"
  1325.  
  1326.       '** Set the product bitmap
  1327.       SetListItem "IDC_BMP", 1, STR$(IDD_TKT_PROD_BMP)
  1328.  
  1329.       lname$   = GetSymbolValue(SYM_NAME$)
  1330.       company$ = GetSymbolValue(SYM_COMPANY$)
  1331.       SetListItem "IDC_EDIT", 1, lname$
  1332.       SetListItem "IDC_EDIT", 2, company$
  1333.  
  1334.       '** Set text to normal font
  1335.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  1336.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
  1337.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT6)
  1338.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT7)
  1339.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT8)
  1340.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  1341.       AddListItem SYM_UPDATELIST$, "IDC_BMP1"
  1342.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1343.       AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
  1344.  
  1345.       network$ = GetSymbolValue(SYM_NETWORK$)
  1346.       IF network$ = "" THEN
  1347.      SetSymbolValue SYM_NETWORK$, gSTANDARD$
  1348.       ELSEIF network$ = gNODE$ Then
  1349.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT2), FALSE))
  1350.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_TEXT3), FALSE))
  1351.       ELSEIF network$ = gSERVER$ OR network$ = gDISTRIBUTION$ THEN
  1352.      SetListItem "IDC_B", 1, "T"
  1353.      AddListItem SYM_UPDATELIST$, "IDC_B1"
  1354.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), FALSE))
  1355.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_TEXT2), FALSE))
  1356.       END IF
  1357.  
  1358.         ' Make sure we're not using Kanji characters in English install
  1359.         IF 2 > GetListLength("IDC_EDIT") THEN GOTO BADNEWS
  1360.  
  1361.       '** if userName OR companyName is empty inctivate the next button
  1362.       IF network$ = gSTANDARD$ THEN
  1363.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _ 
  1364.     LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1365.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1366.      ELSE
  1367.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1368.      END IF
  1369.  
  1370.       ELSEIF network$ = gNODE$ THEN
  1371.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
  1372.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1373.      ELSE
  1374.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1375.      END IF
  1376.  
  1377.       ELSEIF network$ = gSERVER$ THEN
  1378.      IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1379.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1380.      ELSE
  1381.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1382.      END IF
  1383.  
  1384.       ELSE
  1385.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1386.       END IF
  1387.  
  1388.    CASE "IDC_B"
  1389.  
  1390.         ' Make sure we're not using Kanji characters in English install
  1391.         IF 2 > GetListLength("IDC_EDIT") THEN GOTO BADNEWS
  1392.  
  1393.       If GetListItem("IDC_B",1) = "F" Then
  1394.      SetSymbolValue SYM_NETWORK$, gSTANDARD$
  1395.       Else
  1396.      '*** if both Srv and Dist are supported then Srv overrides
  1397.      If Reg_GetProdSupportForSrv(1) = 1 Then
  1398.     SetSymbolValue SYM_NETWORK$, gSERVER$
  1399.      ElseIf Reg_GetProdSupportForDist(1) = 1 Then
  1400.     SetSymbolValue SYM_NETWORK$, gDISTRIBUTION$
  1401.      End If 
  1402.       End If
  1403.  
  1404.       '** If Server checkbox is selected, grey out the User name. 
  1405.       IF IsDlgButtonChecked(hDlg&,IDC_B1) <> FALSE THEN
  1406.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), FALSE))
  1407.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_TEXT2), FALSE))
  1408.       ELSE
  1409.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_EDIT1), TRUE))
  1410.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_TEXT2), TRUE))
  1411.       END IF
  1412.  
  1413.       network$ = GetSymbolValue(SYM_NETWORK$)
  1414.       IF network$ = gSTANDARD$ THEN
  1415.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _ 
  1416.     LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1417.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1418.      ELSE
  1419.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1420.      END IF
  1421.  
  1422.       ELSEIF network$ = gNODE$ THEN
  1423.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
  1424.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1425.      ELSE
  1426.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1427.      END IF
  1428.  
  1429.       ELSEIF network$ = gSERVER$ THEN
  1430.      IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1431.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1432.      ELSE
  1433.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1434.      END IF
  1435.  
  1436.       ELSE
  1437.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1438.       END IF
  1439.  
  1440.    CASE "IDC_EDIT"
  1441.  
  1442.         ' Make sure we're not using Kanji characters in English install
  1443.         IF 2 > GetListLength("IDC_EDIT") THEN GOTO BADNEWS
  1444.  
  1445.       network$ = GetSymbolValue(SYM_NETWORK$)
  1446.       IF network$ = gSTANDARD$ THEN
  1447.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 OR _ 
  1448.     LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1449.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1450.      ELSE
  1451.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1452.      END IF
  1453.  
  1454.       ELSEIF network$ = gNODE$ THEN
  1455.      IF LEN(GetListItem ("IDC_EDIT", 1)) < 1 THEN
  1456.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1457.      ELSE
  1458.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1459.      END IF
  1460.  
  1461.       ELSEIF network$ = gSERVER$ THEN
  1462.      IF LEN(GetListItem ("IDC_EDIT", 2)) < 1 THEN
  1463.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), FALSE))
  1464.      ELSE
  1465.     notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1466.      END IF
  1467.  
  1468.       ELSE
  1469.      notused% = CINT(EnableWindow(GetDlgItem(hDlg&,IDC_OK), TRUE))
  1470.       END IF
  1471.  
  1472.    CASE "IDC_OK"
  1473.       network$ = GetSymbolValue(SYM_NETWORK$)
  1474.       FOR i% = 1 TO 2
  1475.      IF network$ = gNODE$ AND i% = 2 THEN
  1476.     Exit For
  1477.      END IF
  1478.      IF network$ = gSERVER$ AND i% = 1 THEN
  1479.     GOTO NEXTFIELD
  1480.      END IF
  1481.  
  1482.      IF LEN(GetListItem ("IDC_EDIT", i%)) < 1 THEN
  1483.     ErrorMsgNoDlgExit SID_TKT_ERR_NEEDNAMES, ""
  1484.     EXIT FOR
  1485.       END IF
  1486.  
  1487.      NEXTFIELD:
  1488.  
  1489.       NEXT
  1490.  
  1491.      ' Changes from Japan for DBCS  
  1492.      ' This code is intimately related to code in
  1493.      ' callback.lss:Lot_ReadDefaultsfromRi &
  1494.      ' lcomstf\userreg.cpp:ReadDefaultsfromRi
  1495.      IF LENBP(GetListItem ("IDC_EDIT", 1)) < 80 THEN
  1496.      SetSymbolValue SYM_NAME$,    GetListItem ("IDC_EDIT", 1)
  1497.      ELSE
  1498.      targetstr$ = GetListItem ("IDC_EDIT", 1)
  1499.      IF IsDBCSFirstAtOffset (targetstr$, 80) = 1 THEN
  1500.         SetSymbolValue SYM_NAME$,    LEFTBP(GetListItem ("IDC_EDIT", 1), 79)
  1501.      ELSE
  1502.         SetSymbolValue SYM_NAME$,    LEFTBP(GetListItem ("IDC_EDIT", 1), 80)
  1503.      END IF
  1504.      END IF
  1505.  
  1506.         ' Make sure we're not using Kanji characters in English install
  1507.         IF 2 > GetListLength("IDC_EDIT") THEN GOTO BADNEWS
  1508.  
  1509.      IF LENBP(GetListItem ("IDC_EDIT", 2)) < 80 THEN
  1510.      SetSymbolValue SYM_COMPANY$, GetListItem ("IDC_EDIT", 2)
  1511.      ELSE
  1512.      targetstr$ = GetListItem ("IDC_EDIT", 2)
  1513.      IF IsDBCSFirstAtOffset (targetstr$, 80) = 1 THEN
  1514.        SetSymbolValue SYM_COMPANY$,    LEFTBP(GetListItem ("IDC_EDIT", 2), 79)
  1515.      ELSE
  1516.        SetSymbolValue SYM_COMPANY$,    LEFTBP(GetListItem ("IDC_EDIT", 2), 80)
  1517.      END IF
  1518.      END IF
  1519.      ' End: Changes from Japan for DBCS     
  1520.  
  1521.    '** Allow the user to exit without hitting the button
  1522.    Case "IDC_BACK"
  1523.       sz$ = PopupModalDlg (DB_EXITHISTORY, DB_EXITHISTORY)
  1524.       If sz$ = "BACK" Then
  1525.       SetListItem "__LASTSTATUS", 1, "Q"
  1526.    End If
  1527.  
  1528.    END SELECT   
  1529.  
  1530.     EXIT SUB
  1531.  
  1532. BADNEWS:
  1533.     ' We got here because enterijng Kanji characters in a single byte font
  1534.     ' blows away the symbol table.  Attempt to recover by resetting the text
  1535.     ' items, and surfacing a message that you can't do that
  1536.     ' This will surface the dialog for each character typed until <return>
  1537.     SetListItem "IDC_EDIT", 1, ""
  1538.     SetListItem "IDC_EDIT", 2, ""
  1539.     sz$ = LdString(SID_BAD_KANJI_CHAR)
  1540.     MessageBox sz$, MB_ICONSTOP, LdString(SID_TKT_STD_TITLE)
  1541.  
  1542. END SUB
  1543.  
  1544. '************************************************************************
  1545. '*                   Routines to handle Custom                          *
  1546. '************************************************************************
  1547.  
  1548. '*************************************************************************
  1549. '** SUB CUSTOM1CB (hDlg&, CtrlId%, Classes$, LInst&)
  1550. '**
  1551. '** Purpose: Customize a product. This is main dialog proc. Each dialog
  1552. '**          page uses CUSTOM2CB.
  1553. '**
  1554. '**          This dialog callback can be used only once! Do not display
  1555. '**          more than one dialog at a time with this callback!
  1556. '**            
  1557. '** Author:    DND
  1558. '** Arguments: Callback args
  1559. '** Returns:   NONE
  1560. '*************************************************************************
  1561.  
  1562. SUB CUSTOM1CB (hDlg&, CtrlId%, Classes$, LInst&)
  1563.  
  1564.    DIM chpt$, product_name$, child$, dirsym$, network$
  1565.    DIM page%, tab_handle&
  1566.    DIM RC$, i%, notused%, Inst%, unused&
  1567.  
  1568.    Inst% = CINT(LInst&)
  1569.  
  1570.    SELECT CASE Classes$
  1571.  
  1572.    case "__DLGINIT"
  1573.  
  1574.       '** Set some globals
  1575.       gNumPages% = 0
  1576.       ghdlg& = hDlg&
  1577.  
  1578.       ''Display bmps with transparent background
  1579.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, "STRETCH"
  1580.  
  1581.       '** make text normal
  1582.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT6)
  1583.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  1584.  
  1585.       '** Hide the Path Button for a server or a language install
  1586.       network$ = GetSymbolValue(SYM_NETWORK$)
  1587.       If network$ = gSERVER$ OR _
  1588.      GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ _   
  1589.       Then 
  1590.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_B1), SW_HIDE))
  1591.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_TEXT4), SW_HIDE))
  1592.     notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_TEXT8), SW_SHOW))
  1593.       End If
  1594.       notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), FALSE))
  1595.  
  1596.       '** Set the starting chapter based on the current product
  1597.       i%    = Lot_GetCurrentProduct()
  1598.       chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(i%) + gTOP$)
  1599.       chpt$ = Lot_GetFirstChild(chpt$, F_DISPLAY + F_CUSTOM)
  1600.  
  1601.       '** DND: If no first chapter then we need to do somthing
  1602.  
  1603.       WHILE (chpt$ <> "")
  1604.      product_name$ = Lot_GetChapterValStr(chpt$, F_NAME) 
  1605.      child$        = Lot_GetFirstChild(chpt$, F_DISPLAY + F_CUSTOM)
  1606.  
  1607.      '** Add new page to notebook
  1608.      notused% = RegisterCallback("CALLBACK","CUSTOM2CB")
  1609.      page% = Lot_AddPagetoNotebook(hDlg&,IDC_NOTEBOOK1,DBNM_1,product_name$)
  1610.      tab_handle& = Lot_GetPagehandle(hDlg&,IDC_NOTEBOOK1,page%)
  1611.        IF FPopulateLCB(tab_handle&, child$) = FALSE THEN
  1612.     ErrorMsg SID_ERR_POPULATELCB, ""
  1613.     ERROR STFQUIT
  1614.      END IF
  1615.  
  1616.      '** Store the page information
  1617.      gNumPages% = gNumPages% + 1
  1618.      gPageArray(gNumPages%).szChapter = chpt$
  1619.      gPageArray(gNumPages%).idPage    = page%
  1620.      gPageArray(gNumPages%).hDlgPage  = tab_handle&
  1621.      gPageArray(gNumPages%).nSel      = 1
  1622.  
  1623.      '** Make sure to save the page id of the first page. For now,
  1624.      '** use gCurrentPageIndex to save the page id of first page.
  1625.      IF gNumPages% = 1 THEN gCurrentPageIndex% = page%
  1626.  
  1627.      '** Goto next sibling of chpt$
  1628.      chpt$ = Lot_GetNextSibling(chpt$, F_DISPLAY + F_CUSTOM)  
  1629.       WEND
  1630.  
  1631.       Lot_TurnToPage hDlg&, IDC_NOTEBOOK1, gCurrentPageIndex%
  1632.       gCurrentPageIndex% = 1
  1633.       SetCustomInfo TRUE, TRUE, TRUE
  1634.  
  1635.    case "IDC_B"
  1636.       chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
  1637.          gPageArray(gCurrentPageIndex%).nSel,     _
  1638.          LCBITEM_CHAPTER)
  1639.       dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
  1640.       SetSymbolValue SYM_CHANGEDIRSYMBOL$,  dirsym$
  1641.  
  1642.       IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
  1643.  
  1644.             IF (dirsym$ <> SYM_WINDIR$ AND _
  1645.             dirsym$ <> SYM_LOTUSFONTSDIR$ AND _
  1646.             dirsym$ <> SYM_WINSYSDIR$) THEN
  1647.                 notused% = RegisterCallback ("CALLBACK", "CHANGEPRODUCTDIRCB")
  1648.                 RC$ = PopupModalDlg (DBM_CHANGEDIR, DBM_CHANGEDIR)
  1649.             END IF
  1650.  
  1651.       ELSE
  1652.  
  1653.             dirSym$ = Reg_GetDirSymbolList(Lot_GetCurrentProduct())
  1654.             '** SHOULD NEVER BE IN THIS CODE ANYWAY
  1655.             If GetListLength(dirSym$) >= 1 Then
  1656.                 dirSym$ = GetListItem(dirSym$, 1)
  1657.                 SetSymbolValue SYM_CHANGEDIRSYMBOL$,  dirsym$
  1658.                 notused% = RegisterCallback ("CALLBACK", "CHANGEPRODUCTDIRCB")
  1659.                 RC$ = PopupModalDlg (DBM_CHANGEDIR, DBM_CHANGEDIR)
  1660.             End If
  1661.  
  1662.       END IF
  1663.  
  1664. ''      SELECT CASE RC$
  1665. ''
  1666. ''      case "OK"
  1667. ''      SetCustomInfo FALSE, TRUE, TRUE
  1668. ''      unused& = SetFocus(GetDlgItem(hDlg&, IDC_B1))
  1669. ''
  1670. ''      case "BACK"
  1671. ''      SetCustomInfo TRUE, TRUE, TRUE
  1672. ''      unused& = SetFocus(GetDlgItem(hDlg&, IDC_B1))
  1673. ''
  1674. ''      END SELECT
  1675.     SetCustomInfo FALSE, TRUE, TRUE
  1676.  
  1677.    case "IDC_NOTEBOOK"
  1678.       FOR i% = 1 TO gNumPages%
  1679.             IF gPageArray(i%).idPage = Inst% THEN
  1680.                 gCurrentPageIndex% = i%
  1681.                 gPrevInst% = -1
  1682.                 SetCustomInfo TRUE, FALSE, TRUE
  1683.             EXIT FOR
  1684.         END IF
  1685.       NEXT
  1686.  
  1687.    case "IDC_OK"
  1688.       ''**Display bitmaps the default way from now on
  1689.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  1690.  
  1691.       ResetWinWinsysSymbols
  1692.  
  1693.    case "__DLGDESTROY"
  1694.       ''**Display bitmaps the default way from now on
  1695.       SetSymbolValue SYM_BMP_DISPLAY_MODE$, ""
  1696.  
  1697.       RemoveSymbol SYM_CUSTOMCOST$
  1698.       RemoveSymbol SYM_CHANGEDIRSYMBOL$
  1699.  
  1700.    END SELECT
  1701.  
  1702. END SUB
  1703.  
  1704. '*************************************************************************
  1705. '** SUB CUSTOM2CB (hDlg&, CtrlId%, Classes$, LInst&)
  1706. '**
  1707. '** Purpose: Page dialogs. Use with CUSTOM1
  1708. '**
  1709. '**          This dialog callback can be used only once! Do not display
  1710. '**          more than one dialog at a time with this callback!
  1711. '**            
  1712. '** Author:    DND
  1713. '** Arguments: Callback args
  1714. '** Returns:   NONE
  1715. '*************************************************************************
  1716.  
  1717. SUB CUSTOM2CB (hDlg&, CtrlId%, Classes$, LInst&)
  1718.  
  1719.    DIM chpt$, tiponly%, index%, dirsym$, notused%, Inst%
  1720.    STATIC PrevPage%
  1721.  
  1722.    Inst% = CINT(LInst&)
  1723.    
  1724.    SELECT CASE Classes$
  1725.  
  1726.       case "__DLGINIT"
  1727.      AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  1728.      AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  1729.  
  1730.    case "IDC_LCB"
  1731.  
  1732.      SetYieldActive FALSE
  1733.  
  1734.      '** If Inst% is negative that just means that the section changed.
  1735.      '** If Inst% is positive then a check box was toggled.
  1736.  
  1737.      IF Inst% < 0 THEN
  1738.         Inst%    = -Inst%
  1739.         tiponly% = TRUE
  1740.      ELSE
  1741.         tiponly% = FALSE
  1742.      END IF
  1743.  
  1744.      '** Get the chapter from the LCB item
  1745.      index% = Inst% - IDC_LCB1 + 1
  1746.      chpt$  = Lot_LCBGetItem(hDlg&, index%, LCBITEM_CHAPTER)
  1747.      gPageArray(gCurrentPageIndex%).nSel = index%
  1748.  
  1749.      '** Process the LCB info
  1750.      IF chpt$ <> "" THEN
  1751.         IF tiponly% = FALSE THEN
  1752.            Lot_ToggleChapterFilesInCopyList chpt$
  1753.         END IF
  1754.         '** Only redisplay if the page or the selection has changed
  1755.         IF (PrevPage% <> gCurrentPageIndex% OR Inst% <> gPrevInst%) THEN
  1756.            SetCustomInfo FALSE, TRUE, TRUE
  1757.         ELSE
  1758.            SetCustomInfo FALSE, TRUE, FALSE
  1759.         END IF
  1760.      END IF
  1761.      ''* Disable the Change Path.. Button if on a shared directory
  1762.      IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ THEN
  1763.         chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
  1764.                gPageArray(gCurrentPageIndex%).nSel,     _
  1765.                LCBITEM_CHAPTER)
  1766.         dirsym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
  1767.         IF (dirsym$ = SYM_COMPONENTSDIR$ OR _
  1768.             dirsym$ = SYM_LOTUSUSERDIR$ OR _
  1769.             dirsym$ = SYM_LOTUSFONTSDIR$ OR _
  1770.           dirsym$ = SYM_WINDIR$ OR _
  1771.           dirsym$ = SYM_WINSYSDIR$) THEN
  1772.            notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), FALSE))
  1773.         ELSE
  1774.           IF IsWindowVisible(GetDlgItem(ghdlg&, IDC_B1)) <> FALSE THEN
  1775.         notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), TRUE))
  1776.           END IF
  1777.        END IF
  1778.      END IF
  1779.      '** Remember last page and selection for next time
  1780.      PrevPage% = gCurrentPageIndex%
  1781.      gPrevInst% = Inst%
  1782.  
  1783.      SetYieldActive TRUE
  1784.  
  1785.    END SELECT
  1786.  
  1787. END SUB
  1788.  
  1789.  
  1790. '*************************************************************************
  1791. '** SUB CHANGEPRODUCTDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1792. '**
  1793. '** Purpose: Callback to handle dialog that lets you change one product
  1794. '**          directory.
  1795. '**            
  1796. '** Author:    DND
  1797. '** Arguments: Callback args
  1798. '** SymbolsIn: SYM_CHANGEDIRSYMBOL$ 
  1799. '** Returns:   NONE
  1800. '*************************************************************************
  1801.  
  1802. SUB CHANGEPRODUCTDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1803.  
  1804.    STATIC drvIndex%, dirChanged%
  1805.    DIM    dirSym$, dirToChange$, dirName$, rc$, i%, olddir$, Inst%
  1806.    DIM    notused%
  1807.  
  1808.    Inst% = CINT(LInst&)
  1809.  
  1810.    SELECT CASE Classes$
  1811.  
  1812.    case "__DLGINIT"
  1813.      dirChanged%  = FALSE
  1814.      dirSym$      = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  1815.      dirToChange$ = GetSymbolValue(dirSym$)
  1816.      dirName$     = GetSymbolValue(dirSym$ + gNAME$)
  1817.  
  1818.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  1819.      AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  1820.  
  1821.      SetWindowText GetDlgItem(hDlg&, IDC_GROUP1), dirName$
  1822.  
  1823.      Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  1824. '      drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
  1825.  
  1826.      SetListItem "IDC_EDIT", 1, dirToChange$
  1827.      drvIndex% = ValidateEditBox(hDlg& , 1)
  1828.      AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1829.  
  1830.    case "IDC_EDIT"
  1831.      dirChanged% = TRUE
  1832.  
  1833.    case "IDC_BRWSDIR"
  1834.      notused% = ValidateBrowse(hDlg& , Inst%) 
  1835.      dirChanged% = TRUE
  1836.  
  1837.    case "IDC_COMBO1"
  1838.      ComboSelChanged 1, Inst%
  1839.      drvIndex%   = Inst%
  1840.      dirChanged% = TRUE
  1841.  
  1842.    case "IDC_OK"
  1843.      IF dirChanged% = TRUE THEN
  1844.        dirSym$      = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  1845.        olddir$      = GetSymbolValue(dirSym$)
  1846.  
  1847.        
  1848.        IF ValidateEditBox(hDlg& , 1) = 0 THEN
  1849.      SetListItem "__LASTSTATUS", 1, "Q"
  1850.      EXIT SUB
  1851.        END IF
  1852.        dirToChange$ = GetPathFromComboEdit(hDlg&,1)
  1853.  
  1854.        IF ValidatePath(dirToChange$) = FALSE THEN
  1855.      SetListItem "__LASTSTATUS", 1, "Q"
  1856.        ELSE
  1857.             dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  1858.             SetSymbolValue dirSym$, dirToChange$
  1859.  
  1860.               '** Server is only allowed to change main product dir
  1861.               IF GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
  1862.                  dirName$ = |"| + dirSym$ + |",TRUE|
  1863.               ELSE
  1864.                  dirName$ = |"| + dirSym$ + |",FALSE|
  1865.               END IF
  1866.               rc$ = Lot_CallOneProductFunction(Lot_GetCurrentProduct(), _
  1867.               "PathChange", gNEXT$, FALSE, dirName$)
  1868.               If rc$ = gBACK Then
  1869.                  SetListItem "IDC_EDIT", 1, Lot_ExtractDirectory(olddir$)
  1870.                  drvIndex% = SelectDriveCombo ("IDC_COMBO1", olddir$)
  1871.                  SetSymbolValue dirSym$, olddir$
  1872.                  AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1873.                  SetListItem "__LASTSTATUS", 1, "Q"
  1874.                  EXIT SUB
  1875.               End If
  1876.  
  1877.      Lot_RefreshDestination(dirSym$)
  1878.        END IF
  1879.      END IF
  1880.  
  1881.    END SELECT
  1882.  
  1883. END SUB
  1884.  
  1885. 'MARIANA
  1886. '** SUB GETCOMPONENTDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1887. '** Purpose: Prompts for Lotusapp dir in install
  1888. '** Author:    MZ
  1889. '** Arguments: Callback args
  1890. '** Returns:   NONE
  1891. '*************************************************************************
  1892. SUB GETCOMPONENTDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  1893.    STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS), dirChanged%
  1894.    DIM    dirSym$, dirToChange$, dirName$, winLotApp$, Inst%
  1895.    DIM    drvSel%
  1896.    
  1897.    Inst% = CINT(LInst&)
  1898.    SELECT CASE Classes$
  1899.  
  1900.    case "__DLGINIT"
  1901.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT2)
  1902.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  1903.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  1904.  
  1905.       dirChanged%  = FALSE
  1906.       dirToChange$ = GetSymbolValue(SYM_COMPONENTSDIR$)
  1907.       dirName$     = GetSymbolValue(dirSym$ + gNAME$)
  1908.  
  1909.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  1910.       AddListItem SYM_UPDATELIST$, "IDC_COMBO1"
  1911.       'drvIndex% = SelectDriveCombo ("IDC_COMBO1", dirToChange$)
  1912.       SetListItem "IDC_EDIT", 1, dirToChange$
  1913.       drvIndex%(1) = ValidateEditBox(hDlg& , 1)
  1914.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  1915.  
  1916.    case "IDC_COMBO1"
  1917.     ComboSelChanged 1,Inst%
  1918.     drvIndex%(1)   = Inst%
  1919.     dirChanged% = TRUE
  1920.    
  1921.    case "IDC_EDIT"
  1922.       dirChanged% = TRUE
  1923.  
  1924.    case "IDC_BRWSDIR"
  1925.       drvSel% = ValidateBrowse(hDlg& , Inst%) 
  1926.       dirChanged% = TRUE
  1927.  
  1928.    case "IDC_OK"
  1929.     IF dirChanged% = TRUE THEN
  1930.       IF ValidateEditBox(hDlg& , 1) = 0 THEN
  1931.     SetListItem "__LASTSTATUS", 1, "Q"
  1932.     EXIT SUB
  1933.       END IF
  1934.       dirToChange$ = GetPathFromComboEdit(hDlg&,1)
  1935.       IF ValidatePath(dirToChange$) = FALSE THEN
  1936.     SetListItem "__LASTSTATUS", 1, "Q"
  1937.       ELSE
  1938.     SetSymbolValue SYM_COMPONENTSDIR$, dirToChange$
  1939.     Lot_RefreshDestination(SYM_COMPONENTSDIR$)
  1940.       END IF
  1941.       'Initialize the symbols for Notes Data and ORACLE Home directories
  1942.       DL_SetNotesDataPath
  1943.       DL_SetOraclePath
  1944.     END IF
  1945.  
  1946.    END SELECT
  1947.  
  1948. END SUB
  1949.  
  1950. '************************************************************************
  1951. '*                   End of Custom Routines                             *
  1952. '************************************************************************
  1953. '*************************************************************************
  1954. '** SUB SIZEOFINSTALLCB (hDlg&, CtrlId%, Classes$, LInst&)
  1955. '**
  1956. '** Purpose:   Handles the SizeOfInstall Dialog Box for Single Install
  1957. '**            Always works with the current product (should be 1).
  1958. '**
  1959. '**            With a little work we might be able to use this callback
  1960. '**            for the main size of install dialog in SmartSuite.
  1961. '**            You would need to pay attention to minimum size and
  1962. '**            current product. Plus, the path asked for would be
  1963. '**            the BASEDIR, not a product path. However, I think the
  1964. '**            logic could be added.
  1965. '**
  1966. '** In Symbols:
  1967. '**     
  1968. '** Author:    DND
  1969. '** Arguments: STANDARD CALLBACK ARGS
  1970. '** Comments:  SYM_SIZEOFINSTALL$ is an in-out param
  1971. '** Returns:
  1972. '**     
  1973. '*************************************************************************
  1974. '** unc template for multiple COMBO-TEXT boxes
  1975. SUB SIZEOFINSTALLCB (hDlg&, CtrlId%, Classes$, LInst&)
  1976.  
  1977.    STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS), dirChanged%, size$, lDistSize&, dirChanged2%, dirChanged3%
  1978.    DIM    dirSym$, dirToChange$, rc$, i%, nProds%, lcb&, notused%
  1979.    DIM    drvItem$, drvFree&, network$, Inst%, dirSym2$, dirToChange2$
  1980.    DIM    NumDirs%, DriveChangedFlag%, drvSel%
  1981.  
  1982.    DriveChangedFlag% = FALSE              '** MZ
  1983.  
  1984.    Inst% = CINT(LInst&)
  1985.  
  1986.    network$ = GetSymbolValue(SYM_NETWORK)
  1987.  
  1988.    SELECT CASE Classes$
  1989.    
  1990.    CASE "__DLGINIT"
  1991.  
  1992.       '** Init the radio buttons
  1993.       size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
  1994.       SELECT CASE size$
  1995.  
  1996.       CASE gCOMPLETE$
  1997.      SetListItem "IDC_B", 1, "T"            '** Complete
  1998.  
  1999.       CASE gLAPTOP$
  2000.      SetListItem "IDC_B", 2, "T"            '** Minimum
  2001.  
  2002.       CASE gCUSTOM$
  2003.      SetListItem "IDC_B", 3, "T"            '** Custom
  2004.  
  2005.       END SELECT
  2006.       AddListItem SYM_UPDATELIST$, "IDC_B"
  2007.  
  2008.  
  2009.       '** Fill the product full size
  2010.       lcb& = 0
  2011.       nProds% = Reg_GetNumberOfProducts()
  2012.       FOR i% = 1 to nProds%
  2013.     IF Reg_GetUIInOrOut (i%) <> 0 THEN
  2014.       lcb& = lcb& + Reg_GetProdFullSize(i%)
  2015.     END IF 
  2016.       NEXT
  2017.       SetListItem "IDC_TEXT", 2, LdString(SID_SPACENEEDED) + _
  2018.       STR$((lcb& \ 1048576) + 1) + gStrMB$
  2019.  
  2020.       '** Fill in the product laptop size
  2021.       lcb& = 0
  2022.       FOR i% = 1 to nProds%
  2023.     IF Reg_GetUIInOrOut (i%) <> 0 THEN
  2024.       lcb& = lcb& + Reg_GetProdMinSize(i%)
  2025.     END IF 
  2026.       NEXT
  2027.       SetListItem "IDC_TEXT", 4, LdString(SID_SPACENEEDED) + _
  2028.       STR$((lcb& \ 1048576) + 1) + gStrMB$
  2029.  
  2030.     '** Set up the normal font controls
  2031.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2032.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2033.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  2034.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT4)
  2035.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT5)
  2036.     AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT10)
  2037.  
  2038.     AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  2039.     AddListItem  SYM_UPDATELIST$, "IDC_TEXT2"
  2040.     AddListItem  SYM_UPDATELIST$, "IDC_TEXT4"
  2041.  
  2042.     '** Init the path area. We only change first path in list.
  2043.     '** So far, the SmartSuite dlg does not have any paths.
  2044.  
  2045.     dirChanged%  = FALSE
  2046.     dirChanged2%  = FALSE
  2047.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  2048.        dirChanged%  = TRUE
  2049.        dirSym$      = Reg_GetDirSymbolList(1)
  2050.        If GetListLength(dirSym$) >= 1 Then
  2051.     dirSym$      = GetListItem(dirSym$, 1)
  2052.     dirToChange$ = GetSymbolValue(dirSym$)
  2053.     Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  2054.     SetListItem "IDC_EDIT", 1, dirToChange$
  2055.     drvIndex%(1) = ValidateEditBox(hDlg& , 1)
  2056.     AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  2057.        End If
  2058.  
  2059.        dirSym2$      = Reg_GetDirSymbolList(1)
  2060.        NumDirs% = Reg_GetProdSupportForExtraProdDirs(1)
  2061.  
  2062.        If GetListLength(dirSym2$) > 1 AND _
  2063.     NumDirs% = 1 Then
  2064.      dirChanged2%  = TRUE
  2065.      dirSym2$      = GetListItem(dirSym2$, 2)
  2066.      dirToChange2$ = GetSymbolValue(dirSym2$)
  2067.      Lot_GetDriveFreeSpaceList "IDC_COMBO2"
  2068.      SetListItem "IDC_EDIT", 2, dirToChange2$
  2069.      drvIndex%(2) = ValidateEditBox(hDlg& , 2)
  2070.      AddListItem SYM_UPDATELIST$, "IDC_EDIT2"
  2071.        End If
  2072.  
  2073.      '** If server, then fill the COMPONENTS as well.
  2074.      '** TV: COMPONENTS is always IDC_EDIT/COMBO3 
  2075.      IF GetSymbolValue(SYM_NETWORK$) = gSERVER$ THEN
  2076.   dirToChange$ = GetSymbolValue(SYM_COMPONENTSDIR$)
  2077.   Lot_GetDriveFreeSpaceList "IDC_COMBO3"
  2078.   SetListItem "IDC_EDIT", 3, dirToChange$
  2079.   drvIndex%(3) = ValidateEditBox(hDlg& , 3)
  2080.   AddListItem SYM_UPDATELIST$, "IDC_EDIT3"
  2081.      END IF
  2082.  
  2083.  
  2084.      '** Take care of whether the controls are enabled or not
  2085.      IF Reg_GetProdSupportForFullInstall(1) = FALSE THEN
  2086.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_B1),    FALSE))
  2087.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT1), FALSE))
  2088.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT2), FALSE))
  2089.      END IF
  2090.      IF Reg_GetProdSupportForMinInstall(1)  = FALSE THEN
  2091.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_B2),    FALSE))
  2092.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT3), FALSE))
  2093.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT4), FALSE))
  2094.      END IF
  2095.      IF Reg_GetProdSupportForCustInstall(1) = FALSE THEN
  2096.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_B3),    FALSE))
  2097.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT5), FALSE))
  2098.      END IF
  2099.        '**** IDC_TEXT3and IDC_TEXT5 should be visible for a product with only full install
  2100.      IF (Reg_GetProdSupportForFullInstall(1) <> FALSE) AND _
  2101.   (Reg_GetProdSupportForMinInstall(1)  = FALSE)  AND _
  2102.   (Reg_GetProdSupportForCustInstall(1) = FALSE)  THEN
  2103.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT3), TRUE))
  2104.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT4), TRUE))
  2105.   notused% = CINT(EnableWindow(GetDlgItem(hDlg&, IDC_TEXT5), TRUE))
  2106.      END IF
  2107. '** Don't allow user path changes for a language install
  2108.       If GetSymbolValue(SYM_INSTALLKIND$) = gLANGUAGEINSTALL$ _   
  2109.       Then 
  2110.   notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR1), SW_HIDE))
  2111.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_BRWSDIR1), FALSE))
  2112.   notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR2), SW_HIDE))
  2113.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_BRWSDIR2), FALSE))
  2114.   notused% = CINT(ShowWindow (GetDlgItem(hDlg&, IDC_BRWSDIR3), SW_HIDE))
  2115.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_BRWSDIR3), FALSE))
  2116.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_COMBO1), FALSE))
  2117.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_EDIT1), FALSE))
  2118.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_COMBO2), FALSE))
  2119.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_EDIT2), FALSE))
  2120.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_COMBO3), FALSE))
  2121.   notused% = CINT(EnableWindow (GetDlgItem(hdlg&, IDC_EDIT3), FALSE))
  2122.       End If
  2123.     END IF
  2124.  
  2125.    case "IDC_COMBO1"
  2126.     ComboSelChanged 1,Inst%
  2127.     DirChanged% = TRUE
  2128.  
  2129.    case "IDC_COMBO2"
  2130.     ComboSelChanged 2,Inst%
  2131.     DirChanged2% = TRUE
  2132.  
  2133.    case "IDC_COMBO1"
  2134.     ComboSelChanged 3,Inst%
  2135.     DirChanged3% = TRUE
  2136.  
  2137.    case "IDC_B"
  2138.       SELECT CASE Inst%
  2139.  
  2140.       CASE 1
  2141.      size$ = gCOMPLETE$
  2142.  
  2143.       CASE 2
  2144.      size$ = gLAPTOP$
  2145.  
  2146.       CASE 3
  2147.      size$ = gCUSTOM$
  2148.  
  2149.       END SELECT
  2150.  
  2151.  
  2152.    case "IDC_EDIT"
  2153.       SELECT CASE Inst%
  2154.  
  2155.       CASE 1
  2156.    dirChanged% = TRUE
  2157.       CASE 2
  2158.    dirChanged2% = TRUE
  2159.       END SELECT
  2160.  
  2161.    case "IDC_BRWSDIR"
  2162.    drvSel% = ValidateBrowse(hDlg& , Inst%) 
  2163.       SELECT CASE Inst%
  2164.  
  2165.       CASE 1
  2166.    dirChanged% = TRUE
  2167.       CASE 2
  2168.    dirChanged2% = TRUE
  2169.       END SELECT
  2170.    
  2171.    case "IDC_OK"
  2172.      SetSymbolValue SYM_SIZEOFINSTALL$, size$
  2173.  
  2174.      '** Handle the main application path
  2175.      IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ AND _
  2176.      dirChanged% = TRUE                               THEN
  2177.        IF ValidateEditBox(hDlg& , 1) = 0 THEN
  2178.      SetListItem "__LASTSTATUS", 1, "Q"
  2179.      EXIT SUB
  2180.        END IF
  2181.         dirToChange$ = GetPathFromComboEdit(hDlg&,1)
  2182.  
  2183.        IF ValidatePath(dirToChange$) = FALSE THEN
  2184.      SetListItem "__LASTSTATUS", 1, "Q"
  2185.      EXIT SUB
  2186.        ELSE
  2187.      dirSym$ = Reg_GetDirSymbolList(1)
  2188.      If GetListLength(dirSym$) >= 1 Then
  2189.        dirSym$ = GetListItem(dirSym$, 1)
  2190.        SetSymbolValue dirSym$, dirToChange$
  2191.        rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
  2192.        FALSE, |"| + dirSym$ + |",TRUE|)
  2193.        If rc$ = gBACK Then
  2194.          SetListItem "__LASTSTATUS", 1, "Q"
  2195.          EXIT SUB
  2196.        End If
  2197.        Lot_RefreshDestination(dirSym$)
  2198.      End If
  2199.        END IF
  2200.      END IF
  2201.  
  2202.      '** Handle the secondary application path
  2203.      IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ AND _
  2204.      dirChanged2% = TRUE THEN
  2205.        IF drvSel% = ValidateEditBox(hDlg& , 2) = 0 THEN
  2206.      SetListItem "__LASTSTATUS", 1, "Q"
  2207.      EXIT SUB
  2208.        END IF
  2209.        dirToChange2$ = GetPathFromComboedit(hDlg&,2)
  2210.        IF ValidatePath(dirToChange2$) = FALSE THEN
  2211.      SetListItem "__LASTSTATUS", 1, "Q"
  2212.      EXIT SUB
  2213.        ELSE
  2214.      dirSym2$ = Reg_GetDirSymbolList(1)
  2215.      If GetListLength(dirSym2$) > 1 Then
  2216.        dirSym2$ = GetListItem(dirSym2$, 2)
  2217.        SetSymbolValue dirSym2$, dirToChange2$
  2218.        rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
  2219.        FALSE, |"| + dirSym2$ + |",TRUE|)
  2220.        If rc$ = gBACK Then
  2221.          SetListItem "__LASTSTATUS", 1, "Q"
  2222.          EXIT SUB
  2223.        End If
  2224.        Lot_RefreshDestination(dirSym2$)
  2225.      End If
  2226.        END IF
  2227.      END IF
  2228.  
  2229.      '** If this is server, then check the COMPONENTS dir
  2230.      IF GetSymbolValue(SYM_NETWORK$) = gSERVER$  AND _
  2231.      Reg_GetProdSupportForShare32(1) = 1 AND _
  2232.      GetListLength("IDC_EDIT") > 2 THEN
  2233.        IF ValidateEditBox(hDlg& , 3) = 0 THEN
  2234.      SetListItem "__LASTSTATUS", 1, "Q"
  2235.      EXIT SUB
  2236.        END IF
  2237.        dirToChange2$ = GetPathFromComboedit(hDlg,3)
  2238.        IF ValidatePath(dirToChange2$) = FALSE THEN
  2239.      SetListItem "__LASTSTATUS", 1, "Q"
  2240.      EXIT SUB
  2241.        ELSE
  2242.      SetSymbolValue SYM_COMPONENTSDIR$, dirToChange2$
  2243.      Lot_RefreshDestination(SYM_COMPONENTSDIR$)
  2244.        END IF
  2245.      END IF
  2246.      ResetWinWinsysSymbols
  2247.    END SELECT
  2248.  
  2249. DONESIZEOFINSTALLCB:
  2250.  
  2251. END SUB
  2252.  
  2253.  
  2254. '*************************************************************************
  2255. '** SUB DISTSIZEINSTALLCB (hDlg&, CtrlId%, Classes$, LInst&)
  2256. '**
  2257. '** Purpose:   Handles the DB_CHOOSEPATHDIST Dialog Box for Single
  2258. '**            and SmartSuite Install
  2259. '**            Always works with the current product (should be 1).
  2260. '**
  2261. '**            With a little work we might be able to use this callback
  2262. '**            for the main size of install dialog in SmartSuite.
  2263. '**            You would need to pay attention to minimum size and
  2264. '**            current product. Plus, the path asked for would be
  2265. '**            the BASEDIR, not a product path. However, I think the
  2266. '**            logic could be added.
  2267. '**
  2268. '** In Symbols:
  2269. '**     
  2270. '** Author:    DND, CMOY
  2271. '** Arguments: STANDARD CALLBACK ARGS
  2272. '** Comments:  SYM_SIZEOFINSTALL$ is an in-out param
  2273. '** Returns:
  2274. '**     
  2275. '*************************************************************************
  2276.  
  2277. SUB DISTSIZEINSTALLCB (hDlg&, CtrlId%, Classes$, LInst&)
  2278.  
  2279.    STATIC drvIndex%, dirChanged%, size$, lDistSize&
  2280.    DIM    dirSym$, dirToChange$, rc$, i%, nProds%, lcb&, notused%
  2281.    DIM    drvItem$, drvFree&, network$, Inst%
  2282.    DIM    drvSel%
  2283.  
  2284.    Inst% = CINT(LInst&)
  2285.  
  2286.    network$ = GetSymbolValue(SYM_NETWORK)
  2287.    SELECT CASE Classes$
  2288.    
  2289.    CASE "__DLGINIT"
  2290.       size$ = GetSymbolValue(SYM_SIZEOFINSTALL$)
  2291.       '** Fill the product full size
  2292.       lcb& = 0
  2293.       nProds% = Reg_GetNumberOfProducts()
  2294.       FOR i% = 1 to nProds%
  2295.       lcb& = lcb& + Reg_GetProdFullSize(i%)
  2296.       NEXT
  2297.       SetListItem "IDC_TEXT", 2, LdString(SID_SPACENEEDED) + _
  2298.      STR$((lcb& \ 1048576) + 1) + gStrMB$
  2299.  
  2300.  
  2301.       '** Set up the normal font controls
  2302.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2303.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2304.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT7)
  2305.  
  2306.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  2307.       AddListItem  SYM_UPDATELIST$, "IDC_TEXT2"
  2308.  
  2309.       '** Init the path area. We only change first path in list.
  2310.       '** So far, the SmartSuite dlg does not have any paths.
  2311. '      dirChanged%  = FALSE
  2312.       dirChanged%  = TRUE
  2313.       dirSym$      = Reg_GetDirSymbolList(1)
  2314.       If GetListLength(dirSym$) >= 1 Then
  2315.      dirSym$      = GetListItem(dirSym$, 1)
  2316.      dirToChange$ = GetSymbolValue(dirSym$)
  2317.      Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  2318.      SetListItem "IDC_EDIT", 1, dirToChange$
  2319.      drvIndex% = ValidateEditBox(hDlg& , 1)  
  2320.      drvItem$   = GetListItem("IDC_COMBO1",drvIndex%)
  2321.      drvFree&   = CLNG(MID$(drvItem$,3,Instr(drvItem$,";")-4))
  2322.      AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  2323.       End If
  2324.       lDistSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
  2325.       SetListItem "IDC_TEXT", 1, STR$(lDistSize&) + gStrK$
  2326.       SetListItem "IDC_TEXT", 2, STR$(drvFree& - lDistSize&) + gStrK$
  2327.       AddListItem SYM_UPDATELIST$, "IDC_TEXT1"
  2328.       AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
  2329.  
  2330.    case "IDC_COMBO1" 
  2331.       ComboSelChanged 1, Inst%
  2332.       dirChanged%   = TRUE
  2333.       '** For distribution, update the text.
  2334.       drvItem$   = GetListItem("IDC_COMBO1",Inst%)
  2335.       drvFree&   = CLNG(MID$(drvItem$,3,Instr(drvItem$,";")-4))
  2336. 'changed for unc      drvFree&   = CLNG(MID$(drvItem$,3,LEN(drvItem$)-5))
  2337.       '** already computed in __DLGINIT
  2338.       '** lDistSize& = Lot_GetInfSectionSize(gDISTRIBUTIONFILES$) \ 1024
  2339.       SetListItem "IDC_TEXT", 1, STR$(lDistSize&) + gStrK$
  2340.       SetListItem "IDC_TEXT", 2, STR$(drvFree& - lDistSize&) + gStrK$
  2341.       AddListItem SYM_UPDATELIST$, "IDC_TEXT1"
  2342.       AddListItem SYM_UPDATELIST$, "IDC_TEXT2"
  2343.  
  2344.  
  2345.    case "IDC_EDIT"
  2346.       dirChanged% = TRUE
  2347.  
  2348.    case "IDC_BRWSDIR"
  2349.       drvSel% = ValidateBrowse(hDlg& , Inst%)
  2350.       drvItem$   = GetListItem("IDC_COMBO1",drvSel%)
  2351.       drvFree&   = CLNG(MID$(drvItem$,3,Instr(drvItem$,";")-4))
  2352.       SetListItem "IDC_TEXT", 2, STR$(drvFree& - lDistSize&) + gStrK$
  2353.       AddListItem SYM_UPDATELIST$, "IDC_TEXT2" 
  2354.       dirChanged% = TRUE
  2355.  
  2356.    case "IDC_OK"
  2357.       
  2358.       SetSymbolValue SYM_SIZEOFINSTALL$, size$
  2359.  
  2360.       IF dirChanged% = TRUE THEN
  2361.      '** Handle the main application path
  2362.     
  2363.     IF ValidateEditBox(hDlg& , 1) = 0 THEN
  2364.       SetListItem "__LASTSTATUS", 1, "Q"
  2365.       EXIT SUB
  2366.     END IF
  2367.     dirToChange = GetPathFromComboEdit(hDlg&,1)
  2368.     IF ValidatePath(dirToChange$) = FALSE THEN
  2369.       SetListItem "__LASTSTATUS", 1, "Q"
  2370.       EXIT SUB
  2371.     ELSE
  2372.       dirSym$ = Reg_GetDirSymbolList(1)
  2373.       If GetListLength(dirSym$) >= 1 Then
  2374.         dirSym$ = GetListItem(dirSym$, 1)
  2375.         SetSymbolValue dirSym$, dirToChange$
  2376.         rc$ = Lot_CallOneProductFunction(1, "PathChange",gNEXT$, _
  2377.           FALSE, |"| + dirSym$ + |",TRUE|)
  2378.  
  2379.        '** Not sure what to do with the return yet
  2380.  
  2381.        Lot_RefreshDestination(dirSym$)
  2382.      End If
  2383.  
  2384.      ResetWinWinsysSymbols
  2385.      '** TV:     
  2386.      IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSMARTSUITE$ THEN
  2387.        SetSymbolValue SYM_BASEDIR$, dirToChange$
  2388.      END IF
  2389.        END IF
  2390.      END IF
  2391.  
  2392.    END SELECT
  2393.  
  2394. END SUB
  2395.  
  2396. '*************************************************************************
  2397. '** SUB DISKCOPYMETHODCB (hDlg&, CtrlId%, Classes$, LInst&)
  2398. '**
  2399. '** Purpose:  Allows user to choose Server or Distribution
  2400. '** IN SYMBOLS : NETWORK=SERVER |  DISTRIBUTION    
  2401. '** OUT SYMBOLS: NETWORK=SERVER | DISTRIBUTION    
  2402. '**     
  2403. '** Author:
  2404. '** Arguments:
  2405. '**     
  2406. '**     
  2407. '** Returns:
  2408. '**     
  2409. '*************************************************************************
  2410.  
  2411. SUB DISKCOPYMETHODCB (hDlg&, CtrlId%, Classes$, LInst&)
  2412.    DIM network$, Inst%
  2413.  
  2414.    Inst% = CINT(LInst&)
  2415.  
  2416.    SELECT CASE Classes$
  2417.    
  2418.    CASE "__DLGINIT"
  2419.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2420.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2421.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
  2422.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  2423.  
  2424.       network$ = GetSymbolValue(SYM_NETWORK$)
  2425.       IF network$ = gSERVER$ THEN
  2426.      SetListItem "IDC_B", 1, "T"
  2427.      AddListItem SYM_UPDATELIST$, "IDC_B1"
  2428.       ELSEIF network$ = gDISTRIBUTION$ THEN
  2429.      SetListItem "IDC_B", 2, "T"
  2430.      AddListItem SYM_UPDATELIST$, "IDC_B2"
  2431.       END IF
  2432.  
  2433.    CASE "IDC_B"
  2434.       SELECT CASE Inst%
  2435.       
  2436.       CASE 1
  2437.      SetSymbolValue SYM_NETWORK$, gSERVER$
  2438.  
  2439.       CASE 2
  2440.      SetSymbolValue SYM_NETWORK$, gDISTRIBUTION$
  2441.  
  2442.       END SELECT
  2443.  
  2444.    END SELECT
  2445.  
  2446. END SUB
  2447.  
  2448. '*************************************************************************
  2449. '** PUBLIC FUNCTION SRV_SUCCESSCB (hDlg&, CtrlId%, Classes$, LInst&)
  2450. '** Purpose: This is a call back for Success dlg box for Server Install.
  2451. '**          It executes the licenser.exe, if start licenser button
  2452. '**          is selected.
  2453. '**          This works with DB_SRV_SUCCESS AND DB_SRV_SUCCESS_LIC
  2454. '** Author:  MZ
  2455. '** Arguments:
  2456. '*************************************************************************
  2457.  
  2458. PUBLIC SUB SRV_SUCCESSCB (hDlg&, CtrlId%, Classes$, LInst&)
  2459.    DIM path$, exist%, ExecError%, Inst%
  2460.  
  2461.    Inst% = CINT(LInst&)
  2462.  
  2463.    SELECT CASE Classes$
  2464.  
  2465.    CASE "__DLGINIT"
  2466.       '** Set up the normal font controls
  2467.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2468.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  2469.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT4)
  2470.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  2471.  
  2472.    CASE "IDC_B"
  2473.       IF Inst% = 1 THEN
  2474.      path$  = GetSymbolValue(SYM_LICDIR$)
  2475.      path$  = path$ + "licenser.exe"
  2476.      exist% = DoesFileExist(path$, femExists)
  2477.  
  2478.      '** DND: Should I be displaying where we looked for licenser?
  2479.      IF exist% = FALSE THEN
  2480.     ErrorMsgNoDlgExit SID_NO_LICENSEREXE, ""
  2481.      ELSE
  2482.     '** DND: Should I display what we could not launch?
  2483.     ExecError% = WinExec (path$, SW_SHOWNORMAL)
  2484.     IF ExecError% < 32 THEN
  2485.        ErrorMsgNoDlgExit SID_ERR_EXECLIC, ""
  2486.     END IF
  2487.      END IF
  2488.       END IF
  2489.  
  2490.    END SELECT
  2491.  
  2492. END SUB
  2493.  
  2494. '*************************************************************************
  2495. '** PUBLIC SUB LAUNCHNAGCB (hDlg&, CtrlId%, Classes$, LInst&)
  2496. '** Purpose: Sole purpose is to launch Notepad on the NAG
  2497. '**          
  2498. '**          
  2499. '** Author: Marcel Meth
  2500. '** Arguments:
  2501. '**     
  2502. '**     
  2503. '** Returns:
  2504. '**     
  2505. '*************************************************************************
  2506.  
  2507. PUBLIC SUB LAUNCHNAGCB (hDlg&, CtrlId%, Classes$, LInst&)
  2508.    DIM cmd$, ExecError%, Inst%
  2509.  
  2510.    Inst% = CINT(LInst&)
  2511.  
  2512.    SELECT CASE Classes$
  2513.  
  2514.    CASE "__DLGINIT"
  2515.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2516.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  2517.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  2518.  
  2519.    CASE "IDC_B"
  2520.  
  2521.       '** DND: Will these filenames always be the same?
  2522.  
  2523.       cmd$ = GetSymbolValue(SYM_STF_CWDDIR$) + LdString(SID_READNETWRI)
  2524.         If NOT DoesFileExist(cmd$, femExists) Then
  2525.             cmd$ =  MakePath(GetSymbolValue(SYM_STF_SRCDIR$),LdString(SID_READNETWRI))
  2526.         End If
  2527.          If NOT DoesFileExist(cmd$, femExists) Then
  2528.              cmd$ =  LdString(SID_READNETWRI)
  2529.          End If
  2530.         cmd$ = LdString(SID_WRITEEXE) & " " & cmd$
  2531.       ExecError% = WinExec (cmd$, SW_SHOWNORMAL )
  2532.  
  2533.       '** DND: This does not seem like enough info for error
  2534.       IF ExecError% < 32 THEN
  2535.             ErrorMsg SID_ERR_EXECWRITE, ""
  2536.       END IF
  2537.  
  2538.    END SELECT   
  2539.  
  2540. END SUB
  2541.  
  2542. '*************************************************************************
  2543. '*************************** Local Functions *****************************
  2544. '*************************************************************************
  2545.  
  2546. '*************************************************************************
  2547. '** SUB SetCustomInfo(fOnTab%,fNewSpace%,fUpdateAll%)
  2548. '**
  2549. '** Purpose: Fill with info for custom dialogs. Call this every time
  2550. '**          the LCB changes selection or state.
  2551. '**            
  2552. '** Author:    DND
  2553. '** Arguments: fOnTab%     TRUE if tab has focus
  2554. '**            fNewSpace%  TRUE if we should get new space requirements
  2555. '**            fUpdateAll% TRUE if we should update all fields on the dlg
  2556. '** Returns:   NONE
  2557. '*************************************************************************
  2558.  
  2559. SUB SetCustomInfo(fOnTab%,fNewSpace%,fUpdateAll%)
  2560.  
  2561. '   STATIC lckSpace&, drvSave$
  2562.    DIM    chpt$, dest$, dirName$, dirSym$, drv$, tips$, tmpDrv$, szCost$
  2563.    DIM    lckCost&, lckAvail&
  2564.    DIM    bitmap%, n%, notused%, lnotused&, hwndtemp&
  2565.  
  2566.    '** Get the tip and chapter from the current LCB item
  2567.    IF fOnTab% = FALSE THEN
  2568.       chpt$ = Lot_LCBGetItem(gPageArray(gCurrentPageIndex%).hDlgPage, _
  2569.          gPageArray(gCurrentPageIndex%).nSel,     _
  2570.          LCBITEM_CHAPTER)
  2571.    ELSE
  2572.       chpt$ = gPageArray(gCurrentPageIndex%).szChapter$
  2573.    END IF
  2574.    IF chpt$ = "" THEN EXIT SUB
  2575.  
  2576.    tips$ = Lot_GetChapterValStr(chpt$, F_TIPS)   
  2577.  
  2578.    '** If instructed then build the custom cost list
  2579.    IF GetListLength(SYM_CUSTOMCOST$) = 0 OR fNewSpace% <> FALSE THEN
  2580.       lnotused& = LcbGetChapterCost("", "", SYM_CUSTOMCOST$, "")
  2581.    END IF
  2582.  
  2583.    '** Get the destination directory and dirName
  2584.    dirSym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
  2585.  
  2586.    dest$    = GetSymbolValue(dirSym$)
  2587.    dirName$ = GetSymbolValue(dirSym$ + gNAME$)
  2588.    drv$     = MID$(dest$, 1, 1)
  2589. '** UNC stuff
  2590.    IF drv$ = "\" THEN
  2591.        Lot_SplitUNCPath dest$, drv$, tmpDrv$
  2592.        szCost$ = GetListItem(drv$,2)
  2593.        IF szCost$ = "" THEN
  2594.      lckCost& = 0
  2595.        ELSE
  2596.      lckCost& = CLNG(szCost$) \ 1024
  2597.        END IF
  2598.    ELSE
  2599.        n%       = ASC(LCASE$(drv$)) - ASC("a") + 1
  2600.        lckCost& = CLNG(GetListItem(SYM_CUSTOMCOST$, n%)) \ 1024
  2601.    END IF
  2602.    '** Set the space available
  2603. '** I commented this out because the space value would be inacurate if
  2604. '** free space on a drive changed between visits to the LCB.
  2605. '** I left the code here in case calling GetFreeSpaceForDrive 
  2606. '** proved to be too much of a performance hit
  2607. '**   IF drv$ = drvSave$ THEN
  2608. '**      lckAvail& = lckSpace&
  2609. '**   ELSE
  2610. '**      IF MID$(drv$,1,1) = "\" THEN
  2611. '**        szCost$ = GetListItem(drv$,4) 'get the drivefree space for the
  2612. '**        IF szCost$ <> "" THEN         'unc volume
  2613. '**          lckAvail& = CLNG(szCost$)
  2614. '**        ELSE
  2615. '**          lckAvail& = 0
  2616. '**        END IF
  2617. '**      ELSE
  2618.     lckAvail& = GetFreeSpaceForDrive(drv$)
  2619. '**        lckSpace& = lckAvail&
  2620. '**        drvSave$  = drv$
  2621. '**      END IF
  2622. '**   END IF
  2623.    IF fUpdateAll% <> FALSE THEN
  2624.       '** write out the tip text
  2625.     SetWindowText GetDlgItem(gPageArray(gCurrentPageIndex%).hDlgPage&, IDC_TEXT1), tips$
  2626.  
  2627.       '** Set the bitmap (if any)
  2628.       bitmap% = Lot_GetChapterValInt(chpt$, F_BITMAP)
  2629.         lnotused& = SendMessage(GetDlgItem(gPageArray(gCurrentPageIndex%).hDlgPage&, IDC_BMP1), WM_COMMAND, _
  2630.                             UM_SETBITMAP, bitmap%)
  2631.  
  2632.       '** Set all the values in the dialogs
  2633.       '** SetWindowText GetDlgItem(gPageArray(gCurrentPageIndex%).hDlgPage&, IDC_TEXT1), tips$
  2634.       SetWindowText GetDlgItem(ghdlg&, IDC_TEXT4), dest$
  2635.       SetWindowText GetDlgItem(ghdlg&, IDC_TEXT8), dest$
  2636.       SetWindowText GetDlgItem(ghdlg&, IDC_TEXT5), dirName$
  2637.    END IF
  2638.  
  2639.    SetWindowText GetDlgItem(ghdlg&, IDC_TEXT2), Lot_MakeSizeString(lckCost&)
  2640.    SetWindowText GetDlgItem(ghdlg&, IDC_TEXT3), Lot_MakeSizeString(lckAvail&)
  2641.  
  2642.       ''* Disable the Change Path.. Button if on a shared directory
  2643.    IF GetSymbolValue(SYM_NETWORK$) = gSTANDARD$ AND _
  2644.       IsWindowVisible(GetDlgItem(ghdlg&, IDC_B1)) <> FALSE THEN
  2645.        notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), TRUE))
  2646.       ''* Disable the Change Path.. Button if on a tab, not an item
  2647.  
  2648.       IF fOnTab% = TRUE THEN _
  2649.      notused% = CINT(EnableWindow (GetDlgItem(ghdlg&, IDC_B1), FALSE))
  2650.    END IF
  2651.  
  2652. END SUB
  2653.  
  2654.  
  2655. PUBLIC SUB ResetWinWinsysSymbols()
  2656. '** Purpose:    Reset WINDIR, WINSYSDIR to the value of SymVal$ for server
  2657. '**             or set it back if change from server -> other
  2658. '** Author:     MZ, JMD
  2659. '** Arguments:  
  2660. '*************************************************************************
  2661.  
  2662.    DIM   network$, SymVal$
  2663.  
  2664.    network$ = GetSymbolValue(SYM_NETWORK$)
  2665.    IF network$ = gSERVER$ THEN
  2666.  
  2667.       IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  2668.      SymVal$ = Reg_GetDirSymbolList(1)
  2669.      If GetListLength(SymVal$) >= 1 Then
  2670.     SymVal$ = GetListItem(SymVal$, 1)
  2671.     SymVal$ = GetSymbolValue(SymVal$)
  2672.      Else
  2673.     '** RESOURCE! ***
  2674.     ErrorMsg SID_ERR_SRV_MUST_HAVE_MAINDIR, "" 
  2675.     ERROR STFQUIT
  2676.      End If
  2677.       ELSE
  2678.      SymVal$ = GetSymbolValue(SYM_BASEDIR$)
  2679.       END IF
  2680.  
  2681.       SetSymbolValue SYM_WINDIR$,    SymVal$ + "win\"
  2682.       SetSymbolValue SYM_WINSYSDIR$, SymVal$ + "winsys\"
  2683.       SetSymbolValue SYM_LOTUSFONTSDIR$, SymVal$ + "win\fonts\"
  2684.  
  2685.       Lot_RefreshDestination(SYM_WINDIR$)
  2686.       Lot_RefreshDestination(SYM_WINSYSDIR$)
  2687.       Lot_RefreshDestination(SYM_LOTUSFONTSDIR$)
  2688.  
  2689.    ELSE
  2690.       Lot_InitializeWinWinsysSym
  2691.    END IF
  2692.  
  2693. END SUB
  2694.  
  2695. '** DND: This function should be moved to Toolkit. We might also
  2696. '**      want to think about calling this function whenever a destination
  2697. '**      directory is entered.
  2698.  
  2699. FUNCTION DoesFileExistInDir (dirlist$) AS INTEGER
  2700. '** Purpose:   Takes a list of directories and puts up an error message
  2701. '**            listing all the directories which have files in them. 
  2702. '** In Symbols: 
  2703. '** OUT symbols: 
  2704. '**             
  2705. '**     
  2706. '** Author:  JYOTI KEDIA
  2707. '** Arguments: list of directories
  2708. '**     
  2709. '**     
  2710. '** Returns: TRUE
  2711. '**     
  2712. '*************************************************************************
  2713.    DIM errstr$, n%, i%, dirname$, RC%, temp$, sz$
  2714.  
  2715.    DoesFileExistInDir = TRUE
  2716.    errstr$ = ""
  2717.    n% = GetListLength(dirlist$)
  2718.    for i% = 1 to n%
  2719.       dirname$ = GetListItem(dirlist$,i%) 
  2720.       rc% = DoesDirExist(dirname$)
  2721.       If DoesDirExist(dirname$)Then                
  2722.      temp$ = Lot_Dir(dirname$+"\*.*") 
  2723.      if temp$ <> "" Then 
  2724.     errstr$ = errstr$ + CHR$(10) + CHR$(10) + "     " + dirname$
  2725.      end if
  2726.       end if
  2727.    Next
  2728.        
  2729.    if errstr$ <> "" Then
  2730.       sz$ = LdString(SID_DIR_NOT_EMPTY) + errstr$
  2731.       RC% = DoMsgBox(sz$,LdString(SID_TKT_STD_TITLE),MB_OKCANCEL + MB_ICONEXCLAMATION) 
  2732.       if RC% <> 1 Then
  2733.      SetListItem "__LASTSTATUS",1,"Q"
  2734.      EXIT FUNCTION
  2735.       end if 
  2736.    end if
  2737.  
  2738. END FUNCTION
  2739.  
  2740. '** SUB SRVNODEOPTIONSCB (hDlg&, CtrlId%, Classes$, LInst&)
  2741. '** Purpose: Drives DBSUIT_SRV_NODEOPTIONS dialog
  2742. '** Author:    MZ
  2743. '** Arguments: Callback args
  2744. '** Returns:   NONE
  2745. '** Restriction: this call back works only in custom install
  2746. '*************************************************************************
  2747. SUB SRVNODEOPTIONSCB (hDlg&, CtrlId%, Classes$, LInst&)
  2748.   DIM chpt$, firstchpt$, ProdName$, child$, dirsym$
  2749.   DIM toggle%,Selection%,sel%,Written%
  2750.   DIM NumOfProds%, OptNum%, OptName$, tiponly%,ProdNum%, Selected$, prodno$
  2751.   DIM RC$, i%, j%,k%, notused%, Item$, flag$, SaveInst%, index%,OptKeyWord$
  2752.   DIM Inst%,groupOn%,gIndex%,memberCount%
  2753.  
  2754.   Inst% = CINT(LInst&)
  2755.  
  2756.   SELECT CASE Classes$
  2757.  
  2758.     case "__DLGINIT"
  2759.  
  2760.       ' If no products are registered exit
  2761.       NumOfProds% = Reg_GetNumberOfProducts()
  2762.       IF NumOfProds%=0 THEN
  2763.     EXIT SUB
  2764.       END IF
  2765.  
  2766.       ' Make the right hand text not bold
  2767.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2768.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  2769.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  2770.  
  2771.       ' Turn of the display during this operation
  2772.       Lot_LCBSetRedraw hDlg&, 0
  2773.       Lot_LCBResetContent hDlg&
  2774.  
  2775.       ' Loop through products
  2776.       gIndex% = 1   '***    group box index
  2777.       FOR i% = 1 TO NumOfProds%
  2778.     Reg_ReSetAllNodeOptsSelToDefaults i%
  2779.     OptNum%=Reg_GetNumofNodeOptions(i%)
  2780.     IF OptNum% <> 0 THEN
  2781.       chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(i%) + gTOP$)
  2782.       IF firstchpt$ = "" THEN     
  2783.         firstchpt$ = chpt$
  2784.       END IF
  2785.       Lot_SetSpaceDirTip hDlg&,chpt$,1 - IDC_LCB1 + 1,i%,FALSE
  2786.       ProdName$ = Lot_GetChapterValStr(chpt$, F_NAME) 
  2787.       Written% = 0
  2788.       groupOn% = FALSE
  2789.             memberCount% = 0
  2790.       ' Loop through the options
  2791.       FOR j% = 1 TO OptNum%
  2792.         ' Indent the option name under the product
  2793.         OptKeyWord$ = Reg_GetNodeOptionStr(i%,j%)
  2794.         chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$)
  2795.         IF INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1 THEN
  2796.           IF Written% = 0 THEN
  2797.         ' Write: check box selected
  2798.         '        Name of the product;
  2799.         '        no size;
  2800.         '        number of node options for this product;
  2801.         '        product number;
  2802.         '        G for group
  2803.         Item$="0"+ProdName$+";;"+STR(OptNum%)+";"+STR(i%)+";G"
  2804.         IF Lot_LCBAddItem(hDlg&, Item$) = 0 THEN
  2805.           ErrorMsg SID_ERR_POPULATELCB, ""
  2806.           ERROR STFQUIT
  2807.         END IF
  2808.         Written% = 1
  2809.         memberCount = memberCount + 1
  2810.           END IF
  2811.  
  2812.           OptName$ = "    "+Lot_GetChapterValStr(chpt$, F_NAME)
  2813.           ' Write: check box selected
  2814.           '        Indented Name of the feature;
  2815.           '        size of the feature in Kb;
  2816.           '        chapter number;
  2817.           '        product number;
  2818.           '        M for member;
  2819.           '        OptKeyWord$;
  2820.           '        OptSequence
  2821.           Selected$ = Reg_IsNodeOptionSelected(i%,j%)
  2822.           IF Selected$ = STR(1) THEN
  2823.                 Selected$ = "1"
  2824.         groupOn% = TRUE
  2825.                 ELSE 
  2826.                 Selected$ = "0"
  2827.                 END IF
  2828.         Item$=Selected$+OptName$+";"+ _
  2829.         Lot_MakeSizeString(Lot_GetInfChapterSize(chpt$)\1024) _
  2830.         +";"+chpt$+";"+STR(i%)+";M;"+OptKeyWord$+";"+STR(j%)
  2831.           IF Lot_LCBAddItem(hDlg&, Item$) = 0 THEN
  2832.         ErrorMsg SID_ERR_POPULATELCB, ""
  2833.         ERROR STFQUIT
  2834.           END IF
  2835.           memberCount = memberCount + 1
  2836.         ELSE
  2837.           Reg_ReSetNodeOptionSelected i%,j%,0
  2838.         END IF
  2839.       NEXT
  2840.       IF groupOn <> FALSE THEN
  2841.         notused% = Lot_LCBReplaceItem(hDlg&, gIndex%, LCBITEM_SELECTED,"1")
  2842.       END IF
  2843.       'The next group index is the previous plus number of member boxes
  2844.       gIndex% = gIndex% + memberCount%
  2845.     END IF
  2846.       NEXT
  2847.  
  2848.       ' Turn on the display
  2849.       Lot_LCBSetRedraw hDlg&, 1
  2850.  
  2851.       ' Select the first item in the listbox
  2852.       Lot_LCBSetSel hDlg&, 1
  2853.       prodno$  = Lot_LCBGetItem(hDlg&,1,5)   '***5-productnumber
  2854.       Lot_SetSpaceDirTip hDlg&,firstchpt$,1,CINT(prodno$),FALSE
  2855.  
  2856.     case "IDC_LCB"
  2857.  
  2858.       SetYieldActive FALSE    ' turn off yielding while handling lcb
  2859.  
  2860.       '** If Inst% is negative that just means that the section changed.
  2861.       '** If Inst% is positive then a check box was toggled.
  2862.       SaveInst% = Inst%
  2863.       IF Inst% < 0 THEN
  2864.     Inst%    = -Inst%
  2865.     tiponly% = TRUE
  2866.     toggle% = FALSE
  2867.       ELSE
  2868.     tiponly% = FALSE
  2869.     toggle% = TRUE
  2870.       END IF
  2871.  
  2872.       ' Find what check box was hit
  2873.       index% = Inst% - IDC_LCB1 + 1
  2874.       ' Get the chapter no or number of options from the check box info
  2875.       chpt$  = Lot_LCBGetItem(hDlg&, index%, LCBITEM_CHAPTER)
  2876.       ' Get the product No from the check box info
  2877.       ProdNum% = CINT(Lot_LCBGetItem(hDlg&, index%, 5))
  2878.       ' Read Group/Member flag from the list of check boxes
  2879.       flag$ = Lot_LCBGetItem(hDlg&, index%, 6)
  2880.       ' Read if the check box is checked or not
  2881.       Selection% = CINT(Lot_LCBGetItem(hDlg&, index%, LCBITEM_SELECTED))
  2882.       ' Read the Keyword from the check box info
  2883.       OptKeyWord$ = Lot_LCBGetItem(hDlg&, index%, 7)
  2884.  
  2885.       '** Process the LCB info
  2886.  
  2887.       '** If you toggle a group
  2888.       '** set all members to the same
  2889.       '** index is the group box
  2890.       IF flag$ = "G" AND toggle% = TRUE THEN
  2891.     FOR i% = index%+1 TO index%+CINT(chpt$)
  2892.       IF i% > Lot_LCBGetCount(hDlg&) OR _
  2893.       Lot_LCBGetItem(hDlg&, i%, 6) = "G" THEN EXIT FOR
  2894.       IF Selection% = 0 THEN
  2895.         notused% = Lot_LCBReplaceItem(hDlg&, i%, LCBITEM_SELECTED,"0")
  2896.       ELSE
  2897.         notused% = Lot_LCBReplaceItem(hDlg&, i%, LCBITEM_SELECTED,"1")
  2898.       END IF
  2899.       Reg_SetNodeOptionSelected ProdNum%, CINT(Lot_LCBGetItem(hDlg&,_
  2900.       i%, 8)), Selection%
  2901.     NEXT
  2902.       END IF
  2903.  
  2904.       '** If you select a group
  2905.       IF flag$ = "G" AND toggle% = FALSE THEN
  2906.     prodno$  = Lot_LCBGetItem(hDlg&, index%,5)   '***5-productnumber
  2907.     chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(_
  2908.                 CINT(prodno$)) + gTOP$)
  2909.     Lot_SetSpaceDirTip hDlg&,chpt$,index%,ProdNum%,TRUE
  2910.       END IF
  2911.  
  2912.       '** If you toggle a member
  2913.       IF flag$ = "M" AND toggle% = TRUE THEN
  2914.     sel% = CINT(Lot_LCBGetItem(hDlg&, index%, LCBITEM_SELECTED))
  2915.  
  2916.         'set node option
  2917.     Reg_SetNodeOptionSelected ProdNum%, CINT(Lot_LCBGetItem(hDlg&,_
  2918.         index%, 8)), sel%
  2919.  
  2920.     Lot_SetSpaceDirTip hDlg&,chpt$,index%,ProdNum%,FALSE
  2921.  
  2922.     'go up the lcb until we find the group
  2923.     gIndex%=index%
  2924.     WHILE flag <> "G" AND gIndex% > 0
  2925.       gIndex%=gIndex%-1
  2926.       flag$ = Lot_LCBGetItem(hDlg&, gIndex%, 6)
  2927.     WEND
  2928.  
  2929.         'now scroll down and look at all the members
  2930.     groupOn%=FALSE
  2931.     chpt$  = Lot_LCBGetItem(hDlg&, gIndex%, LCBITEM_CHAPTER)
  2932.         '** Scroll down the member boxes to see if any are on
  2933.         FOR i% = gIndex%+1 TO gIndex%+CINT(chpt$)
  2934.             IF i% > Lot_LCBGetCount(hDlg&) OR _
  2935.             Lot_LCBGetItem(hDlg&, i%, 6) = "G" THEN EXIT FOR
  2936.             sel% = CINT(Lot_LCBGetItem(hDlg&, i%, LCBITEM_SELECTED))
  2937.       IF sel% <> FALSE THEN 
  2938.             groupOn% = TRUE
  2939.             EXIT FOR
  2940.             END IF
  2941.     NEXT
  2942.  
  2943.     IF groupOn% = FALSE THEN
  2944.       notused% = Lot_LCBReplaceItem(hDlg&, gIndex%, LCBITEM_SELECTED,"0")
  2945.         ELSE
  2946.       notused% = Lot_LCBReplaceItem(hDlg&, gIndex%, LCBITEM_SELECTED,"1")
  2947.     END IF
  2948.       END IF
  2949.  
  2950.       '** If you select a member
  2951.       IF flag$ = "M" AND toggle% = FALSE THEN
  2952.     Lot_SetSpaceDirTip hDlg&,chpt$,index%,ProdNum%,TRUE
  2953.       END IF
  2954.  
  2955.       SetYieldActive TRUE     ' turn yielding back on
  2956.  
  2957.    END SELECT
  2958.  
  2959. END SUB
  2960.  
  2961.  
  2962.  
  2963.  
  2964. '*************************************************************************
  2965. SUB NODENODEOPTIONSCB (hDlg&, CtrlId%, Classes$, LInst&)
  2966. '** Purpose: Drives DBSUIT_NODE_NODEOPTIONS dialog
  2967. '** Author:    MZ
  2968. '** Arguments: Callback args
  2969. '** Returns:   NONE
  2970. '*************************************************************************
  2971.   DIM chpt$, firstchpt$, ProdName$, dirsym$,toggle%,Selection%,sel%,Written%
  2972.   DIM OptName$, tiponly%,ProdNum%, Selected$, prodno$
  2973.   DIM AllProdNum%,AllOptNum%
  2974.   DIM RC$, i%, j%, notused%, Item$, flag$, SaveInst%, index%,OptKeyWord$
  2975.   DIM Inst%, drvSel%, dirToChange$
  2976.   DIM avail&, gIndex%,groupOn%,tipChpt$,thisChptIn%,memberCount%
  2977.   STATIC dirChanged%
  2978.  
  2979.   Inst% = CINT(LInst&)
  2980.  
  2981.   SELECT CASE Classes$
  2982.  
  2983.     case "__DLGINIT"
  2984.       dirChanged%  = FALSE
  2985.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  2986.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT3)
  2987.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  2988.  
  2989.       ' Turn of the display during this operation
  2990.       Lot_LCBSetRedraw hDlg&, 0
  2991.       Lot_LCBResetContent hDlg&
  2992.  
  2993.  
  2994.     IF GetSymbolValue(SYM_SINGLESMARTSUITE$) = gSINGLE$ THEN
  2995.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  2996.       dirSym$ = Reg_GetDirSymbolList(1)
  2997.       dirSym$ = GetListItem(dirSym$,1) 
  2998.       dirToChange$ = GetSymbolValue(dirSym$)
  2999.     ELSE
  3000.       dirToChange$ = GetSymbolValue(SYM_BASEDIR$)
  3001.     END IF
  3002.     SetSymbolValue SYM_CHANGEDIRSYMBOL$, dirSym$
  3003.     SetListItem "IDC_EDIT", 1, dirToChange$
  3004.     notused% = ValidateEditBox(hDlg& , 1)
  3005.  
  3006.     AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  3007.  
  3008.     'Loop through the products and find the avail node options
  3009.     AllProdNum% = 0
  3010.     AllProdNum% = Reg_GetNumberOfProducts()
  3011.     IF AllProdNum% <> 0 THEN
  3012.       gIndex% = 1
  3013.       'Loop through the products
  3014.       Written% = 0
  3015.       FOR prodNum%=1 TO AllProdNum%
  3016.     AllOptNum% = 0
  3017.     memberCount% = 0
  3018.     Reg_ReSetAllNodeOptsSelToDefaults prodNum%
  3019.     AllOptNum% = Reg_GetNumofNodeOptions(prodNum%)
  3020.     chpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(prodNum%)_
  3021.       + gTOP$)
  3022.     IF AllOptNum% <> 0 AND (INT(Lot_GetChapterValInt(chpt$,F_INOROUT)) = 1) THEN
  3023.       IF firstchpt$ = "" THEN 
  3024.         firstchpt$ = chpt$
  3025.       END IF
  3026.       ProdName$ = Lot_GetChapterValStr(chpt$, F_NAME) 
  3027.       Written% = 0
  3028.       'if none of the members are on we will deselect group box
  3029.       groupOn%=FALSE
  3030.       ' Loop through the options
  3031.       FOR j% = 1 TO AllOptNum%
  3032.         ' Indent the option name under the product
  3033.         OptKeyWord$ = Reg_GetNodeOptionStr(prodNum%,j%)
  3034.         chpt$ = Lot_GetChapterFromKeyword(OptKeyWord$)
  3035.         thisChptIn%=0
  3036.         avail& = Lot_IsTheNodeOptionsAvailToNode(prodNum%, OptKeyWord$)
  3037.         IF Lot_IsTheFeatureInstalled(OptKeyWord$) <> FALSE AND _
  3038.         avail <> FALSE THEN
  3039.           IF Written% = 0 THEN
  3040.         ' Write: check box selected
  3041.         '        Name of the product;
  3042.         '        no size;
  3043.         '        number of node options for this product;
  3044.         '        product number;
  3045.         '        G for group
  3046.         Item$="0"+ProdName$+";;"+STR(AllOptNum%)+";"+STR(prodNum%)+";G"
  3047.         IF Lot_LCBAddItem(hDlg&, Item$) = 0 THEN
  3048.           ErrorMsg SID_ERR_POPULATELCB, ""
  3049.           ERROR STFQUIT
  3050.         END IF
  3051.         Written% = 1
  3052.         memberCount% = memberCount% + 1
  3053.           END IF
  3054.           OptName$ = "    "+Lot_GetChapterValStr(chpt$, F_NAME)
  3055.           ' Write: check box selected
  3056.           '        Indented Name of the feature;
  3057.           '        size of the feature in Kb;
  3058.           '        chapter number;
  3059.           '        product number;
  3060.           '        M for member;
  3061.           '        OptKeyWord$;
  3062.           '        OptSequence
  3063.           Selected$ = Reg_IsNodeOptionSelected(prodNum%,j%)
  3064.           IF Selected$ = STR(1) THEN
  3065.         groupOn%=TRUE
  3066.         thisChptIn%=1
  3067.         Item$="1"+OptName$+";"+ _
  3068.         Lot_MakeSizeString(Lot_GetInfChapterSize(chpt$)\1024) _
  3069.         +";"+chpt$+";"+STR(prodNum%)+";M;"+OptKeyWord$+";"+STR(j%)
  3070.           ELSE
  3071.         Item$="0"+OptName$+";"+ _
  3072.         Lot_MakeSizeString(Lot_GetInfChapterSize(chpt$)\1024) _
  3073.         +";"+chpt$+";"+STR(prodNum%)+";M;"+OptKeyWord$+";"+STR(j%)
  3074.           END IF
  3075.           memberCount% = memberCount% + 1
  3076.           IF Lot_LCBAddItem(hDlg&, Item$) = 0 THEN
  3077.         ErrorMsg SID_ERR_POPULATELCB, ""
  3078.         ERROR STFQUIT
  3079.           END IF
  3080.         ELSE
  3081.         Reg_ReSetNodeOptionSelected prodNum%,j%,0
  3082.         END IF
  3083.         notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, thisChptIn%)
  3084.       NEXT
  3085.       IF groupOn% <> FALSE THEN
  3086.         notused% = Lot_LCBReplaceItem(hDlg&, gIndex%, LCBITEM_SELECTED,"1")
  3087.       END IF
  3088.       'The next group index is the previous plus number of member boxes
  3089.       gIndex% = gIndex% + memberCount%
  3090.     END IF
  3091.       NEXT
  3092.       ' Turn on the display
  3093.       Lot_LCBSetRedraw hDlg&, 1
  3094.  
  3095.       ' Select the first item in the listbox
  3096.       IF gIndex > 1 THEN 
  3097.     Lot_LCBSetSel hDlg&, 1
  3098.     prodno$  = Lot_LCBGetItem(hDlg&,1,5)   '***5-productnumber
  3099.     Lot_SetSpaceDirTip hDlg&,firstchpt$,1,CINT(prodno$),FALSE
  3100.       END IF
  3101.     END IF
  3102.  
  3103.     case "IDC_LCB"
  3104.  
  3105.       SetYieldActive FALSE    ' turn off yielding while handling lcb
  3106.  
  3107.       '** If Inst% is negative that just means that the section changed.
  3108.       '** If Inst% is positive then a check box was toggled.
  3109.       SaveInst% = Inst%
  3110.       IF Inst% < 0 THEN
  3111.     Inst%    = -Inst%
  3112.     tiponly% = TRUE
  3113.     toggle% = FALSE
  3114.       ELSE
  3115.     tiponly% = FALSE
  3116.     toggle% = TRUE
  3117.       END IF
  3118.       ' Find what check box was hit
  3119.       index% = Inst% - IDC_LCB1 + 1
  3120.       ' Get the chapter no or number of options from the check box info
  3121.       chpt$  = Lot_LCBGetItem(hDlg&, index%, LCBITEM_CHAPTER)
  3122.       ' Get the product No from the check box info
  3123.       ProdNum% = CINT(Lot_LCBGetItem(hDlg&, index%, 5))
  3124.       ' Read Group/Member flag from the list of check boxes
  3125.       flag$ = Lot_LCBGetItem(hDlg&, index%, 6)
  3126.       ' Read if the check box is checked or not
  3127.       Selection% = CINT(Lot_LCBGetItem(hDlg&, index%, LCBITEM_SELECTED))
  3128.       ' Read the Keyword from the check box info
  3129.       OptKeyWord$ = Lot_LCBGetItem(hDlg&, index%, 7)
  3130.  
  3131.       '**save the chapter number to set the tip
  3132.       IF flag$ = "G" THEN
  3133.     prodno$  = Lot_LCBGetItem(hDlg&, index%,5)   '***5-productnumber
  3134.     tipChpt$ = Lot_GetChapterFromKeyword(Reg_GetProductAcronym(CINT(prodno$)) + gTOP$)
  3135.       ELSE
  3136.     tipChpt$=chpt$
  3137.       END IF
  3138.       '** Process the LCB info
  3139.  
  3140.  
  3141.       '** If you toggle a group
  3142.       IF flag$ = "G" AND toggle% = TRUE THEN
  3143.  
  3144.     FOR i% = index%+1 TO index%+CINT(chpt$)
  3145.       IF i% > Lot_LCBGetCount(hDlg&) OR _
  3146.       Lot_LCBGetItem(hDlg&, i%, 6) = "G" THEN EXIT FOR
  3147.       thisChptIn% = 0
  3148.       'here prodno$ is used to toggle member box on/off
  3149.       prodno$ = "0"
  3150.       sel% = CINT(Lot_LCBGetItem(hDlg&, i%, LCBITEM_SELECTED))
  3151.       'selection is the group box state
  3152.       'sel is the member box state 
  3153.       'if they are different make them the same
  3154.       IF sel% <> selection% THEN
  3155.         chpt$  = Lot_LCBGetItem(hDlg&, i%, LCBITEM_CHAPTER)
  3156.         IF selection% <> 0 THEN 
  3157.           thisChptIn% = 1 
  3158.           prodno$ = "1"
  3159.         END IF
  3160.         notused% = Lot_LCBReplaceItem(hDlg&, i%,_
  3161.             LCBITEM_SELECTED,prodno$)
  3162.         notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, _
  3163.               thisChptIn%)
  3164.         Reg_SetNodeOptionSelected ProdNum%,_
  3165.         CINT(Lot_LCBGetItem(hDlg&, i%, 8)), thisChptIn%
  3166.       END IF
  3167.     NEXT
  3168.       END IF
  3169.  
  3170.       '** If you toggle a member
  3171.       IF flag$ = "M" AND toggle% = TRUE THEN
  3172.     'go up the lcb until we find the group
  3173.     gIndex%=index%
  3174.     WHILE flag <> "G" AND gIndex% > 0
  3175.       gIndex%=gIndex%-1
  3176.       flag$ = Lot_LCBGetItem(hDlg&, gIndex%, 6)
  3177.     WEND
  3178.     sel% = CINT(Lot_LCBGetItem(hDlg&, index%, LCBITEM_SELECTED))
  3179.     IF sel% = 0 THEN
  3180.       Reg_SetNodeOptionSelected ProdNum%, _
  3181.       CINT(Lot_LCBGetItem(hDlg&, index%, 8)), 0
  3182.       notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 0)
  3183.       groupOn%=FALSE
  3184.       'if all selections are off turn off group
  3185.       chpt$  = Lot_LCBGetItem(hDlg&, gIndex%, LCBITEM_CHAPTER)
  3186.  
  3187.  
  3188.       FOR i% = gIndex%+1 TO gIndex%+CINT(chpt$)
  3189.         IF i% > Lot_LCBGetCount(hDlg&) OR _
  3190.         Lot_LCBGetItem(hDlg&, i%, 6) = "G" THEN EXIT FOR
  3191.         sel% = CINT(Lot_LCBGetItem(hDlg&, i%, LCBITEM_SELECTED))
  3192.         IF sel% <> FALSE THEN 
  3193.           groupOn% = TRUE
  3194.           EXIT FOR
  3195.         END IF
  3196.       NEXT
  3197.  
  3198.       'if none of the options are on uncheck the group box
  3199.       IF groupOn% = FALSE THEN
  3200.         notused% = Lot_LCBReplaceItem(hDlg&, gIndex%, LCBITEM_SELECTED,"0")
  3201.       END IF
  3202.     ELSE
  3203.       Reg_SetNodeOptionSelected ProdNum%, CINT(Lot_LCBGetItem(hDlg&, index%, 8)), 1
  3204.       notused% = Lot_SetChapterFilesInCopyListInOrOut(chpt$, 1)
  3205.       notused% = Lot_LCBReplaceItem(hDlg&, gIndex%, LCBITEM_SELECTED,"1")
  3206.     END IF
  3207.       END IF
  3208.       '** If you select a member
  3209.       'if we did not toggle then tiponly is true
  3210.       IF toggle = FALSE THEN
  3211.     Lot_SetSpaceDirTip hDlg&,tipChpt$,index%,ProdNum%,TRUE
  3212.       ELSE
  3213.     Lot_SetSpaceDirTip hDlg&,tipChpt$,index%,ProdNum%,FALSE
  3214.       END IF
  3215.  
  3216.       SetYieldActive TRUE     ' turn yielding back on
  3217.  
  3218.     case "IDC_EDIT"
  3219.       dirChanged% = TRUE
  3220.  
  3221.     case "IDC_BRWSDIR"
  3222.       drvSel% = ValidateBrowse(hDlg& , Inst%) 
  3223.       dirChanged% = TRUE
  3224.  
  3225.     case "IDC_COMBO1"
  3226.       ComboSelChanged 1, Inst% 
  3227.       dirChanged% = TRUE
  3228.  
  3229.     case "IDC_OK"
  3230.       IF dirChanged% = TRUE THEN
  3231.     drvSel% = ValidateEditBox(hDlg& , 1)
  3232.     IF drvSel% = 0 THEN
  3233.       SetListItem "__LASTSTATUS", 1, "Q"
  3234.     EXIT SUB
  3235.       END IF
  3236.       dirToChange$ = GetPathFromComboEdit(hDlg&, 1)
  3237.       IF ValidatePath(dirToChange$) = FALSE THEN
  3238.     SetListItem "__LASTSTATUS", 1, "Q"
  3239.       ELSE
  3240.     dirSym$ = GetSymbolValue(SYM_CHANGEDIRSYMBOL$)
  3241.     SetSymbolValue dirSym$, dirToChange$
  3242.     rc$ = Lot_CallOneProductFunction(Lot_GetCurrentProduct(), _
  3243.     "PathChange", gNEXT$,    _
  3244.     FALSE, |"| + dirSym$ + |",FALSE|)
  3245.     If rc$ = gBACK Then
  3246.       SetListItem "__LASTSTATUS", 1, "Q"
  3247.       EXIT SUB
  3248.     End If
  3249.     Lot_RefreshDestination(dirSym$)
  3250.       END IF
  3251.     END IF
  3252.   END SELECT
  3253.  
  3254. END SUB
  3255.  
  3256. '*************************************************************************
  3257. SUB Lot_SetSpaceDirTip(hDlg&,chpt$,index%,ProdNum%,tiponly%)
  3258. '** Purpose: Fill with info for Server NodeOptions dialogs. Call this every
  3259. '**          time the LCB changes selection or state in  SRVNODEOPTIONSCB
  3260. '** Author:    MZ
  3261. '** Arguments: hDlg&
  3262. '**            Chapter$
  3263. '**            index%
  3264. '**            tiponly%
  3265. '*************************************************************************
  3266.    STATIC lckSpace&, drvSave$
  3267.    DIM    dest$, dirName$, dirSym$, drv$, tips$, uncVol$, dirPath$
  3268.    DIM    lckCost&, lckAvail&
  3269.    DIM    bitmap%, n%, notused%
  3270.  
  3271.    '** Get the tip and chapter from the current LCB item
  3272.    tips$ = Lot_GetChapterValStr(chpt$, F_TIPS)   
  3273.  
  3274.    '** If instructed then build the custom cost list
  3275.    IF GetListLength(SYM_CUSTOMCOST$) = 0 OR tiponly <> FALSE THEN
  3276.       notused% = LcbGetChapterCost("", "", SYM_CUSTOMCOST$, "")
  3277.    END IF
  3278.  
  3279.    '** Get the destination directory and dirName
  3280.    dirSym$ = Lot_GetChapterValStr(chpt$, F_DESTDIRSYM)
  3281.    IF GetSymbolValue(SYM_NETWORK$) <> gSTANDARD$ THEN
  3282.       dirSym$ = Reg_GetDirSymbolList(ProdNum%)
  3283.       dirSym$ = GetListItem(dirSym$, 1)
  3284.    END IF
  3285.  
  3286.    dest$    = GetSymbolValue(dirSym$)
  3287.    dirName$ = GetSymbolValue(dirSym$ + gNAME$)
  3288.    drv$     = MID$(dest$, 1, 1)
  3289.    Lot_SplitUNCPath dest$, uncVol$, dirPath$
  3290.    IF uncVol$ = "" THEN
  3291.      n%       = ASC(drv$) - ASC("a") + 1
  3292.      lckCost& = CLNG(GetListItem(SYM_CUSTOMCOST$, n%)) \ 1024
  3293.    ELSE
  3294.      lckCost& = CLNG(GetListItem(uncVol$, UNC_COST)) \ 1024
  3295.  
  3296.    END IF
  3297.    '** Set the space available
  3298.    IF drv$ = drvSave$ THEN
  3299.       lckAvail& = lckSpace&
  3300.    ELSE
  3301.       lckAvail& = GetFreeSpaceForDrive(dest$)
  3302.       lckSpace& = lckAvail&
  3303.       drvSave$  = drv$
  3304.    END IF
  3305.  
  3306.    '** Set the bitmap (if any)
  3307.    bitmap% = Lot_GetChapterValInt(chpt$, F_BITMAP)
  3308.    IF bitmap% <> 0 THEN
  3309.       SetListItem "IDC_BMP", 1, STR$(bitmap%)
  3310.       AddListItem SYM_UPDATELIST$, "IDC_BMP1"
  3311.    END IF
  3312.  
  3313.    '** Set all the values in the dialogs
  3314.    SetWindowText GetDlgItem(hDlg&, IDC_TEXT1), tips$
  3315.    SetWindowText GetDlgItem(hDlg&, IDC_TEXT5), Lot_MakeSizeString(lckCost&)
  3316.    SetWindowText GetDlgItem(hDlg&, IDC_TEXT7), Lot_MakeSizeString(lckAvail&)
  3317.    SetWindowText GetDlgItem(hDlg&, IDC_TEXT9), dest$
  3318.    'SetWindowText GetDlgItem(hDlg&, IDC_TEXT8), dirName$
  3319.  
  3320. END SUB
  3321.  
  3322. '*************************************************************************
  3323. SUB AUTOEXECCB (hDlg&, CtrlId%, Classes$, LInst&)
  3324. '** Purpose: 
  3325. '**          
  3326. '** Author:    Christopher Moy
  3327. '** Arguments: hDlg&
  3328. '**            CtrlId%
  3329. '**            Classes$
  3330. '**            LInst&
  3331. '*************************************************************************
  3332.  
  3333.    DIM modflag%, notused1$, Inst%
  3334.  
  3335.    Inst% = CINT(LInst&)
  3336.    
  3337.  
  3338.    SELECT CASE Classes$
  3339.  
  3340.    CASE "__DLGINIT"
  3341.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  3342.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  3343.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
  3344.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  3345.      AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT5)
  3346.      AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  3347.  
  3348.    CASE "IDC_OK"                    '** Yes button
  3349.      modflag% = 0
  3350.      IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
  3351.     modflag% = 1            '** autoexec needs notes
  3352.      END IF
  3353.      IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
  3354.     modflag% = modflag% + 2 '** autoexec needs share
  3355.      END IF
  3356.      IF modflag% <> FALSE THEN
  3357.     notused1$=ModifyAutoexec(modflag%, 1, "AUTOEXEC.LTS")
  3358.      END IF
  3359.      SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTO$
  3360.  
  3361.    CASE "IDC_MENU"                  '** Make Copy button **
  3362.      modflag% = 0               '** test flag situation
  3363.      IF GetSymbolValue(SYM_NEEDNOTES$) <> gFALSE$ THEN
  3364.     modflag% = 1            '** autoexec needs notes
  3365.      END IF
  3366.      IF GetSymbolValue(SYM_NEEDSHARE$) <> gFALSE$ THEN
  3367.     modflag% = modflag% + 2 '** autoexec needs share
  3368.      END IF
  3369.      IF modflag% <> FALSE THEN
  3370.     notused1$=ModifyAutoexec(modflag%, 0, "AUTOEXEC.LTS")
  3371.      END IF
  3372.      SetSymbolValue SYM_AUTOEXEC_CHOICE$, gAUTOCOPY$
  3373.  
  3374.    CASE "IDC_CONTINUE"                '** No button
  3375.      SetSymbolValue SYM_AUTOEXEC_CHOICE$, gMAN$
  3376.  
  3377.    END SELECT
  3378.  
  3379. END SUB
  3380.  
  3381. '*************************************************************************
  3382. SUB INSTALLCOMPLETECB (hDlg&, CtrlId%, Classes$, LInst&)
  3383. '** Purpose: 
  3384. '**          
  3385. '** Author:    Christopher Moy
  3386. '** Arguments: hDlg&
  3387. '**            CtrlId%
  3388. '**            Classes$
  3389. '**            LInst&
  3390. '*************************************************************************
  3391.    DIM notused1$, Inst%
  3392.    DIM hwnd&, lr&
  3393.  
  3394.    Inst% = CINT(LInst&)
  3395.    
  3396.    SELECT CASE Classes$
  3397.  
  3398.    CASE "__DLGINIT"
  3399.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT1)
  3400.       AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT2)
  3401.       AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  3402.  
  3403. %rem
  3404.    CASE "IDC_CONTINUE"                     '** Restart button
  3405.  
  3406.       notused1$ = Lot_CallProductFunctions("PostSuccessReg", gNext, FALSE, gALLPRODUCTS,"")
  3407.       hwnd&=FindWindow("LInstallWClass",LdString(SID_INST_WINDOW_TITLE))
  3408.       lr&=SendMessage(hwnd&, WM_COMMAND, UM_REBOOTFLAG, 0)
  3409. %endrem
  3410.      
  3411.    CASE "IDC_OK"                    '** Done button
  3412.  
  3413.    END SELECT
  3414.  
  3415. END SUB
  3416.  
  3417. '*************************************************************************
  3418.  
  3419. SUB PARENTDIRCB (hDlg&, CtrlId%, Classes$, LInst&)
  3420. '** Purpose: Drives DB_PARENTDIR dialog
  3421. '** Author:    MZ,TV
  3422. '** Arguments: Callback args
  3423. '** Returns:   NONE
  3424. '*************************************************************************
  3425.    STATIC drvIndex%(1 to MAX_NO_DRIVECOMBOS)
  3426. '   STATIC dirChanged%
  3427.    DIM    dirSym$, dirToChange$, dirName$, rc$, i%, Chapter$, Inst%
  3428.    DIM    AllProdNum%,prodNum%,AllOptNum%,OptName$,OptNum%,notused%
  3429.    DIM    drvSel%
  3430.  
  3431.    Inst% = CINT(LInst&)
  3432.  
  3433.    SELECT CASE Classes$
  3434.  
  3435.    case "__DLGINIT"
  3436.       'For server, want to update always, since we fiddle with the drive list
  3437.       AddListItem  SYM_NORMALFONT$, STR$(IDC_TEXT1)
  3438.       AddListItem  SYM_UPDATELIST$, SYM_NORMALFONT$
  3439.       Lot_GetDriveFreeSpaceList "IDC_COMBO1"
  3440.       dirToChange$ = GetSymbolValue(SYM_BASEDIR$)
  3441.       SetListItem "IDC_EDIT", 1, dirToChange$
  3442.       drvIndex%(1) = ValidateEditBox(hDlg& , 1)
  3443.       AddListItem SYM_UPDATELIST$, "IDC_EDIT1"
  3444.  
  3445.     case "IDC_COMBO1"
  3446.        ComboSelChanged 1, Inst%
  3447.  
  3448. '   case "IDC_EDIT"
  3449. '      dirChanged% = TRUE
  3450.  
  3451.    case "IDC_BRWSDIR"
  3452.      drvSel% = ValidateBrowse(hDlg& , Inst%) 
  3453. '        dirChanged% = TRUE
  3454.  
  3455.    case "IDC_OK"
  3456.     drvSel% = ValidateEditBox(hDlg& , 1)
  3457.     IF drvSel% = 0 THEN
  3458.     SetListItem "__LASTSTATUS", 1, "Q"
  3459.     EXIT SUB
  3460.     ELSE 
  3461.       drvIndex%(1) = drvSel%
  3462.     END IF
  3463.     dirToChange$ = GetPathFromComboEdit(hDlg&, 1)
  3464.     IF ValidatePath(dirToChange$) = FALSE THEN
  3465.       SetListItem "__LASTSTATUS", 1, "Q"
  3466.       EXIT SUB
  3467.     ELSE
  3468.       SetSymbolValue SYM_BASEDIR$, dirToChange$
  3469.       'IF Reg_GetProdSupportForShare32(1) = 1 THEN
  3470.     ' SetTheComponentsDir
  3471.       'END IF      
  3472.       Lot_RefreshDestination(SYM_BASEDIR$)
  3473.     END IF
  3474.    END SELECT
  3475.  
  3476. END SUB
  3477.  
  3478. '*************************************************************************
  3479.  
  3480. PUBLIC FUNCTION Lot_SharedWindowsDlg (Id%) AS STRING
  3481. '** Purpose: Drives DB_PARENTDIR dialog
  3482. '** Author:    JMD
  3483. '** Arguments: ID of dialog, either:
  3484. '**                                     DB_SHAREDWINDOWS        (Install to shared windows dir?)
  3485. '**                                     DB_NOSHAREDWINDOWS(Can't install to shared windows dir?)
  3486. '** Returns:   Return value of PopupModalDlg
  3487. '*************************************************************************
  3488.  
  3489.    AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT3)
  3490.    AddListItem SYM_NORMALFONT$, STR$(IDC_TEXT4)
  3491.    AddListItem SYM_UPDATELIST$, SYM_NORMALFONT$
  3492.     
  3493.    SetListItem "IDC_TEXT", 1, GetSymbolValue(SYM_WINDIR$)
  3494.    SetListItem "IDC_TEXT", 2, GetSymbolValue(SYM_WINSYSDIR$)
  3495.  
  3496.    Lot_SharedWindowsDlg = PopupModalDlg ( Id%, CLng(Id%) )
  3497.  
  3498. END FUNCTION
  3499. '*************************************************************************
  3500.  
  3501.