home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / cdity / ModePro4_5.lha / ModePro / InstallModePro < prev    next >
Encoding:
Text File  |  1995-11-25  |  8.0 KB  |  254 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 Def_DaemonPath_WB      ( expandpath "Sys:WBStartup/" ) )
  13. ( set Def_DaemonPath_COM     ( expandpath "Sys:Tools/Commodities/" ) )
  14. ( set Def_PrefsPath          ( expandpath "Sys:Prefs/" ) )
  15.  
  16. ;-------------------------------------------------------------
  17. ( set AskAutoRunMP      "Automatically run ModePro when the computer boots?" )
  18. ( set AskAutoRunMPHelp  "HHHEEELLLPPPP!!!!" )
  19.  
  20.  
  21. ;-------------------------------------------------------------
  22. ( set AskStartHow               "How would you like ModePro started?\nPress 'Help' for more info.")
  23. ( set OptStartWBStartup         "Put ModePro in the WBStartup drawer")
  24. ( set OptStartUserStartup       "Start ModePro in the Startup-Sequence")
  25. ( set AskStartHowHelp           "ModePro can be started automatically on bootup two ways.  The simplest method is by placing ModePro in the WBStartup drawer.  The second way is to run ModePro from the s:User-Startup file, doing so allows ModePro to promote the Workbench screen." )
  26.  
  27. ;-------------------------------------------------------------
  28. ( set AskPrefsPath      "ModeProPrefs allows you to edit ModePro's promotion options.  Where would you like to put the preferences editor?" )
  29. ( set AskPrefsPathHelp  ("Generally this should be in the %s drawer." Def_PrefsPath) )
  30. ( set AskDaemonPath     "This is the suggested path for ModePro.  Change it if you wish." ) 
  31.  
  32. ;-------------------------------------------------------------
  33. ( set ToolTypeOptions  "Various options" )
  34.  
  35. ( set AskCxPopKey    "Enter the hotkey that pops up the preferences interface." )
  36.  
  37. ( set AskCxPri       "Enter the value of ModePro's commodity priority." )  
  38.  
  39. ( set AskCxPopup     "Would you like ModePro to popup the interface each time it is started.")
  40.  
  41. ( set AskCatOpts     "How should ModePro react when an unknown screen is opened?" )
  42. ( set OptCatProg     "Add the program name to the list." )
  43. ( set OptCatScr      "Add the screen name to the list." )
  44.  
  45. ( set AskCatPopup    "Should ModePro open the interface when a new screen is added to the list?" )
  46.  
  47. ( set AskNLM         "The New Look Menu patch forces some programs to use the AmigaDOS 3+ menu style(usaully black letters on a white background).  Enable the New Look Menu patch?")
  48. ;
  49. ( set AskLanguages   "ModePro features a localized interface.  Which languages would you like to install")
  50. ;-----------------------------------------------------------------------
  51. ( set IM        "Installing ModePro...")
  52.  
  53. ( set AskLang   "Which languages would you like installed with ModePro?")
  54. ( set OptLangFrancais  "français" )
  55. ( set OptLangIslenska  "íslenska" )
  56. ( set OptLangPolski    "polski"   )
  57.  
  58. ( set SrcCatPath "catalogs/%s" )
  59. ( set DestCatPath "locale:catalogs/%s" )
  60.  
  61. ;-----------------------------------------------------------------------
  62. ( set AskModifyUS    "The options you have chosen require the s:user-startup file to be modified." )
  63.  
  64. ( set AutoRun ( askbool (prompt  AskAutoRunMP ) 
  65.                         (help    AskAutoRunMPHelp ) 
  66.                         (default 0) 
  67.               )  
  68. )
  69.  
  70. ( if AutoRun 
  71.     (
  72.         ( set AutoHow ( askchoice (prompt   AskStartHow)
  73.                                   (help     AskStartHowHelp)
  74.                                   (choices  OptStartWBStartup OptStartUserStartup)
  75.                                   (default  1)
  76.                        )
  77.         )
  78.         ( if AutoHow
  79.             (
  80.                 (set daemonpath Def_DaemonPath_COM)
  81.             )
  82.             (
  83.                 (set daemonpath Def_DaemonPath_WB)
  84.             )
  85.         )   
  86.     )
  87.     (
  88.         (set daemonpath Def_DaemonPath_COM)
  89.     )
  90. )
  91.  
  92. (set daemonpath ( askdir (prompt AskDaemonPath)
  93.                           (help "Cow")
  94.                           (default daemonpath)
  95. ) )
  96.  
  97. (set prefspath ( askdir (prompt  AskPrefsPath)
  98.                                (help    AskPrefsPathHelp)
  99.                                (default Def_PrefsPath)
  100.                       ) 
  101. )
  102.  
  103. ( set ModeProPrefsCommand ( tackon ( prefspath) 
  104.                                    ( "ModeProPrefs") 
  105.                           ) 
  106. )
  107.  
  108. ( set cxpopkey ( askstring  (prompt AskCxPopKey)
  109.                             (help "None")
  110.                             (default "lcommand p")
  111.                )
  112. )
  113.  
  114. ( set cxpri ("%ld" (asknumber  (prompt AskCxPri)
  115.                                (help "None")
  116.                                (default 5)
  117.                    )
  118.             )
  119. )
  120.  
  121. ( set cxpopup  ( askbool (prompt  AskCxPopup)
  122.                          (help    "None" )
  123.                ) 
  124. )
  125.  
  126. ( set coptions  (askoptions (prompt AskCatOpts)
  127.                             (help "None")
  128.                             (choices OptCatProg OptCatScr)
  129.                             (default 0)
  130.                 )
  131. )
  132.  
  133. ( set catchprog (BITAND coptions 1) )
  134.  
  135. ( set catchscr  (BITAND (shiftright coptions 1) 1) )
  136.  
  137.  
  138. (if coptions
  139.     (
  140.         ( set catchpopup ( askbool (prompt AskCatPopup)
  141.                                    (help "None")
  142.                           ) 
  143.         )
  144.     )
  145.     (
  146.         (set catchpopup 0)          
  147.     )
  148. )
  149.  
  150. ( set newlookmenus ( askbool (prompt  AskNLM)
  151.                            (help    "None" )
  152.                    )
  153. )
  154.  
  155. ;-Set the tooltypes----------------------------------------------------
  156.  
  157. (tooltype (dest ModePro)
  158.           (settooltype "CX_POPKEY" cxpopkey)
  159. )
  160.  
  161. (tooltype (dest ModePro)
  162.           (settooltype "CX_POPUP" (select cxpopup No Yes) )
  163. )
  164.  
  165. (tooltype (dest ModePro)
  166.           (settooltype "CX_PRIORITY" cxpri )
  167. )
  168.  
  169. (tooltype (dest ModePro)
  170.           (settooltype "NEWLOOKMENUS" (select newlookmenus No Yes) )
  171. )
  172.  
  173. (tooltype (dest ModePro)
  174.           (settooltype "CATCH_NEWPROGRAMS" (select catchprog No Yes) )
  175. )
  176.  
  177. (tooltype (dest ModePro)
  178.           (settooltype "CATCH_NEWSCREENS" (select catchscr No Yes) )
  179. )
  180.  
  181. (tooltype (dest ModePro)
  182.           (settooltype "CATCH_POPUP" (select catchpopup No Yes) )
  183. )
  184.  
  185. (tooltype (dest ModePro)
  186.           (settooltype "PREFSCOMMAND" ModeProPrefsCommand)
  187. )
  188.  
  189.  
  190.  
  191. ;--------------------------------------------------------------
  192.  
  193. (copyfiles (prompt IM)
  194.            (help "Why did you do that?")
  195.            (source ModePro)
  196.            (infos)
  197.            (dest daemonpath)
  198. )
  199.  
  200. (set @default-dest daemonpath)
  201.  
  202. (copyfiles (prompt IM)
  203.            (help "Hey, what are you doing?")
  204.            (source ModeProPrefs)
  205.            (infos)
  206.            (dest prefspath)
  207. )
  208.  
  209. (if (AND AutoRun AutoHow)
  210.     ( 
  211.         (startup "ModePro"
  212.                  (prompt  AskModifyUS )
  213.                  (help    "No help here." )
  214.                  (command (cat "Run <>NIL: ModePro"
  215.                                " CX_PRIORITY="  cxpri 
  216.                                " CX_POPKEY=\""  cxpopkey "\""
  217.                                " CX_POPUP="     (select cxpopup No Yes)
  218.                                (select newlookmenus     ""  " NLM"  )
  219.                                (select catchprog        ""  " CPROG")
  220.                                (select catchscr         ""  " CSCR" )
  221.                                (select catchpopup       ""  " CPOP" )
  222.                                " PCMD=\""       ModeProPrefsCommand "\"" 
  223.                           )
  224.                  )
  225.         )
  226.     )
  227. )
  228.  
  229. (set WhichLang (askoptions (prompt AskLang)
  230.                            (help "Nope!")
  231.                            (choices OptLangFrancais OptLangIslenska OptLangPolski)
  232.                            (default 0) 
  233. )              )
  234.  
  235. (set optnumber 0)
  236.  
  237. ( while ( < optnumber 3 )
  238.   (set flag (BITAND (shiftright WhichLang optnumber) 1) )
  239.   (debug optnumber flag)
  240.   (if flag
  241.     (
  242.       (set lang     ( select optnumber OptLangFrancais OptLangIslenska OptLangPolski ) )
  243.       (debug lang)
  244.       (set srcpath ( SrcCatPath  lang ) )
  245.       (debug srcpath)
  246.       (set dstpath ( DestCatPath lang ) )
  247.       (debug dstpath) 
  248.       (makedir dstpath)
  249.       (copyfiles  (prompt IM) (help "Why did you do that?") (source srcpath) (dest dstpath) (all) )
  250.     )
  251.   )
  252.   (set optnumber (+ optnumber 1) )
  253. )
  254.