;
; $VER: IOBlix ethernet module installation 1.7 (30.03.2000)
;
; Copyright (c) 1998-2000 Thore Böckelmann and RBM Computertechnik
;

;****************************************************************************
;
; English texts
;
(if (not (= @language "deutsch"))
    (
        (set #bad-kick      "You must have AmigaOS 2.0 (V37) or newer to be able to use the IOBlix I/O board.")
        (set #bad-cpu       "You must have at least an MC68020 to use the IOBlix software.")
        (set #cantremove    (cat "Cannot remove old ioblix.resource! "
                                 "Please quit any software using the IOBlix before installing the new drivers!"))
        (set #cantinit      (cat "Cannot initialize ioblix.resource! "
                                 "Please quit any software using the IOBlix before installing the new drivers!"))
        (set #noioblix      (cat "You have no IOBlix Ethernet module installed! "
                                 "Please install the module first, before you install the software!"))
        (set #intro         (cat "\n"
                                 "Now you can install the necessary SANA-II driver and tools for the IOBlix Ethernet module."
                                 "\n"
                                 "\n"
                                 "Do you want to install the driver now?"))
        (set #selectdevs    "\nWhere to install the device driver?\n")
        (set #selecttools   "\nWhere to install the diagnosis tool?\n")
        (set #copyetherdev  "\nCopying ioblixether.device...\n")
        (set #copyetherdiag "\nCopying IOBlixEthDiag...\n")
    )
)

;****************************************************************************
;
; Deutsche Texte
;
(if (= @language "deutsch")
    (
        (set #bad-kick      "Sie müssen AmigaOS 2.0 (V37) oder höher installieren, um die IOBlix-Karte zu benutzen.")
        (set #bad-cpu       "Sie brauchen mindestens einen MC68020, um die IOBlix-Software zu benutzen.")
        (set #cantremove    (cat "Kann alte ioblix.resource nicht aus dem System entfernen!\n"
                                 "Bitte beenden Sie alle Programme, die den IOBlix benutzen, bevor Sie die neue Software installieren!"))
        (set #cantinit      (cat "Kann ioblix.resource nicht initialisieren!\n"
                                 "Bitte beenden Sie alle Programme, die den IOBlix benutzen, bevor Sie die neue Software installieren!"))
        (set #noioblix      (cat "Sie haben keine IOBlix Ethernet-Modul in Ihrem Rechner installiert! "
                                 "Bitte bauen Sie erst das Modul ein, bevor Sie die Software installieren!"))
        (set #intro         (cat "\n"
                                 "Sie können jetzt die nötigen SANA-II Treiber und Diagnosetools für das IOBlix Ethernet-Modul installieren."
                                 "\n"
                                 "\n"
                                 "Wollen Sie die Treiber jetzt installieren?"))
        (set #selectdevs    "\nWohin soll der Gerätetreiber kopiert werden?\n")
        (set #selecttools   "\nWohin soll das Diagnosetool kopiert werden?\n")
        (set #copyetherdev  "\nKopiere ioblixether.device...\n")
        (set #copyetherdev  "\nKopiere IOBlixEthDiag...\n")
    )
)

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

(complete 0)

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

(if (patmatch "68000|68010" (database "cpu"))
    (abort #bad-cpu)
)

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

(welcome)

(complete 10)

;****************************************************************************
;
; Check for IOBlix board
;

(set #setupcheck (run "C/SetupIOBlix remove" (safe)))
(if (< 0 #setupcheck)
    (abort #cantremove)
)

(set #setupcheck (run "C/SetupIOBlix reinit" (safe)))
(if (< 0 #setupcheck)
    (abort #cantinit)
)

(set #ioblixether (run "C/Look4IOBlix hw=ether" (safe)))
(if (= 0 #ioblixether)
    (abort #noioblix)
)

(complete 20)

;****************************************************************************
;
;
;

(set #doit
    (askbool
        (prompt #intro)
        (help @askbool-help)
        (default 1)
    )
)

(if (= 0 #doit)
    (exit (quiet))
)

;****************************************************************************
;
; Setup directory
;

(complete 30)

(set #destdevs
    (askdir
        (prompt #selectdevs)
        (help @askdir-help)
        (default "DEVS:Networks")
    )
)

(complete 50)

(set #desttools
    (askdir
        (prompt #selecttools)
        (help @askdir-help)
        (default "SYS:IOBlix")
    )
)

;****************************************************************************
;
; Install devices
;

(copylib
    (help @copylib-help)
    (prompt #copyetherdev)
    (source "Devs/IOBlixZ2/ioblixether.device")
    (dest #destdevs)
    (confirm)
)

(complete 60)

;****************************************************************************
;
; Install tools
;

(copyfiles
    (help @copyfiles-help)
    (prompt #copyetherdiag)
    (source "C/IOBlixEthDiag")
    (dest #desttools)
    (confirm)
)

(complete 80)

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

(complete 100)
(exit)

