home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Installer Script for AmiTradeCenter V0.4 (02.01.00) by <Ingo@night.de>
- ; I tell you: writing installer scripts is a real pain!
- ; Especially if you don`t know what you are doing ;^)
-
- (set #language (getenv "Language"))
-
- (if (= #language "deutsch")
- (
- (set #minInst43 "Du brauchst Installer Version 43 oder höher\num AmiTradeCenter zu Installieren.\nLebst Du hinterm Mond? ;)")
- (set #askdir "Wo soll ATC installiert werden?\nEin neues Verzeichnis `AmiTradeCenter` wird ggf. dort hingezaubert (zing).")
- (set #askdir1 "Wo befindet sich ATC auf deinem System?\nBitte den kompletten Pfad,\ninklusive /AmiTradeCenter, anwählen!")
- (set #asl_help "Bitte den Pfad auswählen")
- (set #makedir_help "Erzeuge neues Verzeichnis..")
- (set #copyfiles "Kopiere Dateien..")
- (set #copy_help "Dateien werden jetzt Kopiert..")
- (set #yourchoice "\nWelches Icon darf`s denn sein?.\n\n")
- (set #your_help "Dieses Icon wird als Standard-Icon in den Pfad geschmiert.")
- (set #showguide (cat "\n\nMöchtest Du nun einen Blick in die Anleitung riskieren?\n"))
- (set #guide_help "Falls Du nicht lesen kannst, vergiß diesen Punkt ;-)")
- (set #showguide-1 (cat "Na klar.."))
- (set #showguide-2 (cat "Och nö.."))
- (set #theguide "docs/AmiTradeCenter_D.guide")
- (set #installchoice "\nWie willst Du ATC auf deine Platte Brennen?\n")
- (set #inst_help "\nWie willst Du ATC auf deine Platte Brennen?\n")
- (set #detect "\nAmiTradeCenter ist auf diesem\nSystem bereits Installiert.\n(Big Brother is watching you!)")
- (set #NList_new "Zu installierende Version: 17.53\n")
- (set #NList_help "MUI-Class NListTree.mcc nach Mui:libs/mui/ Kopieren")
- (set #NListCopy "Soll die MUI-Class NListTree.mcc nach Mui:libs/mui/NListTree.mcc kopiert werden?\n\n")
- (set #NListCopy-1 (cat "Logo"))
- (set #NListCopy-2 (cat "Alles, nur das nicht!"))
- )
- (
- (set #minInst43 "You need at least Installer version 43 or better\nto install AmiTradeCenter. Where are u from? ;)")
- (set #askdir "Where do you want to install ATC?\nA new drawer `AmiTradeCenter` will be created...somehow ;)")
- (set #askdir1 "Where is ATC located on your System?\nSelect the whole path, incl. /AmiTradeCenter, please!")
- (set #asl_help "Select the Path")
- (set #makedir_help "Creating directory..")
- (set #copyfiles "Copy files..")
- (set #copy_help "Copy files..")
- (set #yourchoice "Wich fuckin` icon would you like to use?")
- (set #your_help "You have to use this fuckin` icon with ATC every day. Better think twice! ;)")
- (set #showguide (cat "\n\nDo you want to study the ATC-guide now?\n"))
- (set #guide_help "Do you want to study the ATC-guide now?")
- (set #showguide-1 (cat "For sure.."))
- (set #showguide-2 (cat "Not really.."))
- (set #theguide "docs/AmiTradeCenter_E.guide")
- (set #installchoice "\nHow do you want ATC to be installed?\n")
- (set #inst_help "\nHow do you want ATC to be installed?\n")
- (set #detect "\nAmiTradeCenter is already installed on this System.\n(Big Brother is watching you!)")
- (set #NList_new "Version to Install: 17.53\n")
- (set #NList_help "Copy MUI-Class NListTree.mcc to Mui:libs/mui/")
- (set #NListCopy "Copy MUI-Class NListTree.mcc to Mui:libs/mui/NListTree.mcc ?\n\n")
- (set #NListCopy-1 (cat "Jups"))
- (set #NLIstCopy-2 (cat "Hell, NO!"))
- )
- )
-
- (if (< (/ @installer-version 65536) 43)
- (abort #minInst43)
- )
-
-
- (if (>= (/ @installer-version 65536) 44)
- (
- (effect "center" "radial" $F0F0F0 $0010E0)
- (set #h (querydisplay "screen" "height"))
- (set #w (querydisplay "screen" "width"))
- (set #d (querydisplay "screen" "depth"))
- (set #c (querydisplay "screen" "colors"))
- )
- )
-
- (complete 0)
-
- (set #installicons "icons.jpg")
- (set #installicons-2 "icons2.jpg")
- (set #installicons-3 "install.jpg")
- (set #iconchoice 4)
-
- (if (>= (/ @installer-version 65536) 44)
- (showmedia 'installpic-3' (tackon "icons" #installicons-3) 'upper_right' 'none' 0)
- )
-
-
- (if (exists "env:mui/AMITRADECENTER.1.cfg")
- (set #isatc 1)
- (set #isatc 0)
- )
-
- (set #choice1 "Install ATC")
- (set #choice2 "Update ATC")
-
- (set #inchoice
- (askchoice
- (if (= #isatc 1)
- (
- (prompt #detect)
- (help #detect)
- )
- (
- (prompt #installchoice)
- (help #inst_help)
- )
- )
- (choices #choice1 #choice2)
- (default #isatc)
- )
- )
-
- (if (= #inchoice 0)
- (
- (set destpath
- (askdir
- (prompt #askdir)
- (help #asl_help)
- (default "work:")
- )
- )
-
- (set @default-dest
- (tackon destpath "AmiTradeCenter")
- )
-
- (set result
- (makedir @default-dest
- (prompt #makedir_help)
- (infos)
- (safe)
- )
- )
-
- (complete 5)
-
- (set result
- (copyfiles
- (prompt #copyfiles)
- (help #copy_help)
- (source "")
- (dest @default-dest)
- (all)
- (infos)
- (optional fail)
- (safe)
- )
- )
-
- (complete 99)
-
- (if (>= (/ @installer-version 65536) 44)
- (
- (showmedia 'installpic' (tackon "icons" #installicons) 'upper_left' 'none' 0)
- (showmedia 'installpic-2' (tackon "icons" #installicons-2) 'upper_center' 'none' 0)
- (if (= #language "deutsch") ;crappy choice command suxx! we have to declare this here to get it work :(
- (
- (set #icon1 "Piktogramm 1")
- (set #icon2 "Piktogramm 2")
- (set #icon3 "Piktogramm 3")
- (set #icon4 "Piktogramm 4")
- )
- (
- (set #icon1 "Pictogram 1")
- (set #icon2 "Pictogram 2")
- (set #icon3 "Pictogram 3")
- (set #icon4 "Pictogram 4")
- )
- )
-
- (set #iconchoice
- (askchoice
- (prompt #yourchoice)
- (help #your_help)
- (choices #icon1 #icon2 #icon3 #icon4)
- (default 0)
- )
- )
-
- (if (= #iconchoice 0)
- (set result
- (copyfiles
- (source (cat """icons/AmiTradeCenter1.info"))
- (dest @default-dest)
- (newname (cat "AmiTradeCenter.info"))
- (optional "nofail" "force" "askuser")
- )
- )
- )
-
- (if (= #iconchoice 1)
- (set result
- (copyfiles
- (source (cat """icons/AmiTradeCenter2.info"))
- (dest @default-dest)
- (newname (cat "AmiTradeCenter.info"))
- (optional "nofail" "force" "askuser")
- )
- )
- )
-
- (if (= #iconchoice 2)
- (set result
- (copyfiles
- (source (cat """icons/AmiTradeCenter3.info"))
- (dest @default-dest)
- (newname (cat "AmiTradeCenter.info"))
- (optional "nofail" "force" "askuser")
- )
- )
- )
-
- (if (= #iconchoice 3)
- (set result
- (copyfiles
- (source (cat """icons/AmiTradeCenter4.info"))
- (dest @default-dest)
- (newname (cat "AmiTradeCenter.info"))
- (optional "nofail" "force" "askuser")
- )
- )
- )
- )
- (
-
- (set result
- (copyfiles
- (source (cat """icons/AmiTradeCenter1.info"))
- (dest @default-dest)
- (newname (cat "AmiTradeCenter.info"))
- (optional "nofail" "force" "askuser")
- )
- )
- )
- )
-
- (set result
- (copyfiles
- (source (cat """icons/AmiTradeCenter_Drawer.info"))
- (dest destpath)
- (newname (cat "AmiTradeCenter.info"))
- (optional "nofail" "force" "askuser")
- )
- )
- )
-
- (
-
-
- (set destpath
- (askdir
- (prompt #askdir1)
- (help #asl_help)
- (default "work:")
- )
- )
-
- (set @default-dest
- (tackon destpath "")
- )
-
- (set result
- (copyfiles
- (prompt #copyfiles)
- (help #copy_help)
- (source "")
- (dest destpath)
- (pattern "~(#?profiles|#?config|#?icon#?|#?Center.info|#?.mcc)")
- (optional fail)
- (safe)
- )
- )
- )
- )
-
- (complete 98)
-
- (set #NList_version (getversion "mui:libs/mui/NListTree.mcc"))
- (set #NList_ver (/ #NList_version 65536))
- (set #NList_rev (- #NList_version (* #NList_ver 65536)))
-
- (if (= #language "deutsch")
- (set #NList_text (cat "\nInstallierte Version:" #NList_ver"."#NList_rev))
- (set #NList_text (cat "\nAlready installed version:" #NList_ver"."#NList_rev))
- )
-
- (if (askbool (prompt #NListCopy #NList_new #NList_text)
- (help #NList_help)
- (choices #NListCopy-1 #NListCopy-2)
- (default 1))
- (
- (set result
- (copyfiles
- (source (cat """mui/libs/mui/NListtree.mcc"))
- (dest "mui:libs/mui/")
- (newname (cat "NListtree.mcc"))
- (optional "nofail" "force" "askuser")
- )
- )
- )
- (
- (set #ready "Dann nicht..")
- )
- )
-
-
- (complete 100)
-
- (if (>= (/ @installer-version 65536) 44)
- (
- (closemedia installpic)
- (closemedia installpic-2)
- (if (askbool (prompt #showguide)
- (help #guide_help)
- (choices #showguide-1 #showguide-2)
- (default 0))
- (
- (set #guideondisk (tackon @default-dest #theguide))
- (showmedia 'media' #guideondisk 'upper_left' 'medium_large' 1 'wordwrap' 'panel')
- )
- (
- (set #ready "done")
- )
- )
- (set wbobj (tackon destpath @default-dest))
- (openwbobject wbobj)
- )
- )
-
- ; hey, the pain is over... pardy on garth!
-