home *** CD-ROM | disk | FTP | other *** search
Wrap
; $VER: Scala Install Program Version 3.02 (31Aug95) ;----------------------------- Text Strings ------------------------------- (set msg_Utils "Utilitaires Scala") (set msg_Palettes "Palettes Scala") (set msg_Symbols "Brosses Scala") (set msg_ARexx "Exemple ARexx Scala") (set msg_EX "EX Scala") (set msg_Fonts "Polices Scala") (set msg_Back "Fonds Scala") (set msg_Demos "Scripts de démo Scala") (set msg_Resize "Changer la taille des fonds Scala") (set msg_ScalaFont "Scala.font") (set msg_NoFastMem1 "Pas de mémoire rapide installée ou disponible.\n\n") (set msg_NoFastMem2 "Scala MM300 nécessite de mémoire rapide pour fonctionner.\n\n") (set msg_NoFastMem3 "Pour installer Scala, vous devez d'abord installer de la mémoire rapide dans votre Amiga avec le port PCMCIA (A1200) ou ajouter une extension de mémoire ou une carte accélératrice dans le connecteur d'extension (A1200/A4000).") (set msg_NoSelect "Vous n'avez rien sélectionné. Recommencez, SVP.") (set msg_NoDrawer ("Vous devez choisir un tiroir où installer %s. Créez un nouveau tiroir ou sélectionnez un tiroir existant." @app-name)) (set msg_ChooseWhat ("Sélectionnez les parties de %s que vous voulez installer :" @app-name)) (set msg_ChooseDest ("Sélectionnez l'emplacement où %s doit être installé :" @app-name)) (set msg_Overscan1 "Vous pouvez passer les fonds de Scala en overscan. Notez que les modes %s et %s prendront plus de place ssur votre disque dur et réduiront peut-être les performances des effets de Scala.\n\n") (set msg_Overscan2 "Vous avez choisi de passer les fonds de Scala en overscan. Notez que cela demande plus de place sur votre disque dur et peut réduire les performances des effets de Scala.\n\n") (set msg_ChooseSize "Choisissez la taille des fonds d'écran de Scala :") (set msg_OldWorkbench ("Vous devez utiliser le Workbench 2.04 ou supérieur pour installer %s" @app-name)) (set msg_Nor "Normal") (set msg_Std "Standard") (set msg_Max "Maximum") (set msg_Startup ("Voulez-vous que %s soit automatiquement lancé lorsque vous démarrez votre Amiga ?" @app-name)) (set msg_ErrorRam "Erreur lors de la copie des fichiers dans Ram:") (set msg_Insert "Insérez la disquette Disk %ld dans un lecteur, SVP.") (set msg_Installing "\nInstallation de :\n\n%s...") (set msg_MoveLingua "Remplacement des chemins d'accès dans %s...") (set msg_ConvertNTSC "Conversion du fond %s en NTSC...") (set msg_ConvertOverscan "Conversion du fond %s en overscan...") (set msg_DeleteOldFiles ("Une ancienne version de %s est déjà installée sur votre disque dur. Voulez-vous que j'efface les anciens fichiers que ne sont plus nécessaires ?" @app-name)) ;------------------------------ Constants --------------------------------- (if (= @app-name "Scala InfoChannel") (set IC 1) (set IC 0) ) (if (= @app-name "InfoChannel Player") (set PL 1) (set PL 0) ) (if (= @app-name "Scala Multimedia") (set MM 1) (set MM 0) ) (if (= @app-name "Upgrade Scala Multimedia") (set UPGR 1) (set UPGR 0) ) (if (or IC MM) ( (set opt_Scala %000000001) (set opt_Utils %000000010) (set opt_Palettes %000000100) (set opt_Symbols %000001000) (set opt_ARexx %000010000) (set opt_EX %000100000) (set opt_Fonts %001000000) (set opt_Back %010000000) (set opt_Demos %100000000) ) ) (if PL ( (set opt_Scala %000000001) (set opt_Symbols %000000010) (set opt_EX %000000100) (set opt_Fonts %000001000) (set opt_Back %000010000) ) ) (if UPGR ( (set opt_Scala %000000001) (set opt_Utils %000000010) (set opt_EX %000000100) (set opt_Back %000001000) (set opt_Demos %000010000) ) ) (if (or IC PL) ( (set lha_Scala "Disk1:Scala.lha") (set num_Scala 1) (set lha_ScalaFont "Disk1:ScalaFont.lha") (set num_ScalaFont 1) (set lha_Utils "Disk1:Utilities.lha") (set num_Utils 1) (set lha_Palettes "Disk1:Palettes.lha") (set num_Palettes 1) (set lha_Symbols "Disk1:Symbols.lha") (set num_Symbols 1) (set lha_ARexx "Disk1:ARexx.lha") (set num_ARexx 1) (set lha_Scripts "Disk1:Scripts.lha") (set num_Scripts 1) (set lha_EX "Disk2:EX.lha") (set num_EX 2) (set lha_Fonts "Disk2:Fonts.lha") (set num_Fonts 2) (set lha_Back1 "Disk2:Backgrounds1.lha") (set num_Back1 2) (set lha_Back2 "Disk3:Backgrounds2.lha") (set num_Back2 3) (set lha_Back3 "Disk4:Backgrounds3.lha") (set num_Back3 4) (set lha_Back4 "Disk5:Backgrounds4.lha") (set num_Back4 5) (set lha_Demos1 "Disk6:Demos1.lha") (set num_Demos1 6) (set lha_Demos2 "Disk7:Demos2.lha") (set num_Demos2 7) (set lha_Demos3 "Disk8:Demos3.lha") (set num_Demos3 8) (set lha_Demos4 "Disk9:Demos4.lha") (set num_Demos4 9) (set lha_Demos5 "Disk10:Demos5.lha") (set num_Demos5 10) (set lha_Demos6 "Disk11:Demos6.lha") (set num_Demos6 11) (set lha_Demos7 "Disk12:Demos7.lha") (set num_Demos7 12) (set lha_Demos8 "Disk13:Demos8.lha") (set num_Demos8 13) (set lha_Demos9 "Disk14:Demos9.lha") (set num_Demos9 14) ) ) (if MM ( (set lha_Scala "Work:ScalaInstall/Versions/PAL/French/Scala.lha") (set num_Scala 1) (set lha_ScalaFont "Work:ScalaInstall/Versions/PAL/French/ScalaFont.lha") (set num_ScalaFont 1) (set lha_Utils "Work:ScalaInstall/Versions/PAL/French/Utilities.lha") (set num_Utils 1) (set lha_EX "Work:ScalaInstall/Versions/PAL/French/EX.lha") (set num_EX 1) (set lha_ARexx "Work:ScalaInstall/Versions/PAL/French/ARexx.lha") (set num_ARexx 1) (set lha_Scripts "Work:ScalaInstall/Versions/PAL/French/Scripts.lha") (set num_Scripts 1) (set lha_Fonts "Work:ScalaInstall/Data/Fonts.lha") (set num_Fonts 2) (set lha_Palettes "Work:ScalaInstall/Data/Palettes.lha") (set num_Palettes 2) (set lha_Symbols "Work:ScalaInstall/Data/Symbols.lha") (set num_Symbols 2) (set lha_Back1 "Work:ScalaInstall/Data/Backgrounds1.lha") (set num_Back1 2) (set lha_Back2 "Work:ScalaInstall/Data/Backgrounds2.lha") (set num_Back2 3) (set lha_Back3 "Work:ScalaInstall/Data/Backgrounds3.lha") (set num_Back3 4) (set lha_Back4 "Work:ScalaInstall/Data/Backgrounds4.lha") (set num_Back4 5) (set lha_Back5 "Work:ScalaInstall/Data/Backgrounds5.lha") (set num_Back5 6) (set lha_Demos1 "Work:ScalaInstall/Data/Demos1.lha") (set num_Demos1 6) (set lha_Demos2 "Work:ScalaInstall/Data/Demos2.lha") (set num_Demos2 7) (set lha_Demos3 "Work:ScalaInstall/Data/Demos3.lha") (set num_Demos3 8) (set lha_Demos4 "Work:ScalaInstall/Data/Demos4.lha") (set num_Demos4 9) ) ) (if UPGR ( (set lha_Scala "Disk1:Scala.lha") (set num_Scala 1) (set lha_ScalaFont "Disk1:ScalaFont.lha") (set num_ScalaFont 1) (set lha_Utils "Disk1:Utilities.lha") (set num_Utils 1) (set lha_EX "Disk1:EX.lha") (set num_EX 1) (set lha_Scripts "Disk1:Scripts.lha") (set num_Scripts 1) (set lha_Back1 "Disk2:Backgrounds1.lha") (set num_Back1 2) (set lha_Demos1 "Disk2:Demos1.lha") (set num_Demos1 2) (set lha_Demos2 "Disk3:Demos2.lha") (set num_Demos2 3) ) ) ;-------------------------- Utility procedures ---------------------------- (Procedure CheckConfig (set OS_Version (/ (getversion) 65536)) (if (< OS_Version 37) (abort msg_OldWorkbench) ) (if (= (database "vblank") 50) ( (SET VideoMode "PAL") (SET NOR ("640 x 512 (%s)" msg_Nor)) (SET STD ("704 x 566 (%s)" msg_Std)) (SET MAX ("736 x 566 (%s)" msg_Max)) ) ( (SET VideoMode "NTSC") (SET NOR ("640 x 400 (%s)" msg_Nor)) (SET STD ("704 x 480 (%s)" msg_Std)) (SET MAX ("736 x 482 (%s)" msg_Max)) ) ) ) (Procedure CheckFastMem (run "AVAIL >ENV:FastMem FAST" (Safe)) (if (= ("%.1s" (getenv "FastMem")) 0) (abort msg_NoFastMem1 msg_NoFastMem2 msg_NoFastMem3) ) (delete "env:FastMem") ) (Procedure CopyTools (copyfiles (prompt "") (help @copyfiles-help) (source "Work:ScalaInstall/Tools") (all) (dest "RAM:") ) (if (not (and (exists "RAM:LHa") (exists "RAM:MakeOverscan") (exists "RAM:MoveLingua"))) (abort msg_ErrorRam) ) ) (Procedure InstallFile (working (msg_Installing Installing)) (run ("RAM:LHa -N x %s \"%s/\"" LhaFile @Dest)) ) (Procedure InstallFontFiles (working (msg_Installing Installing)) (run ("RAM:LHa -N x %s \"%s\"" LhaFile "Fonts:")) ) (Procedure InstallConfigFile (set ConfigDest (tackon "ENVARC:" "Scala")) (if (not (exists ConfigDest)) ( (makedir ConfigDest) (copyfiles (prompt "") (help @copyfiles-help) (source (tackon "RAM:" "scalamm.config")) (dest ConfigDest) ) ) ) ) (Procedure MoveLingua (set i 0) (while (set ScriptName (if IC (select i "InfoChannelIC400.script" "LoScalatore.script" "ScalaAGA.script" "ScalaAirport.script" "ScalaCableTV.script" "ScalaComms.script" "ScalaFeatures.script" "ScalaFonts.script" "ScalaHotel.script" "ScalaQuiz.script" "ScalaShopping.script" "ScalaTime.script" "ScalaTravel.script" "ScalaVoice.script" "ScalaWipes.script" "ScalaWorld.script" "ScaliniMotor.script" "" ) (select i "!ScalaPrincipal.script" "LoScalatore.script" "ScalaFonctions.script" "ScalaPolices.script" "ScalaMM300.script" "ScalaProduits.script" "ScalaJeu.script" "ScalaClip.script" "ScalaVideo.script" "ScalaVoix.script" "ScalaEffets.script" "ScalaMonde.script" "" ) ) ) (set ScriptName (tackon (tackon @dest "Scripts") ScriptName)) (if (exists ScriptName) ( (working (msg_MoveLingua ScriptName)) (run ("RAM:MoveLingua \"%s\" Work:Scala \"%s\" \"%s\"" ScriptName @dest (tackon @dest "Scripts"))) ) ) (set i (+ i 1)) ) ) (Procedure MakeOverscan (set i 0) (while (set PictureName (if UPGR (select i "Fabrics004" "Nature001" "Nature002" "Stones012" "Stones013" "Texture014" "Texture015" "Texture016" "Theme005" "" ) (select i "Fabrics001" "Fabrics002" "Fabrics003" "Fabrics004" "Fantasy001" "Grass001" "NaiveBook" "NaiveClock" "NaiveCoffee" "NaiveDisk" "NaivePencil" "NaivePhone" "NaivePiano" "NaivePlate" "Nature001" "Nature002" "Number001" "Number002" "Number003" "Number004" "Number005" "Number006" "Number007" "Number008" "Number009" "Painting001" "Painting002" "Painting003" "Painting004" "Paper001" "Paper002" "Paper003" "Paper004" "Paper005" "Sky001" "Stones001" "Stones002" "Stones003" "Stones004" "Stones005" "Stones006" "Stones007" "Stones008" "Stones009" "Stones010" "Stones011" "Stones012" "Stones013" "Tech001" "Tech002" "Tech003" "Tech004" "Tech005" "Tech006" "Tech007" "Texture001" "Texture002" "Texture003" "Texture004" "Texture005" "Texture006" "Texture007" "Texture008" "Texture009" "Texture010" "Texture011" "Texture012" "Texture013" "Texture014" "Texture015" "Texture016" "Theme001" "Theme002" "Theme003" "Theme004" "Theme005" "Water001" "Window001" "" ) ) ) (if (and (= VideoMode "NTSC") (= BackSize 0)) (working (msg_ConvertNTSC PictureName)) (working (msg_ConvertOverscan PictureName)) ) (set PictureName (tackon (tackon @dest "Backgrounds") PictureName)) (run ("RAM:MakeOverscan \"%s\" \"%s\" %s %s" PictureName PictureName VideoMode (select BackSize "NOR" "STD" "MAX"))) (set i (+ i 1)) ) (if (= VideoMode "NTSC") ( (set PictureName (tackon (tackon @dest "Backgrounds") "World001")) (run ("RAM:MakeOverscan \"%s\" \"%s\" NTSC NOR" PictureName PictureName)) ) ) ) ;-------------------------- Cleanup procedures ---------------------------- (Procedure DeleteTools (delete "RAM:MakeOverscan" "RAM:MoveLingua" "RAM:Lha" "RAM:scalamm.config") ) (onerror (DeleteTools)) (Procedure DeleteOldFiles (if (or IC PL) ( (if (exists "libs:infochannel.library") (if (askbool (prompt msg_DeleteOldFiles) (help @askbool-help)) ( (delete "libs:infochannel.library") (delete "devs:infochannel.device") (delete "s:infochannel.config") (delete "s:infochannel.layout") (delete "s:infochannel.layout.info") (delete "s:startup-script") (delete "fonts:Info.font") (delete "fonts:Info/11") (delete "fonts:Info/8") (delete "fonts:Info") (delete (tackon @dest "InfoPrint")) (delete (tackon @dest "InfoPrint.info")) (delete (tackon @dest "InfoNet")) (delete (tackon @dest "InfoNet.info")) ) ) ) ) ( (if (exists "libs:scalamm.library") (if (askbool (prompt msg_DeleteOldFiles) (help @askbool-help)) ( (delete "libs:scalamm.library") (delete "devs:scalamm.device") (delete "s:scalamm.config") (delete "s:scalamm.layout") (delete "s:scalamm.layout.info") (delete "s:startup-script") (set utils (tackon @dest "Utilities")) (delete (tackon utils "ScalaMMPrint")) (delete (tackon utils "ScalaMMPrint.info")) ) ) ) ) ) ) ;-------------------------- Menu procedures ------------------------------- (Procedure InstallMenu (until (<> Selection 0) ( (if (or IC MM) (set Selection (askoptions (prompt msg_ChooseWhat) (help @askoptions-help) (choices @app-name msg_Utils msg_Palettes msg_Symbols msg_ARexx msg_EX msg_Fonts msg_Back msg_Demos ) ) ) ) (if PL (set Selection (askoptions (prompt msg_ChooseWhat) (help @askoptions-help) (choices @app-name msg_Symbols msg_EX msg_Fonts msg_Back ) ) ) ) (if UPGR (set Selection (askoptions (prompt msg_ChooseWhat) (help @askoptions-help) (default %11111) (choices @app-name msg_Utils msg_EX msg_Back msg_Demos ) ) ) ) ) (if (= Selection 0) (message msg_NoSelect) ) ) ) (Procedure BackMenu (set BackSize (askchoice (prompt (msg_Overscan1 STD MAX) msg_ChooseSize) (help @askchoice-help) (choices NOR STD MAX) ) ) ) (Procedure DestMenu (set @dest "") (while (= @dest (pathonly @dest)) (set @dest (askdir (prompt msg_ChooseDest) (help @askdir-help) (newpath) (default @default-dest) ) ) (if (= @dest (pathonly @dest)) (message msg_NoDrawer) ) ) (if (not (exists @dest)) ( (makedir @dest (infos)) (tooltype (dest @dest) (noposition)) ) ) (set @default-dest @dest) ) ;------------------------- Installation procedures ------------------------ (Procedure InstallScala (set System (tackon @dest "System")) (makedir System (infos)) (tooltype (dest System) (noposition)) (set Installing @app-name) (set LhaFile lha_Scala) (set DiskNum num_Scala) (InstallFile) (InstallConfigFile) (set Installing msg_ScalaFont) (set LhaFile lha_ScalaFont) (set DiskNum num_ScalaFont) (InstallFontFiles) (copyfiles (prompt "") (help @copyfiles-help) (pattern "EX_Fr#?") (source "Work:ScalaInstall/Versions/PAL/French/") (dest @Dest) ) (if PL ( (set Scripts (tackon @dest "Scripts")) (makedir Scripts (infos)) (tooltype (dest Scripts) (noposition)) (copyfiles (source "Disk1:InfoChannel.script") (dest (tackon @dest "Scripts")) ) (textfile (dest (tackon @dest "System/InfoChannel.startup")) (append (tackon @dest "Scripts/InfoChannel.script")) ) ) ( (set i 0) (while (set DrawerName (select i "Scripts" "Backgrounds" "Animations" "Music" "Sounds" "Symbols" "Palettes" "Text" "Layouts" "" ) ) (set DrawerName (tackon @dest DrawerName)) (makedir DrawerName (infos)) (tooltype (dest DrawerName) (noposition)) (set i (+ i 1)) ) ) ) (if (or IC PL) ( (startup (prompt msg_Startup) (help @startup-help) "Scala" (if IC (command (tackon @dest "InfoChannel")) (command (tackon @dest "InfoPlayer")) ) ) ) ) ) (Procedure InstallUtils (set Utilities (tackon @dest "Utilities")) (makedir Utilities (infos)) (tooltype (dest Utilities) (noposition)) (set Installing msg_Utils) (set LhaFile lha_Utils) (set DiskNum num_Utils) (InstallFile) ) (Procedure InstallPalettes (set Palettes (tackon @dest "Palettes")) (makedir Palettes (infos)) (tooltype (dest Palettes) (noposition)) (set Installing msg_Palettes) (set LhaFile lha_Palettes) (set DiskNum num_Palettes) (InstallFile) ) (Procedure InstallSymbols (set Symbols (tackon @dest "Symbols")) (makedir Symbols (infos)) (tooltype (dest Symbols) (noposition)) (set Installing msg_Symbols) (set LhaFile lha_Symbols) (set DiskNum num_Symbols) (InstallFile) ) (Procedure InstallArexx (set ARexx (tackon @dest "ARexx")) (makedir ARexx (infos)) (tooltype (dest ARexx) (noposition)) (set Installing msg_ARexx) (set LhaFile lha_ARexx) (set DiskNum num_ARexx) (InstallFile) ) (Procedure InstallScripts (set Scripts (tackon @dest "Scripts")) (makedir Scripts (infos)) (tooltype (dest Scripts) (noposition)) (set Installing msg_Demos) (set LhaFile lha_Scripts) (set DiskNum num_Scripts) (InstallFile) (MoveLingua) ) (Procedure InstallEX (set EX (tackon @dest "EX")) (makedir EX (infos)) (tooltype (dest EX) (noposition)) (set StartupDrawer (tackon @dest "Startup")) (makedir StartupDrawer (infos)) (tooltype (dest StartupDrawer) (noposition)) (set Installing msg_EX) (set LhaFile lha_EX) (set DiskNum num_EX) (InstallFile) ) (Procedure InstallFonts (set Installing msg_Fonts) (set LhaFile lha_Fonts) (set DiskNum num_Fonts) (InstallFontFiles) ) (Procedure InstallBack (set Back (tackon @dest "Backgrounds")) (makedir Back (infos)) (tooltype (dest Back) (noposition)) (set Installing msg_Back) (set LhaFile lha_Back1) (set DiskNum num_Back1) (InstallFile) (if (not UPGR) ( (set LhaFile lha_Back2) (set DiskNum num_Back2) (InstallFile) (set LhaFile lha_Back3) (set DiskNum num_Back3) (InstallFile) (set LhaFile lha_Back4) (set DiskNum num_Back4) (InstallFile) (set LhaFile lha_Back5) (set DiskNum num_Back5) (InstallFile) ) ) (if (or (= VideoMode "NTSC") BackSize) (MakeOverscan) ) ) (Procedure InstallDemos (set Anim (tackon @dest "Animations")) (makedir Anim (infos)) (tooltype (dest Anim) (noposition)) (set Sounds (tackon @dest "Sounds")) (makedir Sounds (infos)) (tooltype (dest Sounds) (noposition)) (set Music (tackon @dest "Music")) (makedir Music (infos)) (tooltype (dest Music) (noposition)) (set Text (tackon @dest "Text")) (makedir Text (infos)) (tooltype (dest Text) (noposition)) (set Back (tackon @dest "Backgrounds")) (makedir Back (infos)) (tooltype (dest Back) (noposition)) (set Installing msg_Demos) (set LhaFile lha_Demos1) (set DiskNum num_Demos1) (InstallFile) (set LhaFile lha_Demos2) (set DiskNum num_Demos2) (InstallFile) (if (not UPGR) ( (set LhaFile lha_Demos3) (set DiskNum num_Demos3) (InstallFile) (set LhaFile lha_Demos4) (set DiskNum num_Demos4) (InstallFile) ) ) (if IC ( (set LhaFile lha_Demos5) (set DiskNum num_Demos5) (InstallFile) (set LhaFile lha_Demos6) (set DiskNum num_Demos6) (InstallFile) (set LhaFile lha_Demos7) (set DiskNum num_Demos7) (InstallFile) (set LhaFile lha_Demos8) (set DiskNum num_Demos8) (InstallFile) (set LhaFile lha_Demos9) (set DiskNum num_Demos9) (InstallFile) ) ) ) (Procedure ResizeBack (set BackSize (+ 1 (askchoice (prompt msg_Overscan2 msg_ChooseSize) (help @askchoice-help) (choices STD MAX) ) ) ) (MakeOverscan) ) ;------------------------------- Main program ----------------------------- (CheckFastMem) (CheckConfig) (InstallMenu) (if (<> Selection opt_Fonts) (DestMenu)) (if (bitand Selection opt_Back) (BackMenu)) (CopyTools) (if (bitand Selection opt_Scala) (InstallScala)) (if (bitand Selection opt_Utils) (InstallUtils)) (if (bitand Selection opt_ARexx) (InstallARexx)) (if (bitand Selection opt_Demos) (InstallScripts)) (if (bitand Selection opt_EX) (InstallEX)) (if (bitand Selection opt_Palettes) (InstallPalettes)) (if (bitand Selection opt_Symbols) (InstallSymbols)) (if (bitand Selection opt_Fonts) (InstallFonts)) (if (bitand Selection opt_Back) (InstallBack)) (if (bitand Selection opt_Demos) (InstallDemos)) (DeleteTools) (if (bitand Selection opt_Scala) (DeleteOldFiles)) (exit) (welcome)