; mpegvideo.datatype test script
; Execute it from the matching binary directory, e.g. 000/ or 020/  ...

FailAt 10
Set ECHO ON

; Is here the datatype shared library ?
If EXISTS "mpegvideo.datatype.ld"
  ; Check if we created the test directory
  If NOT EXISTS "RAM:DataTypes"
    MakeDir "RAM:DataTypes"
    Assign LIBS: RAM: ADD
  EndIf

  ; Copy descriptor
  If NOT EXISTS "RAM:MPEG Video"
    Copy CLONE FROM="/MPEG Video(%|.info)" TO="RAM:"
  EndIf

  ; Copy class library
  Copy CLONE FROM="mpegvideo.datatype.ld" TO="RAM:Datatypes/mpegvideo.datatype" BUF=0

  ; Get rid of the old version
  C:FlushLibs
Else
  ECHO "No mpegvideo.datatype.ld in this directory"
  Quit 10
EndIf

