home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 November / PCONLINE_11_99.ISO / filesbbs / OS2 / ACDCR032.ZIP / install.CMD < prev    next >
Encoding:
Text File  |  1999-04-05  |  6.5 KB  |  213 lines

  1. /*           Install the Audio-CD-Folder/Data-CD-Folder 
  2.  *
  3.  *                   (C) Chris Wohlgemuth 1999
  4. */
  5.  
  6. /*
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; either version 2, or (at your option)
  10.  * any later version.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; see the file COPYING.  If not, write to
  19.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  */
  21.  
  22.  call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  23.  call SysLoadFuncs
  24.  
  25. 'cls'
  26. say ''
  27. Say 'About to install Audio-CD-Creator'
  28. Say 'and Data-CD-Creator'
  29. Say '(c) Chris Wohlgemuth 1998-99'
  30. say 'This program and all files are released under the GPL'
  31. say 'See file ''Copying'' for information.'
  32. say ''
  33.  
  34. say 'Press <ENTER> to install or Ctrl-c to abort now.'
  35. say ''
  36. say '>'
  37. parse value SysCurPos() with aktzeile aktspalte
  38. newposition=SysCurPos(aktzeile-1,2)
  39. pull
  40.  
  41. /* Clear screen */
  42. 'cls'
  43.  
  44. /* Get curent directory */
  45. curdir = directory()
  46.  
  47. say 'Current directory is' curdir
  48. say ''
  49.  
  50. /* Query bootdrive */
  51. say 'Quering boot drive...'
  52. parse upper value VALUE('PATH',,'OS2ENVIRONMENT') with '\OS2\INSTALL' -2 boot +2
  53. parse upper value VALUE('PATH',,'OS2ENVIRONMENT') with '\OS2\SYSTEM' -2 boot2 +2
  54. say ''
  55. if boot=boot2 then say 'Bootdrive seems to be' boot
  56. say 'Enter ''y'' to confirm or the real bootdrive letter'
  57. say ''
  58. say '>'
  59. parse value SysCurPos() with aktzeile aktspalte
  60. newposition=SysCurPos(aktzeile-1,2)
  61. parse pull in
  62.  
  63. if in='y'|in='Y'  then boot=boot
  64. else boot=in':'
  65.  
  66.  
  67. /* Clear screen */
  68. 'cls'
  69.  
  70. /* Build help destination path */
  71. helppath=boot'\os2\help\aucdfldr.hlp'
  72. helpsource=curdir'\aucdfldr.hlp'
  73.  
  74. progfolderdll=curdir'\progfldr.dll'
  75. boot=boot'\os2\dll\progfldr.dll' /* Build destination path */
  76. say ''
  77. say 'Copying progfldr.dll to 'boot
  78. say ''
  79.  
  80. /*result=*/
  81. copy progfolderdll boot
  82. say ''
  83.  
  84. say 'Registering class ''CWProgFolder''...'
  85.  
  86. if SysRegisterObjectClass("CWProgFolder",'progfldr')<>1 then
  87.     do         
  88.                 say ''
  89.         say 'Error while registering class ''CWProgFolder'''
  90.         del boot
  91.         say 'Exiting...'
  92.         exit     
  93.     end 
  94.  
  95. audiofolderdll=curdir'\aucdfldr.dll'
  96.  
  97. say 'Registering class ''CWAudioFolder''...'
  98. if SysRegisterObjectClass("CWAudioFolder",audiofolderdll)<>1 then
  99.     do         
  100.                 say ''
  101.         say 'Error while registering class ''CWAudioFolder'''
  102.         say 'Deregistering class ''CWProgFolder'''
  103.         if SysDeregisterObjectClass("CWProgFolder") <>1 then
  104.             say 'Error while deregistering class ''CWProgFolder'''
  105.         del boot
  106.         say 'Exiting...'
  107.         say 'After reboot delete file 'boot
  108.         exit     
  109.     end 
  110.  
  111. say 'Registering class ''CWDataFolder''...'
  112. if SysRegisterObjectClass("CWDataFolder",audiofolderdll)<>1 then
  113.     do         
  114.                 say ''
  115.         say 'Error while registering class ''CWDataFolder'''
  116.         say 'Deregistering class ''CWAudioFolder'''
  117.         if SysDeregisterObjectClass("CWAudioFolder") <>1 then
  118.             say 'Error while deregistering class ''CWAudioFolder'''
  119.         say 'Deregistering class ''CWProgFolder'''
  120.         if SysDeregisterObjectClass("CWProgFolder") <>1 then
  121.             say 'Error while deregistering class ''CWProgFolder'''
  122.         del boot
  123.                 del audiofolderdll
  124.         say 'Exiting...'
  125.         say 'After reboot delete file 'boot
  126.         exit     
  127.     end 
  128.  
  129.  
  130. say 'Copying help file...'
  131. copy helpsource helppath
  132.  
  133. say 'Customizing the template in the templates folder...'
  134. if SysCreateObject("CWAudioFolder","Audio-CD-Creator","<WP_TEMPS>","OBJECTID=<AUDIOCD_CREATOR>;FLDRWRITEFLAGS=11","update")<>1 then
  135.              say '     Can''t update the template.'
  136. if SysCreateObject("CWDataFolder","Data-CD-Creator","<WP_TEMPS>","OBJECTID=<DATACD_CREATOR>","update")<>1 then
  137.              say '     Can''t update the template.'
  138.  
  139. say 'Creating a CD-Writing folder on the desktop...'
  140. if SysCreateObject("WPFolder","CD-Writing Utilities","<WP_DESKTOP>","OBJECTID=<CD_WRITING>","update")<>1 then
  141.              do
  142.                 say ''
  143.                 say 'Can''t create the folder. Exciting...'
  144.         say 'You''ll find a template in your templates folder.'
  145.         exit
  146.              end
  147.  
  148. setupstring='EXENAME='curdir'\cdrtools.exe;STARTUPDIR='curdir
  149.  
  150. say 'Creating an object for CDRTools...'
  151. if SysCreateObject("WPProgram","CDR-Tools","<CD_WRITING>",setupstring,"update")<>1 then
  152.         do
  153.               say ''
  154.               say 'Can''t create a program object for CDRTools.exe.'
  155.               say 'You can find CDRTools in 'curdir
  156.               say '' 
  157.             end
  158.  
  159. say 'Creating shadows for the Readme files...'
  160. setupstring='SHADOWID='curdir'\Readme.CDRTools'
  161.  
  162. if SysCreateObject("WPShadow","Readme.CDRTools","<CD_WRITING>",setupstring,"update")<>1 then
  163.     do
  164.               say 'Can''t create the shadow for Readme.CDRTools.'
  165.           say 'Perhaps on FAT-Drive not HPFS...'
  166.     end
  167. setupstring='SHADOWID='curdir'\Readme.Creator'
  168.  
  169. if SysCreateObject("WPShadow","Readme.Creator","<CD_WRITING>",setupstring,"update")<>1 then
  170.     do
  171.               say 'Can''t create the shadow for Readme.Creator.'
  172.           say 'Perhaps on FAT-Drive not HPFS...'
  173.     end
  174. setupstring='SHADOWID='curdir'\Copying'
  175.  
  176. if SysCreateObject("WPShadow","Copying","<CD_WRITING>",setupstring,"update")<>1 then
  177.     do
  178.               say 'Can''t create the shadow for file COPYING.'
  179.           
  180.     end
  181.  
  182. say 'Creating a shadow of the Audio-CD-Creator in the CD-Writing folder...'
  183. if SysCreateObject("WPShadow","Audio-CD-Creator","<CD_WRITING>","SHADOWID=<AUDIOCD_CREATOR>","update")<>1 then
  184.               say 'Can''t create the shadow.'
  185.  
  186. say 'Creating a shadow of the Data-CD-Creator in the CD-Writing folder...'
  187. if SysCreateObject("WPShadow","Data-CD-Creator","<CD_WRITING>","SHADOWID=<DATACD_CREATOR>","update")<>1 then
  188.               say 'Can''t create the shadow.'
  189.  
  190.  
  191. /* Open the CD-writing folder */
  192. rc=SysSetObjectData("<CD_WRITING>","OPEN=DEFAULT")
  193.  
  194. say ''
  195. say 'The Audio-CD-Creator and Data-CD-Creator'
  196. say 'were installed succesful.'
  197. say 'You''ll find templates in your templates folder for creating'
  198. say 'Audio-CD and Data-CD projects.'
  199. say ''
  200. say 'Have fun :-) !!'
  201.  
  202. say ''
  203. say ''
  204. say 'Press <ENTER>'
  205. say ''
  206. say '>'
  207. parse value SysCurPos() with aktzeile aktspalte
  208. newposition=SysCurPos(aktzeile-1,2)
  209. pull
  210.  
  211. exit
  212.  
  213.