;*****************************************************************************
;    ______        __                  ______                     __  __   __
;   / __  /       / /                 / __  / FIRST TIME INSTALL / /  \ \ / /
;  / /  -'__  __ / /___ ______ _____ / /_ -'_____ ______ ______ / /__  \ \ /
; / /     \ \/ // __  // ____// .__// // \ / .__// __  // __  // __  / /  /  V4
;/ /___    \  // /_/ // __/_ / /   / /_/ // /   / __  // /_/ // / / / / \ \
;\____/    / //_____//_____//_/   /_____//_/   /_/ /_// ____//_/ /_/ /_/ \_\
;         /_/                                        / /
;                                                   /_/
; S3           : CyberVision64/3D, CyberVision64
; Cirrus Logic : Picasso II(+), Picasso IV, Spectrum, Piccolo, Piccolo SD64, Inferno
; Symbios (NCR): Retina BLT Z3
; Texas Inst.  : CyberVisionPPC (Permedia), BlizzardVisionPPC (Permedia) 
;          
; CyberGraphX V4 1998 Vision Factory Development
; CyberGraphX V4 Installer 1995,1996,1997,1998 by Robert C. Reiswig 
; $VER: V0.50 (October-22-1998)
; 
; If you wish to use any part of this installer you must ask. May not be 
; integrated/placed into any other package! You may NOT change this in an way!
; You man NOT take or use the ENV definitions and use them without direct
; permission from me! Changes, suggestions or problems: vgr@best.com
;********************************************************************************


;********************************************************************************
; Cyber Release & Boards
;********************************************************************************
(set @user-level 2)
(set #cyberver "V4 42.0")
(set NoBoard 0)
(set whereback "SYS:Storage")
(message (cat "\nCyberGraphX " #cyberver "\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
              "CyberVisionPPC & CyberVision64/3D & CyberVision64\n\nPicasso II(+) & Picasso IV & Inferno\n\n"
              "Piccolo & Piccolo SD64 & Spectrum 28/24\n\nRetina BLT Z3"
         )
)

(welcome)
;********************************************************************************
; Read All System information
;********************************************************************************
(set cpu (database "cpu")) (if (> (exists ("sys:libs/68060.library")) 0) (set cpu "68060") )
(set vblank (database "vblank")) (set graphmem (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 "3.2")) )))))
(set cgx_root "CGraphX4")
(set pick 0)

