home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Recent / util / misc / ReqAttack.lha / ReqAttack / Install < prev    next >
Text File  |  1993-06-07  |  12KB  |  458 lines

  1. ;$VER: ReqAttackPackageInstallScript 1.8 (7.06.2001) ©Jaca/Dreamolers-CAPS
  2. (set #MSG_WLCOME "Welcome to the ReqAttack 1.80 Package Installer\n©2001 by Jaca/Dreamolers-CAPS\n\nMake sure you use PatchControl from\nMCP archive!\n\nThis installer will install/update ReqAttack, RAPrefsMUI,\nCyReq and other ReqAttack\nutilities + example sound & gfx.\n\nReqAttack support page:\nhttp://jacadcaps.republika.pl/")
  3. (set #MSG_DEST "Where do you wish to install ReqAttack?\nA drawer called \"ReqAttack\" will be created automatically, if not already existing!")
  4. (set #MSG_DONE "Thanks for installing ReqAttack!\n\nPlease read the ReqAttack.guide...\nPlease remove ReqOFF from your system - it's now in ReqAttack!\n\n\nAny questions ???\njacadcaps@poczta.onet.pl")
  5. (set #MSG_NOHELP "No help available. Sorry!")
  6. (set #MSG_COPY_ICON "Copying icon ...")
  7. (set #MSG_RAPATH "Where on your hard disk is your ReqAttack directory?")
  8. (set #MSG_MAKEDIR "\nCreating ReqAttack directory ...")
  9. (set #MSG_COPY_BRUSHDT "Copying ReqAttack Brush Datatype ...")
  10. (set #MSG_COPY_BRUSHDTDESC "Copying ReqAttack Brush Datatype description file ...")
  11. (set #MSG_COPY_ANIMBRUSHDT "Copying ReqAttack Animbrush Datatype ...")
  12. (set #MSG_COPY_ANIMBRUSHDTDESC "Copying ReqAttack Animbrush Datatype description file ...")
  13. (complete 0)
  14. (message #MSG_WLCOME)
  15. ;## VERSION CHECK
  16. (set #OSVERSION (/ (getversion) 65536))
  17.  
  18. (if (< #OSVERSION 39)
  19.     (abort "Sorry\nOS3.0+ required!")
  20. )
  21. ;## ASK FOR DIRECTORY
  22. (set #defdir @default-dest)
  23.         
  24. (if (= 1 (exists "S:ReqAttack.installinfo"))
  25.     (
  26.         (copyfiles
  27.             (source "S:ReqAttack.installinfo")
  28.             (dest "ENV:")
  29.             (newname "ReqAttackInstallInfo")
  30.         )
  31.         (set #envdefdir (getenv "ReqAttackInstallInfo"))
  32.         (if (<> "" #envdefdir)
  33.             (set #defdir (pathonly #envdefdir))
  34.         )
  35.         (delete "ENV:ReqAttackInstallInfo")
  36.     )
  37. )
  38. (set #dest
  39.     (expandpath
  40.         (askdir
  41.             (prompt #MSG_DEST)
  42.             (help #MSG_NOHELP)
  43.             (default #defdir)
  44.         )
  45.     )
  46. )
  47.         (if (= 0 (exists (tackon #dest "ReqAttack")))
  48.             (
  49.                 (makedir (tackon #dest "ReqAttack")
  50.                     (prompt #MSG_MAKEDIR)
  51.                     (help #MSG_NOHELP)
  52.                     (confirm)
  53.                 )
  54.                 (copyfiles
  55.                     (prompt #MSG_COPY_ICON)
  56.                     (source "/ReqAttack.info")
  57.                     (dest #dest)
  58.                     (help #MSG_NOHELP)
  59.                     (confirm)
  60.                 )
  61.                 (run ("installtools/noiconpos \"%s\"" (tackon #dest "ReqAttack")))
  62.             )
  63.         )
  64.  
  65.         (set #dest (tackon #dest "ReqAttack"))
  66.         (set @default-dest #dest)
  67.         (textfile
  68.             (dest "S:ReqAttack.installinfo")
  69.             (append #dest)
  70.         )
  71. ;##
  72. ;## ASK WHAT TO INSTALL (!!!)
  73. ;## 
  74. (set #MSG_WHAT "Select the items you want to be installed")
  75. (set #MSG_PROG "Install/Update ReqAttack & RAPrefsMUI")
  76. (set #MSG_TOOLS "Copy the ReqAttack tools")
  77. (set #MSG_DOCS "Copy documentation")
  78. (set #MSG_LOCALE "Copy catalog files")
  79. (set #MSG_GFX "Copy example gfx files")
  80. (set #MSG_SOUNDS "Copy example sounds")
  81. (set #MSG_DT "Install datatypes")
  82. (set #MSG_CR "Install CyReq")
  83. (set #WHAT_PROG 1)
  84. (set #WHAT_TOOLS 2)
  85. (set #WHAT_DOCS 4)
  86. (set #WHAT_LOCALE 8)
  87. (set #WHAT_GFX 16)
  88. (set #WHAT_SOUNDS 32)
  89. (set #WHAT_DT 64)
  90. (set #WHAT_CR 128)
  91. (set #defwhat 255)
  92. (set #what
  93.   (askoptions
  94.     (prompt #MSG_WHAT)
  95.     (choices #MSG_PROG #MSG_TOOLS #MSG_DOCS #MSG_LOCALE #MSG_GFX #MSG_SOUNDS #MSG_DT #MSG_CR)
  96.     (help "No help available")
  97.     (default #defwhat)
  98.   )
  99. )
  100. ;##
  101. ;## REQATTACK SECTION
  102. ;##
  103. (if (<> 0 (bitand #WHAT_PROG #what))
  104. (
  105.  
  106.     (copyfiles
  107.         (source "ReqAttack")
  108.         (dest #dest)
  109.         (infos)
  110.     )
  111.     (copyfiles
  112.         (source "ATO.readme")
  113.         (dest #dest)
  114.     )
  115.     (copyfiles
  116.         (source "Author.jpg")
  117.         (dest #dest)
  118.     )
  119.     (copyfiles
  120.         (source "readme.mui")
  121.         (dest #dest)
  122.     )
  123.     (copyfiles
  124.         (source "ReqAttack.readme")
  125.         (dest #dest)
  126.     )
  127. (set #rapc (askbool
  128.     (prompt "Where to install RAPrefsMUI")
  129.     (help "It's best to install it in SYS:Prefs")
  130.     (choices "SYS:Prefs" "ReqAttack directory")))
  131.  
  132. (if (= 1 #rapc)
  133.   (
  134.        (copyfiles
  135.           (source "RAPrefsMUI")
  136.           (dest "SYS:Prefs")
  137.           (infos)
  138.       )
  139.       (makedir "Sys:Prefs/RAPImages")
  140.     (copyfiles
  141.       (source "RAPImages")
  142.       (dest (tackon #dest "SYS:Prefs"))
  143.       (all)
  144.     )
  145.   )
  146. )
  147. (if (= 0 #rapc)
  148.   (
  149.        (copyfiles
  150.           (source "RAPrefsMUI")
  151.           (dest #dest)
  152.           (infos)
  153.       )
  154.       (makedir (tackon #dest "RAPImages"))
  155.     (copyfiles
  156.       (source "RAPImages")
  157.       (dest (tackon #dest "RAPImages"))
  158.       (all)
  159.     )
  160.   )
  161. )
  162. ))
  163. (complete 10)
  164. ;##
  165. ;## TOOLS SECTION
  166. ;##
  167. (if (<> 0 (bitand #WHAT_TOOLS #what))
  168. (
  169.   (copyfiles
  170.     (source "Tools")
  171.     (dest (tackon #dest "Tools"))
  172.     (all)
  173.   )
  174.   (copyfiles
  175.     (source "ReqReplacers")
  176.     (dest (tackon #dest "ReqReplacers"))
  177.     (all)
  178.   )
  179. ))
  180. (complete 20)
  181. ;##
  182. ;## DOCS SECTION
  183. ;##
  184. (if (<> 0 (bitand #WHAT_DOCS #what))
  185. (
  186.   (copyfiles
  187.     (source "Documentation/English/ReqAttack.guide")
  188.     (dest (tackon #dest "Documentation"))
  189.   )
  190.   (copyfiles
  191.     (source "Documentation/English/Tools.guide")
  192.     (dest (tackon #dest "Documentation"))
  193.   )
  194. ))
  195. (complete 30)
  196. ;##
  197. ;## GFX SECTION
  198. ;##
  199. (if (<> 0 (bitand #WHAT_GFX #what))
  200. (
  201.   (copyfiles
  202.     (source "AnimLogos")
  203.     (dest (tackon #dest "AnimLogos"))
  204.     (all)
  205.   )
  206.   (copyfiles
  207.     (source "Buttons")
  208.     (dest (tackon #dest "Buttons"))
  209.     (all)
  210.   )
  211.   (copyfiles
  212.     (source "Logos")
  213.     (dest (tackon #dest "Logos"))
  214.     (all)
  215.   )
  216.   (copyfiles
  217.     (source "Patterns")
  218.     (dest (tackon #dest "Patterns"))
  219.     (all)
  220.   )
  221. ))
  222. (complete 40)
  223. ;##
  224. ;## SND SECTION
  225. ;##
  226. (if (<> 0 (bitand #WHAT_SOUNDS #what))
  227. (
  228.   (copyfiles
  229.     (source "Sounds")
  230.     (dest (tackon #dest "Sounds"))
  231.     (all)
  232.   )
  233. ))
  234. (complete 50)
  235. ;##
  236. ;## LOCALE SECTION
  237. ;##
  238. (if (<> 0 (bitand #WHAT_LOCALE #what))
  239. (
  240. (set #L_WHAT "What locale files you wish to install?\nNOTE: ATO translations will be released\nin separate archives!")
  241. (set #L_PL "polski/RAPrefsMUI.catalog")
  242. (set #L_CD "RAPrefsMUI.cd")
  243. (set #W_PL 1)
  244. (set #W_CD 2)
  245. (set #lwhat
  246.   (askoptions
  247.      (prompt #L_WHAT)(choices #L_PL #L_CD)(help "Sorry, no help :(")(default 0)
  248.   )
  249. )
  250. ))
  251. (if (<> 0 (bitand #W_PL #lwhat))
  252. (
  253.   (copyfiles
  254.     (source "Catalogs/polski/RAPrefsMUI.catalog")
  255.     (dest (tackon "LOCALE:Catalogs" "polski/"))
  256.   )
  257. ))
  258. (if (<> 0 (bitand #W_CD #lwhat))
  259. (
  260.   (copyfiles
  261.     (source "Catalogs/RAPrefsMUI.cd")
  262.     (dest #dest)
  263.   )
  264. ))
  265. (complete 60)
  266.  
  267. ;### DATATYPES ###
  268. (if (<> 0 (bitand #WHAT_DT #what))
  269. (
  270.  
  271.         (copylib
  272.             (prompt #MSG_COPY_BRUSHDT)
  273.             (source "DataTypes/Classes/rabrush.datatype")
  274.             (dest   "SYS:classes/datatypes")
  275.             (confirm)
  276.             (help #MSG_NOHELP)
  277.         )
  278.         (copyfiles
  279.             (prompt #MSG_COPY_BRUSHDTDESC)
  280.             (source "DataTypes/Devs/RABrush")
  281.             (dest "DEVS:Datatypes")
  282.             (infos)
  283.             (noposition)
  284.             (confirm)
  285.             (help #MSG_NOHELP)
  286.         )
  287.         (copylib
  288.             (prompt #MSG_COPY_ANIMBRUSHDT)
  289.             (source "DataTypes/Classes/raanimbrush.datatype")
  290.             (dest   "SYS:classes/datatypes")
  291.             (confirm)
  292.             (help #MSG_NOHELP)
  293.         )
  294.         (copyfiles
  295.             (prompt #MSG_COPY_ANIMBRUSHDTDESC)
  296.             (source "DataTypes/Devs/RAAnimBrush")
  297.             (dest "DEVS:Datatypes")
  298.             (infos)
  299.             (noposition)
  300.             (confirm)
  301.             (help #MSG_NOHELP)
  302.         )
  303. ))
  304. (complete 70)
  305. ;##
  306. ;##CYREQ
  307. ;##
  308. (set #MSG_COPY_CYREQ "Copying CyReq ...")
  309. (set #MSG_FA "Now a program will be started that allows you to select at which position to insert CyReq in the Startup-Sequence. Change the predefined position only if you really know what you do!")
  310. (set #MSG_FA2 "\n\nIf CyReq is already in your Startup-Sequence you can delete the corresponding lines by using CONTROL + LEFT MOUSE BUTTON.\n\nBefore saving the changed Startup-Sequence a backup of it will be created!")
  311.  
  312. (if (<> 0 (bitand #WHAT_CR #what))
  313.     (
  314.         (set #actversion 0)
  315.         (set #installversion (getversion "Tools/CyReq"))
  316.         
  317.         (if (= 1 (exists ("C:CyReq")))
  318.             (set #actversion (getversion "SYS:c/CyReq"))
  319.         )
  320.         (if (> #installversion #actversion)
  321.             (
  322.                 (copyfiles
  323.                     (prompt #MSG_COPY_CYREQ)
  324.                     (source "Tools/CyReq")
  325.                     (dest "SYS:c")
  326.                     (help #MSG_NOHELP)
  327.                     (confirm)
  328.                 )
  329.             )
  330.         )
  331.  
  332.         (if (<> 0 (run "installtools/checkprogstart S:Startup-Sequence CyReq"))
  333.             (
  334.                 (textfile
  335.                     (dest "T:cyreq_Start")
  336.                     (append ("CyReq ;one of most important patches in your OS!\n"))
  337.                     (safe)
  338.                 )
  339.                 (message #MSG_FA #MSG_FA2)
  340.                 (run "installtools/FileAttack T:cyreq_Start S:Startup-Sequence Backup S:Startup-Sequence.bak DefaultAfter #?SetPatch#?")
  341.                 (delete "T:cyreq_Start")
  342.             )
  343.         )
  344.     )
  345. )
  346. (complete 80)
  347. ;##
  348. ;## PREFS FILES SECTION
  349. ;##
  350. (if (=(exists "ENVARC:ReqAttack.prefs" (noreq)) 1)
  351.   (if (askbool 
  352.     (prompt "\n\nInstaller has found a ReqAttack.prefs file!\n\nIf RAPrefsMUI was not used before it is\n"
  353.             "strongly recommended that you install the prefs file\nwhich comes with this archive!\n\n"
  354.             "Install the prefs file?")
  355.     (help "Sorry, no help :(")
  356.     (choices "Yes, install" "No, it's a RAPrefsMUI file")
  357.     )
  358.     (copyfiles
  359.       (source "Prefs/ReqAttack.prefs")
  360.       (dest "ENVARC:")
  361.     )
  362.   )
  363. )
  364. (if (=(exists "ENVARC:ReqAttack.prefs" (noreq)) 0)
  365.   (copyfiles
  366.     (source "Prefs/ReqAttack.prefs")
  367.     (dest "ENVARC:")
  368.   )
  369. )
  370. (complete 85)
  371. ;##icons - yeah! :))
  372. (if (askbool (prompt "Do you wish to install avlternative icon sets?\n")(help "no help")(choices "Yes" "No"))
  373. (
  374.   (if (askbool (prompt "1: Glowicons by Martin Merz\n2: Coloricons by Raul Silva")(help "No help")(choices "Glowicons" "Coloricons"))
  375.     (
  376.       (copyfiles(source "Icons/mi.ReqAttack_Drawer.info")(newname "ReqAttack.info")(dest (tackon #dest "/")))
  377.       (copyfiles(source "Icons/mi.ReqAttack.info")(dest #dest)(newname "ReqAttack.info"))
  378.       (if (= 0 #rapc)
  379.         (
  380.           (copyfiles(source "Icons/mi.RAPrefsMUI.info")(dest #dest)(newname "RAPrefsMUI.info"))
  381.         )
  382.         (
  383.           (copyfiles(source "Icons/mi.RAPrefsMUI.info")(dest "SYS:Prefs")(newname "RAPrefsMUI.info"))
  384.         )
  385.       )
  386.     )
  387.     (
  388.       (copyfiles(source "Icons/rs.ReqAttack_Drawer.info")(newname "ReqAttack.info")(dest (tackon #dest "/")))
  389.       (copyfiles(source "Icons/rs.ReqAttack.info")(dest #dest)(newname "ReqAttack.info"))
  390.       (if (= 0 #rapc)
  391.         (
  392.           (copyfiles(source "Icons/rs.RAPrefsMUI.info")(dest #dest)(newname "RAPrefsMUI.info"))
  393.         )
  394.         (
  395.           (copyfiles(source "Icons/rs.RAPrefsMUI.info")(dest "SYS:Prefs")(newname "RAPrefsMUI.info"))
  396.         )
  397.       )
  398.     )
  399.   )
  400. )
  401. )
  402. ;##TOOLTYPE
  403. (tooltype
  404.     (dest (tackon #dest "ReqAttack"))
  405.     (settooltype "HOMEDIR" #dest)
  406. )
  407. (if (= 0 #rapc)
  408. (
  409.   (set #radest (tackon #dest "RAPrefsMUI"))
  410.   (set #MSG_RAPATH "If you run RA from startup-sequence be sure to set raprefspath argument\nlike RA icon's tooltype")
  411.   (message #MSG_RAPATH)
  412. (tooltype
  413.     (dest (tackon #dest "ReqAttack"))
  414.     (settooltype "RAPREFSPATH" (tackon #dest "RAPrefsMUI"))
  415. )
  416. ))
  417. (if (= 0 #rapc)
  418.   (
  419.     (tooltype (dest (tackon #dest "RAPrefsMUI")) (settooltype "HOMEDIR" #dest))
  420.   )
  421.   (
  422.     (tooltype (dest (tackon "SYS:Prefs" "RAPrefsMUI")) (settooltype "HOMEDIR" #dest))
  423.   )
  424. )
  425. (complete 90)
  426. ;##WBSTARTUP
  427. (if (askbool
  428.       (prompt "Do you wish to make a copy of ReqAttack in WBStartup?")
  429.       (help "By default ReqAttack is not installed after\nyou run this installation script")
  430.       (choices "Yes, install!" "No, I'll install RA myself")
  431.     )
  432. (
  433.   (copyfiles
  434.     (source (tackon #dest "ReqAttack"))
  435.     (dest "SYS:WBStartup")
  436.     (infos)
  437.   )
  438. ))
  439. (complete 95)
  440. (set #MSG_NOPOPUP "You don't have popupmenu.library v 9+\nInstall it to activate extra features!\n\nAminet: util/misc/pmuser.lha")
  441. (set #MSG_BETTERSTRING "You don't have the BetterString.mcc MUI class\n\nYou'll find it on\nhttp://www.diku.dk/students/duff/BetterString/\n\nNOTE: RAPrefsMUI 1.80 will work without it!")
  442. (set #MSG_TOOLBAR "You don't have the Toolbar.mcc MUI class\n\nYou'll find it on\nhttp://www.diku.dk/students/benny/\n\nNOTE: RAPrefsMUI 1.80 will FAIL without it!")
  443. (set #MSG_NLISTTREE "You don't have the NListtree.mcc MUI class\n\nYou'll find it on\nhttp://www.aphaso.de/\n\nNOTE: RAPrefsMUI 1.80 will FAIL without it!")
  444.  
  445. (if (=(exists "libs:popupmenu.library" (noreq)) 1)(set #libver (/ (getversion "libs:popupmenu.library") 65536)))
  446. (if (=(exists "libs:popupmenu.library" (noreq)) 0)(set #libver 0))
  447. (if (< #libver 9)
  448.    (message #MSG_NOPOPUP)
  449. )
  450. (if (=(exists "libs:mui/betterstring.mcc" (noreq)) 0)(message #MSG_BETTERSTRING))
  451. (if (=(exists "libs:mui/toolbar.mcc" (noreq)) 0)(message #MSG_TOOLBAR))
  452. (if (=(exists "libs:mui/nlisttree.mcc" (noreq)) 0)(message #MSG_NLISTTREE))
  453.  
  454. (execute "Multiview LastMinute.txt")
  455.  
  456. (complete 100)
  457. (exit #MSG_DONE (quiet))
  458.