home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / memsz231.zip / CATALA.CMD < prev    next >
OS/2 REXX Batch file  |  1993-11-19  |  3KB  |  124 lines

  1. /* CATALA.CMD: Instal·lació de MEMSIZE en català */
  2.  
  3. "@Echo Off"
  4.  
  5. /* Càrregar REXXUTIL */
  6.  
  7. Call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
  8. Call SysLoadFuncs
  9.  
  10.  
  11. /* Initialize */
  12.  
  13. Signal On Failure Name FAILURE
  14. Signal On Halt Name HALT
  15. Signal On Syntax Name SYNTAX
  16.  
  17. Call SysCls
  18. Say "Instal·lació de MEMSIZE..."
  19. Say ""
  20.  
  21.  
  22. /* Verify the existence of the various component files. */
  23.  
  24. Language = "CATALA"
  25.  
  26. Result = SysFileTree( "MEMSIZE.EXE", "Files", "F" )
  27. If Files.0 = 0 Then
  28.   Do
  29.   Say "ERROR: No se troba el MEMSIZE.EXE!"
  30.   Signal DONE
  31.   End
  32.  
  33. Result = SysFileTree( Language".DLL", "Files", "F" )
  34. If Files.0 = 0 Then
  35.   Do
  36.   Say "ERROR: No se troba el "Language".DLL!"
  37.   Signal DONE
  38.   End
  39.  
  40. Result = SysFileTree( Language".HLP", "Files", "F" )
  41. If Files.0 = 0 Then
  42.   Do
  43.   Say "ERROR: No se troba el "Language".HLP!"
  44.   Signal DONE
  45.   End
  46.  
  47. /* Ask for the target directory name. */
  48.  
  49. Say "Si us plau, escribiu el nom complet del directori on voleu"
  50. Say "  instal·lar el programa MEMSIZE (per defecte és C:\OS2\APPS): "
  51. Pull Directory
  52. If Directory = "" Then Directory = "C:\OS2\APPS"
  53.  
  54.  
  55. /* Create the target directory if necessary. */
  56.  
  57. Result = SysFileTree( Directory, "Dirs", "D" )
  58. If Dirs.0 = 0 Then
  59.   Do
  60.   Result = SysMkDir( Directory )
  61.   if Result == 0 Then
  62.     Do
  63.     End
  64.   Else
  65.     Do
  66.     Say "ERROR: No se pot crear el directori destí."
  67.     Signal DONE
  68.     End
  69.   End
  70. Say ""
  71.  
  72.  
  73. /* Ask for the target folder. */
  74.  
  75. Say "Voleu instal·lar-lo de forma que s'executi automàticament a l'arrencar? (S/N)"
  76. Pull YesNo
  77. If YesNo = "S" Then
  78.   Do
  79.   Folder = "<WP_START>"
  80.   Say "L'objecte es copiarà a la carpeta Inici."
  81.   End
  82. Else
  83.   Do
  84.   Folder = "<WP_DESKTOP>"
  85.   Say "L'objecte es copiarà a l'escriptori."
  86.   End
  87. Say ""
  88.  
  89.  
  90. /* Perform the installation. */
  91.  
  92. Say "Copiant MEMSIZE al directori " Directory "..."
  93. Copy MEMSIZE.EXE Directory                  "1>NUL"
  94. Copy Language".DLL" Directory"\MEMSIZE.DLL" "1>NUL"
  95. Copy Language".HLP" Directory"\MEMSIZE.HLP" "1>NUL"
  96.  
  97. Say "Creant l'objecte del programa..."
  98. Type = "WPProgram"
  99. Title = "Recursos del Sistema"
  100. Parms = "MINWIN=DESKTOP;PROGTYPE=PM;EXENAME="Directory"\MEMSIZE.EXE;STARTUPDIR="Directory";OBJECTID=<MEMSIZE>;NOPRINT=YES;"
  101. Result = SysCreateObject( Type, Title, Folder, Parms, "ReplaceIfExists" )
  102.  
  103. If Result = 1 Then
  104.   Say "L'objecte s'ha creat.  Final"
  105. Else             
  106.   Say "ERROR: No s'ha pogut crear l'objecte!"
  107.  
  108. Signal DONE
  109.  
  110. FAILURE:
  111. Say "Errada del REXX."
  112. Signal DONE
  113.  
  114. HALT:
  115. Say "S'atura el REXX."
  116. Signal DONE
  117.  
  118. SYNTAX:
  119. Say "Error de síntaxi del REXX."
  120. Signal DONE
  121.  
  122. DONE:
  123. Exit
  124.