home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / on-line / amitradecenter / install < prev    next >
Text File  |  2000-02-04  |  10KB  |  328 lines

  1. ; $VER: Installer Script for AmiTradeCenter V0.4 (02.01.00) by <Ingo@night.de>
  2. ; I tell you: writing installer scripts is a real pain!
  3. ; Especially if you don`t know what you are doing ;^)
  4.  
  5. (set #language (getenv "Language"))
  6.  
  7. (if (= #language "deutsch")
  8.   (
  9.     (set #minInst43 "Du brauchst Installer Version 43 oder höher\num AmiTradeCenter zu Installieren.\nLebst Du hinterm Mond? ;)")
  10.     (set #askdir "Wo soll ATC installiert werden?\nEin neues Verzeichnis `AmiTradeCenter` wird ggf. dort hingezaubert (zing).")
  11.     (set #askdir1 "Wo befindet sich ATC auf deinem System?\nBitte den kompletten Pfad,\ninklusive /AmiTradeCenter, anwählen!")
  12.     (set #asl_help "Bitte den Pfad auswählen")
  13.     (set #makedir_help "Erzeuge neues Verzeichnis..")
  14.     (set #copyfiles "Kopiere Dateien..")
  15.     (set #copy_help "Dateien werden jetzt Kopiert..")
  16.     (set #yourchoice "\nWelches Icon darf`s denn sein?.\n\n")
  17.     (set #your_help "Dieses Icon wird als Standard-Icon in den Pfad geschmiert.")
  18.     (set #showguide (cat "\n\nMöchtest Du nun einen Blick in die Anleitung riskieren?\n"))
  19.     (set #guide_help "Falls Du nicht lesen kannst, vergiß diesen Punkt ;-)")
  20.     (set #showguide-1 (cat "Na klar.."))
  21.     (set #showguide-2 (cat "Och nö.."))
  22.     (set #theguide "docs/AmiTradeCenter_D.guide")
  23.     (set #installchoice "\nWie willst Du ATC auf deine Platte Brennen?\n")
  24.     (set #inst_help "\nWie willst Du ATC auf deine Platte Brennen?\n")
  25.     (set #detect "\nAmiTradeCenter ist auf diesem\nSystem bereits Installiert.\n(Big Brother is watching you!)")
  26.     (set #NList_new "Zu installierende Version: 17.53\n")
  27.     (set #NList_help "MUI-Class NListTree.mcc nach Mui:libs/mui/ Kopieren")
  28.     (set #NListCopy "Soll die MUI-Class NListTree.mcc nach Mui:libs/mui/NListTree.mcc kopiert werden?\n\n")
  29.     (set #NListCopy-1 (cat "Logo"))
  30.     (set #NListCopy-2 (cat "Alles, nur das nicht!"))
  31.   )
  32.   (
  33.     (set #minInst43 "You need at least Installer version 43 or better\nto install AmiTradeCenter. Where are u from? ;)")
  34.     (set #askdir "Where do you want to install ATC?\nA new drawer `AmiTradeCenter` will be created...somehow ;)")
  35.     (set #askdir1 "Where is ATC located on your System?\nSelect the whole path, incl. /AmiTradeCenter, please!")
  36.     (set #asl_help "Select the Path")
  37.     (set #makedir_help "Creating directory..")
  38.     (set #copyfiles "Copy files..")
  39.     (set #copy_help "Copy files..")
  40.     (set #yourchoice "Wich fuckin` icon would you like to use?")
  41.     (set #your_help "You have to use this fuckin` icon with ATC every day. Better think twice! ;)")
  42.     (set #showguide (cat "\n\nDo you want to study the ATC-guide now?\n"))
  43.     (set #guide_help "Do you want to study the ATC-guide now?")
  44.     (set #showguide-1 (cat "For sure.."))
  45.     (set #showguide-2 (cat "Not really.."))
  46.     (set #theguide "docs/AmiTradeCenter_E.guide")
  47.     (set #installchoice "\nHow do you want ATC to be installed?\n")
  48.     (set #inst_help "\nHow do you want ATC to be installed?\n")
  49.     (set #detect "\nAmiTradeCenter is already installed on this System.\n(Big Brother is watching you!)")
  50.     (set #NList_new "Version to Install: 17.53\n")
  51.     (set #NList_help "Copy MUI-Class NListTree.mcc to Mui:libs/mui/")
  52.     (set #NListCopy "Copy MUI-Class NListTree.mcc to Mui:libs/mui/NListTree.mcc ?\n\n")
  53.     (set #NListCopy-1 (cat "Jups"))
  54.     (set #NLIstCopy-2 (cat "Hell, NO!"))
  55.   )
  56. )
  57.  
  58. (if (< (/ @installer-version 65536) 43)
  59.   (abort #minInst43)
  60. )
  61.  
  62.  
  63. (if (>= (/ @installer-version 65536) 44)
  64.  (
  65.   (effect "center" "radial" $F0F0F0 $0010E0)
  66.   (set #h (querydisplay "screen" "height"))
  67.   (set #w (querydisplay "screen" "width"))
  68.   (set #d (querydisplay "screen" "depth"))
  69.   (set #c (querydisplay "screen" "colors"))
  70.  )
  71. )
  72.  
  73. (complete 0)
  74.  
  75. (set #installicons "icons.jpg")
  76. (set #installicons-2 "icons2.jpg")
  77. (set #installicons-3 "install.jpg")
  78. (set #iconchoice 4)
  79.  
  80. (if (>= (/ @installer-version 65536) 44)
  81.   (showmedia 'installpic-3' (tackon "icons" #installicons-3) 'upper_right' 'none' 0)
  82. )
  83.  
  84.  
  85. (if (exists "env:mui/AMITRADECENTER.1.cfg")
  86.   (set #isatc 1)
  87.   (set #isatc 0)
  88. )
  89.  
  90. (set #choice1 "Install ATC")
  91. (set #choice2 "Update ATC")
  92.  
  93. (set #inchoice
  94.   (askchoice
  95.     (if (= #isatc 1)
  96.      (
  97.       (prompt #detect)
  98.       (help #detect)
  99.      )
  100.      (
  101.       (prompt #installchoice)
  102.       (help #inst_help)
  103.      )
  104.     )
  105.     (choices #choice1 #choice2)
  106.     (default #isatc)
  107.   )
  108. )
  109.   
  110. (if (= #inchoice 0)
  111.   (
  112.     (set destpath
  113.       (askdir
  114.         (prompt #askdir)
  115.         (help #asl_help)
  116.         (default "work:")
  117.       )
  118.     )
  119.  
  120.     (set @default-dest
  121.       (tackon destpath "AmiTradeCenter")
  122.     )
  123.  
  124.     (set result
  125.       (makedir @default-dest
  126.         (prompt #makedir_help)
  127.         (infos)
  128.         (safe)
  129.       )
  130.     )
  131.  
  132.     (complete 5)
  133.  
  134.     (set result
  135.       (copyfiles
  136.         (prompt #copyfiles)
  137.         (help #copy_help)
  138.         (source "")
  139.         (dest @default-dest)
  140.         (all)
  141.         (infos)
  142.         (optional fail)
  143.         (safe)
  144.       )
  145.     )
  146.  
  147.     (complete 99)
  148.  
  149.     (if (>= (/ @installer-version 65536) 44)
  150.        (
  151.          (showmedia 'installpic' (tackon "icons" #installicons) 'upper_left' 'none' 0)
  152.          (showmedia 'installpic-2' (tackon "icons" #installicons-2) 'upper_center' 'none' 0)
  153.            (if (= #language "deutsch") ;crappy choice command suxx! we have to declare this here to get it work :(
  154.               (
  155.                (set #icon1 "Piktogramm 1")
  156.                (set #icon2 "Piktogramm 2")
  157.                (set #icon3 "Piktogramm 3")
  158.                (set #icon4 "Piktogramm 4")
  159.               )
  160.               (
  161.                (set #icon1 "Pictogram 1")
  162.                (set #icon2 "Pictogram 2")
  163.                (set #icon3 "Pictogram 3")
  164.                (set #icon4 "Pictogram 4")
  165.               )
  166.            )
  167.  
  168.          (set #iconchoice
  169.            (askchoice
  170.              (prompt #yourchoice)
  171.              (help #your_help)
  172.              (choices #icon1 #icon2 #icon3 #icon4)
  173.              (default 0)
  174.            )
  175.          )
  176.   
  177.          (if (= #iconchoice 0)
  178.            (set result
  179.              (copyfiles
  180.                (source (cat """icons/AmiTradeCenter1.info"))
  181.                (dest @default-dest)
  182.                (newname (cat "AmiTradeCenter.info"))
  183.                (optional "nofail" "force" "askuser")
  184.              )
  185.            )
  186.          )
  187.  
  188.          (if (= #iconchoice 1)
  189.            (set result
  190.              (copyfiles
  191.                (source (cat """icons/AmiTradeCenter2.info"))
  192.                (dest @default-dest)
  193.                (newname (cat "AmiTradeCenter.info"))
  194.                (optional "nofail" "force" "askuser")
  195.              )
  196.            )
  197.          )
  198.  
  199.          (if (= #iconchoice 2)
  200.            (set result
  201.              (copyfiles
  202.                (source (cat """icons/AmiTradeCenter3.info"))
  203.                (dest @default-dest)
  204.                (newname (cat "AmiTradeCenter.info"))
  205.                (optional "nofail" "force" "askuser")
  206.              )
  207.            )
  208.          )
  209.  
  210.          (if (= #iconchoice 3)
  211.            (set result
  212.              (copyfiles
  213.                (source (cat """icons/AmiTradeCenter4.info"))
  214.                (dest @default-dest)
  215.                (newname (cat "AmiTradeCenter.info"))
  216.                (optional "nofail" "force" "askuser")
  217.              )
  218.            )
  219.          )
  220.        )
  221.        (
  222.  
  223.          (set result
  224.            (copyfiles
  225.              (source (cat """icons/AmiTradeCenter1.info"))
  226.              (dest @default-dest)
  227.              (newname (cat "AmiTradeCenter.info"))
  228.              (optional "nofail" "force" "askuser")
  229.            )
  230.          )
  231.        )
  232.      )
  233.  
  234.       (set result
  235.         (copyfiles
  236.           (source (cat """icons/AmiTradeCenter_Drawer.info"))
  237.           (dest destpath)
  238.           (newname (cat "AmiTradeCenter.info"))
  239.           (optional "nofail" "force" "askuser")
  240.         )
  241.       )
  242.     )    
  243.   
  244.   (
  245.  
  246.  
  247.     (set destpath
  248.       (askdir
  249.         (prompt #askdir1)
  250.         (help #asl_help)
  251.         (default "work:")
  252.       )
  253.     )
  254.  
  255.     (set @default-dest
  256.       (tackon destpath "")
  257.     )
  258.  
  259.     (set result
  260.       (copyfiles
  261.         (prompt #copyfiles)
  262.         (help #copy_help)
  263.         (source "")
  264.         (dest destpath)
  265.         (pattern "~(#?profiles|#?config|#?icon#?|#?Center.info|#?.mcc)")
  266.         (optional fail)
  267.         (safe)
  268.       )
  269.     )
  270.   )
  271. )
  272.  
  273. (complete 98)
  274.  
  275. (set #NList_version (getversion "mui:libs/mui/NListTree.mcc"))
  276. (set #NList_ver (/ #NList_version 65536))
  277. (set #NList_rev (- #NList_version (* #NList_ver 65536)))
  278.  
  279. (if (= #language "deutsch")
  280.    (set #NList_text (cat "\nInstallierte Version:" #NList_ver"."#NList_rev))
  281.    (set #NList_text (cat "\nAlready installed version:" #NList_ver"."#NList_rev))
  282. )
  283.  
  284. (if (askbool (prompt #NListCopy #NList_new #NList_text)
  285.   (help #NList_help)
  286.   (choices #NListCopy-1 #NListCopy-2)
  287.   (default 1))
  288.   (
  289.     (set result
  290.       (copyfiles
  291.         (source (cat """mui/libs/mui/NListtree.mcc"))
  292.         (dest "mui:libs/mui/")
  293.         (newname (cat "NListtree.mcc"))
  294.         (optional "nofail" "force" "askuser")
  295.       )
  296.     )
  297.   )
  298.   (
  299.    (set #ready "Dann nicht..")
  300.   )
  301. )
  302.  
  303.  
  304. (complete 100)
  305.  
  306. (if (>= (/ @installer-version 65536) 44)
  307.   (
  308.     (closemedia installpic)
  309.       (closemedia installpic-2)
  310.         (if (askbool (prompt #showguide)
  311.           (help #guide_help)
  312.           (choices #showguide-1 #showguide-2)
  313.           (default 0))
  314.         (
  315.          (set #guideondisk (tackon @default-dest #theguide))
  316.          (showmedia 'media' #guideondisk 'upper_left' 'medium_large' 1 'wordwrap' 'panel')
  317.         )
  318.         (
  319.          (set #ready "done")
  320.         )
  321.      )
  322.      (set wbobj (tackon destpath @default-dest))
  323.      (openwbobject wbobj)
  324.   )
  325.  
  326. ; hey, the pain is over... pardy on garth!
  327.