home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Programy / Muzyczne / Sid4Amiga.lha / Sid4Amiga / Install_Sid4Amiga < prev    next >
Text File  |  2000-02-07  |  11KB  |  331 lines

  1. ; **********************************************
  2. ; ** Sid4Amiga Install - Getting Better....   **
  3. ; **                                          **
  4. ; **********************************************
  5.  
  6. (set #welcome  (cat "Welcome to Sid4Amiga\nThe new generation Sid Player for your Amiga\n"
  7.                 "\nAmiga Version, Global Prefs & MUI Multi Play Interface"
  8.                 "\nBy\nPaul Heams"
  9.                 "\n\nArtwork and Web Design by Chris Andrews"
  10.                 "\nOriginal Linux code base by Michael schwendt\n"
  11.                 "\n\n© Copyright 1999/2000 Paul Heams - Atlantech Productions")
  12. )
  13.  
  14. (set #backup   (cat "\n\nA Directory with this name already exists.\nIf a previous version has been "
  15.                     "installed here it will be overwriten\n\n"
  16.                     "Do you wish to proceed with the install?")
  17. )
  18.  
  19. (set #s4aDetected   (cat "\n\n..NOTE..\n\nIt appears that a version of Sid4Amiga is Running at the moment\n"
  20.                         "Please quit the existing application and re-run the Installation\n\n"
  21.                         "A reboot may be preferable.")
  22. )
  23. (set #s4aClear      (cat "\n\n..OK..\n\nIt appears that your system is ready to install Sid4Amiga\n"
  24.                      "Do not start Sid4Amiga until the\n"
  25.                         "installation has completed.")
  26. )
  27.  
  28. (set #IconCopy      ("\nWhat Icons do you wish to install by default?\n")
  29. )
  30.  
  31. (set #startup-prompt (cat "\nAn assign for Sid4Amiga is usefull for some advanced functions.\n\n"
  32.                           "Your user-startup file will be altered and an Assign for 'S4A' will point to:\n\n")
  33. )
  34. (set #startup-prompt-2 ("\n\nIt is recommended you proceed with this.\n")
  35. )
  36.  
  37.  
  38. (complete 0)
  39.  
  40. (message #welcome)
  41.  
  42. ;*************************************************************************
  43. ;** Make sure that an older version of Sid4Amiga is not already running **
  44. ;*************************************************************************
  45. (if (run "S4AInstall/SidRunning")
  46.     ( (message #s4aDetected) (exit (quiet)) )
  47.         ( (message #s4aClear)                   )
  48. )
  49.  
  50. ;************************************
  51. ;** Get Avail Command if it exists **
  52. ;************************************
  53. (set #avail 0)
  54. (if (> (exists ("c:avail")) 0)   (set #avail "c:") )
  55. (if (> (exists ("sys:avail")) 0) (set #avail "sys:") )
  56.  
  57. ;*************
  58. ;** Install **
  59. ;*************
  60. (set #name
  61.    (askdir
  62.       (prompt "Sid4AmigaV3.32\n\nWhere would you like to install Sid4Amiga?\nA new directory called ''Sid4Amiga'' will be created.\n"
  63.       )
  64.       (help   "\nChoose the directory where Sid4Amiga should be"
  65.               "\ninstalled or updated."
  66.       )
  67.       (default "sys:")
  68.    )
  69. )
  70.  
  71. (set #Dname (tackon #name "Sid4Amiga"))
  72.  
  73. (if (exists #Dname)
  74.     (message #backup)
  75. )
  76.  
  77. (makedir #Dname
  78.  (infos)
  79. )
  80.  
  81. ; *************************
  82. ; ** modify user-startup **
  83. ; *************************
  84. ((startup "S4A"
  85.     (prompt (cat
  86.             #startup-prompt
  87.             #Dname
  88.             #startup-prompt-2
  89.     ))
  90.     (command (cat "Assign S4A: " #Dname))
  91.     (help @startup-help)
  92. )
  93. (makeassign "S4A" #Dname (safe)))
  94.  
  95.  
  96. ; ***********************
  97. ; ** Get type of icons **
  98. ; ***********************
  99. (set #icontype 0)
  100. (set #PickIcon 0)
  101. (set #PickIcon (askchoice (choices "Combined Original and OS3.5" "OS3.5" "New Icons")
  102.                         (prompt #IconCopy)
  103.                         (help "Select your icons set.\nif you are unsure I suggest you select the topmost option.")
  104.                         (default #icontype)
  105.             )
  106.  
  107. ;***************
  108. ;** Main Copy **
  109. ;***************
  110. (set destdir #Dname)
  111.  
  112. (copyfiles (prompt "Copying Sid4AmigaMUI")         (source "Sid4AmigaMUI")     (dest destdir) )
  113. (copyfiles (prompt "Copying Sid4AmigaGlobalPrefs")     (source "S4A_Preferences")     (dest destdir) )
  114. (copyfiles (prompt "Copying Guide")             (source "Sid4Amiga.guide")     (dest destdir) )
  115.  
  116. ;** ICONS **
  117. (if (= #PickIcon 0)
  118. (
  119.     (copyfiles (prompt "Copying Sid4AmigaMUI Icon (STD)") (source "Sid4AmigaMUI.info") (dest destdir) )
  120.     (copyfiles (prompt "Copying Sid4AmigaGlobalPrefs Icon (STD)") (source "S4A_Preferences.info") (dest destdir) )
  121.     (copyfiles (prompt "Copying Guide Icon (STD)") (source "Sid4Amiga.guide.info") (dest destdir) )
  122.     (copyfiles (prompt "Copying Drawer Icon (STD)") (source "/Sid4Amiga.info") (dest #name))
  123. ))
  124.  
  125. (if (= #PickIcon 1)
  126. (
  127.     (copyfiles (prompt "Copying Sid4AmigaMUI Icon (OS3.5)") (source "Icons/OS3.5/Sid4AmigaMUI.info") (dest destdir) )
  128.     (copyfiles (prompt "Copying Sid4AmigaGlobalPrefs Icon (OS3.5)") (source "Icons/OS3.5/S4A_Preferences.info") (dest destdir) )
  129.     (copyfiles (prompt "Copying Guide Icon (OS3.5)") (source "Icons/OS3.5/Sid4Amiga.guide.info") (dest destdir) )
  130.     (copyfiles (prompt "Copying Drawer Icon (OS3.5)") (source "Icons/OS3.5/Sid4Amiga.info") (dest #name))
  131. ))
  132.  
  133. (if (= #PickIcon 2)
  134. (
  135.     (copyfiles (prompt "Copying Sid4AmigaMUI Icon (NI)") (source "Icons/NewIcons/Sid4AmigaMUI.info") (dest destdir) )
  136.     (copyfiles (prompt "Copying Sid4AmigaGlobalPrefs Icon (NI)") (source "Icons/NewIcons/S4A_Preferences.info") (dest destdir) )
  137.     (copyfiles (prompt "Copying Guide Icon (NI)") (source "Icons/NewIcons/Sid4Amiga.guide.info") (dest destdir) )
  138.     (copyfiles (prompt "Copying Drawer Icon (NI)") (source "Icons/NewIcons/Sid4Amiga.info") (dest #name))
  139. ))
  140.  
  141. (complete 35)
  142. ; ***********************************
  143. ; ** Copy over correct CPU Version **
  144. ; ***********************************
  145. (set #cpu 2)
  146. (set #S4Acpu "Which CPU do you have?")
  147. (set #PickCPU 2)
  148.  
  149.  
  150. (set #PickCPU (askchoice (choices "68020" "68040FPU" "PPC (WarpOS)")
  151.                         (prompt #S4Acpu)
  152.                         (help "Please select the main processor of your machine - If you don't know then select 68020!")
  153.                         (default #cpu)
  154.             )
  155.  
  156. (if (= #PickCPU 0) (set #mainfile "Sid4Amiga680x0/Sid4Amiga020") )
  157. (if (= #PickCPU 1) (set #mainfile "Sid4Amiga680x0/Sid4Amiga040fpu") )
  158. (if (= #PickCPU 2) (set #mainfile "Sid4Amiga") )
  159.  
  160. (complete 50)
  161. (set mainsource #mainfile)
  162. (copyfiles (prompt "Copying Main Executable")
  163.            (source mainsource)
  164.            (dest destdir)
  165.            (newname "Sid4Amiga") 
  166. )
  167.  
  168. ;*******************************
  169. ;** Copy GUI / Graphics Etc.. **
  170. ;*******************************
  171. (complete 65)
  172. (set #Tname (tackon #Dname "Images"))
  173. (makedir #Tname)
  174. (set destimages #Tname)
  175.  
  176. ;******************************************************************************
  177. ;** If the Images already exist and we do not have avail then do not copy    **
  178. ;** them over - this is because of a lock which avail will flush             **
  179. ;******************************************************************************
  180. (if (<> #avail 0)
  181.     (
  182.     (run (tackon #avail "avail") "flush >nil:")
  183.         (copyfiles (prompt "Copying Sid Logo") (source "Images/newsidupright_s.iff") (dest destimages))
  184.         (copyfiles (prompt "Copying C64 Logo") (source "Images/CKey.iff") (dest destimages))
  185.     )
  186.     (
  187.     (set #NEWname (tackon destimages "newsidupright_s.iff"))
  188.     (if (= (exists #NEWname) 0)
  189.         (copyfiles (prompt "Copying Sid Logo") (source "Images/newsidupright_s.iff") (dest destimages))
  190.  
  191.     )
  192.     (set #NEWname (tackon destimages "CKey.iff"))
  193.     (if (= (exists #NEWname) 0)
  194.         (copyfiles (prompt "Copying C64 Logo") (source "Images/CKey.iff") (dest destimages))
  195.     )
  196.     )
  197. )
  198.  
  199. (complete 70)
  200. (set #Tname (tackon #Dname "Images/Gadgets"))
  201. (makedir #Tname)
  202. (set destgadgets #Tname)
  203. (copyfiles (prompt "Copying Gadgets") (source "Images/Gadgets/") (dest destgadgets) (pattern "#?"))
  204.  
  205. ; ************************
  206. ; ** Copy Example Tunes **
  207. ; ************************
  208. (complete 80)
  209. (set #Tname (tackon #Dname "SidTunes"))
  210. (if (= (exists #Tname) 0)
  211.   (
  212.     (makedir #Tname)
  213.  
  214.     (if (= #PickIcon 0)
  215.         (copyfiles (prompt "Copying Drawer Icon (STD)") (source "SidTunes.info") (dest destdir)) 
  216.     )
  217.     (if (= #PickIcon 1)
  218.         (copyfiles (prompt "Copying Drawer Icon (OS3.5)") (source "Icons/OS3.5/SidTunes.info") (dest destdir)) 
  219.     )
  220.     (if (= #PickIcon 2)
  221.         (copyfiles (prompt "Copying Drawer Icon (NI)") (source "Icons/NewIcons/SidTunes.info") (dest destdir)) 
  222.     )
  223.  
  224.   )
  225. )
  226.  
  227. (set desttunes #Tname)
  228. (copyfiles (prompt "Copying SidTunes")
  229.            (source "SidTunes/")
  230.            (dest desttunes)
  231.            (pattern "#?")
  232. )
  233.  
  234. ;*******************
  235. ;** Play List Dir **
  236. ;*******************
  237. (complete 86)
  238. (set #Tname (tackon #Dname "PlayLists"))
  239. (if (= (exists #Tname) 0)
  240.   (
  241.     (makedir #Tname)
  242.  
  243.     (if (= #PickIcon 0)
  244.         (copyfiles (prompt "Copying Drawer Icon (STD)") (source "PlayLists.info") (dest destdir)) 
  245.     )
  246.     (if (= #PickIcon 1)
  247.         (copyfiles (prompt "Copying Drawer Icon (OS3.5)") (source "Icons/OS3.5/PlayLists.info") (dest destdir)) 
  248.     )
  249.     (if (= #PickIcon 2)
  250.         (copyfiles (prompt "Copying Drawer Icon (NI)") (source "Icons/NewIcons/PlayLists.info") (dest destdir)) 
  251.     )
  252.  
  253.   )
  254. )
  255.  
  256. ;******************
  257. ;** AltIcons Dir **
  258. ;******************
  259. (set #IconD (tackon #Dname "Icons"))
  260. (if (= (exists #IconD) 0)
  261.   (
  262.     (makedir #IconD)
  263.  
  264.     (if (= #PickIcon 0)
  265.         (copyfiles (prompt "Copying Drawer Icon (STD)") (source "Icons.info") (dest destdir)) 
  266.     )
  267.     (if (= #PickIcon 1)
  268.         (copyfiles (prompt "Copying Drawer Icon (OS3.5)") (source "Icons/OS3.5/Icons.info") (dest destdir)) 
  269.     )
  270.     (if (= #PickIcon 2)
  271.         (copyfiles (prompt "Copying Drawer Icon (NI)") (source "Icons/NewIcons/Icons.info") (dest destdir)) 
  272.     )
  273.   )
  274. )
  275. (set desticons #IconD)
  276. (copyfiles (prompt "Copying Alternative Icons") (source "Icons") (dest desticons) (pattern "#?"))
  277.  
  278. ; ***************
  279. ; ** Copy Libs **
  280. ; ***************
  281. (complete 90)
  282. (if (exists "libs:")
  283.    (copyfiles (prompt "Copying Sid4Amiga.library") (source "Libs/Sid4Amiga.library") (dest "libs:"))
  284. )
  285.  
  286. (complete 93)
  287. (set #multiview 0)
  288.  
  289. (if (> (exists ("c:multiview")) 0) (set #multiview "c:") )
  290. (if (> (exists ("sys:Utilities/multiview")) 0) (set #multiview "sys:Utilities") )
  291. (if (> (exists ("sys:Tools/multiview")) 0) (set #multiview "sys:Tools") )
  292.  
  293. (if (<> #multiview 0)
  294.     ((run (tackon #multiview "multiview ") "S4AInstall/Welcome.text")))
  295.  
  296. (complete 95) 
  297. (run "S4A_preferences")
  298.  
  299. ; **********************
  300. ; ** Delete old Files **
  301. ; **********************
  302. (complete 96) 
  303. (set #OldFile (tackon #Dname "Sid4AmigaGUI"))
  304. (if (exists #OldFile) (delete #OldFile)
  305. )
  306. (set #OldFile (tackon #Dname "Sid4AmigaPPC.guide"))
  307. (if (exists #OldFile) (delete #OldFile)
  308. )
  309. (set #OldFile (tackon #Dname "Sid4AmigaPPC.guide.info"))
  310. (if (exists #OldFile) (delete #OldFile)
  311. )
  312. (set #OldFile (tackon #Dname "Sid4AmigaGUI.info"))
  313. (if (exists #OldFile) (delete #OldFile)
  314. )
  315.  
  316. ; ********************
  317. ; ** Flush old libs **
  318. ; ********************
  319. (complete 97)
  320. (if (<> #avail 0)
  321.     ((run (tackon #avail "avail") "flush >nil:"))
  322. )
  323. (complete 99)
  324. (message "\nInstallation complete."
  325.          "\n\nStart Sid4Amiga by clicking the GUI icon\nor running the executable ''Sid4Amiga'' by CLI."
  326. )
  327.  
  328. (exit (quiet))
  329.