home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / GLEN / POWERBAT.ZIP / PBINSTAL.PWR < prev    next >
Text File  |  1990-09-19  |  10KB  |  238 lines

  1. Variable        PBSpace,5,65536       ;space needed for .exe modules
  2. Variable        DocSpace,6,153600     ;space needed for doc files
  3. Variable        TotSpace,6,219136     ;space needed for all
  4. Variable        CurrFore,1            ;orig screen colors
  5. Variable        CurrBack,1
  6. Variable        CurrAttr,1
  7. Variable        MonoBack,3,7          ;background color
  8. Variable        ClearMsg,76,"                                                                            "
  9. Variable        DOW,9                 ;date variables
  10. Variable        Mo,2
  11. Variable        Da,2
  12. Variable        Yr,4
  13. Variable        ClrBack,3,112
  14. Variable        MonoTitle,3,112       ;title color
  15. Variable        ClrTitle,3,116
  16. Variable        MonoInfo,3,7          ;information box
  17. Variable        ClrInfo,3,30
  18. Variable        InChar,1
  19. Variable        InString,79
  20. Variable        PBDrive,1
  21. Variable        DocDrive,1
  22. Variable        SourceDir,79          ;install modules
  23. Variable        PBDir,79              ;powerbatch directory
  24. Variable        DocDir,79             ;documentation directory
  25. Variable        DiskTot,8             ;Disk size
  26. Variable        DiskAvail,8           ;free space
  27. Variable        Work,80               ;work area
  28. ?Color          CurrFore,CurrBack,CurrAttr  ;get current colors
  29. ?Date           DOW,Mo,Da,Yr
  30. Clear
  31. ReadYN          "Do you have a color monitor? [Y/N] ",InChar
  32. Compare         InChar,"Y",,,ColorOK
  33. SetVar          ClrBack,MonoBack      ;set colors for mono
  34. SetVar          ClrTitle,MonoTitle
  35. SetVar          ClrInfo,MonoInfo
  36. Label           ColorOK
  37. Color           ClrBack               ;reset default text attribute
  38. Clear
  39. Color           ClrTitle
  40. Box1            5,1,75,6,ClrTitle     ;draw title box
  41. Center          "Installation Program",2
  42. Center          "POWERBATCH",3
  43. Center          "by",4
  44. Center          "Computing Systems Design, Inc.",5
  45. WriteAt         6,5,DOW               ;day of week
  46. GoToXY          64,5                  ;date
  47. Write           Mo
  48. Write           "/"
  49. Write           Da
  50. Write           "/"
  51. Write           Yr
  52. Color           ClrInfo
  53. Box1            1,8,80,25,ClrInfo     ;draw action box
  54. Center          "┤ Press Ctrl-Break To Terminate The Install Process ├",25
  55. WriteAt         3,9,"There are two groups of files on the PowerBatch installation disk. One"
  56. WriteAt         3,10,"group contains the modules necessary to create PowerBatch programs and"
  57. WriteAt         3,11,"one group contains documentation, examples, and informational files."
  58. WriteAt         3,13,"The modules necessary to create PowerBatch programs MUST be on your DOS"
  59. WriteAt         3,14,"search path. The other files you may locate in a directory not on your"
  60. WriteAt         3,15,"search path."
  61. Label           GetSource
  62. WriteAt         3,17,"Enter the drive letter where the PowerBatch install modules are located "
  63. ReadUpKey       InChar
  64. Write           ":"
  65. WriteAt         3,18,"Enter the directory name where the PowerBatch install modules are located"
  66. WriteAt         3,19,"Source dir: \"
  67. ReadStr         InString
  68. Concat          SourceDir,InChar,":"
  69. Length          Work,InString
  70. Compare         Work,0,,,InpOK
  71. Concat          SourceDir,"\"
  72. Label           InpOK
  73. Concat          SourceDir,InString
  74. Concat          Work,SourceDir,"\POWERMAK.EXE"
  75. Upper           Work
  76. ?FileExist      Work,GetPBDir
  77. Clear           CurrAttr
  78. Writeline       Work
  79. WriteLine       "The above specified directory does not contain the PowerBatch programs."
  80. WriteLine       "Refer to the README.1ST file included with the PowerBatch software. To view"
  81. WriteLine       "this file enter the following line and press enter"
  82. WriteLine       " "
  83. WriteLine       "    TYPE README.1ST"
  84. Halt
  85. Label           GetPBDir
  86. WriteAt         3,17,ClearMsg
  87. WriteAt         3,18,ClearMsg
  88. WriteAt         3,19,ClearMsg
  89. GotoXY          3,17
  90. Write           "Enter the drive letter where you will place the PowerBatch software "
  91. ReadUpKey       PBDrive
  92. Write           ":"
  93. WriteAt         3,18,"Enter a directory name on the DOS search path to place PowerBatch compiler"
  94. WriteAt         3,19,"Dir > \"
  95. ReadStr         InString
  96. Upper           InString
  97. Concat          PBDir,PBDrive,":\"
  98. Concat          PBDir,InString
  99. ?InPath         PBDir,,NotInPath      ;is this on the path
  100. ?DiskSpace      PBDir,DiskTot,DiskAvail
  101. Compare         DiskAvail,PBSpace,PBDirOK,NoPathSpace,PBDirOK
  102. Label           NotInPath
  103. GoToXy          3,23
  104. Write           "Directory not on your DOS path...Re-enter"
  105. Goto            ClrMsg
  106. Label           NoPathSpace
  107. GoToXY          3,23
  108. Write           "Insufficient disk space. 64k required"
  109. Label           ClrMsg
  110. Beep            750,8                 ;alert user to error
  111. Wait            35                    ;read the message
  112. GoToXY          3,23
  113. Write           ClearMsg
  114. WriteAt         3,17,ClearMsg
  115. WriteAt         3,19,ClearMsg
  116. GoTo            GetPBDir
  117. Label           PBDirOK
  118. WriteAt         3,17,ClearMsg
  119. WriteAt         3,18,ClearMsg
  120. WriteAt         3,19,ClearMsg
  121. WriteAt         3,17,"Enter the drive letter to receive the PowerBatch information files "
  122. ReadUpKey       DocDrive
  123. Write           ":"
  124. WriteAt         3,18,"Enter a directory name to receive the PowerBatch information files"
  125. WriteAt         3,19,"Dir > \"
  126. ReadStr         InString
  127. Upper           InString
  128. Concat          DocDir,DocDrive,":\"
  129. Concat          DocDir,InString
  130. ?DirExist       DocDir,ChkDocSp
  131. GoToXY          3,23
  132. ReadYN          "Directory does not exist...Shall I create it for you [Y/N] ",InChar
  133. Beep            750,8
  134. GoToXY          3,23
  135. Write           ClearMsg
  136. Compare         InChar,"Y",,,MakDocDir
  137. WriteAt         3,19,ClearMsg
  138. WriteAt         65,17," "
  139. GoTo            PBDirOK
  140. Label           MakDocDir
  141. MD              DocDir
  142. ?DirExist       DocDir,,NoDir
  143. Label           ChkDocSp
  144. ?DiskSpace      DocDrive,DiskTot,DiskAvail
  145. Compare         DocDrive,PBDrive,,,SameDrive
  146. Compare         DiskAvail,DocSpace,BeginCopy,NoDocSpace,BeginCopy
  147. Label           SameDrive
  148. Compare         DiskAvail,TotSpace,BeginCopy,,BeginCopy
  149. Label           NoDocSpace
  150. WriteAt         3,23,"Insufficient disk space. 150k required."
  151. Goto            Clear2
  152. label           NoDir
  153. WriteAt         3,23,"Cannot add "
  154. Write           DocDir
  155. Label           Clear2
  156. Beep            750,8
  157. Wait            35
  158. WriteAt         3,23,ClearMsg
  159. GoTo            PBDirOK
  160. Label           BeginCopy
  161. ClearBox        1,8,80,25,ClrInfo
  162. WriteAt         3,9,"Transferring SMLMODEL.MDL to "
  163. Write           PBDir
  164. Concat          Work,SourceDir,"SMLMODEL.MDL"
  165. COPY            Work, PBDir ">nul"
  166. Compare         DosError,0,CopyError,CopyError
  167. WriteAt         3,10,"Transferring POWERMAK.EXE & PBDELETE.EXE to "
  168. Write           PBDir
  169. Concat          Work,SourceDir,"*.EXE"
  170. COPY            Work, PBDir ">nul"
  171. Compare         DosError,0,CopyError,CopyError
  172. WriteAt         3,11,"Transferring POWERBAT.DOC to "
  173. Write           DocDir
  174. Concat          Work,SourceDir,"POWERBAT.DOC"
  175. COPY            Work, DocDir ">nul"
  176. Compare         DosError,0,CopyError,CopyError
  177. WriteAt         3,12,"Transferring Examples to "
  178. Write           DocDir
  179. Concat          Work,SourceDir,"*.PWR"
  180. COPY            Work, DocDir ">nul"
  181. Compare         DosError,0,CopyError,CopyError
  182. Concat          Work, SourceDir, "DOSEX1.BAT"
  183. COPY            Work, DocDir ">nul"
  184. Compare         DosError,0,CopyError,CopyError
  185. WriteAt         3,13,"Transferring information files to "
  186. Write           DocDir
  187. Concat          Work,SourceDir,"*.FRM"
  188. COPY            Work, DocDir ">nul"
  189. Compare         DosError,0,CopyError,CopyError
  190. Concat          Work,SourceDir,"REGISTER.EXE"
  191. ?FileExist      Work,,Finis
  192. WriteAt         3,14,"You have purchased a registered copy of PowerBatch..."
  193. WriteAt         3,15,"Registering this copy to you."
  194. Wait            3
  195. CD              SourceDir
  196. Register        PBDir
  197. Label           Finis
  198. WriteAt         3,14,"This PowerBatch installation (performed by a compiled PowerBatch program)"
  199. WriteAt         3,15,"is now complete."
  200. Wait            50
  201. Color           CurrAttr
  202. Clear
  203. WriteLine       "If you give an evaluation copy of PowerBatch to a friend, it MUST contain all"
  204. WriteLine       "of the PowerBatch files without modification. The complete list of files in"
  205. WriteLine       "the evaluation system contains:"
  206. WriteLine       "      1) README.1ST      Initial start-up instructions"
  207. WriteLine       "      2) PBINSTAL.EXE    PowerBatch install program"
  208. WriteLine       "      3) POWERMAK.EXE    PowerBatch compiler"
  209. WriteLine       "      4) SMLMODEL.MDL    PowerBatch routines"
  210. WriteLine       "      5) POWERBAT.DOC    PowerBatch documentation"
  211. WriteLine       "      6) DOSEX1.BAT      Sample DOS batch file"
  212. WriteLine       "      7) DEMO1.PWR       Example PowerBatch Source file"
  213. WriteLine       "      8) MENU1.PWR       Example PowerBatch Source file"
  214. WriteLine       "      9) MOVE1.PWR       Example PowerBatch Source file"
  215. WriteLine       "     10) MOVE2.PWR       Example PowerBatch Source file"
  216. WriteLine       "     11) BOXDEMO1.PWR    Example PowerBatch Source file"
  217. WriteLine       "     12) PBINSTAL.PWR    Source for PowerBatch install"
  218. WriteLine       "     13) PBCLONE.PWR     Source for cloning PowerBatch"
  219. WriteLine       "     14) MOVESUB.PWR     Subroutine used by PBCLONE"
  220. WriteLine       "     15) DELETEPB.EXE    Delete all PowerBatch files"
  221. WriteLine       "     16) REGISTER.FRM    Registration form"
  222. WriteLine       "     17) INVOICE.FRM     Pre-printed invoice for company use"
  223. WriteLine       "     18) VENDOR.DOC      Information for software vendors"
  224. WriteLine       "     19) SYSOP.DOC       Information for BBS SysOps"
  225. WriteLine       ""
  226. Concat          Work,SourceDir,"REGISTER.EXE"
  227. ?FileExist      Work,,NoRegMsg
  228. WriteLine       "DO NOT FURNISH THE PROGRAM    REGISTER.EXE  !!!"
  229. WriteLine       "THIS PROGRAM REGISTERS THE SOFTWARE IN YOUR NAME ONLY !!!"
  230. Label           NoRegMsg
  231. Halt            0
  232. Label           CopyError
  233. Concat          Work,"DOS error code ",DosError
  234. Concat          Work," occurred during copy. Cannot continue."
  235. WriteLine       3,14,Work
  236. Beep            800,8,3
  237. WriteLine       3,15,"PowerBatch installation not successful!"
  238.