home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -coverdisks- / 112a / modepro / installmodepro < prev    next >
Text File  |  1998-05-02  |  6KB  |  179 lines

  1. ; Install script for ModePro
  2.  
  3.  
  4. ( set ModePro "ModePro")
  5. ( set ModeProPrefs "ModeProPrefs" )
  6.  
  7. ;-------------------------------------------------------------
  8. ( set Yes "Yes")
  9. ( set No  "No")
  10.  
  11.  
  12. (set startup_prompt   "When your computer boots up, how would you like ModePro started?")
  13. (set startup_choice0  "Never")
  14. (set startup_choice1  "Start from the User-Startup file")
  15. (set startup_choice2  "Start from the WBStartup Drawer")
  16. (set startup_help     "Selecting 'Never' will cause ModePro to not be started when the system boots.\n\nSelecting the 'Start from the User-Startup file' will add an entry in the the S:User-Startup file which will start ModePro.\n\nSelecting the 'Start from the WBStartup Drawer' put ModePro in the WBStartup drawer on Workbench.\n\nThe only difference in the latter two is that if you want to use ModePro to affect the Workbench screen, you must select 'Start from the User-Startup file'")
  17.  
  18. (set path_wbstartup       ( expandpath "Sys:WBStartup") )
  19. (set path_commodities     ( expandpath "Sys:Tools/Commodities") )
  20. (set path_prefs           ( expandpath "Sys:Prefs") )
  21. (set path_modepro         path_commodities)
  22. (set path_modepro_prompt  ("Please select where you want to put ModePro.\n'%s' is the normal location" path_commodities))
  23. (set path_modepro_help    "This is the directory where the ModePro executable will be placed")
  24. (set path_mpprefs_prompt  ("Please select where you want to put ModeProPrefs.\n'%s' is the normal location" path_prefs))
  25. (set path_mpprefs_help    "This is the directory where the ModeProPrefs executable will be placed")
  26.  
  27. ( set oldmodepro_prompt   "There appears to be another copy ModePro installed.\nDelete it?")
  28. ( set oldmodepro_help     "Another, unneeded copy of ModePro appears to be installed, deleting it is recommended")
  29. ( set oldmodepro_deleting "Deleting extra copy and .info file")
  30.  
  31. ( set tt_cxpopkey_prompt    "Enter the hotkey that pops up the preferences interface." )
  32. ( set tt_cxpri_prompt       "Enter the value of ModePro's commodity priority." )
  33. ( set tt_cxpopup_prompt     "Would you like ModePro to popup the interface each time it is started.")
  34. ( set tt_cx_help            "Please see the Commodities section of the Workbench manual for information." )
  35.  
  36. (set installing_modepro       "Installing ModePro")
  37. (set installing_modeproprefs  "Installing ModeProPrefs")
  38.  
  39. (set usmodify_prompt  "The options you have chosen require the s:user-startup file to be modified." )
  40. (set usmodify_help    "If you don't do this part, ModePro may not work correctly" )
  41.  
  42. (set copycat_prompt   "ModePro has been translated into many languages.\nMany thanks go to the ATO for suppling most of the translations.")
  43. (set copycat_help     "You should only select those catalogs that you need.")
  44.  
  45.  
  46. ;-------- BEGIN ----------
  47.  
  48. (set startup_method (askchoice (prompt  startup_prompt)
  49.                                (help    startup_help)
  50.                                (choices startup_choice0 startup_choice1 startup_choice2)
  51.                                (default 2)
  52. )                   )
  53.  
  54.  
  55.  
  56. (if (= startup_method 2) 
  57.   (
  58.     ( set path_delmodepro path_commodities)
  59.     ( set path_modepro    path_wbstartup)
  60.   )
  61.   (
  62.     ( set path_delmodepro path_wbstartup)
  63.     ( set path_modepro (askdir (prompt  path_modepro_prompt)
  64.                                (help    path_modepro_help)
  65.                                (default path_commodities)
  66.     )                  )
  67.   )
  68. )
  69.  
  70. ( set path_mpprefs (askdir (prompt  path_mpprefs_prompt)
  71.                            (help    path_mpprefs_help)
  72.                            (default path_prefs)
  73. )                  )
  74.  
  75.  
  76.  
  77. ( set ModeProPrefsCommand (tackon ( path_mpprefs) 
  78.                                    ( "ModeProPrefs") 
  79.                           ) 
  80. )
  81.  
  82. ( set tt_cxpopkey ( askstring (prompt tt_cxpopkey_prompt)
  83.                               (help tt_cxhelp)
  84.                               (default "lamiga p")
  85.                
  86. )                 )
  87.  
  88. ( set tt_cxpri ("%ld" (asknumber (prompt tt_cxpri_prompt)
  89.                                  (help tt_cxhelp)
  90.                                  (default 5)
  91. )              )      ) 
  92.  
  93. ( set tt_cxpopup (askchoice (prompt tt_cxpopup_prompt) 
  94.                             (help tt_cxhelp)
  95.                             (default 0) 
  96.                             (choices No Yes) 
  97. )             )
  98.  
  99. ;**** COPY THE CATALOGS ****
  100. (copyfiles (prompt  copycat_prompt)
  101.            (help    copycat_help)
  102.            (source  "catalogs/")
  103.            (dest    "locale:catalogs/")
  104.            (infos)
  105.            (confirm)
  106.            (all)
  107. )
  108.  
  109. ;**** DELETE THE ANY EXTRA COPY OF MODEPRO ****
  110.  
  111. (set oldmodepro_file ( tackon (path_delmodepro) 
  112.                      ("ModePro")
  113. )          )
  114.  
  115. (if (exists oldmodepro_file)
  116.   (
  117.     (if (askchoice (prompt  oldmodepro_prompt ) 
  118.                    (help    oldmodepro_help) 
  119.                    (default 1) 
  120.                    (choices No Yes) 
  121.         )
  122.       (
  123.         (delete oldmodepro_file (prompt oldmodepro_deleting))
  124.         (delete (cat (oldmodepro_file) (".info") ) (prompt oldmodepro_deleting) )
  125.       )
  126.     ) 
  127.   )
  128. )
  129.  
  130. ;**** SET THE TOOLTYPES ****
  131.  
  132. (tooltype (dest ModePro)
  133.           (settooltype "CX_POPKEY"    tt_cxpopkey)
  134.           (settooltype "CX_POPUP"     (select tt_cxpopup No Yes) )
  135.           (settooltype "CX_PRIORITY"  tt_cxpri )
  136.           (settooltype "PREFSCOMMAND" ModeProPrefsCommand)
  137. )
  138.  
  139.  
  140. ;**** COPY FILES ****
  141.     
  142. (copyfiles (prompt installing_modepro)
  143.            (help   installing_modepro)
  144.            (source ModePro)
  145.            (infos)
  146.            (dest path_modepro)
  147. )
  148.  
  149. (set @default-dest path_modepro)
  150.  
  151. (copyfiles (prompt installing_modeproprefs)
  152.            (help   installing_modeproprefs)
  153.            (source ModeProPrefs)
  154.            (infos)
  155.            (dest path_mpprefs)
  156. )
  157.  
  158.  
  159. ;**** PROMPT TO MODIFY THE U-S FILE ****
  160. (if (= startup_method 1)
  161.     ( 
  162.         (startup "ModePro"
  163.                  (prompt  usmodify_prompt )
  164.                  (help    usmodify_help )
  165.                  (command (cat "Run <>NIL: " (tackon path_modepro "ModePro")) )
  166.         )
  167.     )
  168.     (
  169.        (startup "ModePro"
  170.                  (prompt  usmodify_prompt )
  171.                  (help    usmodify_help )
  172.                  (command ";Don't run ModePro from User-Startup")
  173.   
  174.         )
  175.     )
  176. )
  177.  
  178.  
  179.