home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 104 / af104sub.adf / scalos.lzx / Scalos / Install.Scalos next >
Text File  |  1997-09-30  |  12KB  |  571 lines

  1. ; Scalos Installation Script (c)1997 fOX! (17.09.1997)
  2.  
  3. (set languages-default 1)
  4.  
  5. ;WICHTIG !!!!!!!!!!!!!!!!!!!
  6. ;APPNAME=Scalos
  7. ;im InstallIcon
  8.  
  9.  
  10. ;===[ ENGLISH ]==============================================================
  11.  
  12. (set language-default 1)
  13.  
  14. (set #bad-kick "You must be using Kickstart 3.0+ to install Scalos")
  15.  
  16. (set #bad-cpu "You require at least a 68020 or higher processor to run Scalos")
  17.  
  18. (set #bad-mui "Requires MUI 3.6+")
  19.  
  20. (set #install-start
  21.     (cat
  22.         "\n\nWelcome to Scalos Installation\n\n"
  23.         "Done by fOX!/ALiENDESiGN\n\n"
  24.     )
  25. )
  26. (set #install-exit
  27.     (cat
  28.         "Thank you for installing Scalos ..."
  29.     )
  30. )
  31.  
  32. (set #where-scalos "Where would you like to install Scalos? (no Scalos directory will be created!)")
  33.  
  34. (set #where-scalos-help
  35.     (cat
  36.         "Scalos will be installed directly into the"
  37.         " desired directory. An assign Scalos: is made"
  38.         " right after the creation of the directory"
  39.     )
  40. )
  41.  
  42. (set #where-scalosprefs "Where is the place for the preferences editors?")
  43.  
  44. (set #where-scalosprefs-help
  45.     (cat
  46.         "This is the destination directory of all Scalos preferences"
  47.         " editors!\n\n Normaly ALL Scalos preferences editors are in Scalos:Prefs !"
  48.     )
  49. )
  50.  
  51. (set #languages-select    "Which languages should be installed?")
  52.  
  53. (set #languages-select-help
  54.     (cat
  55.         "Please select your favourite language that should be"
  56.         " copied to you Locale: directory?"
  57.     )
  58. )
  59.  
  60. (set #moduletype-select "Which Moduletype (see help) should be installed?")
  61.  
  62. (set #moduletype-select-help
  63.     (cat
  64.         "The Moduletype is the kind of userinterface that"
  65.         " you'll see when you for example delete files..."
  66.     )
  67. )
  68.  
  69. (set #plugin-select "Do you want to install some useful tools and plugins for Scalos")
  70.  
  71. (set #plugin-select-help
  72.     (cat
  73.         "One plugin for example might be useful for you if you want"
  74.         " a sorted cleanup of the icons..."
  75.     )
  76. )
  77.  
  78. (set #autostart-select "Do you want to install Scalos as Workbench replacement?")
  79.  
  80. (set #autostart-select-help
  81.     (cat
  82.         "If you select YES this installscript will rename the current"
  83.         " LoadWB to LoadWB.orig and install a tiny replacement to load"
  84.         " Scalos intead of the original Workbench"
  85.     )
  86. )
  87.  
  88. (set #startup-scalos "Scalos: assign is about add to you user-startup")
  89.  
  90. (set #startup-scalos-help
  91.     (cat
  92.         "An Assign Scalos: will be added to your user-startup"
  93.     )
  94. )
  95.  
  96. (set #copy-scalos "Copying Scalos (Mainprogram)...")
  97.  
  98. (set #copy-scalosprefs "Copying Scalos Preferences...")
  99.  
  100. (set #copy-libs1 "Copying Library: iconobject.library ...")
  101. (set #copy-libs2 "Copying Library: mcpgfx.library ...")
  102. (set #copy-libs3 "Copying Library: preferences.library ...")
  103. (set #copy-libs4 "Copying Datatype: amigaiconobject.datatype ...")
  104. (set #copy-libs5 "Copying Datatype: iconobject.datatype ...")
  105. (set #copy-libs6 "Copying Datatype: newiconobject.datatype ...")
  106.  
  107. (set #copy-muilib "Copying MCPFrame.mcc ...")
  108.  
  109. (set #copy-modules "Copying selected modules...")
  110.  
  111. (set #copy-classes "Copying required datatypes (Classes)...")
  112.  
  113. (set #copy-datatypes "Copying required datatypes (Devs)...")
  114.  
  115. (set #copy-catalog "Copying desired translations...")
  116.  
  117. (set #copy-presets "Copying Presets...")
  118.  
  119. (set #copy-plugins "Copying Plugins...")
  120.  
  121. (set #copy-tools "Copying Tools...")
  122.  
  123. (set #copy-loadwb "Copying LoadWB replacement...")
  124.  
  125. (set #rename-loadwborg "Renaming of original LoadWB...")
  126.  
  127. (set #rename-loadwbscalos "Renaming/Installing Scalos-LoadWB...")
  128.  
  129. (set #register-thank
  130.     (cat
  131.         "Thank you for registering Scalos\n\n"
  132.         "I appreciate your support!\n\n"
  133.         "Keep on supporting aMIGa!"
  134.     )
  135. )
  136.  
  137. (set #mypleasure "My Pleasure!")
  138.  
  139. (set #nomui
  140.     (cat
  141.         "The Install-Script couldn't find a installed MUI-Version!\n\n"
  142.         "MUI 3.6 or higher is required to run Scalos(Prefs)\n\n"
  143.         "Would you like to continue the installation?"
  144.     )
  145. )
  146.  
  147. (set #nomui-help
  148.     (cat
  149.         "MUI is an enhanced userinterface! You can get a"
  150.         " Shareware version via Aminet!"
  151.     )
  152. )
  153.  
  154. (set #makedir-scalos "Creating Scalos-Destination...")
  155.  
  156. (set #makedir-scalos "Creating Prefs-Destination...")
  157.  
  158.  
  159. ;===[ GERMAN ]==============================================================
  160. (if (= @language "deutsch")
  161.     (
  162.     (set languages-default 2)
  163.     )
  164. )
  165. ;============================== PROGRAM-START================================
  166.  
  167. (set @default-dest "")
  168.  
  169. ;Check Kickstart (>= v3.0) Version.
  170.  
  171. (if (< (/ (getversion) 65536) 39)
  172.     (abort #bad-kick)
  173. )
  174. (set processor (database "cpu"))
  175. (if (< processor "68020")
  176.     (abort #bad-cpu)
  177. )
  178.  
  179. ;(set muilib-path 0)
  180. ;(if (exists "MUI:Libs/muimaster.library" (NOREQ))
  181. ;    (set muilib-path "MUI:Libs/muimaster.library")
  182. ;    (if (exists "Libs:muimaster.library")
  183. ;        (set muilib-path "Libs:muimaster.library")
  184. ;        (if    (NOT
  185. ;                (askbool
  186. ;                    (prompt #nomui)
  187. ;                    (help   #nomui-help)
  188. ;                )
  189. ;            )
  190. ;            (abort #bad-mui)
  191. ;        )
  192. ;    )
  193. ;)
  194.  
  195. ;(if muilib-path
  196. ;    (if (< (/ (getversion "Libs:muimaster.library") 65536) 17)
  197. ;        (abort #bad-mui)
  198. ;    )
  199. ;)
  200.  
  201. (message #install-start)
  202. (welcome)
  203.  
  204. (complete 0)
  205.  
  206. ;===[ select Scalos Destination ]============================================
  207.  
  208. (if (exists "Scalos:" (NOREQ))
  209.  (
  210.      (set firstinstall 0)
  211.      (set scalos-dest "Scalos:")
  212.  )
  213.  (    (set firstinstall 1)
  214.      (set scalos-dest
  215.         (askdir
  216.             (prompt    #where-scalos)
  217.             (help    #where-scalos-help "\n\n" @askdir-help)
  218.             (default "SYS:Scalos")
  219.             (newpath)
  220.         )
  221.     )
  222.     (if (not (exists scalos-dest))
  223.         (makedir scalos-dest
  224.             (prompt #makedir-scalos)
  225.             (help    @makedir-help)
  226.         )
  227.     )
  228.     (makeassign "Scalos" scalos-dest)
  229.  )
  230. )
  231.  
  232.  
  233. (set scalosprefs-dest
  234.     (askdir
  235.         (prompt    #where-scalosprefs)
  236.         (help    #where-scalosprefs-help "\n\n" @askdir-help)
  237.         (default "Scalos:Prefs")
  238.         (newpath)
  239.     )
  240. )
  241.  
  242. (set languages
  243.     (askoptions
  244.         (prompt    #languages-select)
  245.         (help    #languages-select-help "\n\n" @askoptions-help)
  246.         (choices
  247.             "English (built in)"
  248.             "Deutsch"
  249.         )
  250.         (default languages-default)
  251.     )
  252. )
  253.  
  254. ;Preparation for MUI-Library
  255. (if (not (exists "MUI:" (noreq)))
  256.     (set mui-dest
  257.         (askdir
  258.             (prompt    #where-muilib)
  259.             (help    #where-muilib-help "\n\n" @askdir-help)
  260.             (default "Libs:MUI")
  261.         )
  262.     )
  263.     (set mui-dest "MUI:Libs/MUI")
  264. )
  265.  
  266. (if (not
  267.     (askchoice
  268.         (prompt    #moduletype-select)
  269.         (help    #moduletype-select-help "\n\n" @askoptions-help)
  270.         (choices
  271.             "MUI"
  272.             "Class Act"
  273.         )
  274.         (default 0)
  275.     )
  276.      )
  277.     (set module-path "Modules_MUI")
  278.     (set module-path "Modules_CA")
  279.  
  280. )
  281.  
  282. (set plugin
  283.     (askbool
  284.         (prompt #plugin-select)
  285.         (help #plugin-select-help)
  286.         (default 1)
  287.     )
  288. )
  289.  
  290. (set autostart 0)
  291. (if (AND (OR (exists "S:Scalos.key" (NOREQ)) (exists "S/Scalos.key" (NOREQ))) (NOT (exists "C:LoadWB.orig" (NOREQ))))
  292.     (set autostart
  293.         (askbool
  294.             (prompt #autostart-select)
  295.             (help #autostart-select-help)
  296.             (default 1)
  297.         )
  298.     )
  299. )
  300.  
  301.  
  302. ;===[ Real Installation ]====================================================
  303.  
  304. ;Create Scalos: Assign
  305. (if firstinstall
  306.  (
  307. ;    (makedir scalos-dest
  308. ;        (prompt    #makedir-scalos)
  309. ;        (help    #makedir-scalos-help "\n\n" @makedir-help)
  310. ;        (infos)
  311. ;    )
  312.     (startup @app-name
  313.         (prompt    #startup-scalos)
  314.         (help    #startup-scalos-help "\n\n" @startup-help)
  315.         (command 'Assign Scalos: \"' scalos-dest '\"\n')
  316.     )
  317.  )
  318. )
  319.  
  320. (complete 5)
  321.  
  322. ;Copy Scalos-Mainfile
  323. (copyfiles
  324.     (prompt    #copy-scalos)
  325.     (source    "Scalos")
  326.     (dest    scalos-dest)
  327.     (files)
  328.     (infos)
  329. )
  330.  
  331. (complete 10)
  332.  
  333. ;Copy Prefs
  334. (if (not (exists scalosprefs-dest (NOREQ)))
  335.     (
  336.         (makedir scalosprefs-dest
  337.             (prompt #makedir-prefs)
  338.             (help    @makedir-help)
  339.         )
  340.     )
  341. )
  342.  
  343.  
  344. (copyfiles
  345.     (prompt    #copy-scalosprefs)
  346.     (source    "Prefs/")
  347.     (dest    scalosprefs-dest)
  348.     (infos)
  349.     (all)
  350. )
  351.  
  352. (complete 20)
  353.  
  354. (copylib
  355.     (prompt    #copy-libs1)
  356.     (source    ("Libs/iconobject.library"))
  357.     (dest    "Libs:")
  358.     (help    @copylib-help)
  359.     (confirm)
  360. )
  361.  
  362. (copylib
  363.     (prompt    #copy-libs2)
  364.     (source    ("Libs/mcpgfx.library"))
  365.     (dest    "Libs:")
  366.     (help    @copylib-help)
  367.     (confirm)
  368. )
  369.  
  370. (copylib
  371.     (prompt    #copy-libs3)
  372.     (source    ("Libs/preferences.library"))
  373.     (dest    "Libs:")
  374.     (help    @copylib-help)
  375.     (confirm)
  376. )
  377.  
  378. (complete 30)
  379.  
  380. ;Copy MUI Lib:
  381. (copylib
  382.     (prompt    #copy-muilib)
  383.     (source "Libs/MUI/MCPFrame.mcc")
  384.     (dest    mui-dest)
  385.     (help    @copylib-help)
  386.     (confirm)
  387. )
  388.  
  389. (complete 40)
  390.  
  391. ;Copy Required/Selected Modules
  392. (copyfiles
  393.     (prompt    #copy-modules)
  394.     (source    module-path)
  395.     (dest    (tackon scalos-dest "Modules"))
  396.     (all)
  397. )
  398.  
  399. (complete 50)
  400.  
  401. (copylib
  402.     (prompt    #copy-libs4)
  403.     (source    ("Classes/Datatypes/amigaiconobject.datatype"))
  404.     (dest    "SYS:Classes/Datatypes")
  405.     (help    @copylib-help)
  406.     (confirm)
  407. )
  408.  
  409. (copylib
  410.     (prompt    #copy-libs5)
  411.     (source    ("Classes/Datatypes/iconobject.datatype"))
  412.     (dest    "SYS:Classes/Datatypes")
  413.     (help    @copylib-help)
  414.     (confirm)
  415. )
  416.  
  417. (copylib
  418.     (prompt    #copy-libs6)
  419.     (source    ("Classes/Datatypes/newiconobject.datatype"))
  420.     (dest    "SYS:Classes/Datatypes")
  421.     (help    @copylib-help)
  422.     (confirm)
  423. )
  424.  
  425. (complete 60)
  426.  
  427. ;Copy "Devs/Datatypes/#?" To "Devs:Datatypes"
  428. (copyfiles
  429.     (prompt    #copy-datatypes)
  430.     (source    "Devs/Datatypes")
  431.     (dest    "Devs:Datatypes")
  432.     (infos)
  433.     (all)
  434. )
  435.  
  436. (complete 70)
  437.  
  438. ;Copy of the catalog files (with version check)
  439. (if (= (exists "Locale:") 2)
  440.     (
  441.         (set n 0)
  442.         (while
  443.             (set language
  444.                 (select n
  445.                     "English"
  446.                     "Deutsch"
  447.                     ""
  448.                 )
  449.             )
  450.             (
  451.                 (if (IN languages n)
  452.                     (if (<> 0 n)   ; No catalog for english strings...
  453.                         (
  454.                             (set catalogs (tackon "Locale/Catalogs" (tackon language "Scalos")))
  455.                             (set destination (tackon "Locale:Catalogs" (tackon language "Scalos")))
  456.                             (makedir destination)
  457. ;-------------------------------------------------------------------------------------------
  458.                             (
  459.                                 (set lala 0)
  460.                                 (while
  461.                                     (set scaloscat
  462.                                         (select lala
  463.                                             "Scalos_Delete.catalog"
  464.                                             "Scalos_ECommand.catalog"
  465.                                             "Scalos_NewDrawer.catalog"
  466.                                             "Scalos_OpenLocation.catalog"
  467.                                             "Scalos_Rename.catalog"
  468.                                             "Scalos_ETrashcan.catalog"
  469.                                             "Scalos.catalog"
  470.                                             "ScalosPattern.catalog"
  471.                                             "ScalosPrefs.catalog"
  472.                                             "ScalosPalette.catalog"
  473.                                             "ScalosMenu.catalog"
  474.                                             ""
  475.                                         )
  476.                                     )
  477.                                     (
  478.                                         (if (exists (tackon catalogs scaloscat)) 
  479.                                             (copylib
  480.                                                 (prompt    #copy-catalog)
  481.                                                 (source    (tackon catalogs scaloscat))
  482.                                                 (dest    destination)
  483.                                                 (help    @copylib-help)
  484.                                                 (confirm)
  485.                                             )
  486.                                         )
  487.                                         (set lala (+ lala 1))
  488.                                     )
  489.                                 )
  490.                             )
  491. ;-----------------------------------------------------------------------------------------------
  492.                         )
  493.                     )
  494.                 )
  495.                 (set n (+ n 1))
  496.             )
  497.         )
  498.     )
  499. )
  500.  
  501. (complete 80)
  502.  
  503. ;Copy presets
  504. (copyfiles
  505.     (prompt    #copy-presets)
  506.     (source    "Presets")
  507.     (dest    "SYS:Prefs/Presets")
  508.     (infos)
  509.     (all)
  510. )
  511.  
  512. ;Copy Plugin + Tools
  513. (if plugin
  514.     (
  515.         (copyfiles
  516.             (prompt    #copy-plugins)
  517.             (source    "PlugIns")
  518.             (dest    (tackon scalos-dest "Plugins"))
  519.             (infos)
  520.             (all)
  521.         )
  522.         (copyfiles
  523.             (prompt    #copy-tools)
  524.             (source    "Tools")
  525.             (dest    (tackon scalos-dest "Tools"))
  526.             (infos)
  527.             (all)
  528.         )
  529.     )
  530. )
  531.  
  532. (complete 90)
  533.  
  534. ;Installing LoadWB-Replacement
  535. (if autostart
  536.     (
  537.         (copyfiles
  538.             (prompt #copy-loadwb)
  539.             (source    "LoadWB.Scalos")
  540.             (dest    "C:")
  541.         )
  542.         (if    (rename "C:LoadWB" "C:LoadWB.orig"
  543.                 (prompt #rename-loadwborg)
  544.             )
  545.             (rename "C:LoadWB.scalos" "C:LoadWB"
  546.                 (prompt #rename-loadwbscalos)
  547.             )
  548.         )
  549.     )
  550. )
  551.  
  552. (if (exists "S/Scalos.key" (NOREQ))
  553.     (
  554.         (askbool
  555.             (prompt    #register-thank)
  556.             (help    @askbool-help)
  557.             (choices #mypleasure #mypleasure)
  558.         )
  559.         (copyfiles
  560.             (prompt #copy-scaloskey)
  561.             (source    "S/Scalos.key")
  562.             (dest    "S:")
  563.         )
  564.     )
  565. )
  566.  
  567. (complete 100)
  568.  
  569. (EXIT #install-exit)
  570.                                                                                                                                                                                                                                                                                                                                                
  571.