home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / m / maclitev1.0.dms / maclitev1.0.adf / InstallerScript < prev    next >
Text File  |  1996-06-24  |  12KB  |  470 lines

  1. ;**************************************************
  2. ;
  3. ;$VER: MAC Lite Emulation Installer v1.0 (24 Jun 1996)
  4. ;
  5. ; Title:
  6. ;    EMPLANT's MAC Lite Emulation Software Installer
  7. ; Description:
  8. ;    The Commodore Installer Script for EMPLANT's
  9. ;    MAC emulation module software.
  10. ;
  11. ; Installer script by Jim Drew
  12. ;
  13. ;**************************************************
  14.  
  15. (set true 1)
  16. (set false 0)
  17. (set quote "\"")
  18. (set nothing "")
  19. (set WB2 (< 2293760 (getversion "exec.library" (resident)))) ; true if under 2.0
  20.  
  21. (set mode 0)                ;default to 32 bit mode
  22.  
  23. (set EMPLANT_dir (getassign "EMPLANT"))
  24. (set c_dir (getassign "C"))
  25. (set libs_dir (getassign "LIBS"))
  26. (set fonts_dir (getassign "FONTS"))
  27. (set devs_dir (getassign "DEVS"))
  28. (set s_dir (getassign "S"))
  29.  
  30. (set Src_c "MacII:MAC_EMU/c/")
  31. (set Src_devs "MacII:MAC_EMU/devs/")
  32. (set Src_fonts "MacII:MAC_EMU/fonts/")
  33. (set Src_libs "MacII:MAC_EMU/libs/")
  34. (set Src_docs "MacII:MAC_EMU/Documentation/")
  35. (set Src_ExtIO "MacII:MAC_EMU/Ext_IO/")
  36. (set Src_ROMS "MacII:MAC_EMU/ROM_Images/")
  37. (set Src_Video "MacII:MAC_EMU/Video_Drivers/")
  38. (set Src_main "MacII:MAC_EMU/")
  39.  
  40. (if  (<> EMPLANT_dir nothing)
  41.      (if  (askbool
  42.                (prompt "\n\n\nSome version of the MAC emulation software "
  43.                "already exists in your drawer named: \n\n"
  44.                quote EMPLANT_dir quote
  45.                "\n\nDo you want the update installed over it?")
  46.                (help
  47.                "\n\n\nThe installer has determined that you already have a "
  48.                "some version of the MAC emulation software installed "
  49.                "on your system.  If this is wrong or you want the update "
  50.                "installed elsewhere, select 'NO', otherwise select 'YES'."
  51.                )
  52.                (default 1)
  53.           )
  54.                (set is_update true) 
  55.  
  56. ;else ask where to put software
  57.  
  58.                (
  59.                (set is_update false)
  60.                (set EMPLANT_dir
  61.                (askdir
  62.                     (prompt "Where would you like the updated software "
  63.                     "installed?\n"
  64.                     "'EMPLANT' will be automatically appended.")
  65.                     (help @askdir-help)
  66.                     (default @default-dest)
  67.                )
  68.                )
  69.  
  70.                (set EMPLANT_dir
  71.                (tackon EMPLANT_dir "EMPLANT")
  72.                )
  73.  
  74.                (makedir EMPLANT_dir
  75.                (infos)
  76.                )
  77.           )
  78.      )
  79. )
  80.  
  81. ; EMPLANT: was not previously assigned, so ask where to make it
  82. (if  (= EMPLANT_dir nothing)
  83.           (
  84.           (set EMPLANT_dir
  85.                (askdir
  86.                     (prompt "Where would you like the software installed? "
  87.                     "'EMPLANT' will be automatically appended.")
  88.                     (help @askdir-help)
  89.                     (default @default-dest)
  90.                )
  91.           )
  92.  
  93.           (set EMPLANT_dir
  94.           (tackon EMPLANT_dir "EMPLANT")
  95.           )
  96.  
  97.           (makedir EMPLANT_dir
  98.           (infos)
  99.           )
  100.      )
  101. )
  102.  
  103.           (set EMU_Dir
  104.           (tackon EMPLANT_dir "MACLite")
  105.           )
  106.  
  107.           (makedir EMU_dir
  108.           (infos)
  109.           )
  110.  
  111. (set @default-dest EMU_dir)
  112.  
  113. (complete 5)
  114.  
  115. ; ask user to locate SYS:C directory
  116.  
  117. (set c_dir
  118.      (askdir
  119.           (prompt "Please locate your C: directory.")
  120.           (help @askdir-help)
  121.           (default c_dir)
  122.      )
  123. )
  124.    
  125. (working omp "...Please Wait...")
  126.  
  127. (copyfiles
  128.      (prompt "Select file(s) to be copied into your C: directory:")
  129.      (help "\n\n\n\n\nThis will copy RsrvCold to your C: "
  130.      "directory.\n\n\n\n\n\n\n\n"
  131.      @copyfiles-help)
  132.      (source Src_c)
  133.      (dest c_dir)
  134.      (pattern "#?")
  135.      (confirm)
  136. )
  137.  
  138. (complete 10)
  139.  
  140. ; ask user to locate LIBS: directory
  141.  
  142. (set libs_dir
  143.      (askdir
  144.           (prompt "Please locate your LIBS: directory.")
  145.           (help @askdir-help)
  146.           (default libs_dir)
  147.           (newpath)
  148.      )
  149. )
  150.  
  151. (working omp "...Please Wait...")
  152.  
  153. (copyfiles
  154.      (prompt "Select file(s) to be copied into your LIBS: directory:")
  155.      (help "\n\n\n\n\nThis will copy the JAM library into your "
  156.      "system's LIBS: directory.\n\n\n\n\n\n\n"
  157.      @copylib-help)
  158.      (source Src_libs)
  159.      (dest libs_dir)
  160.      (pattern "(#?.library#?)")
  161.      (confirm)
  162. )
  163.  
  164. (complete 20)
  165.  
  166. ; ask user to locate DEVS: directory
  167.  
  168. (set devs_dir
  169.      (askdir
  170.           (prompt "Please locate your DEVS: directory")
  171.           (help @askdir-help)
  172.           (default devs_dir)
  173.      )
  174. )
  175.  
  176. (working omp "...Please Wait...")  
  177.  
  178. (copyfiles
  179.      (prompt "Select file(s) to be copied into your DEVS: directory:")
  180.      (help "\n\n\n\n\nThis will copy the device drivers for the use "
  181.      "with EMPLANT's various I/O ports.\n\n\n\n\n\n\n"
  182.      @copyfiles-help)
  183.      (source Src_devs)
  184.      (dest DEVS_dir)
  185.      (pattern "#?")
  186.      (confirm)
  187. )
  188.  
  189. (complete 30)
  190.  
  191. ; ask user to locate FONTS: directory
  192.  
  193. (set Fonts_dir
  194.      (askdir
  195.           (prompt "Please locate your FONTS: directory")
  196.           (help @askdir-help)
  197.           (default fonts_dir)
  198.           (newpath)
  199.      )
  200. )
  201.  
  202. (working omp "...Please Wait...")
  203.  
  204. (copyfiles
  205.      (prompt "Select file(s) to be copied into your FONTS: directory:")
  206.      (help "\n\n\n\n\nThis will copy over any fonts needed for the "
  207.      "emulation.\n\n\n\n\n\n\n"
  208.      @copyfiles-help)
  209.      (source Src_fonts)
  210.      (dest fonts_dir)
  211.      (pattern "(SCAIV#?)")
  212.      (fonts)
  213.      (confirm)
  214. )
  215.  
  216. (complete 40)
  217.  
  218. (working omp "...Please Wait...")
  219.  
  220. ; Copy utilities
  221.    
  222. (set EMPLANT_dir
  223.      (copyfiles
  224.           (prompt "Select files to be copied to the EMPLANT: directory:")
  225.           (help "\n\n\n\n\nThis will copy all of the utilities for the "
  226.           "EMPLANT hardware and the MAC emulation.\n\n\n\n\n\n\n"
  227.           @copyfiles-help)
  228.           (source Src_main)
  229.           (dest EMPLANT_dir)
  230.           (pattern "(HardFile#?|ROMINFO#?|MAC_HDSetup#?)")
  231.           (confirm)
  232.      )
  233. )
  234.  
  235. (complete 50)
  236.  
  237. ; Copy over the MAC EMULATION programs
  238.  
  239. (working omp "...Please Wait...")
  240.    
  241. (set EMU_dir
  242.      (copyfiles
  243.           (prompt "Select files to be copied to the EMPLANT:MAC/ directory:")
  244.           (help "\n\n\n\n\n\nThis will copy the MAC emulation's main "
  245.           "programs.\n\n\n\n\n\n\n"
  246.           @copyfiles-help)
  247.           (source Src_main)
  248.           (dest EMU_dir)
  249.           (pattern "(MACLite#?|Lite.dat)")
  250.           (confirm)
  251.      )
  252. )
  253.  
  254. ;copy AppIcon
  255.  
  256. (copyfiles
  257.      (source Src_Main)
  258.      (dest EMU_dir)
  259.      (pattern "(EMP_AppIcon.info)")
  260. )
  261.  
  262. (complete 55)
  263.  
  264. ;create Video_Drivers directory
  265.    
  266. (set VideoDrvr_dir
  267. (cat EMU_dir)
  268. )
  269. (set VideoDrvr_dir
  270. (tackon VideoDrvr_dir "Video_Drivers")
  271. )
  272.  
  273. (makedir VideoDrvr_dir
  274. (infos)
  275. )
  276.  
  277. (working omp "...Please Wait...")
  278.  
  279. (copyfiles
  280.      (prompt "Select file(s) to be copied into your Video_Drivers directory:")
  281.      (help "\n\n\n\n\nThis will copy the video drivers to the proper "
  282.      "directory.  ALL MAC video drivers must reside in your "
  283.      "'\EMPLANT:MAC/Video_Drivers\' directory.\n\n\n\n\n\n"
  284.      @copyfiles-help)
  285.      (source Src_video)
  286.      (dest VideoDrvr_dir)
  287.      (pattern "(#?)")
  288.      (confirm)
  289. )
  290.  
  291. (complete 60)
  292.  
  293. ;create ExtIO directory
  294.  
  295. (set ExtIODrvr_dir
  296. (cat EMU_dir)
  297. )
  298. (set ExtIODrvr_dir
  299. (tackon ExtIODrvr_dir "Ext_IO")
  300. )
  301.  
  302. (makedir ExtIODrvr_dir
  303. (infos)
  304. )
  305.  
  306. (working omp "...Please Wait...")
  307.  
  308. (copyfiles
  309. (prompt "Select file(s) to be copied into your Ext_IO directory:")
  310.      (help "\n\n\n\n\nThis will copy the external I/O drivers to the proper "
  311.      "directory.  ALL MAC external I/O drivers must reside in your "
  312.      "'\EMPLANT:MAC/Ext_IO\' directory.\n\n\n\n\n\n"
  313.      @copyfiles-help)
  314.      (source Src_ExtIO)
  315.      (dest ExtIODrvr_dir)
  316.      (pattern "(#?)")
  317.      (confirm)
  318. )
  319.  
  320. (complete 70)
  321.  
  322. ;create Documentation directory
  323.  
  324. (set Docs_dir
  325. (cat EMU_dir)
  326. )
  327. (set Docs_dir
  328. (tackon Docs_dir "Documentation")
  329. )
  330.  
  331. (makedir Docs_dir
  332. (infos)
  333. )
  334.  
  335. (working omp "...Please Wait...")
  336.  
  337. (copyfiles
  338.      (prompt "Select file(s) to be copied Documentation directory:")
  339.      (help "\n\n\n\nThis will copy various documentation and "
  340.      "IFF pictures to your documentation directory.  ALL MAC emulation "
  341.      "documentation should reside in your "
  342.      "'\EMPLANT:MAC/Documenation\' directory.\n\n\n\n\n\n"
  343.      @copyfiles-help)
  344.      (source Src_docs)
  345.      (dest Docs_dir)
  346.      (pattern "#?")
  347.      (confirm)
  348. )
  349.  
  350. (complete 75)
  351.  
  352. ;create ROM_Images directory
  353.  
  354. (set ROM_dir
  355. (cat EMU_dir)
  356. )
  357. (set ROM_dir
  358. (tackon ROM_dir "ROM_Images")
  359. )
  360.  
  361. (makedir ROM_dir
  362. (infos)
  363. )
  364.  
  365. (working omp "...Please Wait...")
  366.  
  367. (copyfiles
  368.      (prompt "Select ROM Image(s) and Related Files:")
  369.      (help "\n\n\n\n\nThis will copy your ROM image(s) from your "
  370.      "original installation (if applicable).  ALL ROM image files "
  371.      "must be in your '\EMPLANT:MAC/ROM_Images\' directory.\n\n\n\n\n\n"
  372.      @copyfiles-help)
  373.      (source Src_ROMS)
  374.      (dest ROM_dir)
  375.      (pattern "#?")
  376.      (confirm)
  377. )
  378.  
  379. (complete 80)
  380.  
  381.  
  382. ; add custom EMPLANT setup caller to Startup-Sequence if 'AssignEMPLANT'
  383. ; does not exist yet
  384.  
  385. (if  (not (exists "s:AssignEMPLANT"))
  386.      (if  (askbool
  387.                (prompt "\nIn order for MAC emulation to work correctly, "
  388.                "the FIRST line in your STARTUP-SEQUENCE must be\n\n"
  389.                "'execute >NIL: s:SetupEMPLANT'\n\n"
  390.                "and the LAST line of your USER-STARTUP must be:\n\n"
  391.                "'execute >NIL: s:AssignEMPLANT'\n\n"
  392.                "These lines can be automatically added by this installer "
  393.                "script.  Do you wish to proceed?\n\n")
  394.                (help @askbool-help)
  395.                )
  396.  
  397.                (
  398.                     (if (= @pretend 0)
  399.                     (
  400.                         (
  401.                         (if  (not  (exists "s:user-startup"))
  402.                              (textfile
  403.                              (dest "s:user-startup")
  404.                              (append ";user-startup \n\n")
  405.                          )
  406.                     )
  407.                     (textfile
  408.                     (dest "ram:startup-sequence")
  409.                     (append ";BEGIN EMPLANT \n")
  410.                     (append "assign t: ram: \n")
  411.                     (append "execute >NIL: s:SetupEMPLANT \n")
  412.                     (append ";END EMPLANT \n")
  413.                     (include "s:startup-sequence")
  414.                     )
  415.                     (rename "s:startup-sequence" "s:startup-sequence.old")
  416.                     (copyfiles
  417.                     (help @copyfiles-help)
  418.                     (source "ram:startup-sequence")
  419.                     (dest "s:")
  420.                     )
  421.                     (delete "ram:startup-sequence")
  422.  
  423.                     (textfile
  424.                     (dest "ram:user-startup")
  425.                     (include "s:user-startup")
  426.                     (append ";BEGIN EMPLANT \n")
  427.                     (append "execute >NIL: s:AssignEMPLANT \n")
  428.                     (append ";END EMPLANT \n")
  429.                     )
  430.                     (rename "s:user-startup" "s:user-startup.old")
  431.                     (copyfiles
  432.                     (help @copyfiles-help)
  433.                     (source "ram:user-startup")
  434.                     (dest "s:")
  435.                     )
  436.                     (delete "ram:user-startup")
  437.                )
  438.           )
  439.           )
  440.      )
  441.      )
  442. )
  443.  
  444. ;create mini-script files
  445.       
  446. (delete "s:SetupEMPLANT")
  447. (textfile
  448. (dest "s:SetupEMPLANT")
  449. (append "RsrvCold >NIL: \n")
  450. )
  451. (delete "s:AssignEMPLANT")
  452. (textfile
  453. (dest "s:AssignEMPLANT")
  454. (append "Assign EMPLANT: " EMPLANT_dir "\n")
  455. )
  456.  
  457.  
  458. (complete 100)
  459.  
  460. (message "\n\n\n\n"
  461. "A T T E N T I O N ! ! !\n\n"
  462. "You must turn off the power to your Amiga before attempting "
  463. "to run the emulation.  Simply rebooting will NOT work, you "
  464. "MUST physically turn off of the Amiga with its power switch. "
  465. "No exceptions."
  466. )          
  467.  
  468. (exit)
  469.