; install mv1440 by Jürgen Einrauch 26. Januar 1999     
failat 21

echo "  *e[1;32m___________________________________________________"
echo "  *e[43m                                                   *e[0m"
echo "  *e[0;28;43m           Install mv1440sup72 (840x400)    *e[1m       *e[0m"
echo "  *e[;;43m___________________________________________________*e[0m*n"

lab anfang
echo "*n   Wähle Sprache / Choose language."
echo noline "   Schreibe *e[32md*e[0m für deutsch / Type *e[32me*e[0m for english: "
set > nil: spra ?
IF $spra eq "d"
skip deutsch
endif
IF $spra eq "e"
skip english
endif
skip back anfang

lab deutsch
echo "*n   *e[32mWarnung. Lesen Sie vorher alle Informationen !*e[0m"
echo noline "*n   <mv1440sup72> jetzt installieren ? (ja/nein): "
set > nil: Inp ?
IF $Inp eq "ja"
  skip start
endif
IF $Inp eq "Ja"
  skip start
endif
IF $Inp eq "j"
  skip start
endif
IF $Inp eq "J"
  skip start
endif
echo noline "*n   Installation abgebrochen."
EndCLI >NIL:
quit

lab start
IF NOT EXISTS SYS:mv1440sup72
skip warning
else
IF NOT EXISTS SYS:mv1440sup72/monitors
skip warning
else
IF NOT EXISTS SYS:mv1440sup72/sys
skip warning
else
skip warning2
endif

lab warning
echo "*n   Sie   m ü s s e n   <mv1440sup72> in die Workbench-"
echo "   Partition der Festplatte kopieren! Installation abgebrochen."
WAIT 5 secs
EndCLI >NIL:
quit

lab warning2
IF EXISTS SYS:monitorfiles_old
echo "*n   <mv1440sup72> ist bereits vorhanden."
echo "   Installation abgebrochen."
wait 3 secs
else
skip start2
wait 4 secs
endif
EndCLI >NIL:
quit

lab start2 
IF NOT EXISTS SYS:devs/monitors
skip break
else
endif
IF NOT EXISTS sys:prefs/env-archive/sys/overscan.prefs
skip break
endif
IF NOT EXISTS sys:prefs/env-archive/sys/screenmode.prefs
skip break
endif
IF NOT EXISTS SYS:storage/monitors
skip break
else
skip start3
endif

lab start3
echo "*n   Ihre alten Monitordaten werden jetzt in der neuen"
echo "   Workbenchdatei <monitorfiles_old> gesichert." 
wait 1 secs

makedir sys:monitorfiles_old
copy >nil:  from sys:devs/monitors to sys:monitorfiles_old/monitors
copy >nil: from sys:storage/monitors to sys:devs/monitors
makedir >nil: sys:monitorfiles_old/sys
copy >nil: from sys:prefs/env-archive/sys/overscan.prefs to sys:monitorfiles_old/sys
copy >nil: from sys:prefs/env-archive/sys/screenmode.prefs to sys:monitorfiles_old/sys

delete >nil: sys:devs/monitors/euro36
delete >nil: sys:devs/monitors/a2024
delete >nil: sys:devs/monitors/#?(.info)
delete >nil: sys:prefs/env-archive/sys/overscan.prefs
delete >nil: sys:prefs/env-archive/sys/screenmode.prefs

copy >nil: from sys:mv1440sup72/monitors to sys:devs/monitors
copy >nil: from sys:mv1440sup72/sys to sys:prefs/env-archive/sys
skip end

lab break
echo "*n   Das Installationsprogramm kann einige Daten nicht"
echo "   finden. Installieren Sie alle Dateien manuell!"
WAIT 6 secs
EndCLI >NIL:
quit

lab end
wait 3 secs
echo "*n   Installation beendet."
echo "   Starten Sie den Rechner neu, um die Installation abzuschließen."
echo "   Justieren und fixieren Sie alle Fenster neu."
wait 6 secs
EndCLI >NIL:
quit

; .............................................

lab english
echo "*n   *e[32mWarning. Read all information docs first !*e[0m"
echo noline "*n   Install mv1440sup72 now ? (yes/no): "
set > nil: Inp ?
IF $Inp eq "Yes"
  skip start
endif
IF $Inp eq "yes"
  skip start
endif
IF $Inp eq "y"
  skip start
endif
IF $Inp eq "Y"
  skip start
endif
echo noline "*n   Installation aborted."
EndCLI >NIL:
quit

lab start
IF NOT EXISTS SYS:mv1440sup72
skip warning
else
IF NOT EXISTS SYS:mv1440sup72/monitors
skip warning
else
IF NOT EXISTS SYS:mv1440sup72/sys
skip warning
else
skip warning2
endif

lab warning
echo "*n   You   m u s t   copy <mv1440sup72> to the workbench"
echo "   partition of your harddisk! Installation aborted."
WAIT 5 secs
EndCLI >NIL:
quit

lab warning2
IF EXISTS SYS:monitorfiles_old
echo "*n   <mv1440sup72> still installed."
echo "   Installation aborted."
wait 3 secs
else
skip start2
wait 4 secs
endif
EndCLI >NIL:
quit

lab start2 
IF NOT EXISTS SYS:devs/monitors
skip break
else
endif
IF NOT EXISTS sys:prefs/env-archive/sys/overscan.prefs
skip break
endif
IF NOT EXISTS sys:prefs/env-archive/sys/screenmode.prefs
skip break
endif
IF NOT EXISTS SYS:storage/monitors
skip break
else
skip start3
endif

lab start3
echo "*n   Your old monitor configuration will be saved now"
echo "   in the new Workbench directory <monitorfiles_old>." 
wait 1 secs

makedir sys:monitorfiles_old
copy >nil:  from sys:devs/monitors to sys:monitorfiles_old/monitors
copy >nil: from sys:storage/monitors to sys:devs/monitors
makedir >nil: sys:monitorfiles_old/sys
copy >nil: from sys:prefs/env-archive/sys/overscan.prefs to sys:monitorfiles_old/sys
copy >nil: from sys:prefs/env-archive/sys/screenmode.prefs to sys:monitorfiles_old/sys

delete >nil: sys:devs/monitors/euro36
delete >nil: sys:devs/monitors/a2024
delete >nil: sys:devs/monitors/#?(.info)
delete >nil: sys:prefs/env-archive/sys/overscan.prefs
delete >nil: sys:prefs/env-archive/sys/screenmode.prefs

copy >nil: from sys:mv1440sup72/monitors to sys:devs/monitors
copy >nil: from sys:mv1440sup72/sys to sys:prefs/env-archive/sys
skip end

lab break
echo "*n   The install program can`t find some prefs or monitor"
echo "   files. Install all files manually!"
WAIT 6 secs
EndCLI >NIL:
quit

lab end
wait 3 secs
echo "*n   Installation finished."
echo "   Reset your computer to enable the new configuration."
echo "   New adjust and fix all windows."
wait 6 secs
EndCLI >NIL:
quit
