home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 October / PCO_1098.ISO / filesbbs / os2 / minta167.arj / MINTA167.ZIP / install.cmd < prev    next >
Encoding:
Text File  |  1998-08-18  |  2.8 KB  |  90 lines

  1. /*************************************************************************/
  2. /*  MINTA installation file - Creates a wps-object for Minta             */
  3. /*  To run this file, just type "install" on the OS/2 command line.      */
  4. /*************************************************************************/
  5.  
  6. PARSE SOURCE operSystem . sourceFile
  7.  
  8. IF \(operSystem = "OS/2") THEN DO
  9.     SAY "Please use only with IBM-OS/2 Operating system!"
  10.     EXIT
  11.     END
  12.  
  13. /*************************************************************************/
  14.  
  15. '@ECHO OFF'
  16.  
  17. CALL rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
  18. CALL sysloadfuncs
  19.  
  20. /*************************************************************************/
  21.  
  22. Ver = "1.67"
  23. MintaDir = FILESPEC("drive", sourceFile)FILESPEC("path", sourceFile)
  24.  
  25. CALL SysFileTree MintaDir"MINTA.EXE",'file','F'
  26. IF file.0 = 0 THEN DO
  27.     SAY "MINTA.EXE was not found in the same directory as ",
  28.     FILESPEC("name",sourceFile)
  29.  
  30.     DO UNTIL \(file.0 = 0)
  31.         SAY ""
  32.         SAY "Please give the full path to the file MINTA.EXE."
  33.         SAY "(Press ENTER/RETURN alone to exit)"
  34.         PULL MintaDir
  35.         IF MintaDir = "" THEN EXIT
  36.         IF (FILESPEC("drive",MintaDir) = "") | (FILESPEC("path",MintaDir) = "")
  37.         THEN SAY 'You must give a full path in format "d:\path\"'
  38.         ELSE DO
  39.             IF \(SUBSTR(MintaDir,length(MintaDir),1) = "\" )
  40.             THEN MintaDir = MintaDir"\"
  41.             CALL SysFileTree MintaDir"MINTA.EXE",'file','F'
  42.             IF file.0 = 0
  43.             THEN SAY "Can not find" MintaDir"MINTA.EXE there - please give the right directory"
  44.             END
  45.         END
  46.     SAY ""
  47.     END
  48.  
  49. /*************************************************************************/
  50.  
  51. setup = 'PROGTYPE=OS2;EXENAME='MintaDir'MINTA.EXE;STARTUPDIR='MintaDir';'
  52. setup = setup'ICONFILE 'MintaDir'MINTA.ICO;'
  53.  
  54. SAY ""
  55. SAY ""
  56. SAY "* Creating Minta wps-object ..."
  57. check = SysCreateObject('WPProgram', 'Minta 'Ver, '<WP_DESKTOP>', setup)
  58.  
  59. IF check = 0 THEN DO
  60.     SAY "* Could not create wps-object!"
  61.     SAY "  (Does perhaps an object for Minta already exist?)"
  62.     CALL CHAROUT , "* Do you want to update the existing object [Y/N] ? "
  63.     PULL answer
  64.     IF \(SUBSTR(answer,1,1) = "Y") THEN EXIT
  65.  
  66.     SAY "* Updating Minta wps-object ..."
  67.     check = SysCreateObject('WPProgram','Minta 'Ver,'<WP_DESKTOP>',setup,"update")
  68.  
  69.     IF check = 0 THEN DO
  70.         SAY ""
  71.         SAY "* Sorry, object-creation failed again. Aborting ..."
  72.         EXIT
  73.         END
  74.     ELSE DO
  75.         SAY ""
  76.         SAY "* Minta wps-object updated successfully!"
  77.         END
  78.     END
  79. ELSE DO
  80.     SAY ""
  81.     SAY "* Minta wps-object created successfully!"
  82.     END
  83.  
  84. SAY ""
  85. SAY "* See the online help for more information about Minta!"
  86.  
  87. /*************************************************************************/
  88.  
  89. EXIT
  90.