home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / MAKDOC.ZIP / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1993-02-14  |  4KB  |  133 lines

  1. /* MakeDoc v.1.0 Installer (Install.CMD) (c) 1993 by XmbSoft */
  2.  
  3.  
  4. '@cls'
  5. say '--- MakeDoc v.1.0 Installer by XmbSoft [CIS ID 100031,2136] ---'
  6. say
  7. say
  8. say 'With MakeDoc, the creation of Book objects (hipertext documentation)'
  9. say 'from an .INF file is easy. Once MakeDoc has been installed, drag'
  10. say 'the icon of the *.INF file that contains the documentation of the'
  11. say 'new program: MakeDoc will automatically create the Book object.'
  12. say
  13. say 'MakeDoc can create the Book object in three different places. You'
  14. say 'must pick one of those now, although you can change your selection'
  15. say 'later.'
  16. say
  17. say '   1 - Create the Book object in the Desktop.                    [/D]'
  18. say '   2 - Create the Book object in the folder of the *.INF file.   [/F]'
  19. say '   3 - Create the Book object in the Information folder of OS/2. [/I]'
  20. say
  21. say 'Press 1, 2 or 3 (0 will abort installation):'
  22.  
  23. pull Opt .
  24.  
  25. if Opt\='1' & Opt\='2' & Opt\='3' then call final
  26.  
  27. Select 
  28.    when Opt='1' then Param='/D'
  29.    when Opt='2' then Param='/F'
  30.    when Opt='3' then Param='/I'
  31. end
  32.  
  33. DrSys=FileSpec('D',Value('SYSTEM_INI',,'OS2ENVIRONMENT'))
  34.  
  35. say 'Now, enter the drive and full path of the directory where you want'
  36. say "to install MakeDoc (for exemple, C:\MAKEDOC). If it doesn't exist"
  37. say 'it will be created:'
  38. say
  39.  
  40. pull DirMD .
  41.  
  42. if DirMD='' then call final
  43.  
  44. say
  45. say '> Creating/verifying the directory' DirMD'...'
  46.  
  47. DirOld=directory()
  48.  
  49. if directory(DirMD)='' then
  50. do
  51.    call RxFuncAdd 'SysMkDir','RexxUtil','SysMkDir'
  52.    if SysMkDir(DirMD)>0 then
  53.    do
  54.       say
  55.       say 'Error creating directory' DirMD'.'
  56.       call final
  57.    end
  58. end
  59.  
  60. call directory(DirOld)
  61.  
  62. say '> Copying files...'
  63.  
  64. '@copy MakeDoc.CMD' DirMD '> nul'
  65. '@copy MakeDoc.DOC' DirMD '> nul'
  66. '@copy CMD.EA' DirMD '> nul'
  67. '@copy DOC.EA' DirMD '> nul'
  68.  
  69. say '> Adding EAs to files...'
  70.  
  71. '@'FileSpec('D', DirMD)
  72. call directory DirMD
  73.  
  74. '@eautil MakeDoc.CMD CMD.EA /m /j'
  75. '@eautil MakeDoc.DOC DOC.EA /m /j'
  76.  
  77. say '> Creating objects...'
  78.  
  79. call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject'
  80.  
  81. if SysCreateObject("WPShadow", "MakeDir.DOC", "<WP_DESKTOP>", "SHADOWID="DirMD"\MakeDoc.DOC;ICONPOS=40 25;OBJECTID=<WP_MDDOC>")
  82. then say '...MakeDoc.DOC (Shadow) has been installed successfully.'
  83. else say 'Problem creating shadow!!!'
  84.  
  85. Setup='EXENAME='DirMD'\MakeDoc.CMD;'||,
  86.       'MINIMIZED=YES;ICONPOS=25 25;NORENAME=YES;'||,
  87.       'OBJECTID=<WP_MDPrg>;'||,
  88.       'PARAMETERS='Param';'
  89.  
  90. if SysCreateObject("WPProgram", "MakeDoc v.1.0^by XmbSoft", "<WP_DESKTOP>", Setup)
  91. then say '...MakeDoc (Program) has been installed successfully.'
  92. else say 'Problem creating program object!!!'
  93.  
  94. if SysCreateObject("WPShadow", "REXX.INF", "<WP_DESKTOP>", "SHADOWID="DrSys"\OS2\BOOK\REXX.INF;ICONPOS=40 10")
  95. then say '...REXX.INF (Shadow) has been installed successfully.'
  96. else say 'Problem creating REXX.INF shadow!!!'
  97. say
  98. say
  99. '@pause'
  100. '@cls'
  101. say 'Try me NOW!!!'
  102. say 
  103. say 'Drag the icon of REXX.INF onto the MakeDoc v.1.0 by XmbSoft icon.'
  104. say "A Book Object called 'REXX Guide' will be created. Depending on"
  105. say 'the option you chose, this object will be placed in the Desktop,'
  106. say 'in the Information folder or in the folder of the original file'
  107. say '(\OS2\BOOK).'
  108. say
  109. say
  110. say 'Double-click onto the MakeDoc.Doc icon to view documentation.'
  111. say 'No, I want no money for MakeDoc but any feedback is welcome!'
  112. say
  113. say 'The Author:             Xavier M. Badosa, CIS ID 100031,2136.'
  114. say
  115. say
  116. say '********************* End of Installation *********************'
  117. say
  118. say
  119. say
  120. '@pause'
  121.  
  122. call RxFuncAdd 'SysDropFuncs', 'RexxUtil', 'SysDropFuncs'
  123. call SysDropFuncs
  124.  
  125. exit
  126.  
  127. final:
  128.    say
  129.    say 'Installation aborted!'
  130.    say
  131.    '@pause'
  132.    exit
  133.