home *** CD-ROM | disk | FTP | other *** search
/ Chip: Shareware for Win 95 / Chip-Shareware-Win95.bin / ostatni / setupb / setup.scr < prev    next >
Text File  |  1996-12-02  |  39KB  |  825 lines

  1. //
  2. // Setup Installation File
  3. // Created by Setup Builder Version 5.01.000/32
  4. //
  5. // Copyright ⌐ 1993 - 1996 GPP Software
  6. //
  7. // Created: 02-12-1996 at 21:22:36
  8. //
  9. //
  10. // Setup procedure for installing/de-installing:
  11. //
  12. // SETUP / SETUP BUILDER
  13. //
  14.  
  15.  
  16. // Application Variables
  17. SET %Caption%="Setup"
  18. SET %Application%="Setup Builder"
  19. SET %Company%="GPPSoftware"
  20. SET %InstallPath%="C:\SETUP"
  21. SET %InstallDrive%="C:"
  22. SET %Option%=1
  23. SET %Option1%=TRUE
  24. SET %IniFile%="BLDR16.INI"
  25. IF "#INSTVER#"=="INST16" GetProfileString("Install", "Path", "%InstallPath%", "%IniFile%", %InstallPath%)
  26. IF "#INSTVER#"=="INST32" RegGetSetting(2, "SOFTWARE\%Company%\%Application%\Install", "Path", "%InstallPath%", %InstallPath%)
  27. AddChar(%InstallPath%, "\")
  28.  
  29.  
  30. // Language
  31. SetLanguage("UkEnglish")
  32.  
  33.  
  34. // Copy all the bitmaps
  35. CopyFile("GPSOFT3.BM_","%WindowsDirectory%TEMP\GPSOFT3.BMP")
  36. CopyFile("DIAMOND.BM_","%WindowsDirectory%TEMP\DIAMOND.BMP")
  37.  
  38.  
  39. // Create all the objects
  40. CreateBackdrop("DEFAULTBACKDROP")
  41. CreateControl("Text","%Application% Setup",-1,20,10,0,0,1048576,"Times New Roman",50,3,16777215,0)
  42. CreateControl("Text","Install/De-Install created using Setup Builder Version 5.01.000/32|Copyright ⌐ 1993 - 1996 GPP Software|",-1,20,0,0,0,1114112,"Times New Roman",17,3,16777215,0)
  43. EndObject()
  44.  
  45.  
  46. CreateCueCard("WELCOMECARD",20,50,310,200,2)
  47. CreateControl("Text","%Application%",-1,20,20,150,45,0,"Times New Roman",50,0,10485760,0)
  48. CreateControl("ColourBlock","",-1,20,70,270,5,0,128)
  49. CreateControl("Text","Welcome to %Application%, the foremost|Software Setup building tool from:",-1,25,95,150,45,0,"Times New Roman",17,0,0,0)
  50. CreateControl("Bitmap","%WindowsDirectory%TEMP\GPSOFT3.BMP",-1,25,148,150,45,0)
  51. EndObject()
  52.  
  53.  
  54. CreateCueCard("PROMO1",20,50,400,210,2)
  55. CreateControl("Text","Ease Of Use Designed In!",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  56. CreateControl("ColourBlock","",-1,20,50,270,5,0,128)
  57. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,90,150,45,0)
  58. CreateControl("Text","No programming is required for simple installs",-1,50,90,150,45,0,"Times New Roman",17,0,0,0)
  59. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,120,150,45,0)
  60. CreateControl("Text","You don't need to be a programmer to use %Application%",-1,50,120,150,45,0,"Times New Roman",17,0,0,0)
  61. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,150,150,45,0)
  62. CreateControl("Text","Create simple installs in less than 10 minutes!",-1,50,150,150,45,0,"Times New Roman",17,0,0,0)
  63. EndObject()
  64.  
  65.  
  66. CreateCueCard("PROMO2",20,50,360,230,2)
  67. CreateControl("Text","New Features",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  68. CreateControl("ColourBlock","",-1,20,50,150,5,0,128)
  69. CreateControl("Text","%Application% now supports:",-1,25,70,150,45,0,"Times New Roman",20,0,16711680,0)
  70. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,100,150,45,0)
  71. CreateControl("Text","User defined Backdrops",-1,50,100,150,45,0,"Times New Roman",17,0,0,0)
  72. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,120,150,45,0)
  73. CreateControl("Text","User defined Dialogs",-1,50,120,150,45,0,"Times New Roman",17,0,0,0)
  74. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,140,150,45,0)
  75. CreateControl("Text","User defined Cue Cards/Bill Boards",-1,50,140,150,45,0,"Times New Roman",17,0,0,0)
  76. CreateControl("Text","All are completely configureable by the user using the",-1,25,170,150,45,0,"Times New Roman",17,0,0,0)
  77. CreateControl("Text","%Application% in-built Project Object Designer",-1,25,190,150,45,0,"Times New Roman",17,0,0,0)
  78. EndObject()
  79.  
  80.  
  81. CreateCueCard("PROMO3",20,50,360,235,2)
  82. CreateControl("Text","16 and 32 Bit Support",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  83. CreateControl("ColourBlock","",-1,20,50,235,5,0,128)
  84. CreateControl("Text","%Application% now supports:",-1,25,70,150,45,0,"Times New Roman",20,0,16711680,0)
  85. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,100,150,45,0)
  86. CreateControl("Text","Dual 16/32 bit platform installations",-1,50,100,150,45,0,"Times New Roman",17,0,0,0)
  87. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,125,150,45,0)
  88. CreateControl("Text","Windows 95/NT Registry",-1,50,125,150,45,0,"Times New Roman",17,0,0,0)
  89. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,150,150,45,0)
  90. CreateControl("Text","Windows 95/NT Shared File Registry",-1,50,150,150,45,0,"Times New Roman",17,0,0,0)
  91. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,175,150,12,0)
  92. CreateControl("Text","Windows 95/NT Long File Names",-1,50,175,150,45,0,"Times New Roman",17,0,0,0)
  93. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,200,150,12,0)
  94. CreateControl("Text","OLE Control Registration",-1,50,200,150,12,0,"MS Sans Serif",17,0,0,0)
  95. EndObject()
  96.  
  97.  
  98. CreateCueCard("PROMO4",20,50,400,230,2)
  99. CreateControl("Text","New Features",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  100. CreateControl("ColourBlock","",-1,20,50,150,5,0,128)
  101. CreateControl("Text","Try %Application%'s Optional Installations facilty!",-1,25,70,150,45,0,"Times New Roman",20,0,16711680,0)
  102. CreateControl("Text","Optional Installations allow you to create installs for your",-1,25,100,150,45,0,"Times New Roman",17,0,0,0)
  103. CreateControl("Text","customers which give them the choice of which components",-1,25,120,150,45,0,"Times New Roman",17,0,0,0)
  104. CreateControl("Text","of your software to install.",-1,25,140,150,45,0,"Times New Roman",17,0,0,0)
  105. CreateControl("Text","You can create up to 15 different options with any",-1,25,170,150,45,0,"Times New Roman",17,0,0,0)
  106. CreateControl("Text","name you wish to give them!",-1,25,190,150,45,0,"Times New Roman",17,0,0,0)
  107. EndObject()
  108.  
  109.  
  110. CreateCueCard("PROMO5",20,50,330,210,2)
  111. CreateControl("Text","New Features",-1,20,20,150,45,0,"Times New Roman",30,0,10485760,0)
  112. CreateControl("ColourBlock","",-1,20,50,150,5,0,128)
  113. CreateControl("Text","Plus lots lots more!",-1,25,70,150,45,0,"Times New Roman",20,0,16711680,0)
  114. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,100,150,45,0)
  115. CreateControl("Text","Complete new MDI user interface",-1,50,100,150,45,0,"Times New Roman",17,0,0,0)
  116. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,120,150,45,0)
  117. CreateControl("Text","Many new script language enhancements",-1,50,120,150,45,0,"Times New Roman",17,0,0,0)
  118. CreateControl("Bitmap","%WindowsDirectory%TEMP\DIAMOND.BMP",-1,25,140,150,45,0)
  119. CreateControl("Text","Better multitasking",-1,50,140,150,45,0,"Times New Roman",17,0,0,0)
  120. CreateControl("Text","In fact, many of the things you have asked for!",-1,25,170,150,45,0,"Times New Roman",17,0,0,0)
  121. EndObject()
  122.  
  123.  
  124. // Close Setup Program
  125. HideSetup()
  126.  
  127.  
  128. // Display appropriate backdrop
  129. GetScreenWidth(%Width%)
  130. SET %BackDrop%="DEFAULTBACKDROP"
  131. IF "%BackDrop%" != "(None)" ShowBackdrop("%BackDrop%")
  132.  
  133.  
  134. // Determine if s/w is already installed
  135. SET %DoUpgrade% = FALSE
  136. IF "#INSTVER#"=="INST16" GetProfileString("Install", "DeInstallScript", "%InstallPath%DEINST.INF", "%IniFile%", %DeInstall%)
  137. IF "#INSTVER#"=="INST32" RegGetSetting(2, "SOFTWARE\%Company%\%Application%\Install", "DeInstallScript", "%InstallPath%DEINST.INF", %DeInstall%)
  138. IF "#INSTVER#"=="INST16" GetProfileString("Install", "Installed", "0", "%IniFile%", %Installed%)
  139. IF "#INSTVER#"=="INST32" RegGetInt(2, "SOFTWARE\%Company%\%Application%\Install", "Installed", 0, %Installed%)
  140. IF %Installed% != 0 GOTO :GOTVERSION
  141. SET %DoUpgrade% = TRUE
  142. SET %DeInstall% = "%InstallPath%DEINST.INF"
  143. CheckExists("%DeInstall%")
  144. SET %Installed% = %ERROR%
  145. IF %ERROR% == TRUE GOTO :GOTVERSION
  146. SET %DeInstall% = "%InstallPath%DEINST.SCR"
  147. CheckExists("%DeInstall%")
  148. SET %Installed% = %ERROR%
  149. IF %ERROR% == TRUE GOTO :GOTVERSION
  150. SET %DeInstall% = "%InstallPath%SETUP.SCR"
  151. CheckExists("%DeInstall%")
  152. SET %Installed% = %ERROR%
  153. :GOTVERSION
  154.  
  155.  
  156. // User defined code - initialisation
  157. // Find out what is or is not installed so we
  158. // can prompt the user with what still needs installing
  159. CheckExists("%InstallPath%*.EXE")
  160. SET %Option1% = NOT %ERROR%
  161.  
  162. CheckExists("%InstallPath%SAMPLES\*.*")
  163. SET %Option2% = NOT %ERROR%
  164.  
  165. CheckExists("%InstallPath%OBJECTS\*.*")
  166. SET %Option3% = NOT %ERROR%
  167.  
  168.  
  169.  
  170. // Welcome Dialog
  171. :BACK1
  172. SET %Message1%="Welcome to the %Application% Installation Program."
  173. SET %Message2%="This program will install the %Application% software in the directory you specify on your hard disk."
  174. SET %Message3%="(Compuserve ID: 100105,536)||Setup is supplied with the Setup Builder|software and is the copyright of G.Plowman"
  175. DialogBox("Welcome")
  176. IF %ERROR% == IDCANCEL GOTO :EXIT
  177.  
  178.  
  179. // Installation options
  180. CreateDialog("OPTIONS","%Caption%",0,0,260,140)
  181. CreateControl("GroupBox","",-1,6,6,248,110,0)
  182. CreateControl("Icon","Setup",-1,15,20,0,0,0)
  183. CreateControl("Text","Please make a selection from the following options:",-1,60,30,170,24,0,"MS Sans Serif",15,0,0,0)
  184. CreateControl("CheckBox","Install the %Application% software",100,38,46,180,14,0,%Option1%)
  185. CreateControl("CheckBox","Install Sample Objects",101,38,66,180,14,0,%Option2%)
  186. CreateControl("CheckBox","Install General Samples",102,38,86,180,14,0,%Option3%)
  187. CreateControl("Button","&Continue",IDOK,81,123,54,14,0)
  188. CreateControl("Button","&Back",IDBACK,140,123,54,14,0)
  189. CreateControl("Button","E&xit",IDCANCEL,199,123,54,14,0)
  190. CentreDialog()
  191. SetFocus(IDOK)
  192. EndObject()
  193.  
  194. :BACK2
  195. DialogBox("OPTIONS")
  196. IF %ERROR% == IDBACK GOTO :BACK1
  197. IF %ERROR% == IDCANCEL GOTO :EXIT
  198. SET %Option%=0
  199. SET %Option%=%Option% + %Option3%
  200. SET %Option%=%Option% * 2
  201. SET %Option%=%Option% + %Option2%
  202. SET %Option%=%Option% * 2
  203. SET %Option%=%Option% + %Option1%
  204.  
  205.  
  206. // Sort out where to install the software
  207. // but only if the software isn't already installed
  208. IF %Installed% == TRUE GOTO :INSTALLED
  209. // Ask the user where to install the software
  210. // but only if the software isn't already installed
  211. :RETRY
  212. SET %Message1%="The install program will copy the %Application% files into the following directory:"
  213. DialogBox("AskPath")
  214. IF %ERROR% == IDBACK GOTO :BACK2
  215. IF %ERROR% == IDCANCEL GOTO :EXIT
  216.  
  217. // Create installation directory
  218. AddChar(%InstallPath%, "\")
  219. SET %MakeDir% = %InstallPath%
  220. SET %Temp% = Len(%MakeDir%)
  221. IF %Temp% > 3 SET %Temp% = %Temp% - 1
  222. SET %MakeDir% = Left(%MakeDir%, %Temp%)
  223. MkDir(%MakeDir%)
  224. IsWriteable(%MakeDir%)
  225. IF %ERROR% == FALSE GOTO :DIRERROR
  226.  
  227.  
  228. // Save the installation directory/de-install script
  229. IF "#INSTVER#"=="INST16" WriteProfileString("Install", "Path", "%MakeDir%", "%IniFile%")
  230. IF "#INSTVER#"=="INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "Path", "%MakeDir%")
  231. SET %Temp% = ""
  232. :INSTALLED
  233.  
  234.  
  235. // Upgrade the de-install if required
  236. IF %DoUpgrade% == FALSE GOTO :NODEINSTUPG
  237. SET %Temp% = "%DeInstall%"
  238. SET %DeInstall% = "%WindowsDirectory%GPPSOFT\SETUP.001"
  239. GetBackupName("%DeInstall%", %DeInstall%)
  240. IF %Installed% == FALSE GOTO :NODEINSTUPG
  241. Open("%DeInstall%", 10, WRITE)
  242. WriteLine(10, "//$FILES$")
  243. Close(10)
  244. CopyFile("%Temp%","%DeInstall%",0,1,1)
  245. :NODEINSTUPG
  246.  
  247. SET %DoUpgrade% = ""
  248. IF "#INSTVER#"=="INST16" WriteProfileString("Install", "DeInstallScript", "%DeInstall%", "%IniFile%")
  249. IF "#INSTVER#"=="INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "DeInstallScript", "%DeInstall%")
  250. IF "#INSTVER#"=="INST16" WriteProfileString("Install", "Installed", "1", "%IniFile%")
  251. IF "#INSTVER#"=="INST32" RegWriteInt(2, "SOFTWARE\%Company%\%Application%\Install", "Installed", 1)
  252.  
  253. WriteProfileString("%Application%", "Version", "1", "DEINST.INI")
  254. WriteProfileString("%Application%", "DeInstallScript", "%DeInstall%", "DEINST.INI")
  255. WriteProfileString("%Application%", "Cmd", "%WindowsDirectory%GPPSOFT\#INSTVER#.EXE", "DEINST.INI")
  256.  
  257.  
  258. Set %MakeDir% = "%InstallPath%SAMPLES"
  259. MkDir("%MakeDir%")
  260. IsWriteable(%MakeDir%)
  261. IF %ERROR% == FALSE GOTO :DIRERROR
  262. Set %MakeDir% = "%InstallPath%OBJECTS"
  263. MkDir("%MakeDir%")
  264. IsWriteable(%MakeDir%)
  265. IF %ERROR% == FALSE GOTO :DIRERROR
  266. SET %MakeDir% = ""
  267.  
  268.  
  269. // User defined code - pre file copying
  270. // Save the install version
  271. IF "#INSTVER#" == "INST16" WriteProfileString("Install", "Version", "5.01.000", "%IniFile%")
  272. IF "#INSTVER#" == "INST16" WriteProfileString("Install", "DefaultBackdrop", "%InstallPath%OBJECTS\DEFAULT.BKD", "%IniFile%")
  273. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "Version", "5.01.000")
  274. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "DefaultBackdrop", "%InstallPath%OBJECTS\DEFAULT.BKD")
  275.  
  276. // Make the temporary directory
  277. MkDir("%WindowsDirectory%TEMP")
  278. IF "#INSTVER#" == "INST16" WriteProfileString("Install", "TempPath", "%WindowsDirectory%TEMP", "%IniFile%")
  279. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "TempPath", "%WindowsDirectory%TEMP")
  280.  
  281. // Set the copy dialog position for small screens so that
  282. // the user can see the cue cards
  283. GetScreenWidth(%Width%)
  284. IF %Width% <= 800 CentreDialog(2, 2)
  285.  
  286.  
  287.  
  288. // Setup the de-install procedure
  289. OpenDeInstall("%DeInstall%")
  290. AddDeInstall("$STARTUP$","Set ^037Caption^037=^034Setup^034")
  291. AddDeInstall("$STARTUP$","Set ^037InstallPath^037=^034%InstallPath%^034")
  292. AddDeInstall("$STARTUP$","MessageBox(^034The %Application% software is about to be removed from your machine.^^013^^013All files, directories and the appropriate Program Manager Group will be deleted.^^013^^013Are you sure you wish to continue ?^034, ^034%Caption%^034, MB_YESNO, MB_ICONQUESTION)")
  293. AddDeInstall("$STARTUP$","IF %%ERROR%% == IDYES GOTO :DODELETE")
  294. AddDeInstall("$STARTUP$","Set ^037Message1^037 = ^034De-installation aborted - the %Application% software has not been deinstalled.^034")
  295. AddDeInstall("$STARTUP$","Set ^037Message2^037 = ^034^034")
  296. AddDeInstall("$STARTUP$","DialogBox(^34OKBOX^34)")
  297. AddDeInstall("$STARTUP$","GOTO :END")
  298. AddDeInstall("$STARTUP$",":DODELETE")
  299.  
  300. AddDeInstall("$USERSCRIPT$","// Remove older version's files")
  301. AddDeInstall("$USERSCRIPT$","Delete(^034%WindowsDirectory%DOSEXEC.PIF^034)")
  302. AddDeInstall("$USERSCRIPT$","")
  303. AddDeInstall("$USERSCRIPT$","// Remove extraneous files")
  304. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%SAMPLES\*.*^034)")
  305. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%OBJECTS\*.*^034)")
  306. AddDeInstall("$USERSCRIPT$","")
  307. AddDeInstall("$USERSCRIPT$","Delete(^034%WindowsDirectory%BUILDER.INI^034)")
  308. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%BUILDER.EXE^034)")
  309. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%INST.EXE^034)")
  310. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%SETUP.SCR^034)")
  311. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%LADMIN.EXE^034)")
  312. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%DIBAPI.DLL^034)")
  313. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%DIBAPI16.DLL^034)")
  314. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%TS.HLP^034)")
  315. AddDeInstall("$USERSCRIPT$","")
  316. AddDeInstall("$USERSCRIPT$","// Help file .GID files")
  317. AddDeInstall("$USERSCRIPT$","SetFileAttr(^034%InstallPath%BUILDER.GID^034, 0, 0, 0, 0)")
  318. AddDeInstall("$USERSCRIPT$","SetFileAttr(^034%InstallPath%SETUP.GID^034, 0, 0, 0, 0)")
  319. AddDeInstall("$USERSCRIPT$","SetFileAttr(^034%InstallPath%TS.GID^034, 0, 0, 0, 0)")
  320. AddDeInstall("$USERSCRIPT$","Delete(^034%InstallPath%*.GID^034)")
  321. AddDeInstall("$USERSCRIPT$","")
  322. AddDeInstall("$USERSCRIPT$","// Finally file manager item")
  323. AddDeInstall("$USERSCRIPT$","IF ^034#INSTVER#^034 == ^034INST16^034 WriteProfileString(^034Extensions^034, ^034inf^034, ^034^034, ^034WIN.INI^034)")
  324. AddDeInstall("$USERSCRIPT$","IF ^034#INSTVER#^034 == ^034INST16^034 WriteProfileString(^034Extensions^034, ^034scr^034, ^034^034, ^034WIN.INI^034)")
  325.  
  326.  
  327. // Cleanup de-install script
  328. AddDeInstall("$DIRECTORIES$","RmDir(^034%InstallPath%SAMPLES^034)")
  329. AddDeInstall("$DIRECTORIES$","RmDir(^034%InstallPath%OBJECTS^034)")
  330. AddDeInstall("$CLEANUP$","SET ^037Len^037 = Len(^034^037InstallPath^037^034) - 1")
  331. AddDeInstall("$CLEANUP$","SET ^037InstTemp^037 = Left(^034^037InstallPath^037^034, ^037Len^037)")
  332. AddDeInstall("$CLEANUP$","RmDir(^034^037InstTemp^037^034)")
  333. AddDeInstall("$CLEANUP$","Delete(^034%WindowsDirectory%%IniFile%^034)")
  334. AddDeInstall("$CLEANUP$","IF ^34^35^35INSTVER^35^35^34==^34INST32^34 RegDeleteSetting(2, ^34SOFTWARE\%Company%\%Application%^34, ^34^34)")
  335. AddDeInstall("$CLEANUP$","SET ^037Message1^037 = ^034The %Application% software has been successfully de-installed.^034")
  336. AddDeInstall("$CLEANUP$","SET ^037Message2^037 = ^034To re-install the %Application% software you should re-run this installation program.^034")
  337. AddDeInstall("$CLEANUP$","DialogBox(^34OKBOX^34)")
  338. AddDeInstall("$CLEANUP$","WriteProfileString(^34%Application%^34,^34Continue^34,^0341^34,^34DEINST.INI^34)")
  339. AddDeInstall("$CLEANUP$",":END")
  340.  
  341.  
  342. // Check for space availability
  343. GetDiskSpace(%InstallDrive%)
  344. SET %Space%=%ERROR%
  345. SET %Required%=0
  346. IF %Option1%==TRUE SET %Required%=%Required% + 2764800
  347. IF %Option2%==TRUE SET %Required%=%Required% + 12288
  348. IF %Option3%==TRUE SET %Required%=%Required% + 45056
  349. IF %Space% >= %Required% GOTO :GOTSPACE
  350. MessageBox("The %Application% software requires %Required% bytes of disk space and there is only %Space% bytes free on your %InstallDrive% drive.||Do you wish to continue to install the software ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  351. IF %ERROR% == IDNO GOTO :EXIT
  352. :GOTSPACE
  353.  
  354.  
  355. // Do the file copying
  356. SET %TotalBlocks%=0
  357. IF %Option% AND 1 != 0 SET %TotalBlocks% = %TotalBlocks% + 23
  358. IF %Option% AND 2 != 0 SET %TotalBlocks% = %TotalBlocks% + 10
  359. IF %Option% AND 4 != 0 SET %TotalBlocks% = %TotalBlocks% + 9
  360. CopyFile(%TotalBlocks%)
  361. Release()
  362. IF %Option% AND 1==0 GOTO :OVER1
  363. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  364. IF %ERROR% == IDCANCEL GOTO :EXIT
  365. AddDeInstall("$FILES$","Delete(^034%InstallPath%SETUP.EXE^034)")
  366. ShowCueCard("WELCOMECARD")
  367. "SETUP.EXE", "%InstallPath%", "Copying: Interpreter Executable", TRUE
  368. :OVER1
  369. Release()
  370. IF %Option% AND 1==0 GOTO :OVER2
  371. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  372. IF %ERROR% == IDCANCEL GOTO :EXIT
  373. AddDeInstall("$FILES$","Delete(^034%InstallPath%INST16.EXE^034)")
  374. "INST16.EX_", "%InstallPath%INST16.EXE", "Copying: 16-bit Interpreter Executable", TRUE
  375. :OVER2
  376. Release()
  377. IF %Option% AND 1==0 GOTO :OVER3
  378. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  379. IF %ERROR% == IDCANCEL GOTO :EXIT
  380. AddDeInstall("$FILES$","Delete(^034%InstallPath%INST32.EXE^034)")
  381. "INST32.EX_", "%InstallPath%INST32.EXE", "Copying: 32-bit Interpreter Executable", TRUE
  382. :OVER3
  383. Release()
  384. IF %Option% AND 1==0 GOTO :OVER4
  385. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  386. IF %ERROR% == IDCANCEL GOTO :EXIT
  387. AddDeInstall("$FILES$","Delete(^034%InstallPath%CLEANUP.EXE^034)")
  388. ShowCueCard("PROMO1")
  389. "CLEANUP.EXE", "%InstallPath%", "Copying: Interpreter Executable", TRUE
  390. :OVER4
  391. Release()
  392. IF %Option% AND 1==0 GOTO :OVER5
  393. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  394. IF %ERROR% == IDCANCEL GOTO :EXIT
  395. AddDeInstall("$FILES$","Delete(^034%InstallPath%DEINST.EXE^034)")
  396. "DEINST.EXE", "%InstallPath%", "Copying: De-Installer Executable", TRUE
  397. :OVER5
  398. Release()
  399. IF %Option% AND 1==0 GOTO :OVER6
  400. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  401. IF %ERROR% == IDCANCEL GOTO :EXIT
  402. AddDeInstall("$FILES$","Delete(^034%InstallPath%BLDR16.EXE^034)")
  403. "BLDR16.EX_", "%InstallPath%BLDR16.EXE", "Copying: Setup Builder 16-bit Executable", TRUE
  404. :OVER6
  405. Release()
  406. IF %Option% AND 1==0 GOTO :OVER7
  407. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  408. IF %ERROR% == IDCANCEL GOTO :EXIT
  409. AddDeInstall("$FILES$","Delete(^034%InstallPath%Bldr32.exe^034)")
  410. "Bldr32.ex_", "%InstallPath%Bldr32.exe", "Copying: Setup Builder 32-bit Executable", TRUE
  411. :OVER7
  412. Release()
  413. IF %Option% AND 1==0 GOTO :OVER8
  414. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  415. IF %ERROR% == IDCANCEL GOTO :EXIT
  416. AddDeInstall("$FILES$","Delete(^034%InstallPath%BUILDER.HLP^034)")
  417. "BUILDER.HL_", "%InstallPath%BUILDER.HLP", "Copying: Setup Builder Help File", TRUE
  418. :OVER8
  419. Release()
  420. IF %Option% AND 1==0 GOTO :OVER9
  421. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  422. IF %ERROR% == IDCANCEL GOTO :EXIT
  423. AddDeInstall("$FILES$","Delete(^034%InstallPath%SETUP.HLP^034)")
  424. ShowCueCard("PROMO2")
  425. "SETUP.HL_", "%InstallPath%SETUP.HLP", "Copying: Setup Script Language Help File", TRUE
  426. :OVER9
  427. Release()
  428. IF %Option% AND 1==0 GOTO :OVER10
  429. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  430. IF %ERROR% == IDCANCEL GOTO :EXIT
  431. AddDeInstall("$FILES$","Delete(^034%InstallPath%COMPRESS.EXE^034)")
  432. "COMPRESS.EXE", "%InstallPath%", "Copying: Compression Utility", TRUE
  433. :OVER10
  434. Release()
  435. IF %Option% AND 1==0 GOTO :OVER11
  436. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  437. IF %ERROR% == IDCANCEL GOTO :EXIT
  438. AddDeInstall("$FILES$","Delete(^034%InstallPath%COMPRESS.TXT^034)")
  439. "COMPRESS.TXT", "%InstallPath%", "Copying: Compression Utility", TRUE
  440. :OVER11
  441. Release()
  442. IF %Option% AND 1==0 GOTO :OVER12
  443. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  444. IF %ERROR% == IDCANCEL GOTO :EXIT
  445. AddDeInstall("$FILES$","Delete(^034%InstallPath%DOSEXEC.PIF^034)")
  446. ShowCueCard("PROMO3")
  447. "DOSEXEC.PIF", "%InstallPath%", "Copying: PIF File", TRUE
  448. :OVER12
  449. SET %Skip%=0
  450. Release()
  451. IF %Option% AND 1==0 GOTO :OVER13
  452. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  453. IF %ERROR% == IDCANCEL GOTO :EXIT
  454. AddDeInstall("$FILES$","Delete(^034%InstallPath%IMPORT.INI^034)")
  455. SET %Skip%=1
  456. SetGaugeText("Copying: Third Party Components Configuration File", "%CurrentDirectory%IMPORT.INI", "%InstallPath%IMPORT.INI")
  457. ConfirmOverwrite("%InstallPath%IMPORT.INI", "%CurrentDirectory%IMPORT.INI", "", 0)
  458. IF %ERROR% == IDNO GOTO :OVER13
  459. "IMPORT.INI", "%InstallPath%", "Copying: Third Party Components Configuration File", TRUE
  460. SET %Skip%=0
  461. :OVER13
  462. UpdateGauge(%Skip%)
  463. Release()
  464. IF %Option% AND 1==0 GOTO :OVER14
  465. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  466. IF %ERROR% == IDCANCEL GOTO :EXIT
  467. AddDeInstall("$FILES$","Delete(^034%InstallPath%PRNT.BAT^034)")
  468. "PRNT.BAT", "%InstallPath%", "Copying: Registration Support File", TRUE
  469. :OVER14
  470. Release()
  471. IF %Option% AND 1==0 GOTO :OVER15
  472. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  473. IF %ERROR% == IDCANCEL GOTO :EXIT
  474. AddDeInstall("$FILES$","Delete(^034%InstallPath%LADMIN16.EXE^034)")
  475. "LADMIN16.EX_", "%InstallPath%LADMIN16.EXE", "Copying: License Administration Utility", TRUE
  476. :OVER15
  477. Release()
  478. IF %Option% AND 1==0 GOTO :OVER16
  479. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  480. IF %ERROR% == IDCANCEL GOTO :EXIT
  481. AddDeInstall("$FILES$","Delete(^034%InstallPath%LADMIN32.EXE^034)")
  482. "LADMIN32.EX_", "%InstallPath%LADMIN32.EXE", "Copying: License Administration Utility", TRUE
  483. :OVER16
  484. Release()
  485. IF %Option% AND 1==0 GOTO :OVER17
  486. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  487. IF %ERROR% == IDCANCEL GOTO :EXIT
  488. AddDeInstall("$FILES$","Delete(^034%InstallPath%ORDERAUS.TXT^034)")
  489. "ORDERAUS.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  490. :OVER17
  491. Release()
  492. IF %Option% AND 1==0 GOTO :OVER18
  493. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  494. IF %ERROR% == IDCANCEL GOTO :EXIT
  495. AddDeInstall("$FILES$","Delete(^034%InstallPath%ORDERUK.TXT^034)")
  496. "ORDERUK.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  497. :OVER18
  498. Release()
  499. IF %Option% AND 1==0 GOTO :OVER19
  500. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  501. IF %ERROR% == IDCANCEL GOTO :EXIT
  502. AddDeInstall("$FILES$","Delete(^034%InstallPath%COMMENTS.TXT^034)")
  503. "COMMENTS.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  504. :OVER19
  505. Release()
  506. IF %Option% AND 1==0 GOTO :OVER20
  507. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  508. IF %ERROR% == IDCANCEL GOTO :EXIT
  509. AddDeInstall("$FILES$","Delete(^034%InstallPath%VENDORS.TXT^034)")
  510. "VENDORS.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  511. :OVER20
  512. Release()
  513. IF %Option% AND 1==0 GOTO :OVER21
  514. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  515. IF %ERROR% == IDCANCEL GOTO :EXIT
  516. AddDeInstall("$FILES$","Delete(^034%InstallPath%INSTALL.TXT^034)")
  517. "INSTALL.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  518. :OVER21
  519. Release()
  520. IF %Option% AND 1==0 GOTO :OVER22
  521. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  522. IF %ERROR% == IDCANCEL GOTO :EXIT
  523. AddDeInstall("$FILES$","Delete(^034%InstallPath%README.TXT^034)")
  524. ShowCueCard("PROMO4")
  525. "README.TXT", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  526. :OVER22
  527. Release()
  528. IF %Option% AND 1==0 GOTO :OVER23
  529. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  530. IF %ERROR% == IDCANCEL GOTO :EXIT
  531. AddDeInstall("$FILES$","Delete(^034%InstallPath%FILE_ID.DIZ^034)")
  532. "FILE_ID.DIZ", "%InstallPath%", "Copying: Supporting Documentation", TRUE
  533. :OVER23
  534. Release()
  535. IF %Option% AND 2==0 GOTO :OVER24
  536. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  537. IF %ERROR% == IDCANCEL GOTO :EXIT
  538. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\ASKPATH.DLG^034)")
  539. "ASKPATH.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Files", TRUE
  540. :OVER24
  541. Release()
  542. IF %Option% AND 2==0 GOTO :OVER25
  543. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  544. IF %ERROR% == IDCANCEL GOTO :EXIT
  545. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DEFAULT.BKD^034)")
  546. "DEFAULT.BKD", "%InstallPath%OBJECTS\", "Copying: Default Object Files", TRUE
  547. :OVER25
  548. Release()
  549. IF %Option% AND 2==0 GOTO :OVER26
  550. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  551. IF %ERROR% == IDCANCEL GOTO :EXIT
  552. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DEFAULT.CUE^034)")
  553. "DEFAULT.CUE", "%InstallPath%OBJECTS\", "Copying: Default Object Files", TRUE
  554. :OVER26
  555. Release()
  556. IF %Option% AND 2==0 GOTO :OVER27
  557. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  558. IF %ERROR% == IDCANCEL GOTO :EXIT
  559. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DEINSTAL.DLG^034)")
  560. "DEINSTAL.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Object Files", TRUE
  561. :OVER27
  562. Release()
  563. IF %Option% AND 2==0 GOTO :OVER28
  564. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  565. IF %ERROR% == IDCANCEL GOTO :EXIT
  566. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DIALOG1.DLG^034)")
  567. "DIALOG1.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Object Files", TRUE
  568. :OVER28
  569. Release()
  570. IF %Option% AND 2==0 GOTO :OVER29
  571. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  572. IF %ERROR% == IDCANCEL GOTO :EXIT
  573. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\DIALOG2.DLG^034)")
  574. "DIALOG2.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Object Files", TRUE
  575. :OVER29
  576. Release()
  577. IF %Option% AND 2==0 GOTO :OVER30
  578. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  579. IF %ERROR% == IDCANCEL GOTO :EXIT
  580. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\LICENSE.DLG^034)")
  581. "LICENSE.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Files", TRUE
  582. :OVER30
  583. Release()
  584. IF %Option% AND 2==0 GOTO :OVER31
  585. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  586. IF %ERROR% == IDCANCEL GOTO :EXIT
  587. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\OKBOX.DLG^034)")
  588. "OKBOX.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Files", TRUE
  589. :OVER31
  590. Release()
  591. IF %Option% AND 2==0 GOTO :OVER32
  592. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  593. IF %ERROR% == IDCANCEL GOTO :EXIT
  594. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\REGISTER.CUE^034)")
  595. ShowCueCard("PROMO5")
  596. "REGISTER.CUE", "%InstallPath%OBJECTS\", "Copying: Sample Object Files", TRUE
  597. :OVER32
  598. Release()
  599. IF %Option% AND 2==0 GOTO :OVER33
  600. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  601. IF %ERROR% == IDCANCEL GOTO :EXIT
  602. AddDeInstall("$FILES$","Delete(^034%InstallPath%OBJECTS\WELCOME.DLG^034)")
  603. "WELCOME.DLG", "%InstallPath%OBJECTS\", "Copying: Sample Files", TRUE
  604. :OVER33
  605. Release()
  606. IF %Option% AND 4==0 GOTO :OVER34
  607. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  608. IF %ERROR% == IDCANCEL GOTO :EXIT
  609. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\DIAMOND.BMP^034)")
  610. "DIAMOND.BMP", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  611. :OVER34
  612. Release()
  613. IF %Option% AND 4==0 GOTO :OVER35
  614. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  615. IF %ERROR% == IDCANCEL GOTO :EXIT
  616. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\PANEL.BMP^034)")
  617. "PANEL.BMP", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  618. :OVER35
  619. Release()
  620. IF %Option% AND 4==0 GOTO :OVER36
  621. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  622. IF %ERROR% == IDCANCEL GOTO :EXIT
  623. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\ROUNDPT.BMP^034)")
  624. "ROUNDPT.BMP", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  625. :OVER36
  626. Release()
  627. IF %Option% AND 4==0 GOTO :OVER37
  628. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  629. IF %ERROR% == IDCANCEL GOTO :EXIT
  630. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SQUAREPT.BMP^034)")
  631. "SQUAREPT.BMP", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  632. :OVER37
  633. Release()
  634. IF %Option% AND 4==0 GOTO :OVER38
  635. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  636. IF %ERROR% == IDCANCEL GOTO :EXIT
  637. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SAMPLE1.SPJ^034)")
  638. "SAMPLE1.SPJ", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  639. :OVER38
  640. Release()
  641. IF %Option% AND 4==0 GOTO :OVER39
  642. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  643. IF %ERROR% == IDCANCEL GOTO :EXIT
  644. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SAMPLE2.SPJ^034)")
  645. "SAMPLE2.SPJ", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  646. :OVER39
  647. Release()
  648. IF %Option% AND 4==0 GOTO :OVER40
  649. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  650. IF %ERROR% == IDCANCEL GOTO :EXIT
  651. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SAMPLE3.INI^034)")
  652. "SAMPLE3.INI", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  653. :OVER40
  654. Release()
  655. IF %Option% AND 4==0 GOTO :OVER41
  656. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  657. IF %ERROR% == IDCANCEL GOTO :EXIT
  658. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SAMPLE3.SCR^034)")
  659. "SAMPLE3.SCR", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  660. :OVER41
  661. Release()
  662. IF %Option% AND 4==0 GOTO :OVER42
  663. CheckExists("%CurrentDrive%DISK01", "Please insert the diskette labelled 'DISK01'")
  664. IF %ERROR% == IDCANCEL GOTO :EXIT
  665. AddDeInstall("$FILES$","Delete(^034%InstallPath%SAMPLES\SETUP.SPJ^034)")
  666. "SETUP.SPJ", "%InstallPath%SAMPLES\", "Copying: Sample Files", TRUE
  667. :OVER42
  668. EndCopyFile()
  669. ShowCueCard("")
  670.  
  671.  
  672.  
  673.  
  674. // User defined code - post file copying
  675. // Reset dialog centering
  676. CentreDialog(3, 3)
  677.  
  678. // License - check for old versions first
  679. GetProfileString("License", "Registration", "", "BUILDER.INI", %LStr%)
  680. IF "%LStr%" == "" GOTO :NOBUILDER
  681. IF "#INSTVER#" == "INST16" WriteProfileString("License", "Registration", "%LStr%", "%IniFile%")
  682. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\License", "Registration", "%LStr%")
  683. :NOBUILDER
  684. IF "#INSTVER#" == "INST16" GetProfileString("License", "Registration", "", "%IniFile%", %LStr%)
  685. IF "#INSTVER#" == "INST32" RegGetSetting(2, "SOFTWARE\%Company%\%Application%\License", "Registration", "", %LStr%)
  686. IF "%LStr%" != "" GOTO :GOTIT
  687. GetLicense(%License%)
  688. IF "#INSTVER#" == "INST16" WriteProfileString("License", "Registration", "%License%", "%IniFile%")
  689. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\License", "Registration", "%License%")
  690. :GOTIT
  691.  
  692. // Tell Setup Builder where to find some files for creating install disks
  693. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "Setup", "%InstallPath%setup.exe", "%IniFile%")
  694. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "DeInstall", "%InstallPath%deinst.exe", "%IniFile%")
  695. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "Inst16", "%InstallPath%inst16.exe", "%IniFile%")
  696. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "Inst32", "%InstallPath%inst32.exe", "%IniFile%")
  697. IF "#INSTVER#" == "INST16" WriteProfileString("Executables", "Cleanup", "%InstallPath%cleanup.exe", "%IniFile%")
  698. IF "#INSTVER#" == "INST16" WriteProfileString("Install", "ImportList", "%InstallPath%IMPORT.INI", "%IniFile%")
  699.  
  700. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "Setup", "%InstallPath%setup.exe")
  701. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "DeInstall", "%InstallPath%deinst.exe")
  702. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "Inst16", "%InstallPath%inst16.exe")
  703. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "Inst32", "%InstallPath%inst32.exe")
  704. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Executables", "Cleanup", "%InstallPath%cleanup.exe")
  705. IF "#INSTVER#" == "INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\Install", "ImportList", "%InstallPath%IMPORT.INI")
  706.  
  707. // Delete the old DOSEXEC.PIF to fix compression errors
  708. Delete("%WindowsDirectory%DOSEXEC.PIF")
  709.  
  710. // Delete old import file
  711. Delete("%WindowsDirectory%IMPORT.INI")
  712.  
  713.  
  714. // Now setup a new program manager group and its icons
  715. MessageBox("Setup can create a Program Manager group|for the %Application% application.||Do you wish to create a Program|Manager group and icons ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  716. Set %PmGrp% = %Error%
  717. IF %ERROR% == IDNO GOTO :NOPMGROUP
  718.  
  719. MakeGroup("%Application%", "")
  720. IF %Option% AND 1 != 0 MakeIcon("Setup Builder (16-bit)", "%InstallPath%BLDR16.EXE ")
  721. IF %Option% AND 1 != 0 MakeIcon("Setup Builder (32-bit)", "%InstallPath%Bldr32.exe ")
  722. IF %Option% AND 1 != 0 MakeIcon("Setup Builder Help", "%InstallPath%BUILDER.HLP ")
  723. IF %Option% AND 1 != 0 MakeIcon("Setup Script Help", "%InstallPath%SETUP.HLP ")
  724. IF %Option% AND 1 != 0 MakeIcon("Install Notes", "%InstallPath%INSTALL.TXT ")
  725. IF %Option% AND 1 != 0 MakeIcon("ReadMe", "%InstallPath%README.TXT ")
  726. AddDeInstall("$PMGROUP$","DeleteGroup(^034%Application%^034)")
  727. :NOPMGROUP
  728.  
  729.  
  730. // Licensing
  731. :LICENSING
  732. IF "%IniFile%" == "" SET %IniFile%="Setup Builder.INI"
  733. SET %Message1% = "Please enter the following licensing information for the %Application% software:"
  734. DialogBox("License")
  735. IF %ERROR% == IDCANCEL GOTO :EXIT
  736. IF "#INSTVER#"=="INST16" WriteProfileString("License","UserName","%EF_1%","%IniFile%")
  737. IF "#INSTVER#"=="INST16" WriteProfileString("License","Company","%EF_2%","%IniFile%")
  738. IF "#INSTVER#"=="INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\License", "UserName", "%EF_1%")
  739. IF "#INSTVER#"=="INST32" RegWriteSetting(2, "SOFTWARE\%Company%\%Application%\License". "Company", "%EF_2%")
  740.  
  741.  
  742. // User defined code - post PM group creation
  743. // Create some extra icons
  744. IF %PmGrp% == IDNO GOTO :NOICONS
  745. IF "#INSTVER#" == "INST16" MakeIcon("License Administrator", "%InstallPath%LADMIN16.EXE %IniFile%")
  746. IF "#INSTVER#" == "INST32" MakeIcon("License Administrator", "%InstallPath%LADMIN32.EXE %Application%")
  747. MakeIcon("Australian Order Form", "%InstallPath%PRNT.BAT %InstallPath%ORDERAUS.TXT")
  748. MakeIcon("UK Order Form", "%InstallPath%PRNT.BAT %InstallPath%ORDERUK.TXT")
  749. MakeIcon("Setup", "%CurrentDrive%\SETUP.EXE", "%InstallPath%SETUP.EXE")
  750. MakeIcon("Install", "%CurrentDrive%\INSTALL.EXE", "%InstallPath%SETUP.EXE")
  751.  
  752. // Delete unwanted icons
  753. DeleteIcon("Setup Builder")    // Remove old icon
  754. IF "#INSTVER#" == "INST16" DeleteIcon("Setup Builder (32-bit)")
  755. IF "#INSTVER#" == "INST32" DeleteIcon("Setup Builder (16-bit)")
  756. :NOICONS
  757.  
  758. // File association - Windows 3.x only
  759. IF "#INSTVER#" == "INST32" GOTO :NOASSOC
  760. MessageBox("Setup can install a file association|for File Manager with .SCR and .INF files.||Do you wish to install this association ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  761. IF %ERROR% == IDNO GOTO :NOASSOC
  762. IF "#INSTVER#" == "INST16" WriteProfileString("Extensions", "inf", "%InstallPath%inst16.exe ^.inf", "WIN.INI")
  763. IF "#INSTVER#" == "INST16" WriteProfileString("Extensions", "scr", "%InstallPath%inst16.exe ^.scr", "WIN.INI")
  764. :NOASSOC
  765.  
  766.  
  767. // Create the de-install icon
  768. IF %PmGrp% == IDYES MakeIcon("Un-Install %Application%", "%WindowsDirectory%GPPSOFT\DEINST.EXE %Application%")
  769.  
  770.  
  771. // Done
  772. :SUCCESS
  773. SET %Message1%="|%Application% installation has been successfully completed."
  774. SET %Message2%=""
  775. DialogBox("OkBox")
  776.  
  777.  
  778. // User defined code - installation completion
  779. MessageBox("Do you wish to view the|extra installation notes ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)
  780. IF %ERROR% == IDNO GOTO :NONOTES
  781.  
  782. WinExec("notepad.exe %InstallPath%README.TXT")
  783. :NONOTES
  784.  
  785. GOTO :END
  786.  
  787.  
  788. // User decided to quit
  789. :EXIT
  790. EndCopyFile()
  791. SET %Message1%="Installation has been terminated. You should re-run this installation program at a later time to install %Application%."
  792. SET %Message2%="|The %Application% software has not been installed."
  793. DialogBox("OkBox")
  794. GOTO :END
  795.  
  796.  
  797. // Error
  798. :ERROR
  799. EndCopyFile()
  800. SET %Message1%="An error occured during installation of the %Application% software."
  801. SET %Message2%="|The %Application% software has not been fully installed."
  802. DialogBox("OkBox")
  803. GOTO :END
  804.  
  805.  
  806. // Failed to create install directory
  807. :DIRERROR
  808. SET %Message1%="|Failed to create the installation directory '%MakeDir%'."
  809. SET %Message2%="|Unable to install the %Application% software in the specified directory."
  810. DialogBox("OkBox")
  811. GOTO :RETRY
  812.  
  813.  
  814. :END
  815. // Delete all the bitmaps
  816. Delete("%WindowsDirectory%TEMP\GPSOFT3.BMP")
  817. Delete("%WindowsDirectory%TEMP\DIAMOND.BMP")
  818.  
  819.  
  820. // Final tidy up - close files and remove components from H/D
  821. CloseDeInstall()
  822. Close()
  823. CheckExists("%CurrentDirectory%CLEANUP.EXE", "Please insert the diskette labelled 'DISK01'")
  824. IF %ERROR% == IDOK WinExec("%CurrentDirectory%CLEANUP.EXE")
  825.