home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga Shareware Floppies / ma56.dms / ma56.adf / StartMenu / Install_Update < prev    next >
Text File  |  1996-06-12  |  8KB  |  315 lines

  1. ; Install_Update
  2. ; Upgrade v1.0 of StartMenu
  3. ; Copyright © 1996 John Corigliano
  4. ; $VER: Install_Update 1.0
  5.  
  6. (set vers (+ (getenv "Kickstart")))
  7.  
  8. (welcome "Welcome to the StartMenu upgrade!")
  9.  
  10. (set dirhelp
  11.    (cat
  12.         "Select the place on your hard drive where you have version 1.0 of StartMemu.\n"
  13.         "The installer will delete some old files that are no longer used and add new files. Also, it will update your \"start.pref\" file so that it is compatible with 2.0"
  14.     )
  15. )
  16.  
  17.  
  18. (set new_dir
  19.     (askdir
  20.         (prompt "Where is the old version of StartMenu?")
  21.         (help dirhelp)
  22.         (default "Work:")
  23.     )
  24. )
  25. (set @default-dest new_dir)
  26.  
  27. (set old_start (tackon @default-dest "StartMenu"))
  28. (if (= 0 (exists old_start))
  29.     (abort "Could not find StartMenu in the directory you specified\nUse the Install_New script to install for the first time.")
  30. )
  31.  
  32. (tooltype
  33.     (dest "Dist/StartMenu")
  34.     (settooltype "PATH" @default-dest)
  35. )
  36.  
  37. (tooltype
  38.     (dest "Dist/StartMenuLite")
  39.     (settooltype "PATH" @default-dest)
  40. )
  41.  
  42. (tooltype
  43.     (dest "Dist/StartMenuUltraLite")
  44.     (settooltype "PATH" @default-dest)
  45. )
  46.  
  47. (set ttypehelp
  48.     (cat
  49.         "To enable keyboard control of StartMenu, you must enter a key-combination for StartMenu to use.\n"
  50.         "This key-combination can be any valid Commodities key sequence.\n"
  51.         "The default value is \"rawkey ralt up\" which is the \"Right Alt Key plus Up Arrow Key\" key combination.\n"
  52.         "You must enter a key sequence here."
  53.     )
  54. )
  55. (set ttype
  56.     (askstring
  57.         (prompt "Please enter the hot-key combination to use with StartMenu")
  58.         (help ttypehelp)
  59.         (default "rawkey ralt up")
  60.     )
  61. )
  62. (if (= ttype "")
  63.     (set ttype "rawkey ralt up")
  64. )
  65.  
  66. (tooltype
  67.     (dest "Dist/StartMenu")
  68.     (settooltype "HOTKEY" ttype)
  69. )
  70.  
  71. (tooltype
  72.     (dest "Dist/StartMenuLite")
  73.     (settooltype "HOTKEY" ttype)
  74. )
  75.  
  76. (tooltype
  77.     (dest "Dist/StartMenuUltraLite")
  78.     (settooltype "HOTKEY" ttype)
  79. )
  80.  
  81. (set dfile (tackon @default-dest "Default.info"))
  82. (delete dfile (optional "force"))
  83.  
  84. (set dfile (tackon @default-dest "Folder.info"))
  85. (delete dfile (optional "force"))
  86.  
  87. (set dfile (tackon @default-dest "ScreenShot.iff"))
  88. (delete dfile (optional "force"))
  89.  
  90. (set dfile (tackon @default-dest "Install.readme"))
  91. (delete dfile (optional "force"))
  92.  
  93. (set dfile (tackon @default-dest "Install.readme.info"))
  94. (delete dfile (optional "force"))
  95.  
  96. (copyfiles
  97.     (prompt "Copying new files...")
  98.     (source "Dist")
  99.     (help @copyfiles-help)
  100.     (dest @default-dest)
  101.     (all)
  102.     (infos)
  103.     (optional "force")
  104. )
  105.  
  106. (makedir (tackon @default-dest "StartUp") (infos))
  107.  
  108. (if (> 39 vers)
  109.     (
  110.         (copyfiles 
  111.             (prompt "Copying prefs...")
  112.             (source "main.pref.20")
  113.             (dest @default-dest)
  114.             (newname "main.pref")
  115.         )
  116.         (copylib
  117.             (prompt "Installing WBStartup-Handler to L:")
  118.             (source "L/WBStart-Handler")
  119.             (dest "L:")
  120.             (confirm)
  121.             (help "StartMenu uses this to launch programs.")
  122.         )
  123.         (protect "L:WBStart-Handler" "+e")
  124.     )
  125.     (
  126.         (copyfiles 
  127.             (prompt "Copying prefs...")
  128.             (source "main.pref.30")
  129.             (dest @default-dest)
  130.             (newname "main.pref")
  131.         )
  132.         (copylib
  133.             (prompt "Installing wbstart.library to LIBS:")
  134.             (source "Libs/wbstart.library")
  135.             (dest "LIBS:")
  136.             (confirm)
  137.             (help "StartMenu uses this to launch programs.")
  138.         )
  139.     )
  140. )
  141.  
  142. (run ("UpdatePrefs %s %s" @default-dest @default-dest))
  143.  
  144. (set starthelp
  145.     (cat
  146.         "If you want StartMenu to run everytime you boot your computer pick one of the first three items.\n"
  147.         "The three choices are:\n"
  148.         "  \" StartMenu\" - this is the full version.\n"
  149.         "  \"StartMenuLite\" - this is just the menus and no taskbar.\n"
  150.         "  \" StartMenuUltraLite\" - this is just the menus and no taskbar and no graphics.\n\n"
  151.         "Select \"Skip this part\" if you do not want to copy anything to WBStartUp.  If you find you like StartMenu, you can always drag-n-drop it to the WBStartUp drawer at a later time."
  152.     )
  153. )
  154. (set rc
  155.     (askchoice
  156.         (prompt "Do you want me to copy StartMenu to Sys:WBStartup?")
  157.         (choices "StartMenu" "StartMenuLite" "StartMenuUltraLite" "Skip this part")
  158.         (help starthelp)
  159.     )
  160. )
  161.  
  162. (select rc
  163.     (copyfiles
  164.         (source (tackon @default-dest "StartMenu"))
  165.         (dest "Sys:WBStartUp")
  166.         (infos)
  167.     )
  168.     (copyfiles
  169.         (source (tackon @default-dest "StartMenuLite"))
  170.         (dest "Sys:WBStartUp")
  171.         (infos)
  172.     )
  173.     (copyfiles
  174.         (source (tackon @default-dest "StartMenuUltraLite"))
  175.         (dest "Sys:WBStartUp")
  176.         (infos)
  177.     )
  178.     (set nop 1)
  179. )
  180.  
  181. (set rc
  182.     (askchoice
  183.         (prompt "Which icons?")
  184.         (choices "Standard 4 color" "8 color (NewIcons)" "8 color MWB")
  185.         (help "Select which icon set StartMenu should use in the menus")
  186.     )
  187. )
  188.  
  189. (select rc
  190.     (copyfiles
  191.         (source "icons4")
  192.         (dest @default-dest)
  193.         (all)
  194.         (optional "force")
  195.     )
  196.     (copyfiles
  197.         (source "icons8")
  198.         (dest @default-dest)
  199.         (all)
  200.         (infos)
  201.         (optional "force")
  202.     )
  203.     (copyfiles
  204.         (source "iconsMWB")
  205.         (dest @default-dest)
  206.         (all)
  207.         (optional "force")
  208.     )
  209.  
  210. )
  211.  
  212. (if (> vers 37)
  213.     (
  214.         (set rc
  215.             (askchoice
  216.                 (prompt "Choose a language:")
  217.                 (choices "Deutsch" "Français)" "Italiano" "Svenska" "English")
  218.                 (help "Select which language to use for StartSetup and FindFile")
  219.             )
  220.         )
  221.         (select rc
  222.             (copyfiles
  223.                 (source "locale/Deutsch")
  224.                 (dest "Locale:catalogs/Deutsch")
  225.                 (all)
  226.                 (optional "force")
  227.             )
  228.             (copyfiles
  229.                 (source "locale/Français")
  230.                 (dest "Locale:catalogs/Français")
  231.                 (all)
  232.                 (optional "force")
  233.             )
  234.             (copyfiles
  235.                 (source "locale/Italiano")
  236.                 (dest "Locale:catalogs/Italiano")
  237.                 (all)
  238.                 (optional "force")
  239.             )
  240.             (copyfiles
  241.                 (source "locale/Svenska")
  242.                 (dest "Locale:catalogs/Svenska")
  243.                 (all)
  244.                 (optional "force")
  245.             )
  246.             (set nop 1)
  247.         )
  248.  
  249.     )
  250. )
  251.  
  252. (set rc
  253.     (askoptions
  254.         (prompt "What \"Extras\" programs would you like to install?")
  255.         (choices "WinControl" "WinMaster" "MemMeter" "AudMon" "SMRexx")
  256.         (help "These programs use the TaskBar, so you should only install them if you use the full version of Startmenu")
  257.     )
  258. )
  259.  
  260. (if (BITAND rc 1)
  261.     (copyfiles
  262.         (source "Extras/WinControl/WinControl")
  263.         (dest (tackon @default-dest "StartUp"))
  264.         (infos)
  265.         (optional "force")
  266.     )
  267.     (copyfiles
  268.         (source "Extras/WinControl/WCPrefs")
  269.         (dest "Sys:Prefs")
  270.         (infos)
  271.         (optional "force")
  272.     )
  273. )
  274.  
  275. (if (BITAND rc 2)
  276.     (copyfiles
  277.         (source "Extras/WinMaster/WinMaster")
  278.         (dest (tackon @default-dest "StartUp"))
  279.         (infos)
  280.         (optional "force")
  281.     )
  282. )
  283.  
  284. (if (BITAND rc 4)
  285.     (copyfiles
  286.         (source "Extras/MemMeter/MemMeter")
  287.         (dest (tackon @default-dest "StartUp"))
  288.         (infos)
  289.         (optional "force")
  290.     )
  291. )
  292.  
  293. (if (BITAND rc 8)
  294.     (copyfiles
  295.         (source "Extras/AudMon")
  296.         (dest (tackon @default-dest "StartUp"))
  297.         (infos)
  298.         (all)
  299.         (optional "force")
  300.     )
  301. )
  302.  
  303. (if (BITAND rc 16)
  304.     (copyfiles
  305.         (source "Extras/SMRexx/SMRexx")
  306.         (dest (tackon @default-dest "StartUp"))
  307.         (infos)
  308.         (optional "force")
  309.     )
  310. )
  311.  
  312.  
  313. (exit bye)
  314.  
  315.