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