home *** CD-ROM | disk | FTP | other *** search
/ MACD 7 / MACD7.iso / datatypes / macpict2-dtc / install < prev    next >
Encoding:
Text File  |  1998-01-12  |  2.7 KB  |  117 lines

  1. ; Installer for MacPict datatype
  2. ; 1997-06-30 by Bengt Engdahl
  3. ; updated 1998-01-03 by Erik Engdahl
  4. ;
  5. ; $VER: MacPict datatype Install 1.2
  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. (set #cpu (database "cpu"))
  14.  
  15. (askchoice
  16.     (prompt ask0x0)
  17.     (choices "68020" "68000")
  18.     (if (OR (= #cpu "68000") (= #cpu "68010"))
  19.         (default 1)
  20.         (default 0)
  21.     )
  22.  
  23.     (help
  24.             (cat "On machines with an 68020 processor or higher, like "
  25.              "the Amiga 1200, 2500, 3000 and 4000 you can select "
  26.              "the 68020 version, which is optimized for those "
  27.              "processors.\n\n"
  28.              "If you have an Amiga with a 68000 or 68010 processor, "
  29.              "like the standard version of the Amiga 500, 500+, "
  30.              "600, 2000 and you have upgraded to Kickstart 3.0 or "
  31.              "higher, then you must select the 68000 version.")
  32.     )
  33. )
  34.  
  35.  
  36. ; ===== Install datatype =====
  37.  
  38. (set classdir
  39.     (askdir
  40.         (prompt whereclasses)
  41.         (help @askdir-help)
  42.         (default "SYS:Classes/DataTypes")
  43.     )
  44. )
  45.  
  46.  
  47. (copyfiles
  48.     (if (= 0x0choice 0)
  49.         (source "classes/datatypes/MacPict.datatype.020")
  50.         (source "classes/datatypes/MacPict.datatype.000")
  51.     )
  52.     (dest classdir)
  53.     (newname "MacPict.datatype")
  54. )
  55.  
  56. ; ===== Install recognition part =====
  57. (copyfiles
  58.     (source "devs/datatypes/Macintosh PICT2")
  59.     (dest "Devs:DataTypes")
  60.     (newname "Macintosh PICT2")
  61.     (infos)
  62. )
  63.  
  64. ; ===== Check for the old (CBM) MacPaint datatype recognition =====
  65.  
  66. (if (exists ("Devs:DataTypes/MacPaint"))
  67.     (
  68.         (if(=  (GetSum "Devs:DataTypes/MacPaint") -2117613666)
  69.             (
  70.                 (message mpaintinst)
  71.                 (copyfiles
  72.                     (source "Devs:DataTypes/MacPaint")
  73.                     (dest "SYS:Storage/DataTypes/")
  74.                     (infos)
  75.                 )
  76.                 (delete "Devs:DataTypes/MacPaint" (infos))
  77.  
  78.                 (copyfiles
  79.                     (source "MacPaint/MacPaint")
  80.                     (dest "Devs:DataTypes")
  81.                     (newname "MacPaint")
  82.                     (infos)
  83.                 )
  84.             )
  85.         )
  86.     )
  87. )
  88.  
  89. ; ===== Install Docs =====
  90.  
  91. (set default-dest
  92.     (askdir
  93.         (prompt wheredoc)
  94.         (help @askdir-help)
  95.         (default "Help:")
  96.     )
  97. )
  98. (set @default-dest default-dest)
  99. (copyfiles
  100.     (source "docs")
  101.     (dest @default-dest)
  102.     (pattern "#?")
  103.     (infos)
  104.     (noposition)
  105. )
  106. ;===== almost done =====
  107.  
  108. (run "C:AddDataTypes Refresh")
  109.  
  110. ; Installation was permanent
  111. (exit
  112.   (cat "You might have to reboot the system before you can use the "
  113.          "MacPict2 datatype."
  114.   )
  115. (quiet)
  116. )
  117.