; Installer for

(set cpu (database "cpu"))
(set vblank (database "vblank"))
(set chipmem (database "graphics-mem"))
(set totmem (database "total-mem"))
(set osver (/ (getversion "LIBS:version.library") 65536))
(if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
(set fastmem (- totmem graphmem))

( if (= osver 37) ( (set workbench "2.0"))
( if (= osver 38) ( (set workbench "2.1"))
( if (= osver 39) ( (set workbench "3.0"))
( if (= osver 40) ( (set workbench "3.1"))
( if (= osver 41) ( (set workbench "4.0"))
)))))


(set default_lang 4)

(set #MinReq
(cat "The following are the MINIMUM REQUIREMENTS!\n"
	"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
                         "Kickstart 3.x, **You only have " workbench "**\n\n"
                         "PicassoII in linear mode *not segmented*\n\n"
                         "68020 or higher\n\n"
                         "2 MB of fast memory")
)

(set #MinCPU
(cat	"The following are the MINIMUM REQUIREMENTS!\n"
	"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
	"68020 or higher, **You only have " cpu "**\n\n"
	"PicassoII in linear mode *not segmented*\n\n"
	"Kickstart 3.x\n\n"
	"2 MB of fast memory")
)

(set #About
(cat	"Cybergraphics Software by:\n\nFrank Mariak\nfmariak@chaosengine.ping.de"
	"\n\n&\n\nThomas G.Sontowski\nmarvin@sun.ph-cip.uni-koeln.de"
	"\n\n\nInstaller partly done by:\n Robert Reiswig - rcr@netcom.com")
)

(set #Info
(cat	"Basic system check, This machine has\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
	 " \"" workbench "\" Version of OS\n\n"
	 " \"" cpu "\" Processor\n\n "
	 " \"" blank "\" Machine\n\n"
         " \"" chipmem  "\" Total Free Chip Memory\n\n"
	 " \"" fastmem  "\" Total Free Fast Memory\n\n  \"" totmem "\" Total Free Memory\n\n")
)

    (set #PosMsg "Ja")
    (set #NegMsg "Nein")

    (set #AskDirMsg  (cat "Wählen Sie bitte ein Verzeichnis in-\ndem alle Zusatzdateien installiert "
		"werden sollen, die nicht auf die Systempartition müssen") )


 (set #ToDoMsg (cat "To guarantee problem-free working of the new intuition emulation,"
	" you have to remove the old VillageTronic or EGS emulation. In the "
	"shareware release this is NOT done by the installation script. "
	"Piccolo owners have to move the files devs:monitors/EGS and "
	"sys:wbstartup/EGSStartup to another location, PicassoII owners "
	"have to move the file village.library in sys:expansion, also "
	"the vilintuisup.library has to be renamed because it is replaced "
	"by a cybergraphics version of the library."
        )
 )

(set #RegInfoMsg
	(cat
	"REGISTRATION\n~~~~~~~~~~~~~\n"
         "The registration fee is DM50 or $30. You have to pay it to one of the"
         " following to get a full working version:\n\n"
         "     Frank Mariak       Thomas Sontowski        \n"
	 "	  Klosterstr. 7      Bensberger Marktweg 15\n"
	 "	  44135 Dortmund     51069 Köln            \n\n\n"
         "Feel free to contact us by email or smail if you have any questions."
))




;========================================================
; German strings

(if (= @language "deutsch")

(set default_lang 2)

(set #MinReq
(cat "Folgendes sind die Minimalanforderungen !\n"
	"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
                         "Kickstart 3.x, **Sieh haben nur " workbench "**\n\n"
                         "PicassoII im linear modus *nicht segmentiert*\n\n"
                         "68020 oder höher\n\n"
                         "2 MB FAST Ram")
)

(set #MinCPU
(cat	"Folgendes sind die Minimalanforderungen!\n"
	"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
	"68020 oder höher, **Sie haben nur einen " cpu "**\n\n"
	"PicassoII im linear modus *nicht segmentiert*\n\n"
	"Kickstart 3.x\n\n"
	"2 MB FAST Ram")
)

(set #About
(cat	"Cybergraphics Software von:\n\nFrank Mariak\nfmariak@chaosengine.ping.de"
	"\n\n&\n\nThomas G.Sontowski\nmarvin@sun.ph-cip.uni-koeln.de"
	"\n\n\nInstaller Skript von:\n Robert Reiswig - rcr@netcom.com")
)


(set #Info
(cat	"System Test, This Machine Has\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
	 " \"" workbench "\" Version of OS\n\n"
	 " \"" cpu "\" Processor\n\n "
	 " \"" blank "\" Machine\n\n"
         " \"" graphmem  "\" Total Free Chip Memory\n\n"
	 " \"" fastmem  "\" Total Free Fast Memory\n\n  \"" totmem "\" Total Free Memory\n\n")
)

    (set #PosMsg "Ja")
    (set #NegMsg "Nein")

    (set #AskDirMsg  (cat "Wählen Sie bitte ein Verzeichnis in-\ndem alle Zusatzdateien installiert "
		"werden sollen, die nicht auf die Systempartition müssen") )


    (set #ToDoMsg (cat "Um einen problemlosen Betrieb der neuen Emulation zu gewährleisten, müssen"
		"die VillageTronic bzw. EGS Emulationen entfernt werden. Dies wird in der"
		"Shareware version NICHT von dem Installationsskript übernommen!"
		"Piccolo Besitzer müssen die Dateien devs:monitors/EGS und sys:wbstartup/EGSStartup"
		"aus den jeweiligen Verzeichnen löschen/verschieben"
		)
    )

(set #RegInfoMsg
	(cat
	"REGISTRIERUNG\n~~~~~~~~~~~~~\n"
         "Die Registrierungsgebühr beträgt DM50 or $30. Bei Interesse an einer Vollversion"
         " einsenden an:\n\n"
         "     Frank Mariak       Thomas Sontowski        \n"
	 "	  Klosterstr. 7      Bensberger Marktweg 15\n"
	 "	  44135 Dortmund     51069 Köln            \n\n\n"
         "Bei eventuellen Fragen können Sie uns gerne per Post oder email kontaktieren.")
)

)


(if (< osver 39)  (abort #MinReq)
)


(if (< cpu 68020) (abort #MinCPU)
)


(message #About)

(message #Info)

(message #ToDoMsg)

(set @default-dest (askdir
                       (prompt #AskDirMsg)
                       (help @askdir-help)
                       (default @default-dest)
                   )
)
(complete 10)



;====== copy english stuff ======
(if (= default_lang 4)
(
    (copyfiles
        (prompt "copying guide file...")
        (help @copyfiles-help)
        (source "CyberGfx_E.guide")
        (dest @default-dest)
        (newname "CyberGfx.guide")
        (infos)
        (confirm)
    )
    (complete 20)

    (if (exists "Orderform")
    (
        (copyfiles
            (prompt "copying orderform...")
            (help @copyfiles-help)
            (source "Orderform")
            (dest @default-dest)
            (newname "Orderform")
            (infos)
            (confirm)
        )
    ))
    (complete 30)


        (copyfiles
            (prompt "copying developer docs...")
            (help @copyfiles-help)
            (source "devdocs/")
            (dest (tackon @default-dest "devdocs" ))
            (all)
            (confirm)
        )
    (complete 40)

;====== Copy all available cyber monitors =====
    (copyfiles
        (prompt "copying monitors...")
        (help @copyfiles-help)
        (source "monitors/")
        (dest "devs:monitors")
        (all)
        (confirm 1)
    )
    (complete 50)



;====== Copy all cyber libraries =====
    (copyfiles
        (prompt "copying libraries")
        (help @copyfiles-help)
        (source "libs/")
        (dest "libs:")
        (all)
        (confirm 1)
    )
    (complete 70)


;====== Copy adpro driver =====
    (copyfiles
        (prompt "copying adpro driver")
        (help @copyfiles-help)
        (source "drivers/")
        (dest "adpro:savers2/")
        (all)
        (confirm 1)
    )
    (complete 80)
))


;====== copy German stuff ======
(if (= default_lang 2)
(
    (copyfiles
        (prompt "Kopiere guide Datei...")
        (help @copyfiles-help)
        (source "CyberGfx_D.guide")
        (dest @default-dest)
        (newname "CyberGfx.guide")
        (infos)
        (confirm)
    )
    (complete 20)

    (if (exists "Bestellformular")
    (
        (copyfiles
            (prompt "Kopiere Bestellformular...")
            (help @copyfiles-help)
            (source "Bestellformular")
            (dest @default-dest)
            (newname "Bestellformular")
            (infos)
            (confirm)
        )
    ))
    (complete 30)


        (copyfiles
            (prompt "Kopiere Entwicklerunterlagen...")
            (help @copyfiles-help)
            (source "devdocs/")
            (dest (tackon @default-dest "devdocs" ))
            (all)
            (confirm)
        )
    (complete 40)

;====== Copy all available cyber monitors =====
    (copyfiles
        (prompt "Kopiere Monitordateien")
        (help @copyfiles-help)
        (source "monitors/")
        (dest "devs:monitors")
        (all)
        (confirm 1)
    )
    (complete 50)



;====== Copy all cyber libraries =====
    (copyfiles
        (prompt "Kopiere libraries")
        (help @copyfiles-help)
        (source "libs/")
        (dest "libs:")
        (all)
        (confirm 1)
    )
    (complete 70)

;====== Copy adpro driver =====
    (copyfiles
        (prompt "Kopiere ADPro Treiber")
        (help @copyfiles-help)
        (source "drivers/")
        (dest "adpro:savers2/")
        (all)
        (confirm 1)
    )
    (complete 80)

))




(message #RegInfoMsg)

(exit)
