home *** CD-ROM | disk | FTP | other *** search
/ MACD 9 / MACD9.iso / Datatypes / MacPict2 / Install < prev    next >
Encoding:
Text File  |  1998-09-16  |  3.4 KB  |  139 lines

  1. ; Installer for MacPict datatype
  2. ; 1997-06-30 by Bengt Engdahl
  3. ; last updated 1998-09-16 by Erik Engdahl
  4. ;
  5. ; $VER: MacPict datatype Install 1.4
  6. ;
  7.  
  8. (set mpaintinst "You have the (CBM) MacPaint datatype installed.\nThe recognition have to be replaced with the supplied one. The new will work as good as the old one. If you don't wan't this, press 'Abort' now.\n\n(The old will be placed in Storage)")
  9. (set wheredoc (cat "Choose where you want the documentation to be installed. No drawer will be created there."))
  10. (set whereclasses "Where do the (Graphic) Datatype Classes belong?")
  11. (set ask0x0 "Choose which processor you have.")
  12.  
  13. (complete 0)
  14.  
  15. (set #cpu (database "cpu"))
  16.  
  17. (select
  18.   (askchoice
  19.     (prompt ask0x0)
  20.     (choices "68040" "68020" "68000")
  21.     (help
  22.       (cat "On machines with an 68020 processor or higher, like "
  23.            "the Amiga 1200, 2500, 3000 and 4000 you can select "
  24.            "the 68020 version, which is optimized for those "
  25.            "processors.\n\n"
  26.            "If you have an Amiga with a 68000 or 68010 processor, "
  27.            "like the standard version of the Amiga 500, 500+, "
  28.            "600, 2000 and you have upgraded to Kickstart 3.0 or "
  29.            "higher, then you must select the 68000 version.\n\n"
  30.            "If your Amiga has a 68040 or 68060 processor "
  31.            "then I recommend choosing the 68040 version.\n\n"
  32.            @askchoice-help)
  33.     )
  34.     (default 1)
  35.     (if (OR (= #cpu "68000") (= #cpu "68010"))
  36.       (default 2)
  37.     )
  38.     (if (OR(= #cpu "68040") (= #cpu "68060"))
  39.       (default 0)
  40.     )
  41.   )
  42.   (set dt_binary "MacPict.datatype.040")
  43.   (set dt_binary "MacPict.datatype.020")
  44.   (set dt_binary "MacPict.datatype.000")
  45. )
  46.  
  47. ; ===== Install datatype =====
  48.  
  49. (set classdir
  50.   (askdir
  51.     (prompt whereclasses)
  52.     (help @askdir-help)
  53.     (default "SYS:Classes/DataTypes")
  54.   )
  55. )
  56.  
  57. (copyfiles
  58.   (source (tackon "classes/datatypes/" dt_binary))
  59.   (dest classdir)
  60.   (newname "MacPict.datatype")
  61. )
  62.  
  63. (complete 20)
  64.  
  65. ; ===== Remove old recognition part =====
  66. (if (exists ("Devs:DataTypes/Macintosh PICT2"))
  67.   (delete "Devs:DataTypes/Macintosh PICT2" (infos))
  68. )
  69.  
  70. ; ===== Install recognition part =====
  71. (copyfiles
  72.   (source "devs/datatypes/MacPICT2")
  73.   (dest "Devs:DataTypes")
  74.   (newname "MacPICT2")
  75.   (infos)
  76. )
  77.  
  78. (complete 40)
  79.  
  80. ; ===== Check for the old (CBM) MacPaint datatype recognition =====
  81.  
  82. (if (exists ("Devs:DataTypes/MacPaint"))
  83.   (
  84.     (if(=  (GetSum "Devs:DataTypes/MacPaint") -2117613666)
  85.       (
  86.         (message mpaintinst)
  87.         (copyfiles
  88.           (source "Devs:DataTypes/MacPaint")
  89.           (dest "SYS:Storage/DataTypes/")
  90.           (infos)
  91.         )
  92.         (delete "Devs:DataTypes/MacPaint" (infos))
  93.  
  94.         (copyfiles
  95.           (source "MacPaint/MacPaint")
  96.           (dest "Devs:DataTypes")
  97.           (newname "MacPaint")
  98.           (infos)
  99.         )
  100.       )
  101.     )
  102.   )
  103. )
  104.  
  105. (complete 60)
  106.  
  107. ; ===== Install Docs =====
  108.  
  109. (set default-dest
  110.   (askdir
  111.     (prompt wheredoc)
  112.     (help @askdir-help)
  113.     (default "Help:")
  114.   )
  115. )
  116. (set @default-dest default-dest)
  117. (copyfiles
  118.   (source "docs")
  119.   (dest @default-dest)
  120.   (pattern "#?")
  121.   (infos)
  122.   (noposition)
  123. )
  124. (complete 80)
  125. ;===== almost done =====
  126.  
  127. (run "C:AddDataTypes Refresh")
  128.  
  129. (complete 100)
  130. ; Installation was permanent
  131. (exit
  132.   (cat "You might have to reboot the system before you can use the "
  133.        "new MacPict2 datatype.\n"
  134.        "A tip is to use the command 'libflush' or similar to make"
  135.        "sure there aren't an old version of the datatype in memory."
  136.   )
  137. (quiet)
  138. )
  139.