home *** CD-ROM | disk | FTP | other *** search
/ Castle Explorer / DKMMCAST.iso / pc / dksetup / dksetup.mst < prev    next >
Text File  |  1996-09-10  |  40KB  |  1,008 lines

  1. '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2. '   DKSETUP.MST     Generic Setup File
  3. '
  4. '   VERSION
  5. '   -------
  6. CONST STR_VERSION = "V 2.10.010"
  7. '
  8. '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  9. 'Change History
  10. '--------------
  11. 'Version    Date        By  Description
  12. '-------    ----        --  -----------
  13. '2.10.010   23/5/96     SB  Created the Developer Dialog for installing either Scrunged or Text mode
  14. '2.10.009   02/04/96    CR  Re-Organised the groups of system drivers. No longer installs VFW
  15. '                           or the MSADPCM sound drivers on Windows 95.
  16. '2.10.008   10/04/96    CR  Stopped the user from being able to install to A:\.
  17. '                           It caused a crash on Win95.
  18. '2.10.007   03/04/96    CR  Removed the path in the device=dva.386 entry which is
  19. '                           put into system.ini. The Code is in UpdateWingDrivers in
  20. '                           Dkgen.inc. This stops a crash when installing Windows followed by
  21. '                           our product and then Office.
  22. '2.10.006   22/03/96    CR  Change the define WITH_SAMPLER_NOCM to WITH_FULL_SAMPLER.
  23. '                           This now installs the full sampler into the \DKMM\SAMPLER dir.
  24. '2.10.005   14/03/96    CR  Hide the Program Group window while adding the program icons.
  25. '2.10.004   27/02/96    CR  Changed most of the define names to make them more consistent.
  26. '2.10.003   27/02/96    CR  Added the INST_QTW define for installing QuickTime for Windows.
  27. '2.10.002   22/02/96    CR  The Fonts section in setup.inf needs a dummy placeholder
  28. '                           called NOFONT.ZZZ. Fonts are not registered for uninstall.
  29. '2.10.001   20/02/96    CR  Changed the setup files to separate Product Specific,
  30. '                           Localise Only and Generic information.
  31. '
  32. '16/02/96 Made the cursor 'Busy' while creating the program group/items.
  33. '14/02/96 Add the Sampler Icon name to the MMAPP.ini when using WITH_SAMPLER_NOCOM,
  34. '         so that uninstall can delete the Sampler Icon.
  35. '12/02/96 Added option to bundle sampler WITHOUT the Custom Menu.
  36. '25/01/96 Add WITH_ORDERING_INFO and MUSEUM_TITLE defines.
  37. '22/01/96 Fix the dialogs in the TestSystem function in Dkgen.inc.
  38. '15/12/95 Fix the Set Restart Directory problem when installing Win32s
  39. '14/12/95 Only delete files from the previous install if it was in a
  40. '         different directory. Otherwise it deletes the files just installed!
  41. '05/12/95 Reset the default install path when selecting back from the custom
  42. '         install dialog box and clear the copy list.
  43. '04/12/95 Move the mmapp.ini entry updates after the install.
  44. '31/11/95 Check the msacm.ini to make sure the audio compression is enabled.
  45. '29/11/95 Add the line in DKCODE\VERSION.INI to the main ini file. This is only
  46. '         used by the sampler3 product at the moment.
  47. '21/11/95 Can now handle a product + sampler3 bundle disc.
  48. '13/11/95 Add the Setup Version number to the About dialog box in the Setup.
  49. '08/11/95 Use the test for cirrus logic dirvers all of the time, not just
  50. '         when bundled with a sampler.
  51. '03/11/95 Cater for Win32s install and general tidy up of this script file.
  52. '         Unfortunately still need to use comments to select / deselect
  53. '         the specific font code parts.
  54. '18/08/95 rc and this have no min install. Changed dlg boxes custom,
  55. '         custom help and speed
  56. '18/08/95 Register notes most recent lang used
  57. '11/08/95 Register created using inf file
  58. '26/07/95 Uninstall code added
  59. '07/07/95 Correct dkgen.inc so unregisters use of ctl3d
  60. '04/07/95 Make sure files in bin section of inf file 'always' overwrite
  61. '28/07/95 Ini file not created for minimum install, uses file provided in dkcode
  62. '27/06/95 Test for directory names max 8 chars
  63. '26/06/95 For minimum install, ini file is now not installed
  64. '19/06/95 Moved test for cirrus drivers to mst file as only applies to sampler
  65. '05/06/95 Fonts installed on users machine
  66. '01/06/95 No choice about adding icon to prog man, altered dkgen.inc & rc file
  67. '            (custom, customhelp & speed dlg boxes need changing)
  68. '22/05/95 Code for bundling with sampler
  69. '22/05/95 Large readme need Write (will need to change dlg box in rc file)
  70. '15/05/95 No warning that directory does not exist
  71. '03/05/95 Ini file put in executable directory rather than Windows dir to stop
  72. '            clash with foreign products with same name files
  73. '
  74. '------------------------------------------------------------------------------
  75. '
  76. ' All of the defines which are used to control the flow of Setup are listed here.
  77. '
  78. ' SCRUNGED              Product will run in scrunge mode not test mode.
  79. '                       The ini file is different.
  80. ' WITH_UNINSTALL        Installs Uninstall with the product.
  81. ' WITH_ORDERING_INFO    Installs Ordering Information with the product.
  82. ' WITH_SAMPLER          Installs the Sampler with the product.
  83. '                       This sampler goes into the product directory.
  84. '                       This sampler has a Custom Menu.
  85. ' WITH_FULL_SAMPLER     Installs the full Sampler with the product.
  86. '                       This sampler goes into the sampler directory \DKMM\SAMPLER.
  87. '                       This sampler has its own icon and can be uninstalled separately.
  88. '                       The sampler files are listed in the SAMPBIN section of setup.inf.
  89. ' NEEDS_MUSEUM_LIFT     Installs the museum lift. (DKSWTCH.EXE)
  90. ' NEEDS_WIN32S          Installs Win32s.
  91. ' NEEDS_WING            Installs WinG.
  92. ' NEEDS_QTW             Installs QuickTime for Windows using Apple's own installer.
  93. ' NEEDS_VFW             Installs Video for Windows.
  94. ' NEEDS_SOUND           Installs ADPCM sound drivers.
  95. '
  96. '------------------------------------------------------------------------------
  97. ''$DEFINE DEBUG
  98. '$INCLUDE 'dkgen.inc'
  99. '
  100.  
  101. '$IFDEF NEEDS_WIN32S
  102.     ' Include extra Win32s specific routines
  103.     '$INCLUDE 'win32s.inc'
  104. '$ENDIF
  105.  
  106. DECLARE SUB CreateReg()
  107. DECLARE SUB Install()
  108. DECLARE SUB AddFilesToCopyList(szInstallType$)
  109. DECLARE SUB UpdateFonts()
  110. DECLARE FUNCTION IsCDROMDrive LIB "dkutils.dll" (wDrive%) As INTEGER
  111. DECLARE FUNCTION DeleteFiles LIB "dkutils.dll" (szDiffPath$, szProdName$, szDKREgIni$) AS INTEGER
  112. DECLARE FUNCTION DeleteDir LIB "dkutils.dll" (szDiffPath$) AS INTEGER
  113. DECLARE FUNCTION DeleteSection LIB "dkutils.dll" (szProdName$, szDKREgIni$) AS INTEGER
  114. DECLARE FUNCTION TestForCirrus LIB "dkutils.dll" () As INTEGER
  115. DECLARE FUNCTION GetCdVolumeLabel LIB "dkutils.dll" ( szCdVolumeLabel$, szCdDrive$ ) As INTEGER
  116. DECLARE FUNCTION InstallFont LIB "dkutils.dll" (szFont$) AS INTEGER
  117.  
  118.  
  119. Init:
  120.    Initialise STR_PRODUCTNAME, DEFAULT_INSTALL_PATH, STR_MSGCAPTION
  121.  
  122. '****************************************************************************************************************************************
  123. '****************************************************************************************************************************************
  124. 'SetBitmap CUIDLL_FILENAME,101
  125. '****************************************************************************************************************************************
  126. '****************************************************************************************************************************************
  127.  
  128. WelcomeDlg:
  129.     if Welcome() = NAV_BACK then
  130.         ' Don nothing - cant go back
  131.     end if
  132.  
  133.     if TestSystem() = NAV_BACK then
  134.         goto WelcomeDlg
  135.     end if
  136.  
  137.     '+++
  138.     '$IFDEF NEEDS_WIN32S
  139.  
  140.         if bInstalledWin32s = 0 then
  141. '****************************************************************************************************************************************
  142. '****************************************************************************************************************************************
  143. '        dButton = DoMsgBox("bInstalled Win32s = 0.  Starting the Win32s installer", szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  144. '****************************************************************************************************************************************
  145. '****************************************************************************************************************************************
  146.             IF OnWindowsNT() THEN
  147.             else
  148.                 goto InstallWin32s
  149.             endif
  150.         endif
  151.  
  152.         FinishedWin32s:
  153.     '$ENDIF
  154.     '---
  155.  
  156.     '+++
  157.     '$IFDEF NEEDS_QTW
  158.  
  159.         ret% = InstallQTW()     ' Install QuickTime for Windows
  160.     '$ENDIF
  161.     '---
  162.  
  163.     '   TestCirrus:
  164.     if TestForCirrus() = 1 then
  165.         dButton = DoMsgBox(STR_CIRRUS, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  166.     end if
  167.  
  168.  
  169.     '$IFDEF NEEDS_SOUND
  170.         ' Update the Sound driver ini entries
  171.         if UpdateADPCMDrivers() = NAV_BACK then
  172.             goto WelcomeDlg
  173.         end if
  174.     '$ENDIF
  175. '$IFDEF SCRUNGED_OR_TEXT
  176. beginDevelopDiag:
  177.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_DEVELOPER, "FQuitDlgProc", 0, "")
  178.     select case szButton
  179.     case "REACTIVATE"
  180.         goto beginDevelopDiag
  181.     case "EXIT" , "CANCEL"
  182.         bscrunged=0 ' Text Mode
  183.         UIPop 1
  184.     case "CONTINUE"
  185.         bscrunged=1 ' Scrunge Mode
  186.         UIPop 1
  187.     end select
  188. '$ENDIF
  189.  
  190. ExpressCustomDlg:
  191.     ' defaults to Express
  192.     'if szExpressCustomChoice = "EXPRESS" then
  193.     '    SetSymbolValue "RadioDefault", "1"
  194.     'else
  195.     '    SetSymbolValue "RadioDefault", "1"
  196.     'end if
  197.  
  198. ECDlgLoop:
  199.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_SPEED, "FRadioDlgProc", DLG_WHIZZHELP, PROC_HELP)
  200.  
  201.     select case szButton
  202.     case "REACTIVATE"
  203.         goto ECDlgLoop
  204.     case "BACK"
  205.         UIPop 1
  206.         goto WelcomeDlg
  207.     case "CONTINUE" ' Install
  208.         UIPop 1
  209.         if GetSymbolValue("ButtonChecked") = "1" then
  210.             szExpressCustomChoice = "EXPRESS"
  211.             goto ExpressInstallLoop
  212.         else
  213.             szExpressCustomChoice = "CUSTOM"
  214.             goto CustomInstallLoop
  215.         end if
  216.     case "EXIT" , "CANCEL"
  217.         AskQuit
  218.         goto ECDlgLoop
  219.     end select
  220.  
  221.  
  222. CustomInstallLoop:
  223. GetPathDlg:
  224.     SetSymbolValue "EditTextIn", szDestPath
  225.     szOldDestPath = szWinDrive + ":" + DEFAULT_INSTALL_PATH
  226.     SetSymbolValue "EditFocus", "ALL"
  227.  
  228. GetPathDlgLoop:
  229.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_DESTPATH, "FEditDlgProc", DLG_PATHHELP, PROC_HELP)
  230.  
  231.     select case szButton
  232.     case "REACTIVATE"
  233.         goto GetPathDlgLoop
  234.  
  235.     case "BACK"
  236.         UIPop 1
  237.         szDestPath = szOldDestPath
  238.         ClearCopyList
  239.         goto ECDlgLoop
  240.  
  241.     case "CONTINUE"
  242.         UIPop 1
  243.         szDestPath = GetSymbolValue("EditTextOut")
  244.  
  245.         ' Add backslash if missing
  246.         if mid$(szDestPath, 2, 1) = ":" and mid$(szDestPath, 3, 1) <> "\" then
  247.             szTemp$ = mid$(szDestPath, 1, 2) + "\" + mid$(szDestPath, 3, len(szDestPath)-2)
  248.             szDestPath = szTemp
  249.         end if
  250.  
  251.         ' Add drive letter and :\ if missing
  252.         if mid$(szDestPath, 2, 1) <> ":" then
  253.             if mid$(szDestPath, 1,1) <> "\" then
  254.                 szDestPath = mid$(szWinPath, 1,1) + ":\" + szDestPath
  255.             else
  256.                 szDestPath = mid$(szWinPath, 1,1) + ":" + szDestPath
  257.             end if
  258.         elseif IsDriveValid(mid$(szDestPath, 1,1)) = 0 then
  259.             szDestPath = szOldDestPath
  260.             UIPop 1
  261.             BadPath
  262.             goto GetPathDlg
  263.         end if
  264.  
  265.         slength% = len(szDestPath)
  266.  
  267.         'Check dir names not > 8 chars
  268.         dirlength% = 0
  269.         i% = 3
  270.         while i% <> slength%
  271.             i% =i%+1
  272.             dirlength% = dirlength% +1
  273.             if mid$(szDestPath, i%, 1)="\" then
  274.                 if dirlength% > 9 then
  275.                     szDestPath = szOldDestPath
  276.                     dButton = DoMsgBox( STR_DIRTOOLONG, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  277.                     goto GetPathDlg
  278.                  else
  279.                     dirlength% = 0
  280.                 endif
  281.             end if
  282.         wend
  283.         if dirlength% > 8 then
  284.             szDestPath = szOldDestPath
  285.             dButton = DoMsgBox( STR_DIRTOOLONG, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  286.             goto GetPathDlg
  287.         endif
  288.  
  289.  
  290.         ' check for "foreign" chars in path
  291.         found% = 0
  292.         for i% = 1 to slength%
  293.             if asc(mid$(szDestPath, i%, 1)) > 126 then
  294.                 found% = 1
  295.             end if
  296.         next i%
  297.         if found% = 1 then
  298.             szDestPath = szOldDestPath
  299.             UIPop 1
  300.             BadPath
  301.             goto GetPathDlg
  302.         end if
  303.  
  304.         wDrive% = asc(mid$(szDestPath, 1,1)) - asc("A")
  305.         if IsCDROMDrive(wDrive%) > 0 then
  306.             szDestPath = szOldDestPath
  307.             UIPop 1
  308.             BadPath
  309.             goto GetPathDlg
  310.         end if
  311.  
  312.         if IsDriveNetwork(mid$(szDestPath,1,1)) = 1 then
  313.             szDestPath = szOldDestPath
  314.             UIPop 1
  315.             NetworkDrive
  316.             goto GetPathDlg
  317.         end if
  318.  
  319.         ' Put in to avoid a:\ crash below
  320.         if mid$(szDestPath,1,3) = "A:\" then
  321.             szDestPath = szOldDestPath
  322.             UIPop 1
  323.             BadPath
  324.             goto GetPathDlg
  325.         end if
  326.  
  327.         ' IsDirWritable() Crashes on Win95 if looking at A:\ with no disk in!
  328.         if IsDirWritable(szDestPath) = 0 then
  329.             szDestPath = szOldDestPath
  330.             UIPop 1
  331.             BadPath
  332.             goto GetPathDlg
  333.         end if
  334.  
  335.  
  336.   '      if DoesDirExist(szDestPath) = 0 then
  337.   '          dButton = DoMsgBox( STR_DIRNOTEXIST, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  338.   '          if dButton = 7 then
  339.   '              goto GetPathDlg
  340.   '          end if
  341.   '      end if
  342.  
  343.         UIPop 1
  344.  
  345.     case "EXIT" , "CANCEL"
  346.         AskQuit
  347.         goto GetPathDlg
  348.     end select
  349.  
  350. GetCustomChoicesDlg:
  351.     SetSymbolValue "CheckItemsState", ""
  352. '    AddListItem "CheckItemsState", szMinimalInstall
  353. '    AddListItem "CheckItemsState", szAddPMItem
  354. GetCustomChoicesLoop:
  355.  
  356.     ClearCopyList
  357. '    if szMinimalInstall = "OFF" then
  358.         AddFilesToCopyList "FULL"
  359. '    else
  360. '        AddFilesToCopyList "MINIMAL"
  361. '    end if
  362.  
  363.     dDestDrive = asc(mid$(szDestPath, 1,1)) - asc("A")+1
  364.     dWinDrive = asc(mid$(szWinPath, 1,1)) - asc("A")+1
  365.  
  366.     SetSymbolValue "DriveStatusText", ""
  367.     AddListItem "DriveStatusText", mid$(szDestPath, 1,1) + ":"
  368.     AddListItem "DriveStatusText", str$(GetDiskSpaceNeeded(dDestDrive) / 1024) + " K"
  369.     AddListItem "DriveStatusText", str$(GetFreeSpaceForDrive(mid$(szDestPath, 1,1))/1024) + " K"
  370.  
  371.     if dDestDrive = dWinDrive then
  372.         AddListItem "DriveStatusText", ""
  373.         AddListItem "DriveStatusText", ""
  374.         AddListItem "DriveStatusText", ""
  375.     else
  376.         AddListItem "DriveStatusText", mid$(szWinPath, 1,1) + ":"
  377.         AddListItem "DriveStatusText", str$(GetDiskSpaceNeeded(dWinDrive)/ 1024 ) + " K"
  378.         AddListItem "DriveStatusText", str$(GetFreeSpaceForDrive(mid$(szWinPath, 1,1))/1024) + " K"
  379.     end if
  380.  
  381.     AddListItem "DriveStatusText", szDestPath
  382.  
  383. ChooseInstall:
  384.  
  385.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_CUSTOM, "FCustInstDlgProc", DLG_CUSTOMHELP, PROC_HELP)
  386.  
  387. '    szMinimalInstall = GetListItem("CheckItemsState", 1)
  388. '    szAddPMItem = GetListItem("CheckItemsState", 2)
  389.  
  390.     select case szButton
  391.     case "REACTIVATE"
  392.         goto GetCustomChoicesLoop
  393.     case "BACK"
  394.         UIPop 1
  395.         goto GetPathDlg
  396.     case "CONTINUE"
  397.         UIPop 1
  398.     case "EXIT" , "CANCEL"
  399.         AskQuit
  400.         goto GetCustomChoicesLoop
  401.     end select
  402.  
  403.     ClearCopyList
  404. '    if szMinimalInstall = "OFF" then
  405.         AddFilesToCopyList "FULL"
  406. '    else
  407. '        AddFilesToCopyList "MINIMAL"
  408. '    end if
  409.     goto CommonInstallLoop
  410.  
  411. ExpressInstallLoop:
  412.     AddFilesToCopyList "FULL"
  413.     goto CommonInstallLoop
  414.  
  415. CommonInstallLoop:
  416.     InitCommonInstall
  417.  
  418.     if szMinimalInstall = "ON" and GetFreeSpaceForDrive(mid$(szDestPath,1,1)) < MINIMUM_DISK_SPACE then
  419.         error ERR_NODISKSPACE
  420.     elseif GetFreeSpaceForDrive(mid$(szDestPath,1,1)) < GetDiskSpaceNeeded( asc(mid$(szDestPath, 1,1))-asc("A")+1 ) then
  421.         error ERR_NODISKSPACE
  422.     end if
  423.  
  424.     '+++
  425.     '$IFDEF NEEDS_WING
  426.  
  427.         UpdateWinGDrivers
  428.     '$ENDIF
  429.     '---
  430.  
  431.     '+++
  432.     '$IFDEF NEEDS_VFW
  433.  
  434.         ' Don't need to install VFW on Windows 95, it is already there.
  435.         if not OS_Windows95 then
  436.  
  437.             UpdateIndeoAVIDrivers
  438.         end if
  439.  
  440.     '$ENDIF
  441.     '---
  442.  
  443.     UpdateFonts ' Installs specific fonts
  444.  
  445.     Install     ' Installs all of the necessary files.
  446.  
  447.     dCursor = ShowWaitCursor()
  448.  
  449.     ' Always create the DK Registry and enter the details
  450.     CreateIniKeyValue "Win.ini", "MMAPP", "Path", szWinDrive+":"+DKREG_INI_PATH, cmoOverwrite
  451.     CreateReg
  452.  
  453.     '**********************************************************************************************************************************
  454.     '**********************************************************************************************************************************
  455.     ' Make the assosiation with files with the extention .CAS...
  456.     CreateIniKeyValue "Win.ini", "Extensions", "cas",szDestPath+"\"+APPLICATION_EXE_FILE+" ^.cas", cmoOverwrite
  457.     '**********************************************************************************************************************************
  458.     '**********************************************************************************************************************************
  459.  
  460.     ' Get the current window handle for setting its properties later
  461.     hwndSetup = GetActiveWindow
  462.  
  463. '******************************************************************************************************************************
  464. '******************************************************************************************************************************
  465. ' Here is the code for DirectX...
  466. 'It requires the program simple.exe to be copied to the temp directory, along with the DirectX DLL's and the DirectX direcory to be located under DKSetup
  467. '$IFDEF NEEDS_DIRECTX
  468.  
  469.         if OS_Windows95 then
  470.                 ' NT v4 (looks like Win95) Has DirectX Installed... Do NOT install Win95 DirectX II
  471.                 if OnWindowsNT() then
  472.                 else
  473.                     ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  474.                     szDirectCommand="SetupDX2.exe "+szSrcSetupPath
  475.                     intreply=RUN (szDirectCommand)
  476.  
  477.                     ' Wait for Direct X Install to Finish.
  478.                     szErrorCode = ""
  479.                     WHILE szErrorCode = ""
  480.                         ' Look in MMAPP,INI for the DKDirectX group and check the ErrorCode
  481.                         szErrorCode = GetIniKeyString (szWinDrive+":"+DKREG_INI_PATH, "DKDirectX", "ErrorCode")
  482. 'dButton = DoMsgBox( szErrorCode,"DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  483.                      WEND
  484. 'dButton = DoMsgBox( "Ended the loop","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  485. 'intReply = LEN(szErrorCode)
  486.                      szReply = MID$(szErrorCode,1,1)
  487. 'dButton = DoMsgBox( szReply,"DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  488.                      if szReply = "-" then
  489.                         dButton = DoMsgBox( "An error occured while installing DirectX","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  490.                         ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  491.                         error ERR_EXITFAIL
  492.                     else
  493. 'dButton = DoMsgBox( "No errors","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  494.                         'ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  495.                         if szReply = "1" then
  496. 'dButton = DoMsgBox( "Restart","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  497.                                 bInstalledWin32s = 1
  498.                         endif
  499.                     endif
  500.                     ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  501.                 endif
  502.         endif
  503.  
  504. '$ENDIF
  505. '******************************************************************************************************************************
  506. '******************************************************************************************************************************
  507.  
  508.     CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
  509.     ShowProgmanGroup   STR_COMPANYNAME, 1, cmoNone
  510.  
  511.     ' Set the main window properties to bring the main window to the front.
  512.     ' This is so the user cannot start the app now, but will see the prog group after setup!
  513.     i% = SetWindowPos(hwndSetup, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE+SWP_NOMOVE)
  514.  
  515.  
  516. '+++
  517. '$IFDEF WITH_SAMPLER
  518.  
  519. '    if szMinimalInstall = "ON" then
  520. '        szSamplerPath$ = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), SAMPLER_PATH)
  521. '        szSamplerPath$ = MakePath(szSamplerPath$, SAMPLER_EXE_FILE)
  522. '        szInf$ = MakePath(szSrcBinPath, APPLICATION_MENU_FILE) + " " + MakePath(szSrcBinPath, APPLICATION_EXE_FILE) + " " + MakePath(szSrcBinPath, APPLICATION_PENGE_FILE) + " " + szSamplerPath$
  523. '        CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  524. '        CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szSrcBinPath, APPLICATION_README_FILE), "", cmoOverwrite
  525. '    else
  526.         szSamplerPath$ = MakePath(szDestPath, SAMPLER_EXE_FILE)
  527.         szInf$ = MakePath(szDestPath, APPLICATION_MENU_FILE) + " " + MakePath(szDestPath, APPLICATION_EXE_FILE) + " " + MakePath(szDestPath, APPLICATION_PENGE_FILE) + " " + szSamplerPath$
  528.         CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  529.         CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szDestPath, APPLICATION_README_FILE), "", cmoOverwrite
  530.         '$IFDEF WITH_ORDERING_INFO
  531.         CreateProgmanItem STR_COMPANYNAME, STR_ORDER, EDITOR_EXE + MakePath(szWinDrive + ":" + DKREG_INI_DIR, ORDER_FILE), "", cmoOverwrite
  532.         '$ENDIF
  533. '    end if
  534.  
  535. '$ELSE
  536.     'NO SAMPLER
  537. '    if szMinimalInstall = "ON" then
  538. '        szInf$ = MakePath(szSrcBinPath, APPLICATION_EXE_FILE) + " " + MakePath(szSrcBinPath, "dkpage")'APPLICATION_PENGE_FILE)
  539. '        CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  540. '        CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szSrcBinPath, APPLICATION_README_FILE), "", cmoOverwrite
  541. '    else
  542.         szInf$ = MakePath(szDestPath, APPLICATION_EXE_FILE) + " " + MakePath(szDestPath, "pagfiles")'APPLICATION_PENGE_FILE)
  543.         CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  544.         CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szDestPath, APPLICATION_README_FILE), "", cmoOverwrite
  545.  
  546.         '$IFDEF WITH_ORDERING_INFO
  547.         CreateProgmanItem STR_COMPANYNAME, STR_ORDER, EDITOR_EXE + MakePath(szWinDrive + ":" + DKREG_INI_DIR, ORDER_FILE), "", cmoOverwrite
  548.         '$ENDIF
  549.  
  550.         '$IFDEF WITH_FULL_SAMPLER
  551.         CreateProgmanItem STR_COMPANYNAME, STR_SAMPLER, MakePath(szFullSampPath, SAMPLER_EXE_FILE), "", cmoOverwrite
  552.         CreateProgmanItem STR_COMPANYNAME, STR_SAMPLER_README, MakePath(szFullSampPath, SAMPLER_README_FILE), "", cmoOverwrite
  553.         '$ENDIF
  554.  
  555. '    end if
  556. '$ENDIF
  557. '---
  558.  
  559.     '+++
  560.     '$IFDEF WITH_UNINSTALL
  561.  
  562.         'Uninstall icon
  563.         szDKUninstall$ = szWinDrive + ":" +  DKREG_INI_DIR
  564.         szInf$ = MakePath( szDKUninstall, UNINSTALL_EXE_FILE)
  565.         CreateProgmanItem STR_COMPANYNAME, STR_UNINSTALL, szInf, szInf, cmoOverwrite
  566.     '$ENDIF
  567.     '---
  568.  
  569. '$IFDEF DEBUG
  570.  
  571.     DumpCopyList MakePath(szDestPath, "copylist.txt")
  572.  
  573. '$ENDIF
  574.  
  575.  
  576.     RestoreCursor( dCursor )
  577.  
  578.     If EndCommonInstall( APPLICATION_README_FILE, 0, EDITOR_EXE ) = NAV_EXIT then
  579.         stop
  580.         end
  581.     endif
  582.  
  583. quit:
  584.     on error goto quit
  585.  
  586.     select case ERR
  587.  
  588.     case 0
  589.         hDlg = DLG_SUCCESS
  590.     case STFQUIT
  591.         hDlg = DLG_BADEXIT
  592.     case ERR_NODISKSPACE
  593.         hDlg = DLG_NODISKSPACE
  594.     case else
  595.         hDlg = DLG_ABORT
  596.     end select
  597.  
  598.     UIPop 10
  599. quit2:
  600.     szButton = UIStartDlg(CUIDLL_FILENAME, hDlg, "FInfo0DlgProc", 0, "")
  601.     select case szButton
  602.     case "REACTIVATE"
  603.         goto quit2
  604.     end select
  605.  
  606.     UIPop 1
  607.     DeInitialise
  608.     stop
  609.     end
  610.  
  611. quitError:
  612.     dButton = DoMsgBox (STR_QUITERROR, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  613.     DeInitialise
  614.     stop
  615.     end
  616.  
  617.  
  618. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  619.  
  620. Sub Install() STATIC
  621.  
  622.     cursor% = ShowWaitCursor()
  623.     CreateDir szDestPath, cmoNone
  624.  
  625.     '$IFNDEF NEEDS_WIN32S
  626.         SetRestartDir szDestPath    '   Already set if needs Win32s
  627.     '$ENDIF
  628.  
  629.     RestoreCursor(cursor%)
  630.  
  631.     CopyFilesInCopyList  'creates dir even if min install
  632.  
  633.     '+++
  634.     '$IFDEF NEEDS_VFW
  635.  
  636.         ' Don't need to install VFW on Windows 95, it is already there.
  637.         if OS_Windows95 = 0 then
  638.  
  639.             Run ("regedit.exe /s " + MakePath(szWinPath, "mplayer.reg"))
  640.             Run ("regedit.exe /s " + MakePath(szWinSysPath, "OLE2.reg"))
  641.  
  642.             '+++
  643.             '$IFNDEF NEEDS_WIN32S
  644.                 ' NOT with WIN32S
  645.                 Run ("regedit.exe /s " + MakePath(szWinSysPath, "cleanup.reg"))
  646.             '$ENDIF
  647.             '---
  648.  
  649.             Run ("profdisp.exe")
  650.  
  651.         end if
  652.     '$ENDIF
  653.     '---
  654.  
  655.     if INI_FILE_SOURCE = "AppPath" then
  656.         szAppINIPath = MakePath(szDestPath, APPLICATION_INI_FILE)
  657.     else
  658.         szAppINIPath = MakePath(szWinPath, APPLICATION_INI_FILE)
  659.     end if
  660.  
  661.        '=d:\                                    =d:\dksetup                =dksetup
  662.     szPengePath = mid$(szSrcSetupPath, 1,len(szSrcSetupPath)-len(SOURCE_SETUP_SUBDIR)-2) ' -2 removes backslash
  663.  
  664. '+++
  665. '$IFDEF WITH_SAMPLER
  666.         szSampINIPath = MakePath(szDestPath, SAMPLER_INI_FILE)
  667.         'data =
  668.         szSampData = szPengePath + "\" + SAMPLER_PATH
  669.         CreateIniKeyValue szSampINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szSampData, cmoOverwrite
  670.         'volumelabel =
  671.         szCdDrive$ = mid$( szSrcSetupPath, 1, 1 )
  672.         szCdVolumeLabel$ = STRING$( 20, 32 )
  673.         if( GetCdVolumeLabel( szCdVolumeLabel$, szCdDrive$ ) ) then
  674.             CreateIniKeyValue MakePath(szDestPath, SAMPLER_INI_FILE), PRODUCT_INI_DIR_SECTION_NAME, "VolumeLabel", szCdVolumeLabel$, cmoOverwrite
  675.         endif
  676. '$ENDIF
  677. '---
  678.  
  679. '+++
  680. '$IFDEF WITH_FULL_SAMPLER
  681.         szSampINIPath = MakePath(szFullSampPath, SAMPLER_INI_FILE)
  682.         'data =
  683.         szSampData = szPengePath + "\" + SAMPLER_PATH
  684.         CreateIniKeyValue szSampINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szSampData, cmoOverwrite
  685. ' Don't want to force a specific cd for the full sampler!
  686. '        'volumelabel =
  687. '        szCdDrive$ = mid$( szSrcSetupPath, 1, 1 )
  688. '        szCdVolumeLabel$ = STRING$( 20, 32 )
  689. '        if( GetCdVolumeLabel( szCdVolumeLabel$, szCdDrive$ ) ) then
  690. '            CreateIniKeyValue MakePath(szDestPath, SAMPLER_INI_FILE), PRODUCT_INI_DIR_SECTION_NAME, "VolumeLabel", szCdVolumeLabel$, cmoOverwrite
  691. '        endif
  692. '$ENDIF
  693. '---
  694.  
  695. '+++
  696. ''$IFDEF SCRUNGED
  697. if bscrunged then
  698. '    if szMinimalInstall = "OFF"  then
  699.         'data =
  700.         CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szPengePath, cmoOverwrite
  701. '    endif
  702.  
  703. ''$ELSE
  704. else
  705.     'DEBUG VERSION
  706.     'data =
  707.     CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szPengePath, cmoOverwrite
  708.     'pages =
  709. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Pages", MakePath(szPengePath,"pagfiles"), cmoOverwrite
  710. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Scrunge", "0", cmoOverwrite
  711. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Developer", "1", cmoOverwrite
  712. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Debug", "1", cmoOverwrite
  713. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "RANDOM_TEST", "1", cmoOverwrite
  714. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "MaxSortErrors", "0", cmoOverwrite
  715. ''$ENDIF
  716. endif
  717. '---
  718.  
  719. if APPLICATION_EXE_FILE = "sampler.exe" then
  720.     ' Add version entry from version.ini if found
  721.     szSampVersion = GetIniKeyString( MakePath( szSrcBinPath, "VERSION.INI" ), "VERSION", "VERSION" )
  722.     if len( szSampVersion ) > 0 then
  723.         CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Version", szSampVersion, cmoOverwrite
  724.     endif
  725. endif
  726.  
  727.     ' Add any custom ini entries in the function in product.inc
  728.     CustomIniEntries
  729.  
  730. End Sub
  731.  
  732. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  733. Sub AddFilesToCopyList(szInstallType$) STATIC
  734.     cursor% = ShowWaitCursor()
  735.  
  736.     szDKUninstall$ = szWinDrive + ":" +  DKREG_INI_DIR
  737.  
  738.     'Shared Files : For ORDER.WRI & FOR MUSEUM TITLES (DKSWTCHW.EXE) Put in \MMAPP
  739.     '$IFDEF WITH_ORDERING_INFO OR NEEDS_MUSEUM_LIFT
  740.     AddSectionFilesToCopyList SETUP_INI_SH_BINARIES_SECTION_NAME, szSrcBinPath, szDKUninstall
  741.     '$ENDIF
  742.  
  743.     '+++
  744.     '$IFDEF WITH_FULL_SAMPLER
  745.  
  746.         AddSectionFilesToCopyList SAMPLER_BINARIES_SECTION_NAME, szSrcBinPath, szFullSampPath
  747.  
  748.     '$ENDIF
  749.     '---
  750.  
  751.     '+++
  752.     '$IFDEF WITH_UNINSTALL
  753.  
  754.         AddSectionFilesToCopyList "UNINSTALL", szSrcBinPath, szDKUninstall
  755.  
  756.     '$ENDIF
  757.     '---
  758.  
  759. '+++
  760. '$IFDEF SCRUNGED_OR_TEXT
  761.  
  762.     if bscrunged = 0 then
  763.         AddSectionFilesToCopyList "BIN TEXT", szSrcBinPath + "\TEXT", szDestPath
  764.     else
  765.         AddSectionFilesToCopyList "BIN SCRUNGED", szSrcBinPath + "\SCRUNGE", szDestPath
  766.     end if
  767.  
  768. '$ELSE
  769.     if OS_Windows95 = 0 then  'I6 bit
  770.         AddSectionFilesToCopyList "BIN 16", szSrcBinPath + "\DKCode16", szDestPath
  771.     else
  772.         AddSectionFilesToCopyList "BIN 32", szSrcBinPath, szDestPath
  773.     end if
  774.  
  775. '$ENDIF
  776. '---
  777. '    select case szInstallType
  778. '    case "FULL"
  779.     AddSectionFilesToCopyList SETUP_INI_BINARIES_SECTION_NAME, szSrcBinPath, szDestPath
  780.  
  781. '    case "MINIMAL"
  782. '        ' nothing
  783. '    end select
  784.  
  785.  
  786.     '+++
  787.     '$IFDEF NEEDS_WING
  788.         AddSectionFilesToCopyList SETUP_INI_WING_BINARIES_NAME, szSrcBinPath, szWinSysPath
  789.         if (OnWIndowsNT()) then
  790.             ' WinG32.DLL must be in Winnt\System32
  791.             szSystem32Path = GetRealWindowsSysDir
  792.             AddSectionFilesToCopyList SETUP_INI_WING32_BINARIES_NAME, szSrcBinPath, szSystem32Path
  793.         else
  794.             AddSectionFilesToCopyList SETUP_INI_WING32_BINARIES_NAME, szSrcBinPath, szWinSysPath
  795.         endif
  796.     '$ENDIF
  797.     '---
  798.  
  799.     '+++
  800.     '$IFDEF NEEDS_VFW
  801.  
  802.         ' Don't need to install VFW on Windows 95, it is already there.
  803.         if OS_Windows95 = 0 then
  804.  
  805.             AddSectionFilesToCopyList "VfW Runtime", szSrcBinPath, szWinSysPath
  806.             AddSectionFilesToCopyList "MPlayer", szSrcBinPath, szWinPath
  807.             AddSectionFilesToCopyList "AVICodecs", szSrcBinPath, szWinSysPath
  808.  
  809.             '+++
  810.             '$IFNDEF NEEDS_WIN32S
  811.                 ' Win32s has its own 32-bit OLE
  812.                 AddSectionFilesToCopyList "OLE2", szSrcBinPath, szWinSysPath
  813.             '$ENDIF
  814.             '---
  815.         end if
  816.     '$ENDIF
  817.  
  818.     '$IFDEF NEEDS_SOUND
  819.         ' Don't need to install Sound on Windows 95, it is already there.
  820.         if OS_Windows95 = 0 then
  821.             if fSystemUpdated = 1 then
  822.                 AddSectionFilesToCopyList "ACM Drivers", szSrcBinPath, szWinSysPath
  823.             end if
  824.         end if
  825.     '$ENDIF
  826.  
  827.     RestoreCursor(cursor%)
  828. End Sub
  829.  
  830. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  831. Sub UpdateFonts() STATIC
  832.     ' Check TT enabled
  833.     MakeListFromSectionFilename "Fonts_list", "Fonts"
  834.  
  835.     listLength% = GetListLength("Fonts_list")
  836.     if listLength% > 0 then
  837.         ' Check to see if the list is just a placeholder or a real list.
  838.         szFontFile$ = GetListItem("Fonts_list", 1)
  839.         if szFontFile <> "NOFONT.ZZZ" then
  840.             ' Do the Win.ini entries
  841.             RegisterFonts
  842.  
  843.             for item% = 1 to listLength%
  844.                 szFontFile = GetListItem("Fonts_list", item%)
  845.                 ' Check if exists
  846.                 ' Install font
  847.                 ret% = InstallFont(MakePath(szSrcBinPath, szFontFile))
  848.                 ' Write WIN.INI
  849.             next
  850.         end if
  851.     end if
  852. End Sub
  853.  
  854. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  855. Sub CreateReg() STATIC
  856.  
  857.     ' The MMAPP.INI path
  858.     szDKRegIni = szWinDrive + ":" +  DKREG_INI_PATH
  859.  
  860.     if DoesFileExist( szDKRegIni, femExist) = 0 then
  861.         'dkreg.ini doesn't exist - initialize AppCount, create dir, add to InstalledApp
  862.         AppCount% = 1
  863.         CreateDir (szWinDrive+":"+DKREG_INI_DIR), cmoNone
  864.         CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  865.         szNum$=str$(AppCount%)
  866.         CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_PRODUCTNAME, cmoOverwrite
  867.         '$IFDEF WITH_FULL_SAMPLER
  868.             ' Create separate Sampler entry
  869.             AppCount% = 2
  870.             CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  871.             szNum$=str$(AppCount%)
  872.             CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_SAMPLER, cmoOverwrite
  873.         '$ENDIF
  874.     else
  875.         if DoesIniSectionExist( szDKRegIni, STR_PRODUCTNAME )=1  then
  876.             szDiffPath$=GetIniKeyString(szDKRegIni, STR_PRODUCTNAME, "Path")
  877.             if(szDestPath$  <> szDiffPath$) then
  878.                 ' product is also installed in a different dir - delete files and dir and ini section
  879.                 ret% = DeleteFiles (szDiffPath, STR_PRODUCTNAME, szDKRegIni)
  880.                 ret% = DeleteDir (szDiffPath)
  881.                 ret% = DeleteSection(STR_PRODUCTNAME, szDKRegIni)
  882.             endif
  883.             'product is installed in same dir - do nothing, has overwritten files
  884.         else
  885.               'product name does not exist - increment AppCount, add to InstalledApp
  886.                szAppCount$ = GetIniKeyString( szDKRegIni, "InstalledApp", "Applications" )
  887.                AppCount% = Val(szAppCount$) + 1
  888.                CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  889.                'assign product to first available number (maybe gaps due to deletion)
  890.                i%=1
  891.                while( GetIniKeyString( szDKRegIni, "InstalledApp",str$(i%) )<>"")
  892.                    i=i+1
  893.                wend
  894.                szNum$=str$(i%)
  895.                CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_PRODUCTNAME, cmoOverwrite
  896.         endif
  897.  
  898.         '$IFDEF WITH_FULL_SAMPLER
  899.             ' Create separate Sampler entry
  900.             if DoesIniSectionExist( szDKRegIni, STR_SAMPLER )=1  then
  901.                 szDiffPath$=GetIniKeyString(szDKRegIni, STR_SAMPLER, "Path")
  902.                 if(szFullSampPath$  <> szDiffPath$) then
  903.                     ' Sampler is installed in a different dir - delete files and dir and ini section
  904.                     ret% = DeleteFiles (szDiffPath, STR_SAMPLER, szDKREgIni)
  905.                     ret% = DeleteDir (szDiffPath)
  906.                     ret% = DeleteSection(STR_SAMPLER, szDKREgIni)
  907.                 endif
  908.                 'Sampler is installed in same dir - do nothing, will overwrite files
  909.             else
  910.                 'Sampler does not exist - increment AppCount, add to InstalledApp
  911.                 szAppCount$ = GetIniKeyString( szDKRegIni, "InstalledApp", "Applications" )
  912.                 AppCount% = Val(szAppCount$) + 1
  913.                 CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  914.                 'assign product to first available number (maybe gaps due to deletion)
  915.                 i%=1
  916.                 while( GetIniKeyString( szDKRegIni, "InstalledApp",str$(i%) )<>"")
  917.                     i=i+1
  918.                 wend
  919.                 szNum$=str$(i%)
  920.                 CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_SAMPLER, cmoOverwrite
  921.             endif
  922.         '$ENDIF
  923.      endif
  924.  
  925.     CreateIniKeyValue szDKRegIni, "InstalledApp","RecentLang", LANG_DLL, cmoOverwrite
  926.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Path", szDestPath, cmoOverwrite
  927.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Company", STR_COMPANYNAME, cmoOverwrite
  928.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Readme", STR_README, cmoOverwrite
  929.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Order", STR_ORDER, cmoOverwrite
  930.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Exe", APPLICATION_EXE_FILE, cmoOverwrite
  931.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "1", APPLICATION_INI_FILE , cmoOverwrite  'Ini
  932. '    if szMinimalInstall = "OFF" then
  933.         MakeListFromSectionFilename "BIN_list", "BIN"
  934.         listLength% = GetListLength("BIN_list")
  935.         if listLength% > 0 then
  936.             for item% = 1 to listLength%
  937.                 szBinFile$ = GetListItem("BIN_list", item%)
  938.                 szNum$=str$(item%+1)
  939.                 CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), szBinFile , cmoOverwrite
  940.             next
  941.         end if
  942. '    end if
  943.  
  944. ''$IFDEF SCRUNGED_OR_TEXT
  945.         if OS_Windows95 then
  946.             MakeListFromSectionFilename "BIN_OPT_list", "BIN 32"
  947.         else
  948.             MakeListFromSectionFilename "BIN_OPT_list", "BIN 16"
  949.         end if
  950.  
  951.         listLength% = GetListLength("BIN_OPT_list")
  952.         if listLength% > 0 then
  953.             for Count% =1 to listLength%
  954.                 szBinFile$ = GetListItem("BIN_OPT_list", Count%)
  955.                 szNum$=str$(item%+1)
  956.                 CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), szBinFile , cmoOverwrite
  957.                 item% = item% + 1
  958.             next
  959.         end if
  960.         szNum$=str$(item%+1)
  961.         CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum),"DKQTWTHK.DLL", cmoOverwrite
  962.          item% = item% + 1
  963. ''$ENDIF
  964.  
  965.  
  966. '$IFDEF WITH_SAMPLER
  967.     szNum$=str$(item%+1)
  968.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), SAMPLER_INI_FILE , cmoOverwrite
  969.     item% = item% + 1
  970. '$ENDIF
  971.  
  972.     ' Add Uninstall only files to the list
  973.     UninstallOnly( item% )
  974.  
  975.  
  976. '$IFDEF WITH_FULL_SAMPLER
  977.     ' Create entries in the sampler section
  978.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Path", szFullSampPath, cmoOverwrite
  979.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Company", STR_COMPANYNAME, cmoOverwrite
  980.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Readme", STR_SAMPLER_README, cmoOverwrite
  981.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Exe", SAMPLER_EXE_FILE, cmoOverwrite
  982.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "1", SAMPLER_INI_FILE , cmoOverwrite  'Ini
  983. '    if szMinimalInstall = "OFF" then
  984.         MakeListFromSectionFilename "SAMP_BIN_list", "SAMPBIN"
  985.         listLength% = GetListLength("SAMP_BIN_list")
  986.         if listLength% > 0 then
  987.             for item% = 1 to listLength%
  988.                 szBinFile$ = GetListItem("SAMP_BIN_list", item%)
  989.                 szNum$=str$(item%+1)
  990.                 CreateIniKeyValue szDKRegIni, STR_SAMPLER, ltrim$(szNum), szBinFile , cmoOverwrite
  991.             next
  992.         end if
  993. '    end if
  994. '$ENDIF
  995.  
  996.     ' Add fonts to the uninstall list.
  997. '    listLength% = GetListLength("Fonts_list")
  998. '    if listLength% > 0 then
  999. '        for item% = 1 to listLength%
  1000. '            szFontFile$ = GetListItem("Fonts_list", item%)
  1001. '            szNum$=str$(item%)
  1002. '            CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME,"F"+ltrim$(szNum), szFontFile, cmoOverwrite
  1003. '        next
  1004. '    end if
  1005.  
  1006. End Sub
  1007.  
  1008.