home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / WordProcessors / slt-pgs3.lzx / PageStream3 / Scripts / TechReport.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1996-10-20  |  11.1 KB  |  375 lines

  1. /* $VER: TechReport.rexx 1.0j (12.07.96)
  2.    Copyright 1996 SoftLogik Publishing Corporation
  3.    May not be distributed without SoftLogik 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 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 (70)
  44. call PRINTERS()
  45.     call SETBUSY (80)
  46. call ENGINES()
  47.     call SETBUSY (95)
  48. call SPECIAL()
  49. call COLORS()
  50.     call SETBUSY (100)
  51. call CLEANUP(0)
  52.  
  53. REGINFO:
  54. call writeln(.ofile, '')
  55. call writeln(.ofile, 'USER INFORMATION:')
  56. if ~open(.tfile, 'PageStream3:PageStream3.prefs', 'R') then rcode=9
  57.     else rcode=0
  58. user.name='Unknown'
  59. user.comp='Unknown'
  60. user.regn='Unknown'
  61. if rcode=0 then do
  62.     do until eof(.tfile)
  63.         temp=(readln(.tfile))
  64.         if left(temp,8)='USERNAME' then user.name=subword(temp,2)
  65.         if left(temp,8)='USERCOMP' then user.comp=subword(temp,2)
  66.         if left(temp,8)='USERREGN' then user.regn=subword(temp,2)
  67.     end
  68.     call close(.tfile)
  69. end
  70. call writeln(.ofile, '  User Name................. '||user.name)
  71. call writeln(.ofile, '  Company................... '||user.comp)
  72. call writeln(.ofile, '  Registration Number....... '||user.regn)
  73. return rcode
  74.  
  75. SYSTEMINFO:
  76. call writeln(.ofile, '')
  77. call writeln(.ofile, 'SYSTEM INFORMATION:')
  78. 'version >'||tfilename
  79. temp=GETTEMP()
  80. call writeln(.ofile, '  '||temp)
  81. 'cpu >'||tfilename
  82. temp=GETTEMP()
  83. call writeln(.ofile, '  '||temp)
  84. call writeln(.ofile, '')
  85. 'avail >'||tfilename
  86. if ~open(.tfile, tfilename, 'R') then return 9
  87. do 4
  88.     temp=readln(.tfile)
  89.     call writeln(.ofile, '  '||temp)
  90. end
  91. call close(.tfile)
  92. return
  93.  
  94. HELPSYSTEM:
  95. call writeln(.ofile, '')
  96. call writeln(.ofile, 'HELP SYSTEM:')
  97. if exists('libs:amigaguide.library') then do
  98.     'version libs:amigaguide.library >'||tfilename
  99.     temp=GETTEMP()
  100.     parse var temp dum ver .
  101.     call writeln(.ofile, '  AmigaGuide.library........ v'||ver)
  102. end
  103. else call writeln(.ofile, '  AmigaGuide.library........ MISSING!')
  104. if exists('sys:Utilities/AmigaGuide') then do
  105.     'version sys:utilities/amigaguide >'||tfilename
  106.     temp=GETTEMP()
  107.     parse var temp dum ver .
  108.     call writeln(.ofile, '  AmigaGuide program........ v'||ver)
  109.     agflag=1
  110. end
  111. else agflag=0
  112. if exists('sys:Utilities/Multiview') then do
  113.     'version sys:utilities/multiview >'||tfilename
  114.     temp=GETTEMP()
  115.     parse var temp dum ver .
  116.     call writeln(.ofile, '  MultiView program......... v'||ver)
  117.     mvflag=1
  118. end
  119. else mvflag=0
  120. if agflag=0 & mvflag=0 then call writeln(.ofile, '  AmigaGuide/Multiview...... MISSING!')
  121. return
  122.  
  123. ASSIGNS:
  124. call writeln(.ofile, '')
  125. call writeln(.ofile, 'ASSIGNS: (AmigaDOS assigns)')
  126.  
  127. /* find out if the softlogik: assign was made */
  128. slassign=showlist('a','SOFTLOGIK')
  129. if slassign=1 then do
  130.     'assign SoftLogik: exists >'||tfilename
  131.     if ~open(.tfile, tfilename, 'R') then return 9
  132.     temp=(readln(.tfile))
  133.     if pos('SOFTLOGIK',upper(temp))~=0 then do
  134.         parse var temp dum line
  135.         line=strip(line,'b')
  136.         call writeln(.ofile, '  SoftLogik................. '||line)
  137.     end
  138.     call close(.tfile)
  139. end
  140. else call writeln(.ofile, '  SoftLogik................. SoftLogik: ASSIGN NOT MADE!')
  141.  
  142. /* find out if the pagestream3: assign was made */
  143. pgsassign=showlist('a','PAGESTREAM3')
  144. if pgsassign=1 then do
  145.     'assign PageStream3: exists >'||tfilename
  146.     if ~open(.tfile, tfilename, 'R') then return 9
  147.     temp=(readln(.tfile))
  148.     if pos('PAGESTREAM3',upper(temp))~=0 then do
  149.         parse var temp dum line
  150.         line=strip(line,'b')
  151.         call writeln(.ofile, '  PageStream3............... '||line)
  152.     end
  153.     call close(.tfile)
  154. end
  155. else call writeln(.ofile, '  PageStream3............... PageStream3: ASSIGN NOT MADE!')
  156.  
  157. /* find out if the fonts assign addition was made */
  158. 'assign fonts: exists >'||tfilename
  159. if ~open(.tfile, tfilename, 'R') then return 9
  160. line=nul
  161. do until eof(.tfile)
  162.     temp=(readln(.tfile))
  163.     if pos('SOFTLOGIK',upper(temp))~=0 & pos('FONTS',upper(temp))~=0 then line=right(temp,length(temp)-pos('+',temp)-1)
  164. end
  165. if line=nul then call writeln(.ofile, '  Fonts..................... SoftLogik:Fonts add ASSIGN NOT MADE!')
  166. call close(.tfile)
  167. call writeln(.ofile, '  Fonts..................... '||line||' add')
  168. return
  169.  
  170. PROGRAMS:
  171. call writeln(.ofile, '')
  172. call writeln(.ofile, 'PROGRAM FILES:')
  173. if exists('PageStream3:PageStream3') then do
  174.     'version PageStream3:PageStream3 full >'||tfilename
  175.     temp=GETTEMP()
  176.     parse var temp dum ver ver2 ver3 .
  177.     if ver3='' then ver2=ver3
  178.     /* 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. */
  179.     ver='3'||right(ver,length(ver)-1)
  180.     if ver2='' then ver2=' '
  181.     call writeln(.ofile, '  PageStream3 program....... v'||ver||' 'ver2)
  182. end
  183. else call writeln(.ofile, '  PageStream3 program....... MISSING!')
  184. if exists('PageStream3:BME') then do
  185.     'version PageStream3:BME >'||tfilename
  186.     temp=GETTEMP()
  187.     parse var temp dum ver ver2 .
  188.     if ver2='' then ver2=' '
  189.     call writeln(.ofile, '  BME program............... v'||ver||' 'ver2)
  190. end
  191. else call writeln(.ofile, '  BME program............... MISSING!')
  192. if exists('PageStream3:PageLiner') then do
  193.     'version PageStream3:PageLiner >'||tfilename
  194.     temp=GETTEMP()
  195.     parse var temp dum ver ver2 .
  196.     if ver2='' then ver2=' '
  197.     call writeln(.ofile, '  PageLiner program......... v'||ver||' 'ver2)
  198. end
  199. else call writeln(.ofile, '  PageLiner program......... MISSING!')
  200. return
  201.  
  202. LIBS:
  203. call writeln(.ofile, '')
  204. call writeln(.ofile, 'SOFTLOGIK:LIBS (program libraries)')
  205. if exists('SoftLogik:Libs/softlogik_app.library') then 'version SoftLogik:Libs/softlogik_app.library >'||tfilename
  206. temp=GETTEMP()
  207. parse var temp dum ver .
  208. call writeln(.ofile, '  softlogik_app.library..... v'||ver)
  209. if exists('SoftLogik:Libs/softlogik_obj.library') then 'version SoftLogik:Libs/softlogik_obj.library >'||tfilename
  210. temp=GETTEMP()
  211. parse var temp dum ver .
  212. call writeln(.ofile, '  softlogik_obj.library..... v'||ver)
  213. if exists('SoftLogik:Libs/softlogik_rsrc.library') then 'version SoftLogik:Libs/softlogik_rsrc.library >'||tfilename
  214. temp=GETTEMP()
  215. parse var temp dum ver .
  216. call writeln(.ofile, '  softlogik_rsrc.library.... v'||ver)
  217. if exists('SoftLogik:Libs/softlogik_os.library') then 'version SoftLogik:Libs/softlogik_os.library >'||tfilename
  218. temp=GETTEMP()
  219. parse var temp dum ver .
  220. call writeln(.ofile, '  softlogik_os.library...... v'||ver)
  221. if exists('SoftLogik:Libs/slarexxsupport.library') then 'version SoftLogik:Libs/slarexxsupport.library >'||tfilename
  222. temp=GETTEMP()
  223. parse var temp dum ver .
  224. call writeln(.ofile, '  slarexxsupport.library.... v'||ver)
  225. if exists('SoftLogik:Libs/softlogik_display.library') then 'version SoftLogik:Libs/softlogik_display.library >'||tfilename
  226. temp=GETTEMP()
  227. parse var temp dum ver .
  228. call writeln(.ofile, '  softlogik_display.library. v'||ver)
  229. return
  230.  
  231. FILTERS:
  232. call writeln(.ofile, '')
  233. call writeln(.ofile, 'SOFTLOGIK:FILTERS (filter modules)')
  234. if exists('SoftLogik:filters') then do
  235.     call GETFILES('softlogik:filters')
  236.     call SAYVERS('softlogik:filters')
  237.     end
  238. else do
  239.     call writeln(.ofile, '- Filters directory MISSING!')
  240. end
  241. return
  242.  
  243. EFFECTS:
  244. call writeln(.ofile, '')
  245. call writeln(.ofile, 'SOFTLOGIK:EFFECTS (effect modules)')
  246. if exists('SoftLogik:effects') then do
  247.     call GETFILES('softlogik:effects')
  248.     call SAYVERS('softlogik:effects')
  249.     end
  250. else do
  251.     call writeln(.ofile, '- Effects directory MISSING!')
  252. end
  253. return
  254.  
  255. PRINTERS:
  256. call writeln(.ofile, '')
  257. call writeln(.ofile, 'SOFTLOGIK:PRINTERS (printer drivers)')
  258. if exists('SoftLogik:printers') then do
  259.     call GETFILES('softlogik:printers')
  260.     call SAYVERS('softlogik:printers')
  261.     end
  262. else do
  263.     call writeln(.ofile, '- Printers directory MISSING!')
  264. end
  265. return
  266.  
  267. SPECIAL:
  268. call writeln(.ofile, '')
  269. call writeln(.ofile, 'SOFTLOGIK:SPECIAL (miscellaneous modules)')
  270. if exists('SoftLogik:special') then do
  271.     call GETFILES('softlogik:special')
  272.     call SAYVERS('softlogik:special')
  273.     end
  274. else do
  275.     call writeln(.ofile, '- Special directory MISSING!')
  276. end
  277. return
  278.  
  279. ENGINES:
  280. call writeln(.ofile, '')
  281. call writeln(.ofile, 'SOFTLOGIK:ENGINES (font and text code modules)')
  282. if exists('SoftLogik:engines') then do
  283.     call GETFILES('softlogik:engines')
  284.     call SAYVERS('softlogik:engines')
  285.     end
  286. else do
  287.     call writeln(.ofile, '- Engines directory MISSING!')
  288. end
  289. return
  290.  
  291. COLORS:
  292. call writeln(.ofile, '')
  293. call writeln(.ofile, 'SOFTLOGIK:COLORS (color libraries)')
  294. if exists('SoftLogik:colors') then do
  295.     call GETFILES('softlogik:colors')
  296.     call SAYVERS('softlogik:colors')
  297.     end
  298. else do
  299.     call writeln(.ofile, '- Colors directory MISSING!')
  300. end
  301. return
  302.  
  303.  
  304. GETTEMP:
  305.     if ~open(.tfile, tfilename, 'R') then return 9
  306.     temp=readln(.tfile)
  307.     call close(.tfile)
  308. return temp
  309.  
  310. GETFILES:
  311.     parse arg path
  312.     Files=showdir(path,file,'|')
  313.     fLength=length(Files)
  314.     nList=0
  315.     DO WHILE fLength>0
  316.         cLength=pos('|',Files)
  317.         IF cLength=0 then DO
  318.             cLength=FLength+1
  319.             fLength=0
  320.         END
  321.         cFile=left(Files,cLength-1)
  322.         eFile=right(cFile,cLength-lastpos('.',cFile))
  323.         IF eFile~='.info' THEN DO
  324.             nList=nList+1
  325.             List.nList=cFile
  326.         END
  327.         IF FLength~=0 THEN Files=right(Files,fLength-cLength)
  328.         fLength=fLength-cLength
  329.     END
  330. return
  331.  
  332. SAYVERS:
  333.     parse arg path
  334.     do count=1 to nlist
  335.         if right(list.count,5)~='.info' then do
  336.             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' | upper(left(list.count,7))='CRAYONS' | upper(right(list.count,12))='.HYPHENATION' then do
  337.                 'list "'||path||'/'list.count||'" lformat %l >'||tfilename
  338.                 ver=' '||GETTEMP()||' bytes'
  339.             end
  340.             else do
  341.                 'version '||path||'/'||list.count||' >'||tfilename
  342.                 temp=GETTEMP()
  343.                 parse var temp dum ver ver2 .
  344.                 if ver2='' then ver2=' '
  345.                 ver=' v'||ver||' '||ver2
  346.             end
  347.             call writeln(.ofile,substr('  '||list.count,1,28,'.')||ver)
  348.         end
  349.     end
  350. return
  351.  
  352.  
  353. SETBUSY:
  354.     parse arg value
  355.     ADDRESS PAGESTREAM
  356.     setbusyrequester bh current value
  357.     getbusyrequester bh
  358.     if result=1 then call CLEANUP(1)
  359.     ADDRESS COMMAND
  360. return
  361.  
  362.  
  363. CLEANUP:
  364.     parse arg value
  365.     call close(.ofile)
  366.     ADDRESS PAGESTREAM
  367.     closebusyrequester bh
  368.     ADDRESS COMMAND
  369.     if value=0 then do
  370.         'sys:utilities/multiview '||ofilename
  371.         if rc>0 then 'sys:utilities/amigaguide '||ofilename
  372.     end
  373.     'delete '||tfilename||' >NIL:'
  374. exit
  375.