;
; $VER: TIFF datatype install 1.0 (18.7.95)
;
; Copyright (c) 1995 Bert Wynants.
;
;****************************************************************************
;
; English texts
;

(set #bad-kick (cat "You must have AmigaOS Release 3 or newer to be able to "
    "use the TIFF DataType.")
)

(set #TIFF-descr (cat "    The TIFF DataTypes Descriptor is required to "
    "identify TIFF files.  This file is usually placed into the "
    "\"DEVS:DataTypes\" drawer, it will then automatically be added to the "
    "list of available DataTypes on every reboot.\n    You may also place it "
    "into the systems \"Storage/DataTypes\" drawer and only activate the "
    "DataType, when you need it (simply double-click the \"TIFF\" icon).\n\n"
    @copyfiles-help)
)

(set #support-me (cat "This is Freeware.\n\nIf you use this DataType "
    "regulary, please consider the amount of work I put into it.  Thank "
    "you.\n\n")
)

;****************************************************************************
;
; Setup
;

(set @default-dest "")

(set class-dest "SYS:Classes")
(set dt-dest "DEVS:DataTypes")
(set storage "SYS:Storage")
(set dt-storage "SYS:Storage/DataTypes")

(makedir storage)
(makedir dt-storage)
(makedir dt-dest)

(if (not (exists class-dest))
    (set class-dest "LIBS:")
)

(complete 0)

(if (< (/ (getversion) 65536) 39)
    (abort #bad-kick)
)

;****************************************************************************
;
; Welcome
;

(welcome)

(message "\n     TIFF DataType \n\nCopyright  1995 "
    "Bert Wynants, All Rights Reserved.\n"
)

(complete 20)

;****************************************************************************
;
; Install DataTypes descriptor
;

(if (exists (tackon dt-dest "TIFF.info"))
    (
        (copyfiles
            (help @copyfiles-help)
            (prompt "Cloning icon...")
            (source (tackon dt-dest "ILBM.info"))
            (newname "TIFF.info")
            (dest "Devs/DataTypes")
            (optional nofail)
        )
        (tooltype
            (help @tooltype-help)
            (prompt "Unsnapshooting icon...")
            (dest "Devs/DataTypes/TIFF")
            (noposition)
        )
    )
)

(copyfiles
    (help #TIFF-descr)
    (prompt "Copying TIFF DataTypes Descriptor...")
    (source "Devs/DataTypes/TIFF")
    (dest dt-dest)
    (infos)
    (confirm)
)

(complete 25)

;****************************************************************************
;
; Copy Documentation
;

(set doc-dir (askdir (help @askdir-help) (prompt "Select a directory for the documentation.") (default "HELP:english/")))
(copyfiles
    (help @copyfiles-help)
    (prompt "Copying TIFF.guide...")
    (source "TIFF.guide")
    (dest doc-dir)
    (infos)
    (optional nofail)
    (confirm)
)

;****************************************************************************
;
; Install class
;

(complete 90)

(copylib
    (help @copylib-help)
    (prompt "Copying TIFF.datatype...")
    (source "Classes/DataTypes/TIFF.datatype")
    (dest (tackon class-dest "DataTypes"))
    (confirm)
)

;****************************************************************************
;
; Exit
;

(
    (run "Avail >NIL: FLUSH")
    (run "AddDataTypes >NIL: Devs/DataTypes/TIFF")
    (complete 100)
    (exit #support-me "The TIFF DataType is now ready to be used.  Enjoy!")
)

