home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d960 / powerplayer.lha / PowerPlayer / Install-PowerPlayer < prev    next >
Text File  |  1993-09-19  |  15KB  |  608 lines

  1. ; ************************************************
  2. ; *
  3. ; * $VER: Install-PowerPlayer v4.0 (19.09.93)
  4. ; *
  5. ; * This is the installation-script for PowerPlayer
  6. ; *
  7. ; * Copyright © 1993 Stephan Fuhrmann
  8. ; *
  9. ; ************************************************
  10.  
  11. (welcome "Welcome to the PowerPlayer installation!")
  12.  
  13. (set OSVersion (/ (getversion) 65536))
  14.  
  15. (message "PowerPlayer is SHAREWARE !\n\n"
  16.             "This means that you *MUST* pay the shareware-fee\n"
  17.             "after testing\n\nPowerPlayer\n\nor delete it.\n"
  18.             "\nChoose 'Proceed' if you agree!"
  19. )
  20.  
  21. (copylib
  22.     (prompt "Copying lh.library to LIBS:.")
  23.     (help
  24.         "The lh.library is needed to crunch/decrunch modules with PMC. "
  25.         "PowerPlayer will automatically decrunch these modules if the "
  26.         "lh.library is installed. This library is optional but installing it is recommended, though.\n\n"
  27.         @copylib-help
  28.     )
  29.     (source "libs/lh.Library")
  30.     (dest "LIBS:")
  31.     (confirm)
  32. )
  33.  
  34. (copylib
  35.     (prompt "Copying powerpacker.library to LIBS:.")
  36.     (help
  37.         "The powerpacker.library is needed to decrunch modules crunched with PowerPacker. "
  38.         "PowerPlayer will automatically decrunch these modules if the "
  39.         "powerpacker.library is installed. PowerPlayer needs this library to work.\n\n"
  40.         @copylib-help
  41.     )
  42.     (source "libs/powerpacker.Library")
  43.     (dest "LIBS:")
  44.     (confirm)
  45. )
  46.  
  47. (if (>= OSVersion 36)
  48.     (set reqmsg ("You're using OS 2.0 or higher."))
  49.     (set reqmsg ("You're using OS 1.3 or lower."))
  50. )
  51.  
  52. (if (>= OSVersion 36) (set defchoice 0) (set defchoice 1))
  53.  
  54. (set reqlib
  55.     (askchoice
  56.         (prompt "Copying ReqTools.Library to LIBS:\n" reqmsg)
  57.         (choices "Install special OS 2.0 version"
  58.                     "Install OS 1.3-compatible version")
  59.         (default defchoice)
  60.         (help
  61.             "If you are running your system with OS 2.0 and higher only, then "
  62.             "there is no need to install the OS 1.3-compatible version of the "
  63.             "ReqTools.Library - the OS 2.0 version is shorter and offers special "
  64.             "features that the OS 1.3-compatible version doesn't have.\n\n"
  65.             "If you're using OS 1.3 or lower, then you must install the OS 1.3-compatible "
  66.             "version of the ReqTools.Library.\n\n"
  67.             @askchoice-help
  68.         )
  69.     )
  70. )
  71.  
  72. (if (= reqlib 0)    (set rlpath "libs/OS2.0/reqtools.library")
  73.                         (set rlpath "libs/OS1.3/reqtools.library")
  74. )
  75.  
  76. (copylib
  77.     (prompt "Copying reqtools.library to LIBS:.")
  78.     (help
  79.         "The ReqTools.Library is needed to display the requesters in PowerPlayer. "
  80.         "PowerPlayer needs this library to work.\n\n"
  81.         @copylib-help
  82.     )
  83.     (source rlpath)
  84.     (dest "LIBS:")
  85.     (confirm)
  86. )
  87.  
  88. (set setemup
  89.     (askbool
  90.         (prompt "Do you want to setup the tooltypes for PowerPlayer ?")
  91.         (help
  92.             "A tooltype is a special kind of preset in an icon. These presets "
  93.             "can be modified by you now, the installer script offers to you this "
  94.             "simple graphical way of installing the tooltypes only once. "
  95.             "\n\n(Otherwise the standard presets are used)\n\n"
  96.             @askbool-help
  97.         )
  98.     )
  99. )
  100.  
  101. (if setemup
  102.     (
  103.         (
  104.             ;set up the qualifier for the shortcuts
  105.  
  106.             (set myqualifier "")
  107.  
  108.             (set qval
  109.                 (askoptions
  110.                     (prompt    "Please choose the keyboard qualifiers for\n"
  111.                                 "PowerPlayer's hotkeys!")
  112.                     (choices
  113.                         "Left Shift"
  114.                         "Right Shift"
  115.                         "Capslock"
  116.                         "Control"
  117.                         "Left Alt"
  118.                         "Right Alt"
  119.                         "Left Amiga"
  120.                         "Right Amiga"
  121.                     )
  122.                     (default 25)
  123.                     (help
  124.                         "A hotkey is a keyboard shortcut that allows to you to "
  125.                         "give commands to an application from every screen/window.\n\n"
  126.                         @askoptions-help
  127.                     )
  128.                 )
  129.             )
  130.             (if (IN qval 0) (set myqualifier ("LSHIFT!")))
  131.             (if (IN qval 1) (set myqualifier ("%s%s" myqualifier "RSHIFT!")))
  132.             (if (IN qval 2) (set myqualifier ("%s%s" myqualifier "CAPSLOCK!")))
  133.             (if (IN qval 3) (set myqualifier ("%s%s" myqualifier "CONTROL!")))
  134.             (if (IN qval 4) (set myqualifier ("%s%s" myqualifier "LALT!")))
  135.             (if (IN qval 5) (set myqualifier ("%s%s" myqualifier "RALT!")))
  136.             (if (IN qval 6) (set myqualifier ("%s%s" myqualifier "LAMIGA!")))
  137.             (if (IN qval 7) (set myqualifier ("%s%s" myqualifier "RAMIGA!")))
  138.  
  139.             (if (myqualifier)
  140.                 (set myqualifier (substr myqualifier 0 (- (strlen myqualifier) 1))))
  141.  
  142.         )
  143.  
  144.         (
  145.             ;set up the directory for the file requester
  146.             (set mydirectory
  147.                 (askdir
  148.                     (prompt "Select the directory where you store your modules.")
  149.                     (help
  150.                         "Usually users store their modules in one directory. "
  151.                         "If you want the filerequester of PowerPlayer to start in "
  152.                         "the directory where you store your modules, then choose your "
  153.                         "modules directory in the file requester!\n\n"
  154.                         @askfile-help
  155.                     )
  156.                     (default "")
  157.                     (disk)
  158.                 )
  159.             )
  160.         )
  161.  
  162.         (
  163.             ;set up the pattern for the file requester
  164.             (set mypattern
  165.                 (askstring
  166.                     (prompt    "Please enter the default matching pattern\n"
  167.                                 "for the file-requesters.\n\n"
  168.                                 "Recommended: '#?'\n"
  169.                                 "Other examples: 'MOD.#?'\n"
  170.                     )
  171.                     (help
  172.                         "A matching pattern is a kind of name mask applied to every "
  173.                         "name in a filerequester. If the name fits to the mask the "
  174.                         "name is displayed, otherwise not. Please consult your "
  175.                         "computers manual for more information on pattern matching.\n\n"
  176.                         @askstring-help
  177.                     )
  178.                     (default "#?")
  179.                 )
  180.             )
  181.         )
  182.         (
  183.             ;ask for the LED-mode
  184.             (set filtermode
  185.                 (askchoice
  186.                     (prompt "Which mode do you wish for the\nlow-pass audio filter ?\n")
  187.                     (choices "Force filter off (best quality)"
  188.                                 "Force filter on (high frequencies filtered)"
  189.                                 "Don't change the mode of the filter"
  190.                     )
  191.                     (default 2)
  192.                     (help
  193.                         "The low-pass audio filter is a special device in your AMIGA "
  194.                         "that prevents very high frequencies (=noise frequencies) from "
  195.                         "passing to your audio output. On normal AMIGAs there are "
  196.                         "no noise frequencies produced and the filter prevents the "
  197.                         "high frequencies of the samples from passing - the sound "
  198.                         "starts to be dull.\n\n"
  199.                         @askchoice-help
  200.                     )
  201.                 )
  202.             )
  203.             (if (= filtermode 0) (set myled "0"))
  204.             (if (= filtermode 1) (set myled "1"))
  205.             (if (= filtermode 2) (set myled "M"))
  206.  
  207.         )
  208.  
  209.         (
  210.             ;ask for the ASL-requesters
  211.             (if
  212.                 (askbool
  213.                     (prompt    "Do you want to use the system's ASL-filerequester\n"
  214.                                 "rather than the filerequester of the\n ReqTools.Library ?"
  215.                     )
  216.                     (default 0)
  217.                     (help
  218.                         "This is a question of taste. The ASL-filerequester is the "
  219.                         "system's standard for OS 2.0 and higher, if you have habituated "
  220.                         "to it you should select 'Yes'.\n\n"
  221.                         "The ReqTools.Library's filerequester is more powerful than the "
  222.                         "ASL-filerequester and it is used by many other programs, too. "
  223.                         "In the current version it is faster than the ASL-filerequester "
  224.                         "and is easier to work with.\n\n"
  225.                         @askbool-help
  226.                     )
  227.                 )
  228.                 (set myasl "TRUE")
  229.                 (set myasl "FALSE")
  230.             )
  231.         )
  232.  
  233.         (
  234.             ;ask for the timer
  235.             (if
  236.                 (askbool
  237.                     (prompt    "Do you want PowerPlayer to have a timer-display ?\n"
  238.                                 "\nThis will consume some CPU-cycles once a second.\n"
  239.                                 "(But you propably won't be able to spot the difference)"
  240.                     )
  241.                     (default 1)
  242.                     (help
  243.                         "Select 'Yes', there's no real reason to turn it off!\n\n"
  244.                         @askbool-help
  245.                     )
  246.                 )
  247.                 (set mytimer "FALSE")
  248.                 (set mytimer "TRUE")
  249.             )
  250.         )
  251.  
  252.         (
  253.             ;ask for the task pri
  254.             (set mytoolpri
  255.                 (cat
  256.                     (asknumber
  257.                         (prompt    "Which task priority do you want for PowerPlayer ?\n\n"
  258.                                     "Valid range: -3..0..3\n\n"
  259.                                     "Default is 0."
  260.                         )
  261.                         (default 0)
  262.                         (help
  263.                             "If you give a high task priority to PowerPlayer it will be "
  264.                             "faster on busy systems. With a low priority (lower than 0) "
  265.                             "PowerPlayer will only get CPU time if the other tasks are "
  266.                             "waiting for something (keypress, disk-access).\n\n"
  267.                             @asknumber-help
  268.                         )
  269.                     )
  270.                 )
  271.             )
  272.         )
  273.     )
  274. )
  275.  
  276. (
  277.     ;get destination dir for PowerPlayer-executable
  278.     (set mydest
  279.         (askdir
  280.             (prompt "Select the directory where you\n want to put the PowerPlayer executable.")
  281.             (help
  282.                 "The directory where you store the executable "
  283.                 "should be easily accessible via WorkBench or CLI/Shell.\n\n"
  284.                 @askfile-help
  285.             )
  286.             (default "Work:")
  287.             (disk)
  288.         )
  289.     )
  290.  
  291.     (if (= @user-level 0)
  292.         (
  293.             (set mydest (tackon mydest "PowerPlayer"))
  294.             (makedir
  295.                 mydest
  296.                 (prompt "Making PowerPlayer-Directory")
  297.                 (help @makedir-help)
  298.                 (infos)
  299.             )
  300.         )
  301.     )
  302.  
  303.     (set @default-dest mydest)
  304.  
  305.     (set ppdest (tackon mydest "PowerPlayer"))
  306.  
  307.     (
  308.         ; check the version of the destination-PowerPlayer (if exists)
  309.         (set vernum (getversion "PowerPlayer"))
  310.         (set ver (/ vernum 65536))
  311.         (set rev (- vernum (* ver 65536)))
  312.  
  313.         (if (= 1 (exists ppdest))
  314.             (
  315.                 (set dvernum (getversion ppdest))
  316.                 (set dver (/ dvernum 65536))
  317.                 (set drev (- dvernum (* ver 65536)))
  318.  
  319.  
  320.                 (if (<= vernum dvernum)
  321.                     (
  322.                         (if (= 0
  323.                             (askbool
  324.                                 (prompt    "ATTENTION: You have already installed\n\n"
  325.                                             ("PowerPlayer v%ld.%ld\n\nand are going to install\n\n" dver drev)
  326.                                             ("PowerPlayer v%ld.%ld.\n\n" ver rev)
  327.                                             "Do you want to continue installing an older version ?"
  328.                                 )
  329.                                 (default 0)
  330.                                 (help
  331.                                     "Installing an older version is unwise because there "
  332.                                     "may be bugs or important features missing in the "
  333.                                     "older version. If you proceed the newer version will "
  334.                                     "be lost!\n\n"
  335.                                     @askbool-help
  336.                                 )
  337.                                 (choices "Continue" "Abort")
  338.                     
  339.                             ))
  340.                             (abort "Okay, I didn't overwrite the executable.")
  341.                         )
  342.                     )
  343.                 )
  344.             )
  345.         )
  346.     )
  347.  
  348.     (set copyinfo 1)
  349.  
  350.     (if (= 1 (exists (ppdest (tackon mydest "PowerPlayer"))))
  351.         (if (askbool
  352.                 (prompt    "ATTENTION: You have are going to\n"
  353.                 "overwrite the PowerPlayer.info file which\n"
  354.                 "contains your previous setup.\n\n"
  355.                 "Do you want to overwrite old settings?")
  356.                 (default 0)
  357.                 (help
  358.                     "To get the full gain of new features, you should overwrite\n"
  359.                     "the old PowerPlayer.info-file with a more up-to-date\n"
  360.                     "info-file. On the other hand, you may want to continue\n"
  361.                     "using your old presets\n"
  362.                     @askbool-help
  363.                 )
  364.                 (choices "Yes" "No")
  365.             )
  366.             (set copyinfo 1)
  367.             (set copyinfo 0))
  368.         )
  369.  
  370.     (if (= copyinfo 1)
  371.         (copyfiles
  372.             (prompt ("Copying PowerPlayer executable to %s." mydest))
  373.             (help @copyfiles-help)
  374.             (source "PowerPlayer")
  375.             (dest mydest)
  376.             (infos)
  377.         )
  378.  
  379.         (copyfiles
  380.             (prompt ("Copying PowerPlayer executable to %s." mydest))
  381.             (help @copyfiles-help)
  382.             (source "PowerPlayer")
  383.             (dest mydest)
  384.         )
  385.     )
  386.  
  387.     ;install all this tooltype stuff
  388.     (if setemup
  389.         (
  390.             (tooltype
  391.             (prompt ("Modifying tooltypes for PowerPlayer in %s." mydest))
  392.                 (help @tooltype-help)
  393.                 (dest ppdest)
  394.                 (settooltype "QUALIFIER" myqualifier)
  395.             )
  396.  
  397.             (tooltype
  398.                 (prompt ("Modifying tooltypes for PowerPlayer in %s." mydest))
  399.                 (help @tooltype-help)
  400.                 (dest ppdest)
  401.                 (settooltype "DIRECTORY" mydirectory)
  402.             )
  403.  
  404.             (tooltype
  405.                 (prompt ("Modifying tooltypes for PowerPlayer in %s." mydest))
  406.                 (help @tooltype-help)
  407.                 (dest ppdest)
  408.                 (settooltype "PATTERN" mypattern)
  409.             )
  410.  
  411.             (tooltype
  412.                 (prompt ("Modifying tooltypes for PowerPlayer in %s." mydest))
  413.                 (help @tooltype-help)
  414.                 (dest ppdest)
  415.                 (settooltype "LED" myled)
  416.             )
  417.  
  418.             (tooltype
  419.                 (prompt ("Modifying tooltypes for PowerPlayer in %s." mydest))
  420.                 (help @tooltype-help)
  421.                 (dest ppdest)
  422.                 (settooltype "ASL" myasl)
  423.             )
  424.  
  425.             (tooltype
  426.                 (prompt ("Modifying tooltypes for PowerPlayer in %s." mydest))
  427.                 (help @tooltype-help)
  428.                 (dest ppdest)
  429.                 (settooltype "NOTIMER" mytimer)
  430.             )
  431.  
  432.             (tooltype
  433.                 (prompt ("Modifying tooltypes for PowerPlayer in %s." mydest))
  434.                 (help @tooltype-help)
  435.                 (dest ppdest)
  436.                 (settooltype "TOOLPRI" mytoolpri)
  437.             )
  438.         )
  439.     )
  440. )
  441.  
  442. (
  443.     ;Copy PMC
  444.     (set pmcdest
  445.         (askdir
  446.             (prompt "Select the directory where you\n want to put PMC.")
  447.             (help
  448.                 "This directory is usually your 'c:'-directory or the same "
  449.                 "directory where PowerPlayer resides in, too.\n\n"
  450.                 @askfile-help
  451.             )
  452.             (default mydest)
  453.             (disk)
  454.         )
  455.     )
  456.  
  457.     (copyfiles
  458.         (prompt ("Copying PMC executable to %s." pmcdest))
  459.         (help @copyfiles-help)
  460.         (source "PMC")
  461.         (dest pmcdest)
  462.     )
  463.  
  464. )
  465.  
  466. (
  467.     ;Copy Docs
  468.  
  469.     (if
  470.         (set qval
  471.             (askoptions
  472.                 (prompt    "Please choose which docs you want to have\n"
  473.                             "installed!\n"
  474.                             "(Or choose none to have no docs installed!)")
  475.                 (choices
  476.                     "English Docs"
  477.                     "German Docs"
  478.                     "French Docs"
  479.                 )
  480.  
  481.                 (default 7)
  482.                 (help
  483.                     "Not installing the docs is unwise because you could have "
  484.                     "questions while using PowerPlayer - then you would have to "
  485.                     "search the installer disk of PowerPlayer. Choosing the "
  486.                     "documentation in your favourite language is sufficient.\n\n"
  487.                     @askoptions-help
  488.                 )
  489.             )
  490.         )
  491.  
  492.         (
  493.             (set docsdest
  494.                 (askdir
  495.                     (prompt "Select the directory where you\n want to put the docs.")
  496.                     (help
  497.                         "You may store the docs "
  498.                         "where you usually store docs or in the directory where "
  499.                         "PowerPlayer resides in.\n\n"
  500.                         @askfile-help
  501.                     )
  502.                     (default mydest)
  503.                 )
  504.             )
  505.  
  506.             (if (IN qval 0)
  507.                 (copyfiles
  508.                     (prompt ("Copying english docs to %s." docsdest))
  509.                     (help @copyfiles-help)
  510.                     (source "Docs/PowerPlayer.English")
  511.                     (dest docsdest)
  512.                     (infos)
  513.                 )
  514.             )
  515.  
  516.             (if (IN qval 1)
  517.                 (copyfiles
  518.                     (prompt ("Copying german docs to %s." docsdest))
  519.                     (help @copyfiles-help)
  520.                     (source "Docs/PowerPlayer.Deutsch")
  521.                     (dest docsdest)
  522.                     (infos)
  523.                 )
  524.             )
  525.             (if (IN qval 2)
  526.                 (copyfiles
  527.                     (prompt ("Copying french docs to %s." docsdest))
  528.                     (help @copyfiles-help)
  529.                     (source "Docs/PowerPlayer.Français")
  530.                     (dest docsdest)
  531.                     (infos)
  532.                 )
  533.             )
  534.         )
  535.     )
  536. )
  537.  
  538. (
  539.     ;install LOCALEs
  540.  
  541.     (set catdir "LOCALE:catalogs")
  542.  
  543.     (if (= 2 (exists "LOCALE:" (noreq)))
  544.         (if
  545.             (set qval
  546.                 (askoptions
  547.                     (prompt    "Please choose which catalogs you want to have\n"
  548.                                 "installed!\n"
  549.                                 "(Or choose none to have no catalogs installed!)")
  550.                     (choices
  551.                         "Deutsch (german)"
  552.                         "Français (french)"
  553.                         "Norsk (norwegian)"
  554.                         "Português (portuguese)"
  555.                     )
  556.  
  557.                     (default 15)
  558.                     (help
  559.                         "It is sufficient to install the catalog(s) of the language(s) "
  560.                         "that you specified as 'preferred' in the locale-preferences "
  561.                         "editor. \n\n"
  562.                         @askoptions-help
  563.                     )
  564.                 )
  565.             )
  566.  
  567.             (
  568.                 (if (IN qval 0)
  569.                     (copyfiles
  570.                         (prompt ("Copying german catalog to %s." (tackon catdir "deutsch")))
  571.                         (help @copyfiles-help)
  572.                         (source "Catalogs/deutsch/PowerPlayer.catalog")
  573.                         (dest (tackon catdir "deutsch"))
  574.                         (infos)
  575.                     )
  576.                 )
  577.                 (if (IN qval 1)
  578.                     (copyfiles
  579.                         (prompt ("Copying french catalog to %s." (tackon catdir "français")))
  580.                         (help @copyfiles-help)
  581.                         (source "Catalogs/français/PowerPlayer.catalog")
  582.                         (dest (tackon catdir "français"))
  583.                         (infos)
  584.                     )
  585.                 )
  586.                 (if (IN qval 2)
  587.                     (copyfiles
  588.                         (prompt ("Copying norwegian catalog to %s." (tackon catdir "norsk")))
  589.                         (help @copyfiles-help)
  590.                         (source "Catalogs/norsk/PowerPlayer.catalog")
  591.                         (dest (tackon catdir "norsk"))
  592.                         (infos)
  593.                     )
  594.                 )
  595.                 (if (IN qval 3)
  596.                     (copyfiles
  597.                         (prompt ("Copying portuguese catalog to %s." (tackon catdir "português")))
  598.                         (help @copyfiles-help)
  599.                         (source "Catalogs/português/PowerPlayer.catalog")
  600.                         (dest (tackon catdir "português"))
  601.                         (infos)
  602.                     )
  603.                 )
  604.             )
  605.         )
  606.     )
  607. )
  608.