home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Patch / Programs / PS3D.LHA / 3.0dupdate / Macros.LHA / TechReport.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1994-11-07  |  10.1 KB  |  348 lines

  1. /* $VER: TechReport.rexx 1.0d (7.11.94)
  2.    Copyright 1994 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. /* SAME OLD STUFF */
  6. OPTIONS RESULTS
  7. TRACE OFF
  8. ADDRESS COMMAND
  9. /* Make sure rexx support is opened */
  10. IF ~SHOW('L','rexxsupport.library') THEN
  11.    CALL ADDLIB('rexxsupport.library',0,-30)
  12.  
  13. /* DEFINITIONS AND REPORT SETUP */
  14. ofilename='ram:Report.TEXT'
  15. tfilename='t:Report.TEMP'
  16.  
  17. if ~open(.ofile, ofilename, 'W') then return 9
  18. call writeln(.ofile, 'PAGESTREAM 3.0 TECHNICAL SUPPORT REPORT')
  19. call writeln(.ofile, '---------------------------------------')
  20.  
  21. ADDRESS PAGESTREAM
  22. openbusyrequester message "'Preparing report...'" thermometer enabled abort enabled total 100 current 0
  23. bh=result
  24. ADDRESS COMMAND
  25.  
  26.  
  27. /* MAIN LOOP */
  28. call REGINFO()
  29. call SETBUSY (2)
  30. call SYSTEMINFO()
  31. call SETBUSY (5)
  32. call HELPSYSTEM()
  33. call SETBUSY (8)
  34. call ASSIGNS()
  35. call SETBUSY (10)
  36. call PROGRAMS()
  37. call SETBUSY (30)
  38. call LIBS()
  39. call SETBUSY (35)
  40. call FILTERS()
  41. call SETBUSY (65)
  42. call EFFECTS()
  43. call SETBUSY (80)
  44. call ENGINES()
  45. call SETBUSY (95)
  46. call COLORS()
  47. call SETBUSY (100)
  48. call CLEANUP(0)
  49.  
  50.  
  51. REGINFO:
  52. call writeln(.ofile, '')
  53. call writeln(.ofile, 'USER INFORMATION:')
  54. if ~open(.tfile, 'PageStream3:PageStream3.prefs', 'R') then rcode=9
  55.     else rcode=0
  56. user.name='Unknown'
  57. user.comp='Unknown'
  58. user.regn='Unknown'
  59. if rcode=0 then do
  60.     do until eof(.tfile)
  61.         temp=(readln(.tfile))
  62.         if left(temp,8)='USERNAME' then user.name=subword(temp,2)
  63.         if left(temp,8)='USERCOMP' then user.comp=subword(temp,2)
  64.         if left(temp,8)='USERREGN' then user.regn=subword(temp,2)
  65.     end
  66.     call close(.tfile)
  67. end
  68. call writeln(.ofile, '  User Name................. '||user.name)
  69. call writeln(.ofile, '  Company................... '||user.comp)
  70. call writeln(.ofile, '  Registration Number....... '||user.regn)
  71. return rcode
  72.  
  73. SYSTEMINFO:
  74. call writeln(.ofile, '')
  75. call writeln(.ofile, 'SYSTEM INFORMATION:')
  76. 'version >'||tfilename
  77. temp=GETTEMP()
  78. call writeln(.ofile, '  '||temp)
  79. 'cpu >'||tfilename
  80. temp=GETTEMP()
  81. call writeln(.ofile, '  '||temp)
  82. call writeln(.ofile, '')
  83. 'avail >'||tfilename
  84. if ~open(.tfile, tfilename, 'R') then return 9
  85. do 4
  86.     temp=readln(.tfile)
  87.     call writeln(.ofile, '  '||temp)
  88. end
  89. call close(.tfile)
  90. return
  91.  
  92. HELPSYSTEM:
  93. call writeln(.ofile, '')
  94. call writeln(.ofile, 'HELP SYSTEM:')
  95. if exists('libs:amigaguide.library') then do
  96.     'version libs:amigaguide.library >'||tfilename
  97.     temp=GETTEMP()
  98.     parse var temp dum ver .
  99.     call writeln(.ofile, '  AmigaGuide.library........ v'||ver)
  100. end
  101. else call writeln(.ofile, '  AmigaGuide.library........ MISSING!')
  102. if exists('sys:Utilities/AmigaGuide') then do
  103.     'version sys:utilities/amigaguide >'||tfilename
  104.     temp=GETTEMP()
  105.     parse var temp dum ver .
  106.     call writeln(.ofile, '  AmigaGuide program........ v'||ver)
  107.     agflag=1
  108. end
  109. else agflag=0
  110. if exists('sys:Utilities/Multiview') then do
  111.     'version sys:utilities/multiview >'||tfilename
  112.     temp=GETTEMP()
  113.     parse var temp dum ver .
  114.     call writeln(.ofile, '  MultiView program......... v'||ver)
  115.     mvflag=1
  116. end
  117. else mvflag=0
  118. if agflag=0 & mvflag=0 then call writeln(.ofile, '  AmigaGuide/Multiview...... MISSING!')
  119. return
  120.  
  121. ASSIGNS:
  122. call writeln(.ofile, '')
  123. call writeln(.ofile, 'ASSIGNS: (AmigaDOS assigns)')
  124.  
  125. /* find out if the softlogik: assign was made */
  126. slassign=showlist('a','SOFTLOGIK')
  127. if slassign=1 then do
  128.     'assign SoftLogik: exists >'||tfilename
  129.     if ~open(.tfile, tfilename, 'R') then return 9
  130.     temp=(readln(.tfile))
  131.     if pos('SOFTLOGIK',upper(temp))~=0 then do
  132.         parse var temp dum line
  133.         line=strip(line,'b')
  134.         call writeln(.ofile, '  SoftLogik................. '||line)
  135.     end
  136.     call close(.tfile)
  137. end
  138. else call writeln(.ofile, '  SoftLogik................. SoftLogik: ASSIGN NOT MADE!')
  139.  
  140. /* find out if the pagestream3: assign was made */
  141. pgsassign=showlist('a','PAGESTREAM3')
  142. if pgsassign=1 then do
  143.     'assign PageStream3: exists >'||tfilename
  144.     if ~open(.tfile, tfilename, 'R') then return 9
  145.     temp=(readln(.tfile))
  146.     if pos('PAGESTREAM3',upper(temp))~=0 then do
  147.         parse var temp dum line
  148.         line=strip(line,'b')
  149.         call writeln(.ofile, '  PageStream3............... '||line)
  150.     end
  151.     call close(.tfile)
  152. end
  153. else call writeln(.ofile, '  PageStream3............... PageStream3: ASSIGN NOT MADE!')
  154.  
  155. /* find out if the fonts assign addition was made */
  156. 'assign fonts: exists >'||tfilename
  157. if ~open(.tfile, tfilename, 'R') then return 9
  158. line=nul
  159. do until eof(.tfile)
  160.     temp=(readln(.tfile))
  161.     if pos('SOFTLOGIK',upper(temp))~=0 & pos('FONTS',upper(temp))~=0 then line=right(temp,length(temp)-pos('+',temp)-1)
  162. end
  163. if line=nul then call writeln(.ofile, '  Fonts..................... SoftLogik:Fonts add ASSIGN NOT MADE!')
  164. call close(.tfile)
  165. call writeln(.ofile, '  Fonts..................... '||line||' add')
  166. return
  167.  
  168. PROGRAMS:
  169. call writeln(.ofile, '')
  170. call writeln(.ofile, 'PROGRAM FILES:')
  171. if exists('PageStream3:PageStream3') then do
  172.     'version PageStream3:PageStream3 full >'||tfilename
  173.     temp=GETTEMP()
  174.     parse var temp dum ver ver2 ver3 .
  175.     if ver3='' then ver2=ver3
  176.     /* for technical reasons, PageStream has version numbers of PageStream3 1.0 instead of PageStream 3.0. Let's make it easier on the user by changing this for the report. */
  177.     ver='3'||right(ver,length(ver)-1)
  178.     if ver2='' then ver2=' '
  179.     call writeln(.ofile, '  PageStream3 program....... v'||ver||' 'ver2)
  180. end
  181. else call writeln(.ofile, '  PageStream3 program....... MISSING!')
  182. if exists('PageStream3:BME') then do
  183.     'version PageStream3:BME >'||tfilename
  184.     temp=GETTEMP()
  185.     parse var temp dum ver ver2 .
  186.     if ver2='' then ver2=' '
  187.     call writeln(.ofile, '  BME program............... v'||ver||' 'ver2)
  188. end
  189. else call writeln(.ofile, '  BME program............... MISSING!')
  190. if exists('PageStream3:PageLiner') then do
  191.     'version PageStream3:PageLiner >'||tfilename
  192.     temp=GETTEMP()
  193.     parse var temp dum ver ver2 .
  194.     if ver2='' then ver2=' '
  195.     call writeln(.ofile, '  PageLiner program......... v'||ver||' 'ver2)
  196. end
  197. else call writeln(.ofile, '  PageLiner program......... MISSING!')
  198. return
  199.  
  200. LIBS:
  201. call writeln(.ofile, '')
  202. call writeln(.ofile, 'SOFTLOGIK:LIBS (program libraries)')
  203. if exists('SoftLogik:Libs/softlogik_app.library') then 'version SoftLogik:Libs/softlogik_app.library >'||tfilename
  204. temp=GETTEMP()
  205. parse var temp dum ver .
  206. call writeln(.ofile, '  softlogik_app.library..... v'||ver)
  207. if exists('SoftLogik:Libs/softlogik_obj.library') then 'version SoftLogik:Libs/softlogik_obj.library >'||tfilename
  208. temp=GETTEMP()
  209. parse var temp dum ver .
  210. call writeln(.ofile, '  softlogik_obj.library..... v'||ver)
  211. if exists('SoftLogik:Libs/slarexxsupport.library') then 'version SoftLogik:Libs/slarexxsupport.library >'||tfilename
  212. temp=GETTEMP()
  213. parse var temp dum ver .
  214. call writeln(.ofile, '  slarexxsupport.library.... v'||ver)
  215. return
  216.  
  217. FILTERS:
  218. call writeln(.ofile, '')
  219. call writeln(.ofile, 'SOFTLOGIK:FILTERS (filter modules)')
  220. if exists('SoftLogik:filters') then do
  221.     call GETFILES('softlogik:filters')
  222.     call SAYVERS('softlogik:filters')
  223.     end
  224. else do
  225.     call writeln(.ofile, '- Filters directory MISSING!')
  226. end
  227. return
  228.  
  229. EFFECTS:
  230. call writeln(.ofile, '')
  231. call writeln(.ofile, 'SOFTLOGIK:EFFECTS (effect modules)')
  232. if exists('SoftLogik:effects') then do
  233.     call GETFILES('softlogik:effects')
  234.     call SAYVERS('softlogik:effects')
  235.     end
  236. else do
  237.     call writeln(.ofile, '- Effects directory MISSING!')
  238. end
  239.  
  240. /* PRINTERS */
  241. call writeln(.ofile, '')
  242. call writeln(.ofile, 'SOFTLOGIK:PRINTERS (printer drivers)')
  243. if exists('SoftLogik:printers') then do
  244.     call GETFILES('softlogik:printers')
  245.     call SAYVERS('softlogik:printers')
  246.     end
  247. else do
  248.     call writeln(.ofile, '- Printers directory MISSING!')
  249. end
  250. return
  251.  
  252. ENGINES:
  253. call writeln(.ofile, '')
  254. call writeln(.ofile, 'SOFTLOGIK:ENGINES (font and text code modules)')
  255. if exists('SoftLogik:engines') then do
  256.     call GETFILES('softlogik:engines')
  257.     call SAYVERS('softlogik:engines')
  258.     end
  259. else do
  260.     call writeln(.ofile, '- Engines directory MISSING!')
  261. end
  262. return
  263.  
  264. COLORS:
  265. call writeln(.ofile, '')
  266. call writeln(.ofile, 'SOFTLOGIK:COLORS (color libraries)')
  267. if exists('SoftLogik:colors') then do
  268.     call GETFILES('softlogik:colors')
  269.     call SAYVERS('softlogik:colors')
  270.     end
  271. else do
  272.     call writeln(.ofile, '- Colors directory MISSING!')
  273. end
  274. return
  275.  
  276.  
  277. GETTEMP:
  278.     if ~open(.tfile, tfilename, 'R') then return 9
  279.     temp=readln(.tfile)
  280.     call close(.tfile)
  281. return temp
  282.  
  283. GETFILES:
  284.     parse arg path
  285.     Files=showdir(path,file,'|')
  286.     fLength=length(Files)
  287.     nList=0
  288.     DO WHILE fLength>0
  289.         cLength=pos('|',Files)
  290.         IF cLength=0 then DO
  291.             cLength=FLength+1
  292.             fLength=0
  293.         END
  294.         cFile=left(Files,cLength-1)
  295.         eFile=right(cFile,cLength-lastpos('.',cFile))
  296.         IF eFile~='.info' THEN DO
  297.             nList=nList+1
  298.             List.nList=cFile
  299.         END
  300.         IF FLength~=0 THEN Files=right(Files,fLength-cLength)
  301.         fLength=fLength-cLength
  302.     END
  303. return
  304.  
  305. SAYVERS:
  306.     parse arg path
  307.     do count=1 to nlist
  308.         if right(list.count,5)~='.info' then do
  309.             if upper(right(list.count,8))='FONTLIST' | upper(list.count)='POSTSCRIPT.EHANDLER' | upper(right(list.count,6))='HEADER' | upper(right(list.count,10))='DICTIONARY' | upper(left(list.count,7))='PANTONE' then do
  310.                 'list "'||path||'/'list.count||'" lformat %l >'||tfilename
  311.                 ver=' '||GETTEMP()||' bytes'
  312.             end
  313.             else do
  314.                 'version '||path||'/'||list.count||' >'||tfilename
  315.                 temp=GETTEMP()
  316.                 parse var temp dum ver ver2 .
  317.                 if ver2='' then ver2=' '
  318.                 ver=' v'||ver||' '||ver2
  319.             end
  320.             call writeln(.ofile,substr('  '||list.count,1,28,'.')||ver)
  321.         end
  322.     end
  323. return
  324.  
  325.  
  326. SETBUSY:
  327.     parse arg value
  328.     ADDRESS PAGESTREAM
  329.     setbusyrequester bh current value
  330.     getbusyrequester bh
  331.     if result=1 then call CLEANUP(1)
  332.     ADDRESS COMMAND
  333. return
  334.  
  335.  
  336. CLEANUP:
  337.     parse arg value
  338.     call close(.ofile)
  339.     ADDRESS PAGESTREAM
  340.     closebusyrequester bh
  341.     ADDRESS COMMAND
  342.     if value=0 then do
  343.         'sys:utilities/multiview '||ofilename
  344.         if rc>0 then 'sys:utilities/amigaguide '||ofilename
  345.     end
  346.     'delete '||tfilename||' >NIL:'
  347. exit
  348.