home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1995 December / SOFM_Dec1995.bin / pc / os2 / adeptbbs / install.cmd < prev    next >
OS/2 REXX Batch file  |  1995-10-31  |  16KB  |  514 lines

  1. /* Begin Install.CMD for AdeptXBBS */
  2. '@Echo off'
  3. adummy = ''
  4. say ''
  5. say ''
  6. say 'If you are *NOT* a registered sysop.  Or are a registered sysop, but have'
  7. say 'misplaced your key, you may not want to install this new version.  If you'
  8. say 'are a registered sysop who knows where your key is, and you have it written'
  9. say 'down, then please continue on.'
  10. say ''
  11. say 'If you are *NOT* a registered sysop, this version will install in DEMO mode.'
  12. say ''
  13. say 'DEMO Mode will let you log on and use the BBS locally but will not allow'
  14. say 'remote callers.'
  15. say ''
  16. say 'Only registered sysops will be able to receive calls/connects to their'
  17. say 'systems.'
  18. say ''
  19. dummy = charout(,'Do you wish to continue with this install? [y/N] ')
  20. parse upper pull adummy
  21. if left(adummy,1) \= 'Y' then do
  22.   exit
  23. end
  24. adummy = ''
  25. say ''
  26. say ''
  27. say ''
  28. say ''
  29. say 'Please... Make sure Chatserver.exe is NOT loaded!  If it is this install'
  30. say '          will fail without warning.  Please make sure that Gatekpr.exe'
  31. say '          is also not running, or any other adeptxbbs utilities.'
  32. say ''
  33. dummy = charout(,'Do you wish to continue with this install? [y/N] ')
  34. parse upper pull adummy
  35. if left(adummy,1) \= 'Y' then do
  36.   exit
  37. end
  38. say ''
  39. say ''
  40. say '  Thank you for Choosing AdeptSoft - BBS: (407) 477-6310, AdeptSoft.Com'
  41. say ''
  42. say '   ──────────────────────────────────────────────────────────'
  43. say 'C──────────────────────────────────────────────────────────'
  44. say 'C▌    ▐C────────────────────────────────────────────────────────'
  45. say 'C▐C▐C▌  ▐C▌   ▐C▌    ▐C▌    ▐C▌   ▐C▌   ▐C▌   ▐C▌    '
  46. say 'C▐C▐C▐C▐C▐C▐C▐C▐C▐C▐C▐C▐C'
  47. say 'C▌    ▐C▐C▐C▌ ▐C▌    ▐C▐C▌ ▐C▐C▐C▌ ▐C▐C'
  48. say 'C▐C ▐C▐C▐C▐C▐C▐C▐C▐C▐C▐C'
  49. say 'C▐C ▐C▌  ▐C▌   ▐C▐C▐C▌    ▐C▌   ▐C▐C'
  50. say 'C▐C ▐C───────────────────────────────────────────────────────'
  51. say 'C──────────────────────────────────────────────────────────'
  52. say '   ──────────────────────────────────────────────────────────'
  53. say ''
  54. say ''
  55. say ''
  56. say ''
  57. say ''
  58. say ''
  59. store = charout(,'Press Enter to continue...')
  60. parse upper pull enterd
  61. say ''
  62. say ''
  63. say 'C┌───────────────────────────────────────────────────────────────────┐'
  64. say 'C│            AdeptXBBS 1.05 Installation/Update Program             '
  65. say 'C│   AdeptXBBS is copyright (c) 1995 by AdeptSoft & Mark Kimes       │'
  66. say 'C│                        All rights reserved                        │'
  67. say 'C└───────────────────────────────────────────────────────────────────┘'
  68. say ''
  69. say ''
  70.  
  71. rc = stream('adeptins.dat','c','query exists')
  72. if rc = '' then
  73. do
  74.   say 'Sorry, ADEPTINS.DAT not found.  Must not be right directory. Terminating.'
  75.   exit
  76. end
  77.  
  78. rc = stream('adeptful.dat','c','query exists')
  79. if rc = '' then
  80. do
  81.   say 'Sorry, ADEPTFUL.DAT not found.  Must not be right directory. Terminating.'
  82.   exit
  83. end
  84.  
  85. curdir = directory()
  86.  
  87. do
  88.     say ''
  89.     say 'Please enter the drive letter to install AdeptXBBS (Ex. C:)'
  90.     say 'You MUST enter the full drive letter, C: <- Notice the colon'
  91.     say '--'
  92.     parse upper pull dummy
  93.     ADDRESS CMD dummy
  94.     ADDRESS CMD "CD\"
  95.     ADDRESS CMD "MD ADEPT 2>NUL"
  96.     ADDRESS CMD "CD ADEPT"
  97.     olddir = curdir
  98.     curdir = dummy'\ADEPT'
  99.     say ''
  100.     say 'Current sub-directory: 'curdir
  101.     say ''
  102.     say 'Install AdeptXBBS into the current'
  103.     dum = charout(, 'sub-directory? [Y/n] ')
  104.     parse upper pull dummy
  105.     if left(dummy,1) = 'N' then exit
  106.     say ''
  107. end
  108.  
  109. say ''
  110. say 'Installing AdeptXBBS, copying files.. Please wait...'
  111.  
  112. InsCmd = copy olddir'\*>NUL'
  113.  
  114. if olddir \= curdir then
  115. do
  116.   ADDRESS CMD InsCmd
  117. end
  118.  
  119. say ''
  120. say '1. Install a Full Copy of AdeptXBBS'
  121. say '2. Upgrade a previous version of AdeptXBBS'
  122. say ''
  123. say '3. Quit'
  124. parse upper pull dummy
  125. if left(dummy,1) = '3' then exit
  126.  
  127. say ''
  128. say 'Unpacking files, this may take a bit...'
  129.  
  130. if left(dummy,1) = '1' then
  131. do
  132.   InsCmd = 'AdeptFul.dat /o >NUL'
  133.   ADDRESS CMD InsCmd
  134.   InsCmd = 'AdpLang.dat /o >NUL'
  135.   ADDRESS CMD InsCmd
  136.   InsCmd = 'AdpMenus.dat /o >NUL'
  137.   ADDRESS CMD InsCmd
  138. end
  139.  
  140. InsCmd = 'AdeptIns.dat /o >NUL'
  141. ADDRESS CMD InsCmd
  142.  
  143. if left(dummy,1) \= 1 then do
  144.     say ''
  145.     say 'If your LANGUAGE.TEXT is customized you may not want to overwrite'
  146.     say 'it.  The needed changes (5 lines) are listed in the READ.ME'
  147.     say 'file.'
  148.     say ''
  149.     dum = Charout(, 'Is it OK to Overwrite your Language.Text? [Y/n] ')
  150.     parse upper pull adummy
  151.     if left(adummy,1) \= 'N' then do
  152.        say ''
  153.        say 'Overwriting your Language.Text file...'
  154.        InsCmd = 'AdpLang.dat /o >NUL'
  155.        ADDRESS CMD InsCmd
  156.     end
  157. end
  158.  
  159. if left(dummy,1) \= 1 then do
  160.     say ''
  161.     say 'Would you like to replace your current menus with the latest menus'
  162.     say 'included with v1.0?'
  163.     say ''
  164.     dum = Charout(, 'Would you like your menus replaced? [Y/n] ')
  165.     parse upper pull adummy
  166.     if left(adummy,1) \= 'N' then do
  167.        say ''
  168.        say 'Replacing menu files...'
  169.        InsCmd = 'AdpMenus.dat /o >NUL'
  170.        ADDRESS CMD InsCmd
  171.     end
  172. end
  173.  
  174. rc = stream('System\Language.Text.Index','c','query exists')
  175. if rc \= '' then
  176. do
  177.   ADDRESS CMD 'DEL System\Language.Text.Index'
  178. end
  179.  
  180. rc = stream('System\Language.Text.Compiled','c','query exists')
  181. if rc \= '' then
  182. do
  183.   ADDRESS CMD 'DEL System\Language.Text.Compiled'
  184. end
  185.  
  186. /* load rexx utility functions */
  187.  
  188. rc = stream('adept.exe','c','query exists')
  189. if rc = '' then
  190. do
  191.   say 'Sorry, ADEPT.EXE not found.  Must not be right directory. Terminating.'
  192.   exit
  193. end
  194.  
  195. say ''
  196. say 'If you see any SYS### errors from this point on, please ignore them'
  197. say ''
  198.  
  199. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  200. call SysLoadFuncs
  201.  
  202. /* say it, then do it */
  203.  
  204. say "Creating AdeptSoft folder..."
  205.  
  206. /* first, create AdeptSoft folder */
  207.  
  208. title = "AdeptSoft"
  209. classname = 'WPFolder'
  210. location = '<WP_DESKTOP>'
  211. setup = 'OBJECTID=<AdeptSoft_Folder>;OPEN=DEFAULT'
  212. result=SysCreateObject(classname,title,location,setup,f)
  213.  
  214. /* If folder exists, ask before updating */
  215.  
  216. if result = 0 then
  217. do
  218.   existed = 'TRUE'
  219.   say ''
  220.   say 'The AdeptXBBS folder already exists.'
  221.   dum = Charout(, 'Do you really want to create a duplicate? [Y/n] ')
  222.   parse upper pull dummy
  223.   if left(dummy,1) = 'N' then
  224.   do
  225.     rc = stream('adept.exe','c','query exists')
  226.     if rc = '' then
  227.     do
  228.       say 'Sorry, ADEPT.EXE not found.  Unarchive does not appear to have '
  229.       say 'been successful.'
  230.       exit
  231.     end
  232.  
  233.     do
  234.       say ''
  235.       say 'Install appears to have been sucessful!'
  236.       say ''
  237.     end
  238.  
  239.     do
  240.       say ''
  241.       say 'NOTE: This setup defaults to starting in 'DEMO' mode, enless you are'
  242.       say '      upgrading, and have already registered the program.  If you are'
  243.       say '      a registered sysop and your key has been entered in the'
  244.       say '      Config->Register AdeptXBBS box, you will automatically startup'
  245.       say '      with the features you registered accessable to you. '
  246.       say ''
  247.       say '      If you are NOT a registered sysop this will install in DEMO mode'
  248.       say '      and you will only be able to log on locally.'
  249.       say ''
  250.       say ''
  251.       say '      If the BBS software beeps twice and then exists when you first try'
  252.       say '      to run it, read the file wontwork.txt. - thanks.'
  253.       say ''
  254.       say 'Would you like to setup your copy of'
  255.       dum = Charout(, 'AdeptXBBS? ')
  256.       parse upper pull dummy
  257.       if left(dummy,1) = 'Y' then
  258.       do
  259.         ADDRESS CMD 'Adept.exe /NODES 2 /SETUP'
  260.       end
  261.       say ''
  262.     end
  263.     say 'Thank you for choosing AdeptSoft!'
  264.     say ''
  265.     exit
  266.   end
  267.   say ''
  268. end
  269.  
  270. say "Creating objects in AdeptSoft folder..."
  271.  
  272. /* now, create program objects in AdeptSoft folder */
  273.  
  274. title = "AdeptXBBS 1 Node"
  275. classname = 'WPProgram'
  276. location = '<AdeptSoft_Folder>'
  277. setup = 'EXENAME='curdir'\ADEPT.EXE;STARTUPDIR='curdir';PARAMETERS=/NODES 1'
  278. call SysCreateObject classname,title,location,setup,u
  279.  
  280. title = "AdeptXBBS 2 Nodes"
  281. classname = 'WPProgram'
  282. location = '<AdeptSoft_Folder>'
  283. setup = 'EXENAME='curdir'\ADEPT.EXE;STARTUPDIR='curdir';PARAMETERS=/NODES 2'
  284. call SysCreateObject classname,title,location,setup,u
  285.  
  286. title = "AdeptXBBS in Setup Mode"
  287. classname = 'WPProgram'
  288. location = '<AdeptSoft_Folder>'
  289. setup = 'EXENAME='curdir'\ADEPT.EXE;STARTUPDIR='curdir';PARAMETERS=/NODES 2 /SETUP'
  290. call SysCreateObject classname,title,location,setup,u
  291.  
  292. rc = stream('xsend.cmd','c','query exists')
  293. if rc \= '' then
  294. do
  295.   title = "Send files"
  296.   classname = 'WPProgram'
  297.   location = '<AdeptSoft_Folder>'
  298.   setup = 'EXENAME='curdir'\XSEND.CMD;STARTUPDIR='curdir
  299.   if existed = '' then setup = setup';PARAMETERS=%* 'curdir'\\'
  300.   call SysCreateObject classname,title,location,setup,u
  301. end
  302.  
  303. rc = stream('fileedit.exe','c','query exists')
  304. if rc \= '' then
  305. do
  306.   title = "File area editor"
  307.   classname = 'WPProgram'
  308.   location = '<AdeptSoft_Folder>'
  309.   setup = 'EXENAME='curdir'\FILEEDIT.EXE;STARTUPDIR='curdir
  310.   call SysCreateObject classname,title,location,setup,u
  311. end
  312.  
  313. rc = stream('mail.cmd','c','query exists')
  314. if rc \= '' then
  315. do
  316.   title = "Process mail"
  317.   classname = 'WPProgram'
  318.   location = '<AdeptSoft_Folder>'
  319.   setup = 'EXENAME='curdir'\mail.cmd;STARTUPDIR='curdir
  320.   call SysCreateObject classname,title,location,setup,u
  321. end
  322.  
  323. rc = stream('reindexfiles.exe','c','query exists')
  324. if rc \= '' then
  325. do
  326.   title = "Reindex File Database"
  327.   classname = 'WPProgram'
  328.   location = '<AdeptSoft_Folder>'
  329.   setup = 'EXENAME='curdir'\ReIndexFiles.EXE;STARTUPDIR='curdir';PARAMETERS=/NUKE'
  330.   call SysCreateObject classname,title,location,setup,u
  331. end
  332.  
  333. rc = stream('reindexusers.exe','c','query exists')
  334. if rc \= '' then
  335. do
  336.   title = "Reindex User File"
  337.   classname = 'WPProgram'
  338.   location = '<AdeptSoft_Folder>'
  339. setup = 'EXENAME='curdir'\ReIndexUsers.Exe;STARTUPDIR='curdir
  340. call SysCreateObject classname,title,location,setup,u
  341. end
  342.  
  343. rc = stream('bfsmake.exe','c','query exists')
  344. if rc \= '' then
  345. do
  346.   title = "Convert file areas"
  347.   classname = 'WPProgram'
  348.   location = '<AdeptSoft_Folder>'
  349.   setup = 'EXENAME='curdir'\BFSMAKE.EXE;STARTUPDIR='curdir
  350.   call SysCreateObject classname,title,location,setup,u
  351. end
  352.  
  353. rc = stream('xmsg.cmd','c','query exists')
  354. if rc \= '' then
  355. do
  356.   title = "Clean up msg areas"
  357.   classname = 'WPProgram'
  358.   location = '<AdeptSoft_Folder>'
  359.   setup = 'EXENAME='curdir'\CLEAN.EXE;STARTUPDIR='curdir
  360.   call SysCreateObject classname,title,location,setup,u
  361. end
  362.  
  363. rc = stream('MUSTREAD.TXT','c','query exists')
  364. if rc \= '' then
  365. do
  366.   title = "Must Read!"
  367.   classname = 'WPShadow'
  368.   location = '<AdeptSoft_Folder>'
  369.   setup = 'SHADOWID='rc
  370.   call SysCreateObject classname,title,location,setup,u
  371. end
  372.  
  373. rc = stream('AdpXBBS.DOC','c','query exists')
  374. if rc \= '' then
  375. do
  376.   title = "AdeptXBBS Documentation!"
  377.   classname = 'WPShadow'
  378.   location = '<AdeptSoft_Folder>'
  379.   setup = 'SHADOWID='rc
  380.   call SysCreateObject classname,title,location,setup,u
  381. end
  382.  
  383. rc = stream('AdScript.DOC','c','query exists')
  384. if rc \= '' then
  385. do
  386.   title = "AdeptREXX Documentation!"
  387.   classname = 'WPShadow'
  388.   location = '<AdeptSoft_Folder>'
  389.   setup = 'SHADOWID='rc
  390.   call SysCreateObject classname,title,location,setup,u
  391. end
  392.  
  393. rc = stream('UserMod.Doc','c','query exists')
  394. if rc \= '' then
  395. do
  396.   title = "Batch User Modifier"
  397.   classname = 'WPShadow'
  398.   location = '<AdeptSoft_Folder>'
  399.   setup = 'SHADOWID='rc
  400.   call SysCreateObject classname,title,location,setup,u
  401. end
  402.  
  403. rc = stream('REGISTER.TXT','c','query exists')
  404. if rc \= '' then
  405. do
  406.   title = "How to Register"
  407.   classname = 'WPShadow'
  408.   location = '<AdeptSoft_Folder>'
  409.   setup = 'SHADOWID='rc
  410.   call SysCreateObject classname,title,location,setup,u
  411. end
  412.  
  413.   rc = directory('Menus')
  414.   if rc \= '' then
  415.   do
  416.     call directory curdir
  417.     title = "BBS Menus"
  418.     classname = 'WPShadow'
  419.     location = '<AdeptSoft_Folder>'
  420.     setup = 'SHADOWID='rc
  421.     call SysCreateObject classname,title,location,setup,u
  422.   end
  423.  
  424.   rc = directory('Text')
  425.   if rc \= '' then
  426.   do
  427.     call directory curdir
  428.     title = "BBS Text"
  429.     classname = 'WPShadow'
  430.     location = '<AdeptXBBS_Folder>'
  431.     setup = 'SHADOWID='rc
  432.     call SysCreateObject classname,title,location,setup,u
  433.   end
  434.  
  435.   rc = directory('System\SysNews')
  436.   if rc \= '' then
  437.   do
  438.     call directory curdir
  439.     title = "BBS System News"
  440.     classname = 'WPShadow'
  441.     location = '<AdeptSoft_Folder>'
  442.     setup = 'SHADOWID='rc
  443.     call SysCreateObject classname,title,location,setup,u
  444.   end
  445.  
  446.   rc = directory('System\MiscNews')
  447.   if rc \= '' then
  448.   do
  449.     call directory curdir
  450.     title = "BBS Misc. News"
  451.     classname = 'WPShadow'
  452.     location = '<AdeptSoft_Folder>'
  453.     setup = 'SHADOWID='rc
  454.     call SysCreateObject classname,title,location,setup,u
  455.   end
  456.  
  457. rc = stream('Adept.HLP','c','query exists')
  458. if rc \= '' then
  459. do
  460.   rc = stream('SEEHELP.EXE','c','query exists')
  461.   if rc \= '' then
  462.   do
  463.     title = "AdeptXBBS Online Help"
  464.     classname = 'WPProgram'
  465.     location = '<AdeptSoft_Folder>'
  466.     setup = 'EXENAME='curdir'\SEEHELP.EXE;'
  467.     setup = setup'STARTDIR='curdir';PARAMETERS='curdir'\ADEPT.HLP'
  468.     call SysCreateObject classname,title,location,setup,f
  469.   end
  470. end
  471.  
  472. rc = stream('adept.exe','c','query exists')
  473. if rc = '' then
  474. do
  475.   say 'Sorry, ADEPT.EXE not found.  Unarchive does not appear to have '
  476.   say 'been successful.'
  477.   exit
  478. end
  479.  
  480. do
  481.   say ''
  482.   say 'Install appears to have been sucessful!'
  483.   say ''
  484. end
  485.  
  486. do
  487.   say ''
  488.   say 'NOTE: This setup defaults to starting 2 nodes.  Both nodes will be'
  489.   say '      started in  "'"SETUP"'"  mode.  This is to be sure that it will'
  490.   say '      not interupt anything else that is running.'
  491.   say ''
  492.   say '      You can setup the BBSs options from the Config pull down on'
  493.   say '      the main screen.'
  494.   say ''
  495.   say '      Be sure to click on Shutdown in order to make sure your settings'
  496.   say '      are properly saved.'
  497.   say ''
  498.   say '      If the BBS software beeps twice and then exists when you first try'
  499.   say '      to run it, read the file wontwork.txt - thanks.'
  500.   say ''
  501.   say 'Would you like to setup your copy of'
  502.   dum = Charout(, 'AdeptXBBS? [y/N] ')
  503.   parse upper pull dummy
  504.   if left(dummy,1) = 'Y' then
  505.   do
  506.     ADDRESS CMD 'Adept.exe /NODES 2 /SETUP'
  507.   end
  508.   say ''
  509. end
  510.  
  511. say 'Thank you for choosing AdeptSoft!'
  512.  
  513. /* END Install Program */
  514.