home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / hmakeos2.zip / HMinstal.cmd < prev    next >
OS/2 REXX Batch file  |  2002-04-01  |  6KB  |  165 lines

  1. /*  rexx-program generating a Hypermake folder and
  2.     program objects with *.HMP file association,
  3.     pointing to HMAKE.EXE and E.EXE
  4.     Author: Martin Vieregg, Germany, Jan 1997 ... Apr 2002 */
  5.  
  6. Call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
  7. Call SysLoadFuncs
  8.  
  9. CurrentDir = directory()
  10.  
  11. say "German language (press Y or N) "
  12. pull YesNo
  13. if  ((YesNo = "Y") | (YesNo = "y") | (YesNo = "J") | (YesNo = "j") ) then 
  14.   German = TRUE
  15. else
  16.   German = FALSE
  17.  
  18. rc = SysOpenObject("<MVhmakeFolder>", ICON, TRUE)
  19.  
  20. if (rc = 1) then DO
  21.   if (German = TRUE) then DO
  22.     say "Der Programmordner Hypermake ist schon vorhanden.";
  23.     say "Sollen die Hypermake Objekte gelöscht werden ? (drücken Sie J oder N) "
  24.   END
  25.   else DO
  26.     say "The Hypermake program folder already exists.";
  27.     say "Do you want to delete all these WPS Objects ? (press Y or N) "
  28.   END
  29.   pull Contin
  30.   if  ((Contin = "N") | (Contin = "n")) then EXIT
  31.  
  32.   Call Destroy "<MVhmake_hymake>"
  33.   Call Destroy "<MVhmake_comp>"
  34.   Call Destroy "<MVhmake_edit>"
  35.   Call Destroy "<MVhmakeAssocFolder>"
  36.   Call Destroy "<MVhmakeDirShadow>"
  37.   Call Destroy "<MVhmakeButtonLib>"
  38.   Call Destroy "<MVhmake_DocuHelp>"
  39.   Call Destroy "<MVhmake_DocuHTML>"
  40.   Call Destroy "<MVhmakeFolder>"
  41.   "@pause"
  42.   exit
  43. END
  44.  
  45.  
  46. if (German = TRUE) then DO
  47.  
  48.   say "Bevor Sie mit diesem Programm fortfahren, müssen Sie die Hypermake Verzeich-"
  49.   say "nisse und Dateien selbst in das Verzeichnis Ihrer Wahl kopiert haben."
  50.   say "Weitermachen ? (drücken Sie J oder N) "
  51.   pull Contin
  52.   if  ((Contin = "N") | (Contin = "n")) then EXIT
  53.  
  54.   say "Es wird ein Hypermake Ordner auf der Arbeitsoberfläche erzeugt..."
  55.  
  56.   Call SysCreateObject "WPFolder", "Hypermake", "<WP_DESKTOP>",,
  57.     "OBJECTID=<MVhmakeFolder>;ICONFILE="CurrentDir"\HMP.ICO;"
  58.  
  59.   Call SysCreateObject "WPFolder", "HMP Zuordnungen", "<MVhmakeFolder>",,
  60.     "OBJECTID=<MVhmakeAssocFolder>;"
  61.  
  62.   Call SysCreateObject "WPProgram", "Hypermake", "<MVhmakeFolder>",,
  63. "OBJECTID=<MVhmake_hymake>;EXENAME="CurrentDir"\HYMAKE.EXE;ICONFILE="CurrentDir"\HMP.ICO;ASSOCFILTER=*.HMP,,;"
  64.  
  65.   Call SysCreateObject "WPProgram", "kompiliere Projekt (Kommandozeile)", "<MVhmakeAssocFolder>",,
  66. "OBJECTID=<MVhmake_comp>;EXENAME="CurrentDir"\HMAKE.EXE;ICONFILE="CurrentDir"\HMP.ICO;ASSOCFILTER=*.HMP,,;"
  67.  
  68.   Call SysCreateObject "WPProgram", "editiere Projektdatei", "<MVhmakeAssocFolder>",,
  69.         "OBJECTID=<MVhmake_edit>;EXENAME=E.EXE;ASSOCFILTER=*.HMP,,;"
  70.  
  71.   Call SysCreateObject "WPProgram", "Button Bibliothek", "<MVhmakeFolder>",,
  72.     "OBJECTID=<MVhmakeButtonLib>;EXENAME=NETSCAPE.EXE;PARAMETERS="CurrentDir"\Buttons\Content.htm;STARTUPDIR="CurrentDir"\Buttons;"
  73.  
  74.   Call SysCreateObject "WPProgram", "Doku als IBM Hilfe", "<MVhmakeFolder>",,
  75.     "OBJECTID=<MVhmake_DocuHelp>;EXENAME=VIEW.EXE;PARAMETERS="CurrentDir"\German\Hymake.hlp;"
  76.   
  77.   Call SysCreateObject "WPProgram", "Doku in HTML", "<MVhmakeFolder>",,
  78.     "OBJECTID=<MVhmake_DocuHTML>;EXENAME=NETSCAPE.EXE;PARAMETERS="CurrentDir"\German\Doku\Index.html;STARTUPDIR="CurrentDir"\German\Doku;"
  79.  
  80.   Call SysCreateObject "WPShadow", "ShadowOfHyperMake", "<MVhmakeFolder>",,
  81.     "OBJECTID=<MVhmakeDirShadow>;SHADOWID="CurrentDir";"
  82.  
  83.  
  84.   say "Es wurde erfolgreich ein Hypermake Ordner mit einigen Objekten erstellt."
  85.   say "Sie können den Ordner irgendwo in einen anderen Ordner Ihrer"
  86.   say "Arbeitsoberfläche verschieben."
  87.   say "Zum Deinstallieren dieser Objekte starten Sie dieses Programm erneut."
  88.   say ""
  89.   say "Wenn Sie die Kommandozeilenversion benutzen wollen, so müssen Sie die"
  90.   say "Datei KBDVIO32.DLL in ein Verzeichnis spielen, das unter LIBPATH in der"
  91.   say "CONFIG.SYS eingetragen ist. Üblicherweise ist hierfür C:\OS2\DLL ein"
  92.   say "passendes Verzeichnis."
  93.  
  94. END
  95. ELSE DO
  96.  
  97.   say "Before running this installation program, you have to copy the Hypermake"
  98.   say "directories and files to the location of your choice by yourself."
  99.   say "Continue ? (press Y or N) "
  100.   pull Contin
  101.   if  ((Contin = "N") | (Contin = "n")) then EXIT
  102.  
  103.   say "creation of a Hypermake folder on the desktop..."
  104.  
  105.  
  106.   Call SysCreateObject "WPFolder", "Hypermake", "<WP_DESKTOP>",,
  107.     "OBJECTID=<MVhmakeFolder>;ICONFILE="CurrentDir"\HMP.ICO;"
  108.  
  109.   Call SysCreateObject "WPFolder", "HMP Associations", "<MVhmakeFolder>",,
  110.     "OBJECTID=<MVhmakeAssocFolder>;"
  111.       Call SysCreateObject "WPProgram", "compile project", "<MVhmakeAssocFolder>",,
  112.           "OBJECTID=<MVhmake_comp>;EXENAME="CurrentDir"\HMAKE.EXE;ICONFILE="CurrentDir"\HMP.ICO;ASSOCFILTER=*.HMP,,;"
  113.       Call SysCreateObject "WPProgram", "edit project file", "<MVhmakeAssocFolder>",,
  114.         "OBJECTID=<MVhmake_edit>;EXENAME=E.EXE;ASSOCFILTER=*.HMP,,;"
  115.  
  116.   Call SysCreateObject "WPProgram", "Button Library", "<MVhmakeFolder>",,
  117.     "OBJECTID=<MVhmakeButtonLib>;EXENAME=NETSCAPE.EXE;PARAMETERS="CurrentDir"\Buttons\Content.htm;STARTUPDIR="CurrentDir"\Buttons;"
  118.  
  119.   Call SysCreateObject "WPProgram", "Docu in IBM Help", "<MVhmakeFolder>",,
  120.     "OBJECTID=<MVhmake_DocuHelp>;EXENAME=VIEW.EXE;PARAMETERS="CurrentDir"\English\Hymake.hlp;"
  121.   
  122.   Call SysCreateObject "WPProgram", "Docu in HTML", "<MVhmakeFolder>",,
  123.     "OBJECTID=<MVhmake_DocuHTML>;EXENAME=NETSCAPE.EXE;PARAMETERS="CurrentDir"\English\Docu\Index.html;STARTUPDIR="CurrentDir"\English\Docu;"
  124.  
  125.   Call SysCreateObject "WPShadow", "ShadowOfHyperMake", "<MVhmakeFolder>",,
  126.     "OBJECTID=<MVhmakeDirShadow>;SHADOWID="CurrentDir";"
  127.  
  128.  
  129.   say "Successful creation of a Hypermake folder on your desktop"
  130.   say "containing some objects."
  131.   say "You can drop the folder somewhere into a folder of your desktop."
  132.   say "To deinstal these objects run this program again."
  133.   say ""
  134.   say "To run the commandline version, please copy the file kbdvio32.dll to a"
  135.   say "directory where other dll files resides which is part of your LIBPATH"
  136.   say "statement in the CONFIG.SYS. Normally the target directory is C:\OS2\DLL"
  137.  
  138. END
  139.  
  140. "copy kbdvio32.dll c:\os2\dll"
  141. "@pause"
  142.  
  143.  
  144. exit
  145.  
  146.  
  147. Destroy:
  148. if SysDestroyObject(ARG(1)) then DO
  149.   if (German = TRUE) then DO
  150.     say "löschen von "ARG(1)" OK"
  151.   END
  152.   else DO
  153.     say "deleting "ARG(1)" OK"
  154.   END
  155.  
  156. END
  157. else DO
  158.   if (German = TRUE) then DO
  159.     say "löschen von "ARG(1)" fehlgeschlagen"
  160.   END
  161.   else DO
  162.     say "deleting "ARG(1)" failed"
  163.   END
  164. END
  165. return