home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Sound / SecondSpin / Install-SecondSpin < prev    next >
Text File  |  2000-01-14  |  9KB  |  398 lines

  1. ; SecondSpin Installer - Rev0022 - 03/10/99
  2. ; Install script (C) Kristian Van Der Vliet 1999
  3. ;
  4. ; Note to anyone reading this: Do not change this script. Do not copy wholesale
  5. ; from it. Do not even think about it. Email me (In the docs) if you want some
  6. ; help with installer scripts.
  7. ;
  8. ; Expert users: There is no expert mode. Sorry. Still, i cant think it would get
  9. ; much harder as it stands anyway....
  10. ;
  11. ; SecondSpin (c) -zuulikuuli
  12.  
  13. (set @app-name
  14. (cat "SecondSpin"
  15. ))
  16.  
  17. (set #welcome
  18. (cat "Welcome to the Installer for SecondSpin.\nInstaller script ©1999 Kristian Van Der Vliet\n\nPlease make sure you have obtained both archives!"
  19. ))
  20.  
  21. (set @default-dest
  22. (cat "Work:"
  23. ))
  24.  
  25. (welcome #welcome)
  26.  
  27. ; We need to be sure that Processor archive has been installed too!
  28.  
  29.  (set encoderdir
  30. (cat "encoders"
  31. ))
  32.  
  33. (if (NOT (exists encoderdir))
  34.     (MESSAGE "\nUnable to locate MP3 Encoder archive files.\n\nMP3 mode will be disabled!")
  35.  
  36. )
  37.  
  38. ; First we want a proper destination dir for the main files
  39.  
  40. (set @default-dest
  41.     (askdir
  42.         (prompt "Please select a destination directory for the Installation\nof SecondSpin. A directory called SecondSpin will be created there")
  43.         (help "No help as yet")
  44.         (newpath)
  45.         (default "Work:")
  46.     )
  47. )
  48.  
  49. (set @default-dest
  50.     (tackon @default-dest "SecondSpin")
  51. )
  52.  
  53. ; Ask which CPU the user has 
  54.  
  55. (set #cpu-version
  56. (askchoice 
  57.     (prompt "Please select the CPU version of SecondSpin you would like to install.")
  58.     (help "In order to provide the best speed when handling MPEG Audio, SecondSpin offers several different executables for different processors. If your machine does have an FPU, it's better to use one. If you have a 68000/68010, please upgrade your machine! If the encoder crashes violently, you might have installed FPU version, although your cpu doesn't have a FPU unit, or it isn't working properly.")
  59.     (choices "PPC" "060 with FPU" "040 with FPU" "030 with FPU" "030 without FPU" "020 with FPU" "020 without FPU")
  60. ))
  61.  
  62. ; Now we need a few configuration details to set the ENV: labels
  63. ; First the device name
  64.  
  65. (set #cd-device
  66. (askstring
  67.     (prompt "Please enter the AmigaDOS device name for your CD-Rom drive.")
  68.     (help "You should enter the AmigaDOS device name for the interface that your CD-Rom drive is connected to I.E scsi.device")
  69.     (default "scsi.device")
  70. ))
  71.  
  72. ; Now the device unit
  73.  
  74. (set #cd-unit
  75. (asknumber
  76.     (prompt "Please enter the Unit number for your CD-Rom drive.")
  77.     (help "You should enter the Unit number for your CD-Rom drive. For an IDE/ATAPI drive this may be 0 or 1, SCSI drives will typically be in the range 0-7.")
  78.     (default 0)
  79.     (range 0 15)
  80. ))
  81.  
  82. ; Finally the CD-Rom type (for cdda_plan)
  83.  
  84. (set #cd-type
  85. (askchoice
  86.     (prompt "Please select your CD-Rom type from the list below.")
  87.     (help "The CD-DA ripper that SecondSpin uses works slightly diferently depending on the make of CD-Rom drive. If you have an IDE/ATAPI drive you should select either 'ATAPI' or 'Old ATAPI' from the list. SCSI drive users should consult their manual, but 'ATAPI' might work fine with most SCSI devices.\n\nNote: Not all CD-Rom drives support CD-DA sampling. If you have such a drive, you may find that the Audio CD-DA quality is poor, or the drive gives eratic results when sampling. This is not caused by SecondSpin.")
  88.     (choices "Sony CDU 8003 and compatible" "Toshiba XM3401TA and compatible" "NEC 2X and 3X" "Some Grundig & Toshiba CD-ROM's" "Standard ATAPI / SCSI" "Old ATAPI" "None of the above")
  89. ))
  90.  
  91. ; Do the bits here to check #cd-type and set #cd-plan acordingly
  92.  
  93. (select #cd-type
  94.     (set #cd-plan "a")
  95.     (set #cd-plan "b")
  96.     (set #cd-plan "c")
  97.     (set #cd-plan "d")
  98.     (set #cd-plan "e")
  99.     (set #cd-plan "f")
  100.     (set #cd-plan "n")
  101. )
  102.  
  103. ; Now we can start copying our files about
  104. ; Make the main dir & copy the files needed.
  105.  
  106. (makedir @default-dest
  107.     (prompt "Creating directory " @default-dest)
  108.     (help "No help as yet")
  109.     (infos)
  110. )
  111.  
  112. ; Now we can copy the remaining main files
  113.  
  114.  
  115. (copyfiles
  116.     (source "bin/")
  117.     (dest @default-dest)        ; Copy the main files to the dest-dir
  118.     (all)
  119.     (infos)
  120. )
  121.  
  122. (copyfiles
  123.     (source "")
  124.     (pattern "SecondSpin.guide#?")
  125.     (dest @default-dest)
  126. )
  127.  
  128. (set #tables-dest
  129. (cat @default-dest "/mpeg_tables"    ; We also need a sub-dir "mpeg_tables"
  130. ))
  131.  
  132. (makedir #tables-dest)
  133.  
  134. (copyfiles
  135.     (prompt "Copying the MPEG Tables to " #tables-dest)
  136.     (source "mpeg_tables/")
  137.     (dest #tables-dest)
  138.     (all)
  139. )
  140.  
  141. ; Do the C: S: and LIBS: files
  142.  
  143. (set #cmd-dest
  144. (cat @default-dest "/external_commands"    ; We need an external_commands directory
  145. ))
  146.  
  147. (set #docs-dest
  148. (cat @default-dest "/docs"    ; We need a docs directory
  149. ))
  150.  
  151. (set #catalogs-dest
  152. (cat @default-dest "/Catalogs"    ; We need a catalog directory (Now who changed this? Wasn't me, i would have got it right the first time ;) )
  153. ))
  154.  
  155. (makedir #cmd-dest)
  156. (makedir #catalogs-dest)
  157.  
  158. (copyfiles
  159.     (source "external_commands")
  160.     (dest #cmd-dest)
  161.     (all)
  162. )
  163.  
  164. (copyfiles
  165.     (source "Catalogs")
  166.     (dest #catalogs-dest)
  167.     (all)
  168. )
  169.  
  170.  
  171. ; Now copy the correct CPU version of the encoder
  172. ; Note that this is a little bit neater than the older Installers ;)
  173.  
  174. (set #lamer-dest
  175. (cat @default-dest "/external_commands/"
  176. ))
  177.  
  178.  
  179. (if (exists encoderdir)
  180.  
  181.     (select #cpu-version
  182.  
  183.         (copyfiles
  184.         (source "encoders/SecondSpin_encoder.elf")
  185.         (dest #lamer-dest)
  186.         (newname "SecondSpin_encoder")
  187.         )
  188.     
  189.         (copyfiles
  190.         (source "encoders/SecondSpin_encoder.060fpu")
  191.         (dest #lamer-dest)
  192.         (newname "SecondSpin_encoder")
  193.         )
  194.  
  195.         (copyfiles
  196.         (source "encoders/SecondSpin_encoder.040fpu")
  197.         (dest #lamer-dest)
  198.         (newname "SecondSpin_encoder")
  199.         )
  200.  
  201.         (copyfiles
  202.         (source "encoders/SecondSpin_encoder.030fpu")
  203.         (dest #lamer-dest)
  204.         (newname "SecondSpin_encoder")
  205.         )
  206.  
  207.         (copyfiles
  208.         (source "encoders/SecondSpin_encoder.030")
  209.         (dest #lamer-dest)
  210.         (newname "SecondSpin_encoder")
  211.         )
  212.  
  213.         (copyfiles
  214.         (source "encoders/SecondSpin_encoder.020fpu")
  215.         (dest #lamer-dest)
  216.         (newname "SecondSpin_encoder")
  217.         )
  218.  
  219.         (copyfiles
  220.         (source "encoders/SecondSpin_encoder.020")
  221.         (dest #lamer-dest)
  222.         (newname "SecondSpin_encoder")
  223.         )
  224.  
  225.     )
  226.  
  227. )
  228.  
  229. ; Now the mpega-libs to libs:
  230.  
  231. (set #mpega-dest
  232.     (cat "Libs:"
  233. ))
  234.  
  235.  (set mpegalib
  236. (cat "Libs:mpega.library"
  237. ))
  238.  
  239. (if (NOT (exists mpegalib))
  240. (select #cpu-version
  241.  
  242.     ((copyfiles
  243.         (source "libs-mpega/mpegaPPC.library")            ; PPC
  244.         (dest #mpega-dest)
  245.         (newname "mpega.library")
  246.     )
  247.  
  248.     (copyfiles
  249.         (source "libs-mpega/mpegappcFPU_library.elf")        ; And another PPC library
  250.         (dest #mpega-dest)
  251.         (newname "mpega.library.elf")
  252.     ))
  253.  
  254.     (copyfiles
  255.         (source "libs-mpega/mpega060FPU.library")        ; 060
  256.         (dest #mpega-dest)
  257.         (newname "mpega.library")
  258.     )
  259.  
  260.     (copyfiles
  261.         (source "libs-mpega/mpega040FPU.library")        ; 040
  262.         (dest #mpega-dest)
  263.         (newname "mpega.library")
  264.     )
  265.  
  266.     (copyfiles
  267.         (source "libs-mpega/mpega020FPU.library")        ; 030 fpu
  268.         (dest #mpega-dest)
  269.         (newname "mpega.library")
  270.     )
  271.  
  272.     (copyfiles
  273.         (source "libs-mpega/mpega020.library")            ; 030 no fpu
  274.         (dest #mpega-dest)
  275.         (newname "mpega.library")
  276.     )
  277.  
  278. ; Note to any 030 users reading this, sorry, but mpega only comes in 020
  279. ; versions, however the SecondSpin_Encoder DOES, so you do have some advantages
  280. ; over 020 users...
  281.  
  282.     (copyfiles
  283.         (source "libs-mpega/mpega020FPU.library")        ; 020 fpu
  284.         (dest #mpega-dest)
  285.         (newname "mpega.library")
  286.     )
  287.  
  288.     (copyfiles
  289.         (source "libs-mpega/mpega020.library")            ; 020 no fpu
  290.         (dest #mpega-dest)
  291.         (newname "mpega.library")
  292.     )
  293.  
  294. )
  295. )
  296.  
  297. ; Now the docs
  298.  
  299. (makedir #docs-dest)
  300.  
  301. (copyfiles
  302.    (source "docs")
  303.    (dest #docs-dest)
  304.    (all)
  305. )
  306.  
  307. (copyfiles
  308.    (source "docs.info")
  309.    (dest @default-dest)
  310.    (nogauge)
  311. )
  312.  
  313. ; Now we copy all of the required libs
  314.  
  315. (copylib
  316.    (source "libs/reqtools.library")
  317.    (dest "LIBS:")
  318. )
  319.  
  320. (copylib
  321.    (source "libs/rexxreqtools.library")
  322.    (dest "LIBS:")
  323. )
  324.  
  325. (copylib
  326.    (source "libs/rexxtricks.library")
  327.    (dest "LIBS:")
  328. )
  329.  
  330. (copylib
  331.    (source "libs/triton.library")
  332.    (dest "LIBS:")
  333. )
  334.  
  335. (copylib
  336.    (source "libs/tritonrexx.library")
  337.    (dest "LIBS:")
  338. )
  339.  
  340. (copylib
  341.    (source "libs/ixemul.library")
  342.    (dest "LIBS:")
  343. )
  344.  
  345. (copylib
  346.    (source "libs/2ndspin.library")
  347.    (dest "LIBS:")
  348. )
  349.  
  350. ; Bet it didn't copy that library, did it?
  351. ; It'll have to be a filecopy instead, for now.
  352.  
  353. (copyfiles
  354.    (source "libs/2ndspin.library")
  355.    (dest "LIBS:")
  356.    (nogauge)
  357. )
  358.  
  359.  
  360. ; Now create the ENV: labels needed for the CDDA ripper
  361.  
  362. (textfile
  363.     (dest "ENVARC:cdda_device")
  364.     (append #cd-device)
  365. )
  366.  
  367. (textfile
  368.     (dest "ENVARC:cdda_unit")
  369.     (append #cd-unit)
  370. )
  371.  
  372. ; Check to see if we need a cd-plan before we set it
  373.  
  374. (if (<> #cd-type 6)
  375.     (textfile
  376.         (dest "ENVARC:cdda_plan")
  377.         (append #cd-plan)
  378.     )
  379. )
  380.  
  381. ; Copy the env labels into ENV: to avoid the reboot
  382.  
  383. (copyfiles
  384.     (source "ENVARC:")
  385.      (dest "ENV:")
  386.     (pattern "cdda#?")
  387. )
  388.  
  389. ; Now put the SecondSpin: assign in user-startup
  390.  
  391. (startup "SecondSpin"
  392.     (prompt "Adding assign to your user-startup sequence")
  393.     (help "No help as yet.")
  394.     (command "Assign SecondSpin: " @default-dest)
  395. )
  396.  
  397. ; That's all the work done. Ta da!
  398.