;********************************************************************************
;English Strings
;********************************************************************************
(set #askzorro "\nWhat type of machine is CyberGraphX V4 installed on?\n")
(set #askcpu "\nWhat CPU does the machine have that you are updating CyberGraphX V4 on? The installer has found:\n")
(set #wherelibs "Where do you want the CyberGraphX V4 libraries installed? The default is 'SYS:Libs'")
(set #whatboard (cat "\nPlease Select the Graphics Board(s) you wish to Install CyberGraphX V4 for:\n"))
(set #todo-prompt "\nDo you wish to install:\n")
(set #cgxmode-todo " CGXMode - Create & Change Screen Modes")
(set #wheremode "Where do you wish to copy the CGXMode Program?")
(set #whereshowcgxconfig "Where do you wish to copy the ShowCGXconfig Program?")
(set #showcgxconfig " ShowCGXconfig - CGX Info Program")

;***** New Strings for Aug-11-97
(set #nocvppcboard "\n\n\nCurrently there is no public driver for the CyberVisionPPC graphics card.")
(set #noretinaboard "\n\n\nCurrently there is no public driver for the Retina BLT Z3 graphics card.")
(set #nopicasso4board "\n\n\nCurrently there is no public driver for the Picasso IV graphics card.")
(set #noinfernoboard "\n\n\nCurrently there installer does not fully support the Inferno yet.")

(set #ask-MODEFILE1 "Which modefile should be installed for the ") 
(set #ask-MODEFILE2 "? The khz number should not exceed your monitors max khz!")
(set #15KHZ "15khz maximum") (set #31KHZ "31khz maximum")
(set #35KHZ "35khz maximum") (set #38KHZ "38khz maximum")
(set #48KHZ "48khz maximum") (set #57KHZ "57khz maximum")
(set #64KHZ "64khz maximum") (set #80KHZ "80khz maximum")

(set #yes "Yes")
(set #no "No")
(set #followingenv "\n\n\n\nThe following section will set the Env Vars for CyberGraphX V4.")
(set #whatboard-tt "\n\n\n\nThe following ToolTypes will be set for the:\n\n")


(set #usesemaphores (cat "USESEMAPHORES\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Uses Semaphores to avoid disabling of multitasking "
                         "under certain conditions. Enabling this option might "
                         "lead to lockups under certain conditions but overall is more "
                         "system friendly."
             )
)
(set #superlayers (cat "SUPERLAYERS\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                       "New fast layers replacement. Will speed layers up a lot, "
                       "especially when using many windows."
             )
)
(set #cpup2c (cat "CPUP2C\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                  "By setting this variable, the planar-to-chunky conversion "
                  "will be done by the CPU, instead of using the blitter."
                  "Therefore the ugly looking 'planar' blitting effects are gone, "
                  "but the software conversion is a bit slower."
             )
)
(set #hirescrsr (cat "HIRESCRSR\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "By setting this variable, the Lores-Sprites on non-AA-machines "
                     "become Hires-sprites (they are no longer doubled by "
                     "the CyberGraphX-Software). "
                    
                )
)
(set #hide15bit (cat "HIDE15BIT\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "By setting this variable, you can switch off 15bit modes to reduce "
                     "screenmode list length. The Modes are still available just hidden."
                )
)
(set #alertemu  (cat "ALERTEMU\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "By setting this variable, DisplayAlert(), (The Screens you get when the machine crashes.) "
                     "will be placed on an CyberGraphX screens."
                )
)
(set #planes2  (cat "PLANES2FAST\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "With this option on, non displayable planar bitmaps "
                     "are allocated in fast memory. This options speeds up "
                     "handling of planar bitmaps but could lead to problems "
                     "with amiga graphics which insist on planar graphics "
                     "placed in chip memory. Take care when using this option."
                )
)
(set #keepamiga (cat "KEEPAMIGAVIDEO\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Everytime a CyberGraphX display becomes a front-screen, "
                     "Amiga display DMA is switched off in order "
                     "to increase chipmem access speed if this option is off."
                )
)
(set #savemem   (cat "SAVEMEM\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "CyberGraphX will reduce memory consumption in less or equal 16 colour "
                     "modes, CyberGraphX keeps a planar representation of the screen "
                     "bitmap in fastmem and a chunky representation in video memory."
                )
)






(set #bootlogo  (cat "BOOTLOGO\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Setting this to '0' will cause the CyberGraphX Bootlogo "
                     "not to be shown at boot time for this card."
                )
)
(set #passthrough (cat "PASSTHROUGH\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                       "If this option is disabled, the monitor switch on this "
                       "CyberGraphX card is deactivated. This option is "
                       "required for multi monitor systems."
                )
)
(set #memclock  (cat "MEMCLOCK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "This is the default memory clock speed in MHz for "
                     "the graphics memory on the card. Default is:" 
                ) 
)
(set #scrollmask (cat "SCROLLMASK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Enables masking when scrolling/moving rectangles with "
                      "a mask in 256 colour modes. Setting this to 'NO' will "
                      "speed up scrolling of text in a shell but might "
                      "cause text crsr refresh problems with programs such as CED V2/V3 ."
                 )
)
(set #dragging  (cat "DRAGGING\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "This makes it is possible to keep multiple screens in video memory "
                     "allowing for very fast screen swaps. The trade off is that you will loose screen dragging."
                     "Do you wish to have dragable screens like normal amiga screens do?"
                )
)

;*********** NEW English Strings:  Wednesday 03-Sep-97 *************************
(set #nobackup "\n\nThis installer will install CGX V4 for the first time. Before you start you should use the backup program that came with your RTG Graphics system. Then you should use the uninstaller that came with it. If it did not come with these, then you will need to remove it by hand.\n\nYou should do this now if you have not done so.")
(set #whatboot "\nWhat bootlogo would you like to use?\n")
(set #bootdefault "CyberGraphX - Default")
(set #bootppc "Light My Fire - PPC")
(set #bootnone "Don't copy - Already Installed")


;*********** NEW English Strings:  Wednesday 22-Oct-97 *************************
(set #nopassthrough (cat "NOPASSTHROUGH\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "THIS IS A MASTER SWITCH. If this option is enabled, the monitor switch on every "
                         "CyberGraphX supported board is deactivated. This option is "
                         "required for multi monitor systems. It is disabled by default. "
                         "If NOPASSTHROUGH=0 (No) then the tooltype PASSTHROUGH can be used. If NOPASSTHROUGH=1 (Yes) then the tooltype PASSTHROUGH is not used!"
                    )
)

(set #supergels     (cat "SUPERGELS\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "A replacement for the original CyberGraphX GELs system. GELs = "
                         "Graphic ELementS, this includes things like blitter objects and effects the speed of "
                         "things like moving icons or opus drag and drop stuff. It will also give you "
                         "superimposed dragging in hi/truecolor! It is disabled by default (No)."

                    )
)

;*********** NEW English Strings:  Monday 01-Dec-97 *************************
(set #noaga "\n\n\nCurrently there installer does not fully support the AGA Chipset or the driver is not out. Please see http://www.vgr.com for more info.")
(set #CGXModeNot4AGA " CGXMode - Not for AGA Driver")
(set #noenvaga "\n\nThe following ENV VARs that you will set will be use by the _graphics card(s)_ that you selected. They will NOT be used by the AGA-PPC driver.")
(set #multimediamem (cat "MULTIMEDIAMEM\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "If MULTIMEDIAMEM=YES CGX will reserve 1MB on the CV64/3D for 3D Textures & Video Overlay options. "
                         "If NO, CV64/3D will then act like a card that does not have these options, like PicassoII. "
                         "You will get the full 4MB for screens with a Z3 machine (Z2 gets 3.5MB). "
                         "MULTIMEDIAMEM is defaulted to YES (where 3MB can be used for screens)."

                    )
)

(set #blackborder   (cat "BLACKBORDER\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "By setting 'BLACKBORDER=YES' will cause the "
                         "border around the screen to be black. The Retina BLT Z3 always uses color0 "
                         "by default where other cards always use black. Default is 'BLACKBORDER=NO'."
                    )
)

(set #noboard "\nOne of the board(s) or chipset(s) you selected is not currently supported.\n\nPlease look on http://www.vgr.com for an update or wait until the next CyberGraphX archive is released.\n\nThe card with the missing driver was the:\n") 

;*********** NEW English Strings:  Wednesday 21-Jan-98 **********************
(set #updatep4flash "\nTo use CyberGraphX with the Picasso IV you should be running version 2.0 or greater of the Picasso IV FlashROM.\n\nThe installer has found a version lower then 2.0.\n\nForm more information and newer FlashROMs you can contact:\nYour Dealer\nVillage Tronic\nVillage Tronic Web site\n")

;*********** NEW English Strings:  Wednesday 11-Mar-98 **********************
(set #noppc1 "\n\nYou selected the PPC option for one of your CPUs. The installer did not find the 'libs:PPC.library'.\n\nCyberGraphX may not work correctly.\n\n Do you wish to reselect the CPU type?")
(set #noppcaga "\nYou selected the 'AGA (PPC Only)' option when picking what graphics card (display device) to use with CyberGraphX. The installer did not find the 'libs:PPC.library'.\n\n The AGACGX driver needs a PPC card installed to work correctly.\n\nDo you wish to Abort the install now?.")
(set #agaquit "\nCyberGraphX install/update exiting.")

;*********** NEW English Strings:  Thursday 22-Oct-98 08:34:55 **********************
(set #By (cat "\n\nCyberGraphX\n\nRelease Version " #cyberver "\n\n\n\n"
              "1998 by:\n\nVision Factory Development"
          
         )
)

(set #guide " CGX Docs - AmigaGuide file")
(set #commy " CyberGraphX - Settings Tool")
(set #wheredocs "Where do you wish to install the CGX AmigaGuide file?")
(set #wherecomm "Where do you wish to install the CGX Settings Tool?")
(set #useroxxler    (cat "USEROXXLER\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "With the default of 'USEROXXLER=YES' it uses the special planar2chunky hardware on the CV64 to "
                         "convert planar to chunky, _both_ for fast memory and video memory destinations."
                    )
)
(set #bitmapcache   (cat "BITMAPCACHE\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Setting 'BITMAPCACHE=YES' will cause Caching of bitmaps that allows faster "
                         "window sizing/moving for smart refresh windows."
                    )
)
(set #packed24      (cat "PACKED24\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "By setting 'PACKED24=YES' this enables packed pixel mode "
                         "for 24bit resolutions. This allows higher refresh rates and "
                         "requires less memory. As a drawback, some accelerated "
                         "graphics operations and cpu rendering slows down."
                    )
)

(set #wbpatspeedup  (cat "WBPATSPEEDUP\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "This env setting should speed up standard wb pattern backfills. "
                          "It is disabled by default (No)."

                    )
)

(set #advancedclk  (cat "ADVANCEDCLK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Allows 'overclocking' of the CV64/CV3D cards, when used with CGXModeV4. "
                          "Default is 'ADVANCEDCLK=No'."

                    )
)
(set #needcd "\n\n\nPlease place your CyberGraphX V4 CDROM into your CDROM drive to continue.")

;********************************************************************************
;German Strings
;********************************************************************************
(if (= @language "deutsch")
(
 (set #askzorro "\nWelche Erweiterungsslots besitzt der Computer, auf dem Sie CyberGraphX V4 installieren ?\n")
 (set #askcpu "\nWelchen Prozessor besitzt der Computer, auf dem Sie CyberGraphX V4 installieren wollen ? Der installer hat folgendes gefunden:\n")
 (set #wherelibs "Wohin sollen die CyberGraphX V4 Bibliotheken installiert werden? Standard ist 'SYS:Libs'")
 (set #whatboard (cat "\nBitte whlen Sie die Grafikkarte(n), mit denen Sie CyberGraphX V4 benutzen wollen:\n"))
 (set #todo-prompt "\nWelches der folgenden Programme wollen Sie installieren: ?\n")
 (set #cgxmode-todo " CGXMode - Erstellen & ndern von Bildschirmmodis")
 (set #wheremode "Wohin wollen Sie das CGXMode Programm kopiert haben?")
 (set #whereshowcgxconfig "Wohin wollen Sie das ShowCGXconfig Programm kopiert haben?")
 (set #showcgxconfig " ShowCGXconfig - CyberGraphX Informationsprogramm")

 ;***** New Strings for Aug-11-97
 (set #nocvppcboard "\n\n\nMomentan ist kein Treiber fr die CyberVisionPPC Grafikkarte frei verfgbar.")
 (set #noretinaboard "\n\n\nMomentan ist kein Treiber fr die Retina BLT Z3 Grafikkarte frei verfgbar.")
 (set #nopicasso4board "\n\n\nMomentan ist kein Treiber fr die PicassoIV Grafikkarte frei verfgbar.")
 (set #noinfernoboard "\n\n\nMomentan untersttzt dieses Skript die Installation der Inferno Grafikkarte noch nicht.")

 (set #ask-MODEFILE1 "Welche Monitorfrequenzdatei whlen Sie fr die ") 
 (set #ask-MODEFILE2 "? Die khz Angabe sollte die maximale khz Angabe fr ihren Bildschirm nicht berschreiten!")
 (set #15KHZ "15khz maximum") (set #31KHZ "31khz maximum")
 (set #35KHZ "35khz maximum") (set #38KHZ "38khz maximum")
 (set #48KHZ "48khz maximum") (set #57KHZ "57khz maximum")
 (set #64KHZ "64khz maximum") (set #80KHZ "80khz maximum")

 (set #yes "Ja")
 (set #no "Nein")
 (set #followingenv "\n\n\n\nDer folgende Abschnitt setzt die Umgebungsvariablen fr CyberGraphX V4.")
 (set #whatboard-tt "\n\n\n\nDie folgenden Piktogrammmerkmale werden gesetzt fr die:\n\n")

 (set #usesemaphores (cat "USESEMAPHORES\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Benutzt Semaphoren um das Unterbrechen des Multitaskings bei bestimmten Bedingungen "
                         "zu vermeiden. Die Aktivierung dieser Option knnte zu Systemhngern unter gewissen "
                         "Voraussetzungen fhren, ist aber im Ganzen Multitaskingfreundlicher als die Standardmethode."
             )
 )
 (set #superlayers (cat "SUPERLAYERS\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                       "Neuer, schnellerer Layers Ersatz. Dadurch werden Fensteroperationen beschleunigt. "
                       "Vor allem, wenn viele Fenster benutzt werden."
             )
 )

 (set #cpup2c (cat "CPUP2C\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                  "Wenn Sie diese Variable setzen, wird die Planar-nach-Chunky Konvertierung "
                  "von der CPU erledigt (im Gegensatz zur Blitter-Konvertierung) "
                  "Damit sind die teilweise merkwrdig aussehenden "planar" Bliteffekte verschwunden, "
                  "aber die CPU-Konvertierung ist langsamer. Wollen Sie diese Mglichkeit aktivieren ?"
             )
 )

 (set #hirescrsr (cat "HIRESCRSR\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Wenn diese Variable aktiviert ist, werden Lores-Sprites auf nicht-AGA-Gerten "
                     "zu Hires-sprites (Sie werden nicht mehr von der CyberGraphX Software "
                     "verdoppelt). "
                )
 )

 (set #hide15bit (cat "HIDE15BIT\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Wenn diese Variable aktiviert ist, werden die 15Bit Modi deaktiviert, um "
                     "die Screenmodeliste zu verkuerzen. Die Modes sind immer noch da, aber nicht sichtbar."
                )
 )

 (set #alertemu  (cat "ALERTEMU\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Ist diese Variable aktiviert, wird DisplayAlert(), (Die Routine, die eine Guru-Box erzeugt.) "
                     "auf einen CyberGraphX Bildschirm umgeleitet."
                )
 )

 (set #planes2  (cat "PLANES2FAST\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Ist diese Option aktiv, werden nicht darzustellende "
                     "planare BitMaps im FastRAM angelegt. Diese Option "
                     "beschleunigt die Bearbeitung von planaren BitMaps, aber "
                     "kann zu Problemen mit Amiga Originalgrafik fhren, wenn "
                     "diese davon ausgeht, dass planare BitMaps im ChipRAM liegen. "
                     "Seien Sie vorsichtig mit der Aktivierung dieser Option."
               )
 )

 (set #keepamiga (cat "KEEPAMIGAVIDEO\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Ist diese Option nicht aktiv, wird jedesmal, wenn "
                     "ein CyberGraphX Bildschirm nach vorne kommt, die Amiga Bildschirm "
                     "DMA abgeschaltet, um den Zugriff auf das ChipMemory zu beschleunigen. "
                )
 )

 (set #savemem   (cat "SAVEMEM\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Wenn diese Option aktiv ist, verbraucht CyberGraphX weniger Speicher in kleiner oder gleich "
                     "16 Farben, weil im Fast RAM Speicher ein planares Abbild des Videospeichers gehalten wird "
                     "und im Videospeicher ein Chunky Abbild."
                )
 )



 (set #bootlogo  (cat "BOOTLOGO\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Ist diese Option inaktiv (auf '0' gesetzt), wird das CyberGraphX Startlogo "
                     "nicht angezeigt whrend eines Neustarts des Rechners."
                )
 )


 (set #passthrough   (cat "PASSTHROUGH\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                    "Wenn diese Option deaktiviert ist, wird der Monitorumschalter "
                    "auf der jeweiligen Karte deaktiviert. "
                    "Diese Option ist fr Mehr-Monitor Systeme erforderlich. "
                )
 )


 (set #memclock  (cat "MEMCLOCK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Damit wird die Geschwindigkeit in MHz fr den"
                     "Grafikkartenspeicher eingestellt. Standard ist:" 
                ) 
 )

 (set #scrollmask (cat "SCROLLMASK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Aktiviert Maskierung beim Verschieben/Scrollen von Rechtecken mit "
                      "einer Maske in 256 Farben. Ist dieses Merkmal auf 'NO' gesetzt "
                      "wird das Scrollen in einem Shell Fenster geringfgig schneller, "
                      "es kann aber bei bestimmten Programmen (wie CED) auch zu Refresh"
	              " Problemen kommen."
                 )
 )
 (set #dragging  (cat "DRAGGING\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "Mit diesem Merkmal ist es mglich, zwischen schnellem Bildschirmumschalten "
                     "oder herunterziehbaren Bildschirmen zu whlen. Welche Variante besser ist, "
                     "hngt ganz vom persnlichen Geschmack des Benutzers ab. Als Vorgabe sind "
		     "Bildschirme immer ziehbar (insofern der Kartentreiber es untersttzt)."
                )
 )

 ;*********** NEW Strings:  Wednesday 03-Sep-97 *************************
 (set #nobackup "\n\nDieses Installationsskript fhrt eine Erstinstallation von CyberGraphX V4 durch. Bevor Sie weitermachen, sollten Sie das evtl. vorhandene alte System mit dem entsprechend dafr vorgesehenen Programm sichern. Verwenden Sie dann das Programm zum Entfernen der alten RTG Systemsoftware. Wenn dieses Programm nicht vorhanden ist, so mssen Sie das manuell erledigen.\n\nSie mssen es auf jeden Fall tun, bevor sie mit dieser Installation fortfahren.")
 (set #whatboot "\nWelches StartupLogo wollen Sie installieren ?\n")
 (set #bootdefault "CyberGraphX - Standard")
 (set #bootppc "Light My Fire - PPC")
 (set #bootnone "Nichts kopieren - bereits installiert")


 ;*********** NEW English Strings:  Wednesday 22-Oct-97 *************************
 (set #nopassthrough (cat "NOPASSTHROUGH\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Wenn diese Option aktiv ist, werden die Monitorumschalter aller "
                         "CyberGraphX Grafikkarten deaktiviert. Bei Mehrmonitorbetrieb wird "
                         "diese Option bentigt. Sie ist standardmig inaktiv. "
                         "Wenn NOPASSTHROUGH=0 (Nein) kann der ToolType PASSTHROUGH in den Monitortreibern verwendet werden. Wenn NOPASSTHROUGH=1 (Ja), ist der Tooltype PASSTHROUGH berbrckt!"
                    )
 )

 (set #supergels     (cat "SUPERGELS\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Ein Ersatz fr den originalen CyberGraphX GELs Systempatch. GELs = "
                         "Graphic ELementS, das betrifft sogenannte BOBs und erhht die Geschwindigkeit "
                         "bei Operationen wie dem Verschieben von Piktogrammen oder DOpus Drag&Drop. Standardmig "
                         "ist diese Option nicht aktiv (Nein)."

                     )
 )

 ;*********** NEW Strings:  Monday 01-Dec-97 *************************
 (set #noaga "\n\n\nEntweder untersttzt das Installationsskript nicht vollstndig den AGA Chipsatz oder der Treiber ist nicht verfgbar. Bitte schauen Sie unter http://www.vgr.com fr weitere Informationen.")
 (set #CGXModeNot4AGA " CGXMode - Nicht verwendbar fr den AGA Treiber!")
 (set #noenvaga "\n\nDie folgenden Variablen, die gesetzt werden, werden nur von _Grafikkarten_ verwendet. Sie werden NICHT vom AGA-PPC Treiber benutzt.")
 (set #multimediamem (cat "MULTIMEDIAMEM\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                          "Wenn MULTIMEDIAMEM=YES, reserviert CGX3 1MB Grafikspeicher der CV64/3D fr 3D Texturen & Video Overlays. "
                          "Wenn NO, verhlt sich die CV64/3D wie eine andere Karte, die diese Mglichkeiten nicht besitzt, wie z.B. die PicassoII."
                          "Sie erhalten dann volle 4MB Grafikspeicher fr Bildschirme mit ZorroIII Gerten (3.5MB bei ZorroII). "
                          "MULTIMEDIAMEM ist standardmig auf YES gesetzt (womit 3MB des Grafikspeichers fr Bildschirme genutzt werden)."
                     )
 )
 (set #blackborder   (cat "BLACKBORDER\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                          "Das Setzen des Merkmals 'BLACKBORDER=YES' fhrt dazu, da der Rahmen um "
                          "den Bildschirm schwarz dargestellt wird. Die RetinaBLT Z3 benutzt sonst immer Farbe 0, "
                          "wogegen andere Karten meist immer schwarz verwenden. Standardeinstellung ist 'BLACKBORDER=NO'."
                     )
 )
 (set #noboard "\nEine (der) Karte(n) oder Chipstze, die Sie ausgewhlt haben, wird momentan nicht untersttzt.\n\nBitte schauen Sie im Internet unter http://www.vgr.com nach einem Update oder warten Sie auf das nchste CyberGraphX Archiv.\n\nDie Karte mit dem fehlenden Treiber war:\n") 

 ;*********** NEW German Strings:  Wednesday 21-Jan-98 **********************
 (set #updatep4flash "\nUm CyberGraphX3 mit der PicassoIV zu benutzen, sollten sie auf jeden Fall die Version 2.0 oder grer des PicassoIV FlashROMs installieren.\n\nDas Installationsskript entdeckte eine ltere Version.\n\nFr weitere Informationen und eine neuere FlashROM Version kontaktieren Sie bitte:\nIhren Hndler\nVillageTronic\ndie VillageTronic WWW Seite\n")

;*********** NEW German Strings:  Wednesday 11-Mar-98 **********************
 (set #noppc1 "\n\nSie haben die PPC Option fr Ihren Rechner gewhlt. Das Installationsskript hat die Datei 'libs:PPC.library' nicht gefunden.\n\nCyberGraphX arbeitet dann mglicherweise nicht richtig.\n\n Wollen Sie diese Option rckgngig machen ?")
 (set #noppcaga "\nSie haben die 'AGA (nur PPC)' Option bei der Auswahl der Grafikkarte fr CyberGraphX ausgewhlt. Das Installationsskript hat die Datei 'libs:ppc.library' nicht gefunden.\n\n Der CGXAGA Treiber bentigt eine phase5 PPC Karte, um zu funktionieren.\n\nWollen Sie die Installation abbrechen ?.")
 (set #agaquit "\nCyberGraphX Installation/Erneuerung endet.")

;*********** NEW German Strings:  Thursday 22-Oct-98 08:34:55 **********************
 (set #By (cat "\n\nCyberGraphX\n\nRelease Version " #cyberver "\n\n\n\n"
              "1998 by:\n\nVision Factory Development"          
          )
 )

 (set #guide " CGX Dokumentation - AmigaGuide Datei")
 (set #commy " CyberGraphX - Einstellungsprogramm")
 (set #wheredocs "Wohin wollen Sie CGX AmigaGuide Datei kopieren ?")
 (set #wherecomm "Wohin wollen Sie das CGX Commodity installieren ?")
 (set #useroxxler    (cat "USEROXXLER\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Mit der Vorgabe von 'USEROXXLER=YES' wird die specielle planar nach chunky Hardware der CV64 benutzt, um "
                         "planar Daten in das chunky Format zu konvertieren, _sowohl_ im Fast memory Speicher als auch im Videospeicher."
                    )
 )
 (set #bitmapcache   (cat "BITMAPCACHE\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Das Setzen von 'BITMAPCACHE=YES' aktiviert die Pufferung von Bitmapdaten im Videospeicher, womit z.B. schnelleres "
                         "Fenster vergrern/verkleinern ermglicht wird fr smart refresh Fenster."
                    )
 )
 (set #packed24      (cat "PACKED24\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Wenn 'PACKED24=YES' gesetzt ist, wird der Packed Pixel 24Bit Modus "
                         "fr 24Bit Auflsungen aktiviert. Das ermglicht hhere Refreshraten und "
                         "bentigt weniger Speicher. Allerdings werden einige Beschleunigungsoptionen "
                         "dadurch etwas verlangsamt."
                    )
 )

 (set #wbpatspeedup  (cat "WBPATSPEEDUP\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Dieser Parameter aktiviert einen Patch fr die Beschleunigung von Standard WBPattern Hintergrnden. "
                          "Es ist als Vorgabe deaktiviert (No)."

                    )
 )

 (set #advancedclk  (cat "ADVANCEDCLK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                         "Ermglicht die 'bertaktung' der CV64/CV3D Karten, wenn Sie mit CGXModeV4 benutzt werden. "
                          "Vorgabe ist 'ADVANCEDCLK=NO'."

                    )
 )
 (set #needcd "\n\n\nBitte legen Sie die CyberGraphX V4 CDROM in das CDROM Laufwerk ein, um fortzufahren.")


)
)


;********************************************************************************
; French Strings by: Gregory Eycken <geycken@geocities.com>
;********************************************************************************
(if (= @language "franais")
(
 (set #askzorro "\nSur quel type d'ordinateur CyberGraphX V4 va-t-il tre install?\n")
 (set #askcpu "\nQuel est le processeur de l'ordinateur sur lequel vous voulez installer CyberGraphX V4? L'installeur a trouv :\n")
 (set #wherelibs "O dsirez-vous installer les bibliothques de CyberGraphX V4? Par dfaut, c'est 'SYS:Libs'.")
 (set #whatboard (cat "\nVeuillez slectionner la carte graphique dont vous voulez installer le fichier moniteur :\n"))
 (set #todo-prompt "\nDsirez-vous installer :\n")
 (set #cgxmode-todo " CGXMode - Crer et modifier les modes d'cran")
 (set #wheremode "O dsirez-vous installer le programme CGXMode?")
 (set #whereshowcgxconfig "O dsirez-vous installer le programme ShowCGXconfig?")
 (set #showcgxconfig " ShowCGXconfig - Programme d'informations CyberGraphX")

 ;***** New Strings for Aug-11-97
 (set #nocvppcboard "\n\n\nIl n'y a actuellement pas de fichier moniteur pour la carte graphique CyberVisionPPC.")
 (set #noretinaboard "\n\n\nIl n'y a actuellement pas de fichier moniteur pour la carte graphique Retina BLT Z3.")
 (set #nopicasso4board "\n\n\nIl n'y a actuellement pas de fichier moniteur pour la carte graphique Picasso IV.")
 (set #noinfernoboard "\n\n\nLe script d'installation n'a pas conu pour supporter entirement l'Inferno.") 

 (set #ask-MODEFILE1 "Quel fichier de modes dsirez-vous installer pour la ") 
 (set #ask-MODEFILE2 "?\nLe nombre de kHz ne devrait pas dpasser la limite maximale de votre moniteur!")
 (set #none "Aucun")
 (set #15KHZ "15kHz maximum") (set #31KHZ "31kHz maximum")
 (set #35KHZ "35kHz maximum") (set #38KHZ "38kHz maximum")
 (set #48KHZ "48kHz maximum") (set #57KHZ "57kHz maximum")
 (set #64KHZ "64kHz maximum") (set #80KHZ "80kHz maximum")

 (set #yes "Oui")
 (set #no "Non")
 (set #followingenv "\n\n\n\nLa partie suivante de l'installation va configurer les variables d'environnement pour CyberGraphX V4.")
 (set #whatboard-tt "\n\n\n\nLa partie suivante de l'installation va configurer les ToolTypes du fichier moniteur de la\n")

 (set #usesemaphores (cat "USESEMAPHORES\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                          "Si cette option est active ('Oui'), cela peut amener  des "
                          "gels du systme dans certaines conditions, mais c'est en "
                          "gnral plus respectueux envers le systme ('system friendly').\n"
                          "En effet, l'utilisation de smaphores peut empcher le multitche "
                          "d'tre dsactiv dans certains cas."
              )
 )
 (set #superlayers (cat "SUPERLAYERS\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                        "Nouveau remplacement des layers.\n"
                        "Si 'Oui', les layers seront plus rapides, spcialement "
                        "lors de l'utilisation de plusieurs fentres. "
                   )
 )
 (set #cpup2c (cat "CPUP2C\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                   "Si 'Oui', la conversion 'planar-to-chunky' sera effectue par le "
                   "processeur au lieu de l'tre par le blitter. "
                   "Les affreux effets blitting 'planar' auront disparus mais "
                   "la conversion sera plus lente."
              )
 )
 (set #hirescrsr (cat "HIRESCRSR\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Si 'Oui', les sprites 'basse rsolution' sur les ordinateurs "
                      "non-AGA deviendront des sprites 'haute rsolution' (ils ne seront "
                      "ainsi plus doubls par la couche logicielle CyberGraphX)."
                 )
 )
 (set #hide15bit (cat "HIDE15BIT\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Si 'Oui', les modes '15 bits' ne seront pas affichs dans la "
                      "liste des modes d'cran, afin de rduire la longueur de la liste. "
                      "Les modes restent disponibles mais cachs."
                 )
 )
 (set #alertemu  (cat "ALERTEMU\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Si 'Oui', les crans ouverts par la fonction DisplayAlert(), "
                      "fonction qui averti des plantages du systme, seront placs "
                      "sur des crans CyberGraphX."
                 )
 )
 (set #planes2  (cat "PLANES2FAST\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Si 'Oui', les graphiques 'planar' non-affichables seront placs "
                      "en autre mmoire (Fast).\nCette option acclre le traitement "
                      "des graphiques 'planar' mais peut conduire  certains problmes "
                      "avec les graphiques Amiga qui insistent pour tre placs en "
                      "mmoire graphique (Chip).\nUtilisez cette option avec prudence!"
                 )
 )
 (set #keepamiga (cat "KEEPAMIGAVIDEO\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Si 'Non', chaque fois qu'un cran CyberGraphX sera activ, "
                      "le DMA de l'affichage Amiga sera suspendu afin d'acclrer "
                      "l'accs  la mmoire graphique (Chip)."
                 )
 )
 (set #savemem   (cat "SAVEMEM\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Si 'Oui', CyberGraphX diminuera l'utilisation de mmoire si le "
                      "mode est en 16 couleurs ou moins.\nCyberGraphX gardera alors une "
                      "reprsentation 'planar' de l'cran en autre mmoire (Fast) et une "
                      "reprsentation 'chunky' en mmoire vido (sur la carte graphique)."
                 )
 )

 (set #bootlogo  (cat "BOOTLOGO\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Si 'Non', aucun logo ne sera affich via cette carte lors de "
                      "l'initialisation."
                 )
 )
 (set #passthrough (cat "PASSTHROUGH\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                        "Si 'Non', l'interrupteur pour moniteur de cette carte est "
                        "dsactiv. Cette option est requise pour les systmes  "
                        "plusieurs moniteurs."
                 )
 )
 (set #memclock  (cat "MEMCLOCK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Veuillez entrer la vitesse d'horloge en MHz de la mmoire vido "
                      "(celle se trouvant sur la carte graphique). Par dfaut, c'est:" 
                 ) 
 )
 (set #scrollmask (cat "SCROLLMASK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                       "Si 'Oui', le masquage est activ lors du dfilement/dplacement "
                       "de rectangles avec un masque dans les modes de 256 couleurs. "
                       "Choisir 'Non' rendra le dfilement du texte plus fluide dans un "
                       "Shell mais pourra aussi produire des erreurs de rafrachissement "
                       "du texte dans des programmes comme CygnusEd."
                  )
 )
 (set #dragging  (cat "DRAGGING\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                      "Si 'Non', plusieurs crans seront gards en mmoire vido "
                      "(sur la carte graphique), rendant le changement d'cran trs rapide. "
                      "Malheuresement, la fonction de glissement d'crans (screen dragging) "
                      "sera perdue.\nDsirez-vous garder la fonction de glissement d'crans "
                      "comme les crans Amiga vous le permettent?"
                 )
 )

 ;*********** New Strings for Wednesday 03-Sep-97 *************************
 (set #nobackup "\n\nCe script d'installation va installer CyberGraphX V4 pour la premire fois.\n\nAvant de poursuivre, si vous utilisez un autre systme RTG, faites un archivage puis une dinstallation  l'aide des utilitaires fournis avec cet autre systme. Si ce systme ne contient pas d'utilitaires, enlevez les fichiers manuellement.\n\n")
 (set #whatboot "\nQuel logo dsirez-vous afficher durant l'initialisation?\n")
 (set #bootdefault "CyberGraphX - Par dfaut")
 (set #bootppc "Light My Fire - Pour les PowerPC")
 (set #bootnone "Ne rien copier - Le logo est dj install")

 ;*********** New Strings for Wednesday 22-Oct-97 *************************
 (set #nopassthrough (cat "NOPASSTHROUGH\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                          "CECI EST UNE OPTION GENERALE.\nSi 'Oui', l'interrupteur pour moniteur "
                          "de toutes les cartes gres par CyberGraphX sera dsactiv. "
                          "Cette option est requise pour les systmes  plusieurs moniteurs. "
                          "Par dfaut, c'est 'Non'.\n"
                          "Attention! Si 'Non', alors le ToolType PASSTHROUGH pourra tre utilis. "
                          "Si 'Oui', alors le ToolType PASSTHROUGH ne pourra pas tre utilis!"
                     )
 )

 (set #supergels     (cat "SUPERGELS\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                          "Si 'Oui', le systme de GELs original de CyberGraphX sera remplac "
                          "(GELs = Graphic ELementS, lments graphiques). Par dfaut, c'est 'Non'.\n"
                          "Les SUPERGELS incluent des nouveauts comme les objets et les effets blitter, "
                          "et l'acclration de choses comme le dplacement d'icnes ou le 'prendre et "
                          "lcher' (drag'n'drop) de DOpus. "
                          "Il permet aussi un glissement superimpos en Hi/TrueColor."
                     )
 )

)
)

;********************************************************************************
; Start Update
;********************************************************************************
;**CD CHECK**
;(askdisk (dest "CyberGraphX_4") (prompt #needcd) (help #needcd) )
;(message #by)
;(message #nobackup)
*********

;*******************************************************************
;  What board to update
;*******************************************************************
(set BGuess 0)

(if (> (exists ("devs:monitors/CVisionPPC")) 0) (set BGuess (+ BGuess 1)) )
(if (> (exists ("devs:monitors/CVision3D")) 0)  (set BGuess (+ BGuess 2)) )
(if (> (exists ("devs:monitors/CVision64")) 0)  (set BGuess (+ BGuess 4)) )
(if (> (exists ("devs:monitors/PicassoII")) 0)  (set BGuess (+ BGuess 8)) )
(if (> (exists ("devs:monitors/Spectrum")) 0)   (set BGuess (+ BGuess 16)) )
(if (> (exists ("devs:monitors/Piccolo")) 0)    (set BGuess (+ BGuess 32)) )
(if (> (exists ("devs:monitors/PiccoSD64")) 0)  (set BGuess (+ BGuess 64)) )
(if (> (exists ("devs:monitors/Inferno")) 0)    (set BGuess (+ BGuess 128)) )
(if (> (exists ("devs:monitors/PicassoIV")) 0)  (set BGuess (+ BGuess 256)) )
(if (> (exists ("devs:monitors/RetinaZ3")) 0)   (set BGuess (+ BGuess 512)) )
;;(if (> (exists ("devs:monitors/CGXAGA")) 0)     (set BGuess (+ BGuess 1024)) )
;;(if (> (exists ("devs:monitors/A2410")) 0)      (set BGuess (+ BGuess 2048)) )

  (set board (askoptions (choices  " CyberVisionPPC" " CyberVision64/3D" " CyberVision64" " PicassoII(+)" " Spectrum"
                                   " Piccolo" " Piccolo SD64" " Inferno" " Picasso IV" " Retina BLT Z3"  ;; " AGA (PPC Only)" " A2410"
                          (prompt #whatboard)
	                  (help #whatboard)
                          (default BGuess)
                         )
             )     
  )


(if (AND (= (exists (tackon cgx_root (tackon "TIDrivers" "CVisionPPC"))) 0)   (IN board 0) ) (abort (cat #noboard "CVisionPPC")) )
(if (AND (= (exists (tackon cgx_root (tackon "S3Drivers" "CVision3D.Z3"))) 0) (IN board 1) ) (abort (cat #noboard "CVision3D")) )
(if (AND (= (exists (tackon cgx_root (tackon "S3Drivers" "CVision64"))) 0)    (IN board 2) ) (abort (cat #noboard "CVision64")) )
(if (AND (= (exists (tackon cgx_root (tackon "CLDrivers" "PicassoII"))) 0)    (IN board 3) ) (abort (cat #noboard "PicassoII")) )
(if (AND (= (exists (tackon cgx_root (tackon "CLDrivers" "Spectrum"))) 0)     (IN board 4) ) (abort (cat #noboard "Spectrum")) )
(if (AND (= (exists (tackon cgx_root (tackon "CLDrivers" "Piccolo"))) 0)      (IN board 5) ) (abort (cat #noboard "Piccolo")) )
(if (AND (= (exists (tackon cgx_root (tackon "CLDrivers" "PiccoSD64"))) 0)    (IN board 6) ) (abort (cat #noboard "PiccoSD64")) )
(if (AND (= (exists (tackon cgx_root (tackon "CLDrivers" "Inferno"))) 0)      (IN board 7) ) (abort (cat #noboard "Inferno")) )
(if (AND (= (exists (tackon cgx_root (tackon "CLDrivers" "PicassoIV"))) 0)    (IN board 8) ) (abort (cat #noboard "PicassoIV")) )
(if (AND (= (exists (tackon cgx_root (tackon "SLDrivers" "RetinaZ3"))) 0)     (IN board 9) ) (abort (cat #noboard "RetinaZ3")) )
;;(if (AND (= (exists (tackon "AADrivers" "CGXAGA")) 0)       (IN board 10) ) (abort (cat #noboard "CGXAGA")) )
;;(if (AND (= (exists (tackon "TIDrivers" "A2410")) 0)        (IN board 11) ) (abort (cat #noboard "A2410")) )

(if (IN board 10) (set AGA 1) (set AGA 0))

;********************************************************************
; Double Check on the CPU
;********************************************************************
(procedure askaboutcpu

(set cpu (database "cpu"))
(if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 0))
(if (= cpu 68020) (set #cpu 0)) (if (= cpu 68030) (set #cpu 0))
(if (= cpu 68040) (set #cpu 1)) (if (= cpu 68060) (set #cpu 1)) 
(if (= @installer-version 0)
  (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 1) )
  (if (= cpu 68060) (set #cpu 1))
)
;; (if (> (exists ("libs:PPC.library")) 0) (set #cpu 2) )

(set cpuPick (askchoice (choices "68020 or 68030" "68040 or 68060" )  ;; "PPC with 68040 or 68060")
			(prompt #askcpu)
	                (help   #askcpu)
          		(default #cpu)
	  )
)

(if (= cpuPick 0) ((set cpuadd ".020") (set cpuadd-1 ".020")) )
(if (= cpuPick 1) ((set cpuadd ".040") (set cpuadd-1 ".040")) )
;; (if (= cpuPick 2) ((set cpuadd ".040") (set cpuadd-1 ".ppc")) )

); END askaboutcpu

(askaboutcpu)

;*******************************************************************
; Check on PPC
;*******************************************************************
;(set redocpu 0)
;(if (AND (= (exists ("libs:PPC.library")) 0) (= cpuPick 2)) 
; (set redocpu     (askbool (prompt #noppc1)
;			   (help   #noppc1)
; 		          
;	          )
; )
;)

;(if (= redocpu 1) (askaboutcpu))

;(set agaquit 0)
;(if (AND (= (exists ("libs:PPC.library")) 0) (IN board 10)) 
; (set agaquit     (askbool (prompt #noppcaga)
;			   (help   #noppcaga)
; 		          
;	          )
; )
;)

;(if (= agaquit 1) (abort #agaquit))
 
;*******************************************************************
;  ASK where cybergfx libs are
;*******************************************************************
(set wherelibs   (askdir (prompt #wherelibs)
			 (help   #wherelibs)
 		         (default "SYS:Libs")
		 )
)

;*******************************************************************
;  Copy libs if there
;*******************************************************************
(if (exists (tackon cgx_root (tackon "cgxsystemlib" (cat "cgxsystem.library" cpuadd-1))) )
  (copyfiles (source (tackon cgx_root (tackon "cgxsystemlib" (cat "cgxsystem.library" cpuadd-1)))) (dest wherelibs) (newname "cgxsystem.library") (optional "nofail") ) 
)

(if (exists (tackon cgx_root (tackon "cgxmpeglib" (cat "cgxmpeg.library" cpuadd))) )
  (copyfiles (source (tackon cgx_root (tackon "cgxmpeglib" (cat "cgxmpeg.library" cpuadd)))) (dest wherelibs) (newname "cgxmpeg.library") (optional "nofail") ) 
)

;(if (exists (tackon "cgxbootpiclib" (cat "cgxbootpic.library" cpuadd)) )
;  (copyfiles (source (tackon "cgxbootpiclib" (cat "cgxbootpic.library" cpuadd))) (dest wherelibs) (newname "cgxbootpic.library") (optional "nofail") ) 
;)

;*******************************************************************
;  Ask What bootlogo....
;*******************************************************************
(if (> (exists ("c:multiview")) 0)  ((set #mpath "c:") (set mfound 1)) )
(if (> (exists ("sys:Utilities/multiview")) 0) ((set #mpath "sys:Utilities") (set mfound 1)) )
(if (= mfound 1) (run (cat "run " (tackon #mpath "multiview ") (tackon cgx_root "cgxbootpiclib/bootlogos.iff"))) )

(if (exists "libs:cgxbootpic.library") (set whatboot 1))
(set whatboot  (askchoice
               (choices #bootdefault #bootnone)
               (prompt #whatboot)
               (help   #whatboot)
               (default whatboot)
              )
)

(if (AND (exists (tackon cgx_root "cgxbootpiclib/cgxbootpic.library")) (= whatboot 0))
  (copyfiles (source (tackon cgx_root "cgxbootpiclib/cgxbootpic.library")) (dest wherelibs) (optional "nofail") ) 
)

;(if (AND (exists "cgxbootpiclib/cgxbootpic.library.ppc") (= whatboot 1))
;  (copyfiles (source "cgxbootpiclib/cgxbootpic.library.ppc") (dest wherelibs) (optional "nofail") (newname "cgxbootpic.library") ) 
;)

;*******************************************************************
;  Install monitor file and handle extra libs 
;*******************************************************************
  (if (AND (exists (tackon cgx_root (tackon "TIDrivers" "CVisionPPC"))) (IN board 0) )
   (if (= (exists (tackon "devs:monitors" "CVisionPPC.info")) 0)  
    (copyfiles (source (tackon cgx_root (tackon "TIDrivers" "CVisionPPC"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
    (copyfiles (source (tackon cgx_root (tackon "TIDrivers" "CVisionPPC"))) (dest "devs:monitors") (optional "nofail") ) 
   )
  )

  (if (IN board 1)
   (
     (set error (run (tackon cgx_root "tools/ChkCV3DZorro")))
     (if (= error 0) (set guessZ 1) (set guessZ 0) )
  
     (set pickZ (askchoice (choices "zorro2 - Amiga 2000/zorro2 Expansion Box" "zorro3 - Amiga 3000(T)/4000(T)")
	                   (prompt #askzorro)
	                   (help   #askzorro)
                           (default guessZ)
                )
     )
  
     (if (= pickZ 0) (set zadd ".Z2"))   (if (= pickZ 1) (set zadd ".Z3")) 

     (if (exists (tackon cgx_root (tackon "S3Drivers" (cat "CVision3D" zadd))))
      (if (= (exists (tackon "devs:monitors" "CVision3D.info")) 0)      
       (copyfiles (source (tackon cgx_root (tackon "S3Drivers" (cat "CVision3D" zadd)))) (dest "devs:monitors") (newname "CVision3D") (infos) (optional "nofail") ) 
       (copyfiles (source (tackon cgx_root (tackon "S3Drivers" (cat "CVision3D" zadd)))) (dest "devs:monitors") (newname "CVision3D") (optional "nofail") ) 
      )      
     )

     (if (exists (tackon cgx_root (tackon "cgxvideolib" (cat "cgxvideo.library" cpuadd))) )
       (copyfiles (source (tackon cgx_root (tackon "cgxvideolib" (cat "cgxvideo.library" cpuadd)))) (dest wherelibs) (newname "cgxvideo.library") (optional "nofail") ) 
     )

     (if (exists (tackon cgx_root (tackon "cgx3dvirgelib" (cat "cgx3dvirgin.library" ""))) )
       (copyfiles (source (tackon cgx_root (tackon "cgx3dvirgelib" (cat "cgx3dvirgin.library" "")))) (dest wherelibs) (newname "cgx3dvirgin.library") (optional "nofail") ) 
     )

   )
  )


  (if (AND (exists (tackon cgx_root (tackon "S3Drivers" "CVision64"))) (IN board 2) )
   (if (= (exists (tackon "devs:monitors" "CVision64.info")) 0)  
    (copyfiles (source (tackon cgx_root (tackon "S3Drivers" "CVision64"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
    (copyfiles (source (tackon cgx_root (tackon "S3Drivers" "CVision64"))) (dest "devs:monitors") (optional "nofail") ) 
   )
  )

  (if (AND (exists (tackon cgx_root (tackon "CLDrivers" "PicassoII"))) (IN board 3) )
   (if (= (exists (tackon "devs:monitors" "PicassoII.info")) 0)  
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "PicassoII"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "PicassoII"))) (dest "devs:monitors") (optional "nofail") ) 
   )
  )

  (if (AND (exists (tackon cgx_root (tackon "CLDrivers" "Spectrum"))) (IN board 4) )
   (if (= (exists (tackon "devs:monitors" "Spectrum.info")) 0)  
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "Spectrum"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "Spectrum"))) (dest "devs:monitors") (optional "nofail") ) 
   )
  )

  (if (AND (exists (tackon cgx_root (tackon "CLDrivers" "Piccolo"))) (IN board 5) )
   (if (= (exists (tackon "devs:monitors" "Piccolo.info")) 0)  
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "Piccolo"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "Piccolo"))) (dest "devs:monitors") (optional "nofail") ) 
   )
  )

  (if (AND (exists (tackon cgx_root (tackon "CLDrivers" "PiccoSD64"))) (IN board 6) )
   (if (= (exists (tackon "devs:monitors" "PiccoSD64.info")) 0)  
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "PiccoSD64"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "PiccoSD64"))) (dest "devs:monitors") (optional "nofail") ) 
   )
  )

  (if (AND (exists (tackon cgx_root (tackon "CLDrivers" "Inferno"))) (IN board 7) )
   (if (= (exists (tackon "devs:monitors" "Inferno.info")) 0)  
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "Inferno"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
    (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "Inferno"))) (dest "devs:monitors") (optional "nofail") ) 
   )
  )

  (if (AND (exists (tackon cgx_root (tackon "CLDrivers" "PicassoIV"))) (IN board 8) )
   (
    (set error1 (run (tackon cgx_root "tools/ChkPIVResource")))   ; 0 <2, 5 >=2
    (if (< error1 5) (message #updatep4flash))

    (if (= (exists (tackon "devs:monitors" "PicassoIV.info")) 0)  
     (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "PicassoIV"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
     (copyfiles (source (tackon cgx_root (tackon "CLDrivers" "PicassoIV"))) (dest "devs:monitors") (optional "nofail") ) 
    )
   )
  )

  (if (AND (exists (tackon cgx_root (tackon "SLDrivers" "RetinaZ3"))) (IN board 9) )
   (if (= (exists (tackon "devs:monitors" "RetinaZ3.info")) 0)  
    (copyfiles (source (tackon cgx_root (tackon "SLDrivers" "RetinaZ3"))) (dest "devs:monitors") (infos) (optional "nofail") ) 
    (copyfiles (source (tackon cgx_root (tackon "SLDrivers" "RetinaZ3"))) (dest "devs:monitors") (optional "nofail") ) 
   )
  )

  ;(if (AND (exists (tackon "AADrivers" "CGXAGA")) (IN board 10) )
  ; (if (= (exists (tackon "devs:monitors" "CGXAGA.info")) 0)  
  ;  (copyfiles (source (tackon "AADrivers" "CGXAGA")) (dest "devs:monitors") (infos) (optional "nofail") ) 
  ;  (copyfiles (source (tackon "AADrivers" "CGXAGA")) (dest "devs:monitors") (optional "nofail") ) 
  ; )
  ;)

  ;(if (AND (exists (tackon "TIDrivers" "A2410")) (IN board 11) )
  ; (if (= (exists (tackon "devs:monitors" "A2410.info")) 0)  
  ;  (copyfiles (source (tackon "TIDrivers" "A2410")) (dest "devs:monitors") (infos) (optional "nofail") ) 
  ;  (copyfiles (source (tackon "TIDrivers" "A2410")) (dest "devs:monitors") (optional "nofail") ) 
  ; )
  ;)



;*********************************************************************************
; Setup Monitor Config File Setup
;*********************************************************************************
(set modefile 0)
(procedure askconfigfile
  (set modefile (askchoice
                 (choices "None/Skip" #31KHZ #35KHZ #38KHZ #48KHZ #57KHZ #64KHZ #80KHZ)
                 (prompt (cat #ask-MODEFILE1 boardname #ask-MODEFILE2))
                 (help   (cat #ask-MODEFILE1 boardname #ask-MODEFILE2))
                 (default modefile)
                )
  )

  (if (> modefile 0)
   (
    (if (< (exists "env:CyberGraphX") 2) (makedir "env:CyberGraphX") )    
    (if (< (exists "envarc:CyberGraphX") 2) (makedir "envarc:CyberGraphX") )    

    (if (= modefile 1) (set mode "Monitor-31khz")) (if (= modefile 2) (set mode "Monitor-35khz")) 
    (if (= modefile 3) (set mode "Monitor-38khz")) (if (= modefile 4) (set mode "Monitor-48khz")) 
    (if (= modefile 5) (set mode "Monitor-57khz")) (if (= modefile 6) (set mode "Monitor-64khz")) 
    (if (= modefile 7) (set mode "Monitor-80khz")) 

    (if (< (exists "sys:prefs") 2) (makedir "sys:prefs") )  
    (if (< (exists "sys:prefs/presets") 2) (makedir "sys:prefs/presets") )  
    (if (< (exists "sys:prefs/presets/monitors") 2) (makedir "sys:prefs/presets/monitors") )    
    (copyfiles (source (tackon cgx_root (cat "prefs/presets/monitors/" mode)))  (dest "sys:prefs/presets/monitors")) 

    (run (cat "setenv CyberGraphX/" boardname "Monitor " mode))
    (copyfiles (source (cat "env:CyberGraphX/" boardname "Monitor"))  (dest "envarc:CyberGraphX") )
   )
  )
)

(if (IN board 0) ( (set boardname "CVisionPPC") (askconfigfile))) (if (IN board 1) ( (set boardname "CVision3D")  (askconfigfile)))
(if (IN board 2) ( (set boardname "CVision64")  (askconfigfile))) (if (IN board 3) ( (set boardname "PicassoII")  (askconfigfile)))
(if (IN board 4) ( (set boardname "Spectrum")   (askconfigfile))) (if (IN board 5) ( (set boardname "Piccolo")  (askconfigfile)))
(if (IN board 6) ( (set boardname "PiccoSD64")  (askconfigfile))) (if (IN board 7) ( (set boardname "Inferno")  (askconfigfile)))
(if (IN board 8) ( (set boardname "PicassoIV")  (askconfigfile))) (if (IN board 9) ( (set boardname "RetinaZ3")  (askconfigfile)))

;********************************************************************************
; Save the env vars...
;********************************************************************************
(procedure Save_Env
 (if (< (exists "env:CyberGraphX") 2) (makedir "env:CyberGraphX") )    
 (if (< (exists "envarc:CyberGraphX") 2) (makedir "envarc:CyberGraphX") )    

 (if (= usesemaphores 0) ( (delete "env:CyberGraphX/USESEMAPHORES") (delete "envarc:CyberGraphX/USESEMAPHORES") ) )
 (if (= usesemaphores 1) ( (run "setenv CyberGraphX/USESEMAPHORES 1") (copyfiles (source "ENV:CyberGraphX/USESEMAPHORES") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= superlayers 0) ( (delete "env:CyberGraphX/SUPERLAYERS") (delete "envarc:CyberGraphX/SUPERLAYERS") ) )
 (if (= superlayers 1) ( (run "setenv CyberGraphX/SUPERLAYERS 1") (copyfiles (source "ENV:CyberGraphX/SUPERLAYERS") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= cpup2c 0) ( (delete "env:CyberGraphX/CPUP2C") (delete "envarc:CyberGraphX/CPUP2C")  ) )
 (if (= cpup2c 1) ( (run "setenv CyberGraphX/CPUP2C 1") (copyfiles (source "ENV:CyberGraphX/CPUP2C") (dest "ENVARC:CyberGraphX") )  ) )

 (if (= HIRESCRSR 0) ( (delete "env:CyberGraphX/HIRESCRSR") (delete "envarc:CyberGraphX/HIRESCRSR") ) )
 (if (= HIRESCRSR 1) ( (run "setenv CyberGraphX/HIRESCRSR 1") (copyfiles (source "ENV:CyberGraphX/HIRESCRSR") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= HIDE15BIT 0) ( (delete "env:CyberGraphX/HIDE15BIT") (delete "envarc:CyberGraphX/HIDE15BIT") ) )
 (if (= HIDE15BIT 1) ( (run "setenv CyberGraphX/HIDE15BIT 1") (copyfiles (source "ENV:CyberGraphX/HIDE15BIT") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= ALERTEMU 0) ( (delete "env:CyberGraphX/ALERTEMU") (delete "envarc:CyberGraphX/ALERTEMU") ) )
 (if (= ALERTEMU 1) ( (run "setenv CyberGraphX/ALERTEMU 1") (copyfiles (source "ENV:CyberGraphX/ALERTEMU") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= PLANES2FAST 0) ( (delete "env:CyberGraphX/PLANES2FAST") (delete "envarc:CyberGraphX/PLANES2FAST") ) )
 (if (= PLANES2FAST 1) ( (run "setenv CyberGraphX/PLANES2FAST 1") (copyfiles (source "ENV:CyberGraphX/PLANES2FAST") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= KEEPAMIGAVIDEO 0) ( (delete "env:CyberGraphX/KEEPAMIGAVIDEO") (delete "envarc:CyberGraphX/KEEPAMIGAVIDEO") ) )
 (if (= KEEPAMIGAVIDEO 1) ( (run "setenv CyberGraphX/KEEPAMIGAVIDEO 1") (copyfiles (source "ENV:CyberGraphX/KEEPAMIGAVIDEO") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= SAVEMEM 0) ( (delete "env:CyberGraphX/SAVEMEM") (delete "envarc:CyberGraphX/SAVEMEM") ) )
 (if (= SAVEMEM 1) ( (run "setenv CyberGraphX/SAVEMEM 1") (copyfiles (source "ENV:CyberGraphX/SAVEMEM") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= NOPASSTHROUGH 0) ( (delete "env:CyberGraphX/NOPASSTHROUGH") (delete "envarc:CyberGraphX/NOPASSTHROUGH") ) )
 (if (= NOPASSTHROUGH 1) ( (run "setenv CyberGraphX/NOPASSTHROUGH 1") (copyfiles (source "ENV:CyberGraphX/NOPASSTHROUGH") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= SUPERGELS 0) ( (delete "env:CyberGraphX/SUPERGELS") (delete "envarc:CyberGraphX/SUPERGELS") ) )
 (if (= SUPERGELS 1) ( (run "setenv CyberGraphX/SUPERGELS 1") (copyfiles (source "ENV:CyberGraphX/SUPERGELS") (dest "ENVARC:CyberGraphX") ) ) )

 (if (= WBPATSPEEDUP 0) ( (delete "env:CyberGraphX/WBPATSPEEDUP") (delete "envarc:CyberGraphX/WBPATSPEEDUP") ) )
 (if (= WBPATSPEEDUP 1) ( (run "setenv CyberGraphX/WBPATSPEEDUP 1") (copyfiles (source "ENV:CyberGraphX/WBPATSPEEDUP") (dest "ENVARC:CyberGraphX") ) ) )


)

;********************************************************************************
; Find out whats in the env vars...
;********************************************************************************
(procedure Read_Env
 (set supergels 1) (set superlayers 0) (set usesemaphores 0)  
 (set hires 0)     (set cpup2c 0)      (set hide15bit 0)     (set alertemu 0)
 (set nochip 0)    (set nopass 0)      (set keepamiga 0)     (set planes2 0)
 (set bootlogo 0)  (set savemem 0)     (set wbpatspeedup 0)


 (if (> (exists ("env:CyberGraphX/USESEMAPHORES")) 0) (if (= 1 (getenv "CyberGraphX/USESEMAPHORES")) (set usesemaphores 1) ) )
 (if (> (exists ("env:CyberGraphX/SUPERLAYERS")) 0)   (if (= 1 (getenv "CyberGraphX/SUPERLAYERS")) (set superlayers 1) ) )
 (if (> (exists ("env:CyberGraphX/CPUP2C")) 0)        (if (= 1 (getenv "CyberGraphX/CPUP2C")) (set cpup2c 1) ) )
 (if (> (exists ("env:CyberGraphX/HIRESCRSR")) 0)     (if (= 1 (getenv "CyberGraphX/HIRESCRSR")) (set hires 1) ) )
 (if (> (exists ("env:CyberGraphX/HIDE15BIT")) 0)     (if (= 1 (getenv "CyberGraphX/HIDE15BIT")) (set hide15bit 1) ) )
 (if (> (exists ("env:CyberGraphX/ALERTEMU")) 0)      (if (= 1 (getenv "CyberGraphX/ALERTEMU")) (set alertemu 1) ) )
 (if (> (exists ("env:CyberGraphX/PLANES2FAST")) 0)   (if (= 1 (getenv "CyberGraphX/PLANES2FAST")) (set planes2 1) ) )
 (if (> (exists ("env:CyberGraphX/KEEPAMIGAVIDEO")) 0)(if (= 1 (getenv "CyberGraphX/KEEPAMIGAVIDEO")) (set keepamiga 1) ) )
 (if (> (exists ("env:CyberGraphX/SAVEMEM")) 0)       (if (= 1 (getenv "CyberGraphX/SAVEMEM")) (set savemem 1) ) )
 (if (> (exists ("env:CyberGraphX/NOPASSTHROUGH")) 0) (if (= 1 (getenv "CyberGraphX/NOPASSTHROUGH")) (set nopassthrough 1) ) )
 (if (> (exists ("env:CyberGraphX/SUPERGELS")) 0)     (if (= 1 (getenv "CyberGraphX/SUPERGELS")) (set supergels 1) ) )
 (if (> (exists ("env:CyberGraphX/WBPATSPEEDUP")) 0)  (if (= 1 (getenv "CyberGraphX/WBPATSPEEDUP")) (set supergels 1) ) )
)

(Read_Env)



;****************************************
; Long Env Set #1
;****************************************
(procedure SetEnvLong_1

 (set PLANES2FAST (askchoice    (choices #no #yes)
	                        (prompt (cat #planes2 " " #currset))
	                        (help   (cat #planes2 " " #currset))
                                (default planes2)
    	          )
 )

 (set USESEMAPHORES (askchoice (choices #no #yes)
	                       (prompt (cat #usesemaphores " " #currset))
	                       (help   (cat #usesemaphores " " #currset))
                               (default usesemaphores)
                    )
 )

 (set SUPERLAYERS (askchoice  (choices #no #yes)
	                      (prompt (cat #superlayers " " #currset))
	                      (help   (cat #superlayers " " #currset))
                              (default superlayers)
                  )
 )

 (set SUPERGELS    (askchoice   (choices #no #yes)
	                        (prompt (cat #supergels  " " #currset))
	                        (help   (cat #supergels  " " #currset))
                                (default supergels)
                   )
 )

)

;****************************************
; Long Env Set #2
;****************************************
(procedure SetEnvLong_2

(set CPUP2P   (askchoice     (choices #no #yes)
	                       (prompt (cat #cpup2c " " #currset))
	                       (help   (cat #cpup2c " " #currset))
          		       (default cpup2c)
	      )
)

(set HIRESCRSR (askchoice    (choices #no #yes)
	                       (prompt (cat #hirescrsr " " #currset))
	                       (help   (cat #hirescrsr " " #currset))
          		       (default hires)
	       )
)

(set HIDE15BIT (askchoice    (choices #no #yes)
	                       (prompt (cat #hide15bit " " #currset))
	                       (help   (cat #hide15bit " " #currset))
          		       (default hide15bit)
	       )
)

(set ALERTEMU  (askchoice    (choices #no #yes)
	                       (prompt (cat #alertemu " " #currset))
	                       (help   (cat #alertemu " " #currset))
          		       (default alertemu)
	       )
)

(set KEEPAMIGAVIDEO (askchoice    (choices #no #yes)
	                       (prompt (cat #keepamiga " " #currset))
	                       (help   (cat #keepamiga " " #currset))
          		       (default keepamiga)
	          )
)

(set SAVEMEM      (askchoice    (choices #no #yes)
	                       (prompt (cat #savemem  " " #currset))
	                       (help   (cat #savemem  " " #currset))
          		       (default savemem)
	          )
)

(if (IN board 0)
 (set nogo 0)
 (set NOPASSTHROUGH (askchoice   (choices #no #yes)
	                         (prompt (cat #nopassthrough  " " #currset))
	                         (help   (cat #nopassthrough  " " #currset))
          	                 (default nopassthrough)
	            )
 )
)


(set WBPATSPEEDUP (askchoice   (choices #no #yes)
	                       (prompt (cat #wbpatspeedup " " #currset))
	                       (help   (cat #wbpatspeedup " " #currset))
          		       (default wbpatspeedup)
	          )
)


;****
)

(set otherboards 0)
(if (OR (IN board 1) (IN board 2) (IN board 3) (IN board 4) (IN board 5) 
                     (IN board 6) (IN board 7) (IN board 8) (IN board 9)
                     (IN board 11) 
    ) 
      (set otherboards 1)
)

(message #followingenv)
(Read_Env)

;;(if (= AGA 0) ((SetEnvLong_1) (SetEnvLong_2)) )
;;(if (= AGA 1) 
;;  (if (= otherboards 1)
;;      ((SetEnvLong_1) (message #noenvaga) (SetEnvLong_2))

(SetEnvLong_1) (SetEnvLong_2)

;;  )
;;)

(Save_Env)

;*********************************************************************************
;* Set needed tooltypes for each board 
;*********************************************************************************
(procedure BOOTLOGO-TT
 (set BOOTLOGO      (askchoice    (choices #no #yes)
	                         (prompt (cat #bootlogo  " " #currset))
	                         (help   (cat #bootlogo  " " #currset))
          	  	         (default 1)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= BOOTLOGO 0) 
               (settooltype "BOOTLOGO" "0")
               (settooltype "BOOTLOGO" "1")
           )
 )
)

(procedure PASSTHROUGH-TT
 (set PASSTHROUGH   (askchoice    (choices #no #yes)
	                         (prompt (cat #passthrough  " " #currset))
	                         (help   (cat #passthrough  " " #currset))
          	  	         (default 0)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= PASSTHROUGH 0) 
               (settooltype "PASSTHROUGH" "NO")
               (settooltype "PASSTHROUGH" "YES")
           )
 )
)

(procedure DRAGGING-TT
 (set DRAGGING   (askchoice    (choices #no #yes)
	                         (prompt (cat #dragging  " " #currset))
	                         (help   (cat #dragging  " " #currset))
          	  	         (default 1)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= DRAGGING 0) 
               (settooltype "DRAGGING" "NO")
               (settooltype "DRAGGING" "YES")
           )
 )
)

(procedure SCROLLMASK-TT
 (set SCROLLMASK    (askchoice    (choices #no #yes)
	                         (prompt (cat #scrollmask  " " #currset))
	                         (help   (cat #scrollmask  " " #currset))
          	  	         (default 1)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= SCROLLMASK 0) 
               (settooltype "SCROLLMASK" "NO")
               (settooltype "SCROLLMASK" "YES")
           )
 )
)

(procedure MEMCLOCK-TT-CV64
  (set MEMCLOCK (asknumber (prompt (cat #memclock  " " #currset))
                           (help   (cat #memclock  " " #currset))
                           (range 50 80)
                           (default 50)
                )
  ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
              (settooltype "MEMCLOCK" (cat MEMCLOCK))
 )
)

(procedure MEMCLOCK-TT-RetinaZ3
  (set MEMCLOCK (asknumber (prompt (cat #memclock  " " #currset))
                           (help   (cat #memclock  " " #currset))
                           (range 20 90)
                           (default 63)
                )
  ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
              (settooltype "MEMCLOCK" (cat MEMCLOCK))
 )
)

(procedure MULTIMEDIAMEM-TT
 (set MULTIMEDIAMEM              (askchoice    (choices #no #yes)
	                         (prompt (cat #multimediamem " " #currset))
	                         (help   (cat #multimediamem " " #currset))
          	  	         (default 1)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= MULTIMEDIAMEM 0) 
               (settooltype "MULTIMEDIAMEM" "NO")
               (settooltype "MULTIMEDIAMEM" "YES")
           )
 )
)

(procedure BLACKBORDER-TT
 (set BLACKBORDER   (askchoice    (choices #no #yes)
	                         (prompt (cat #blackborder " " #currset))
	                         (help   (cat #blackborder " " #currset))
          	  	         (default 0)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= BLACKBORDER 0) 
               (settooltype "BLACKBORDER" "NO")
               (settooltype "BLACKBORDER" "YES")
           )
 )
)



(procedure USEROXXLER-TT
 (set USEROXXLER   (askchoice    (choices #no #yes)
	                         (prompt (cat #useroxxler " " #currset))
	                         (help   (cat #useroxxler " " #currset))
          	  	         (default 1)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= USEROXXLER 0) 
               (settooltype "USEROXXLER" "NO")
               (settooltype "USEROXXLER" "YES")
           )
 )
)


(procedure BITMAPCACHE-TT
 (set BITMAPCACHE   (askchoice    (choices #no #yes)
	                         (prompt (cat #bitmapcache " " #currset))
	                         (help   (cat #bitmapcache " " #currset))
          	  	         (default 1)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= BITMAPCACHE 0) 
               (settooltype "BITMAPCACHE" "NO")
               (settooltype "BITMAPCACHE" "YES")
           )
 )
)


(procedure PACKED24-TT
 (set PACKED24     (askchoice    (choices #no #yes)
	                         (prompt (cat #packed24 " " #currset))
	                         (help   (cat #packed24 " " #currset))
          	  	         (default 1)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= PACKED24 0) 
               (settooltype "PACKED24" "NO")
               (settooltype "PACKED24" "YES")
           )
 )
)




(procedure ADVANCEDCLK-TT
 (set ADVANCEDCLK   (askchoice    (choices #no #yes)
	                         (prompt (cat #advancedclk " " #currset))
	                         (help   (cat #advancedclk " " #currset))
          	  	         (default 0)
	            )
 ) 

 (tooltype (dest (tackon "devs:monitors" boardname)) 
           (if (= ADVANCEDCLK 0) 
               (settooltype "ADVANCEDCLK" "NO")
               (settooltype "ADVANCEDCLK" "YES")
           )
 )
)





(procedure WHATBOARD-TT (message (cat #whatboard-tt boardname)) ) 

(if (IN board 0)  ( (set boardname "CVisionPPC") (WHATBOARD-TT) (BOOTLOGO-TT) (SCROLLMASK-TT)  (BITMAPCACHE-TT) (PACKED24-TT)  ))  
(if (IN board 1)  ( (set boardname "CVision3D")  (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) (BITMAPCACHE-TT) (SCROLLMASK-TT) (MULTIMEDIAMEM-TT) (ADVANCEDCLK-TT) ))
(if (IN board 2)  ( (set boardname "CVision64")  (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) (SCROLLMASK-TT) (MEMCLOCK-TT-CV64) (USEROXXLER-TT)  (ADVANCEDCLK-TT) )) 
(if (IN board 3)  ( (set boardname "PicassoII")  (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) ))
(if (IN board 4)  ( (set boardname "Spectrum")   (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) )) 
(if (IN board 5)  ( (set boardname "Piccolo")    (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) ))
(if (IN board 6)  ( (set boardname "PiccoSD64")  (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) )) 
(if (IN board 7)  ( (set boardname "Inferno")    (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) ))
(if (IN board 8)  ( (set boardname "PicassoIV")  (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) )) 
(if (IN board 9)  ( (set boardname "RetinaZ3")   (WHATBOARD-TT) (BOOTLOGO-TT) (PASSTHROUGH-TT) (DRAGGING-TT) (BLACKBORDER-TT) (MEMCLOCK-TT-RetinaZ3)))
;;(if (IN board 10) ( (set boardname "CGXAGA") ))
;;(if (IN board 11) ( (set boardname "A2410") ))

;*********************************************************************************
;* Ask user to install Tools 
;*********************************************************************************
(set toolpick 15)

;;(if (= AGA 1)
;; ( (set #cgxmode-todo #CGXModeNot4AGA)
;;(set toolpick 2)
;; )
;;)

  (set ToDo (askoptions (choices #cgxmode-todo #showcgxconfig #guide #commy)
                        (prompt #todo-prompt)
                        (help #todo-prompt)
                        (default toolpick)
            )
  ) 

  (if (IN ToDo 0) 
    ( 
      (set wheremode   (askdir (prompt #wheremode)
                               (help   #wheremode)
	                       (default "SYS:Prefs")
		       )
      )

      (if (exists (tackon cgx_root "CGXMode/CGXMode"))
       (if (= (exists (tackon wheremode "CGXMode.info")) 0)
        (copyfiles (source (tackon cgx_root "CGXMode/CGXMode"))  (dest wheremode) (infos) (optional "nofail")) 
        (copyfiles (source (tackon cgx_root "CGXMode/CGXMode"))  (dest wheremode) (optional "nofail"))          
       )
      )

      ;;(if (IN board 9) (set TTBOARD "RetinaZ3") )    (if (IN board 8) (set TTBOARD "PicassoIV") ) 
      ;;(if (IN board 7) (set TTBOARD "Inferno") )     (if (IN board 6) (set TTBOARD "PiccoSD64") ) 
      ;;(if (IN board 5) (set TTBOARD "Piccolo") )     (if (IN board 4) (set TTBOARD "Spectrum") ) 
      ;;(if (IN board 3) (set TTBOARD "PicassoII") )   (if (IN board 2) (set TTBOARD "CVision64") )    
      ;;(if (IN board 1) (set TTBOARD "CVision3D") )   (if (IN board 0) (set TTBOARD "CVisionPPC") ) 

      ;;(if (> board 0)
      ;; (tooltype	(dest (tackon wheremode "CGXMode")) (settooltype "BOARD" TTBOARD) ) 
      ;;)

      (if (= @language "deutsch")
       (
         (if (= (exists "Locale:Catalogs") 0) (makedir "sys:Locale/Catalogs") )
         (if (= (exists (tackon "Locale:Catalogs" "deutsch")) 0) (makedir (tackon "sys:Locale/Catalogs" "deutsch")) )
         (if (exists (tackon cgx_root "CGXMode/catalogs/deutsch/cgxmode.catalog"))
           (copyfiles (source (tackon cgx_root "CGXMode/catalogs/deutsch/cgxmode.catalog")) (dest "sys:Locale/Catalogs/deutsch") )
         )
       )
      )


     (if (exists (tackon cgx_root (cat "prefs/presets/monitors/" "monitors.dat")))  
       (copyfiles (source (tackon cgx_root (cat "prefs/presets/monitors/" "monitors.dat")))  (dest "sys:prefs/presets/monitors")) 
     )
     
    (if (exists (tackon cgx_root "gtlayoutlib/gtlayout.library"))
       (copylib (source (tackon cgx_root "gtlayoutlib/gtlayout.library")) (dest wherelibs) (optional "nofail") ) 
    )

    )
  )


(if (IN ToDo 1) 
  ( 
    (set whereshowcgxconfig   (askdir (prompt #whereshowcgxconfig)
                             (help   #whereshowcgxconfig)
	                     (default "SYS:Tools")
		     )
    )

    (if (exists (tackon cgx_root "tools/showcgxconfig"))
     (if (= (exists (tackon whereshowcgxconfig "showcgxconfig.info")) 0)
      (copyfiles (source (tackon cgx_root "tools/showcgxconfig"))  (dest whereshowcgxconfig) (infos) (optional "nofail")) 
      (copyfiles (source (tackon cgx_root "tools/showcgxconfig"))  (dest whereshowcgxconfig) (optional "nofail"))          
     )
    )

  )
)

(if (IN ToDo 2) 
  ( 
    (set wheredocs   (askdir (prompt #wheredocs)
                             (help   #wheredocs)
	                     (default "HELP:")
		     )
    )

    (if (= @language "deutsch") (set docname "CyberGraphX4_D.guide") (set docname "CyberGraphX4_E.guide"))

    (if (exists (tackon cgx_root (tackon "docs" docname)))
     (if (= (exists (tackon wheredocs (cat docname ".info"))) 0)
      (copyfiles (source (tackon cgx_root (tackon "docs" docname)))  (dest wheredocs) (newname "CyberGraphX4.guide") (infos) (optional "nofail")) 
      (copyfiles (source (tackon cgx_root (tackon "docs" docname)))  (dest wheredocs) (newname "CyberGraphX4.guide") (optional "nofail"))          
     )
    )

   (textfile (dest "ENV:CyberGraphX/CGXHELPPATH") (append (cat "" wheredocs "") ) )
   (copyfiles (source "ENV:CyberGraphX/CGXHELPPATH") (dest "ENVARC:CyberGraphX") ) 

  )
)

 
(if (IN ToDo 3) 
  ( 
    (set wherecomm   (askdir (prompt #wherecomm)
                             (help   #wherecomm)
	                     (default "SYS:Prefs")
		     )
    )

    (if (exists (tackon cgx_root "tools/commodities/CyberGraphX"))
     (if (= (exists (tackon wherecomm "CyberGraphX.info")) 0)
      (copyfiles (source (tackon cgx_root "tools/commodities/CyberGraphX"))  (dest wherecomm) (infos) (optional "nofail")) 
      (copyfiles (source (tackon cgx_root "tools/commodities/CyberGraphX"))  (dest wherecomm) (optional "nofail"))          
     )
    )
    (if (= @language "deutsch")
     (
       (if (= (exists "Locale:Catalogs") 0) (makedir "sys:Locale/Catalogs") )
       (if (= (exists (tackon "Locale:Catalogs" "deutsch")) 0) (makedir (tackon "sys:Locale/Catalogs" "deutsch")) )
       (if (exists (tackon cgx_root "tools/commodities/catalogs/deutsch/cybergraphx.catalog"))
         (copyfiles (source (tackon cgx_root "tools/commodities/catalogs/deutsch/cybergraphx.catalog")) (dest "sys:Locale/Catalogs/deutsch") )
       )
     )
    )
    (if (exists (tackon cgx_root "gtlayoutlib/gtlayout.library"))
      (copylib (source (tackon cgx_root "gtlayoutlib/gtlayout.library")) (dest wherelibs) (optional "nofail") ) 
    )
  )
)




;*******************************************************************
;  END
;*******************************************************************
(if (> (exists ("c:multiview")) 0) (set #mpath "c:") )
(if (> (exists ("sys:Utilities/multiview")) 0) (set #mpath "sys:Utilities") )

(run (cat "run " #mpath "/multiview " (tackon cgx_root "Changes.txt")) )

(set @default-dest "ram:")

(exit)
