home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / cdrom / jukebox_2.1 / jukebox-extensions / install < prev    next >
Text File  |  1996-01-01  |  6KB  |  223 lines

  1. (procedure InstProgGui 
  2.         (
  3.         
  4.            (copyfiles
  5.                (prompt "Copying Prog-GUI")
  6.                (help "This is the executable which lets you chose the tracks to play.\n\n" @copyfiles-help)
  7.                (source "Prog-GUI")
  8.                (dest @default-dest)
  9.                (confirm)
  10.                )
  11.                
  12.         
  13.            (set textfile-help "The created AREXX script gets the necessary information from JukeBox and calls the executable, then works on its output and lets you hear the music. Great, isn't it?")
  14.            (set textfile-prompt "Creating AREXX script for Prog-GUI")
  15.            (set filename "prog.jb")
  16.  
  17.          (if (= num 0)
  18.              (
  19.               (textfile
  20.                   (dest (tackon @default-dest filename))
  21.                   (append "/* Prog.jb by Patrick Kursawe 1996 */\n\ntexts = \"Inhalt gewählt\"\n")
  22.                   (include "prog.main")
  23.                   (prompt textfile-prompt)
  24.                   (help textfile-help)
  25.                   (confirm)
  26.                   )
  27.              )
  28.              )
  29.           (if (= num 1)
  30.              ((
  31.                (textfile
  32.                 (dest (tackon @default-dest filename))
  33.                 (append "/* Prog.jb by Patrick Kursawe 1996 */\n\ntexts = \"contents chosen\"\n")
  34.                 (include "prog.main")
  35.                 (help textfile-help)
  36.                 (prompt textfile-prompt)
  37.                 (confirm)
  38.                 )
  39.              )
  40.               )
  41.          )
  42.               
  43.               (set fkey_pg (+ (askchoice
  44.                           (prompt "Please select an F-Key for calling Prog-GUI")
  45.                           (help "You can call the program from a shell (rx prog.jb) or by pressing an F-Key while the JukeBox-Window is active.\n\n" @askchoice-help)
  46.                           (choices "F1" "F2" "F3" "F4" "F5")
  47.                           (default 0)
  48.                           ) 1)
  49.                       )
  50.                       
  51.                   (tooltype
  52.                       (prompt (cat "Set ToolType MACRO_" fkey_pg "=prog"))
  53.                       (help (cat "This is necessary for calling Prog-GUI by F-Key " fkey_pg))
  54.                       (dest JukeBox)
  55.                       (settooltype (cat "MACRO_" fkey_pg) "prog")
  56.                       (confirm)
  57.                       )
  58.                   (set end1txt (cat "Prog-GUI can be called by F" fkey_pg " now.\n"))
  59.        )
  60.     )    
  61. (procedure InstCatViewer
  62.         (
  63.            (copyfiles
  64.                (prompt "Copying CatViewer")
  65.                (help "This is the executable which shows the catalog-file.\n\n" @copyfiles-help)
  66.                (source "CatViewer")
  67.                (dest @default-dest)
  68.                (confirm)
  69.                )
  70.            
  71.         
  72.            (set textfile-help "The script gets the name of the current catalog file and passes it to the viewer.")
  73.            (set textfile-prompt "Creating AREXX script for CatViewer")
  74.            (set filename "catview.jb")
  75.            
  76.          (if (= num 0)
  77.             ( 
  78.               (textfile
  79.                   (dest (tackon @default-dest filename))
  80.                   (append "/* CatView.jb by Patrick Kursawe 1996 */\n\ntexts = \"CD Titel weitersuchen Gefunden!\"\n")
  81.                   (include "catview.main")
  82.                   (help textfile-help)
  83.                   (prompt textfile-prompt)
  84.                   (confirm)
  85.                   )
  86.               
  87.             )
  88.            )
  89.          (if (= num 1)
  90.                (
  91.                
  92.                (textfile
  93.                    (dest (tackon @default-dest filename))
  94.                    (append "/* CatView.jb by Patrick Kursawe 1996 */\n\ntexts = \"CD title next Found!\"\n")
  95.                    (include "catview.main")
  96.                    (help textfile-help)
  97.                    (prompt textfile-prompt)
  98.                    (confirm)
  99.                    )
  100.                )
  101.              )
  102.         )
  103.  
  104.         (set fkey_cv (+ (askchoice
  105.                              (prompt "Please select an F-Key for calling CatViewer")
  106.                              (help "You can call the program from a shell (rx CatView.jb) or by pressing an F-Key while the JukeBox-Window is active.\n\n" @askchoice-help)
  107.                              (choices "F1" "F2" "F3" "F4" "F5")
  108.                              (default 1)
  109.                           ) 1)
  110.                       )
  111.                       
  112.  
  113.                       
  114.  
  115.                   (tooltype
  116.                       (prompt (cat "Set ToolType MACRO_" fkey_cv "=catview"))
  117.                       (help (cat "This is necessary for calling CatViewer by F-Key " fkey_cv))
  118.                       (dest JukeBox)
  119.                       (settooltype (cat "MACRO_" fkey_cv) "catview")
  120.                       (confirm)
  121.                       )
  122.                   (set end2txt (cat "CatViewer can be called by F" fkey_cv " now.\n"))
  123.     )
  124.  
  125. (procedure InstGuide
  126.         (
  127.          (set helptxt (cat "You wanted me to install the guide. I'm just doing this!\n\n" @copyfiles-help))
  128.         
  129.          (if (= num 0)
  130.                (copyfiles
  131.                    (prompt "Copying the Guide")
  132.                    (help helptxt)
  133.                    (source "Guides/German_guide")
  134.                    (dest @default-dest)
  135.                    (newname "JukeBox-Extensions.guide")
  136.                 (infos)
  137.                    (confirm 1)
  138.                    )
  139.            )
  140.          (if (= num 1)
  141.                 (copyfiles
  142.                     (prompt "Copying the Guide")
  143.                     (help helptxt)
  144.                     (source "Guides/English_guide")
  145.                     (dest @default-dest)
  146.                     (newname "JukeBox-Extensions.guide")
  147.                     (infos)
  148.                     (confirm 1)
  149.                     )
  150.                 
  151.              )
  152.         )
  153.     )
  154.  
  155. (welcome "This Installer script will extend your JukeBox® by two "
  156.          "additional functions. You will just have to answer a few questions..."
  157.          )
  158.  
  159. (complete 0)
  160.  
  161.  
  162.  
  163.  
  164.  
  165. (if (>= 37 (/ (getversion "intuition.library" (resident)) 65536))
  166.      (abort "You need at least V37 to use these programs.\n(That means Workbench V2.0 minimum!)")
  167.      )
  168.      
  169. (set JukeBox (askfile
  170.             (prompt "Please select the JukeBox executable")
  171.             (help "I need to copy some files into the directory where JukeBox is,"
  172.              "later I may modify the ToolTypes of JukeBox.\n"
  173.              "Just select the file you double-click when starting JukeBox.\n\n" @askdir-help )
  174.             (default "work:JukeBox/JukeBox")
  175.             )
  176.         )
  177. (set @default-dest (pathonly JukeBox))
  178.  
  179. (set bits (askoptions
  180.         (prompt "Which extensions do you wish to install?")
  181.         (help "Well, I suggest you take all, though you don't really need the guide!\n\n" @askoptions-help)
  182.         (choices "Prog-GUI" "CatViewer" "Guide")
  183.         )
  184.     )
  185.  
  186. (set num (askchoice
  187.         (prompt "Choose a language. See HELP for more info.")
  188.         (help "The guide is available in german or english, "
  189.          "it's up to you to decide. The programs can be adapted to other "
  190.          "languages quite easily. See the guide for more information.\n\n" @askchoice-help)
  191.         (choices "Deutsch" "english")
  192.         )
  193.     )
  194.  
  195. (complete 10)
  196.  
  197. (if (in bits 0)
  198.     ((InstProgGui)
  199.      
  200.      )
  201.     )
  202. (if (in bits 1)
  203.     ((InstCatViewer)
  204.      
  205.      )
  206.     )
  207. (if (in bits 2)
  208.     ((InstGuide)
  209.      
  210.      )
  211.     )
  212. (if (= bits 0)
  213.     (abort "Why did you get here when you don't want to install anything?")
  214.     )
  215.  
  216. (complete 90)
  217.  
  218.  
  219. (complete 100)
  220. (exit "Wish you fun with JukeBox-Extensions!\n"
  221.       "Don't forget the email/postcard! (see guide)\n\n"
  222.       end1txt end2txt
  223.       )