home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / System / Datatypes / WarpPNGdt / Install_WarpPNG < prev    next >
Text File  |  1999-12-28  |  3KB  |  129 lines

  1. ; $VER: Install_WarpPNG 1.0 (28.12.99)
  2. ;   by Oliver Roberts (oliver.roberts@iname.com)
  3.  
  4. (if (= (exists "Env:Language") 1)
  5.     (set @language (getenv "Language"))
  6. )
  7.  
  8. ;*****************
  9. ; English strings
  10. ;
  11. (set #str-kick3 "You must be running Kickstart 3.0 or higher to use datatypes.")
  12. (set #str-installdt "Installing Datatype")
  13. (set #str-installclass "Installing WarpPNG.datatype class")
  14. (set #str-installdes "Installing Descriptor")
  15. (set #str-wrongcpu "You must have at least a 68040 and PowerPC processor to use this datatype.")
  16. (set #str-oldpicdt (cat
  17.     "WarpPNG.datatype needs picture.datatype v43 or higher.\n\n"
  18.     "Such a datatype is supplied with AmigaOS 3.5, P96 and CyberGraphX."
  19. ))
  20. (set #str-noppc (cat
  21.     "WarpPNG.datatype requires a PowerPC processor and WarpUp Release "
  22.     "4 or higher."
  23. ))
  24. (set #str-backupdesc (cat
  25.     "You already have a PNG datatype descriptor installed.  Would you "
  26.     "like to keep a backup for safe-keeping?\n\n(if this is your first "
  27.     "time installing WarpPNG.datatype, you probably should)"
  28. ))
  29. (set #str-backup "Backup")
  30. (set #str-overwrite "Overwrite")
  31. (set #str-backupdir "Where should the PNG descriptor be backed up to?")
  32. (set #str-backingup "Backing up files")
  33. (set #str-reboot (cat
  34.     "You may need to reboot for the changes to take effect.\n\n"
  35.     "Also, if you have any other PNG datatypes in DEVS:Datatypes, "
  36.     "you will probably have to remove them manually."
  37. ))
  38.  
  39. ;**********************
  40. ; Compatibility checks
  41. ;
  42. (set @default-dest "")
  43. (set #cpu (database "cpu"))
  44.  
  45. (if (< (/ (getversion) 65536) 39)
  46.     (abort #str-kick3)
  47. )
  48.  
  49. (if (NOT (OR (= #cpu "68040") (= #cpu "68060")))
  50.     (abort #str-wrongcpu)
  51. )
  52.  
  53. (set #ppc 0)
  54. (if (exists "LIBS:powerpc.library")
  55.     (
  56.         (set #ppcver (/ (getversion "LIBS:powerpc.library") 65536))
  57.         (if (>= #ppcver 15) (set #ppc 1))
  58.     )
  59. )
  60. (if (= #ppc 0)
  61.     (abort #str-noppc)
  62. )
  63.  
  64. (set #picdt-ok 0)
  65. (if (exists "SYS:Classes/Datatypes/picture.datatype")
  66.     (
  67.         (set #pdtver (/ (getversion "SYS:Classes/Datatypes/picture.datatype") 65536))
  68.         (if (>= #pdtver 43) (set #picdt-ok 1))
  69.     )
  70. )
  71. (if (= #picdt-ok 0)
  72.     (abort #str-oldpicdt)
  73. )
  74.  
  75. ;*************
  76. ; Here we go!
  77. ;
  78. (welcome "")
  79.  
  80. (working #str-installdt)
  81.  
  82. (copylib
  83.     (help @copylib-help)
  84.     (prompt #str-installclass)
  85.     (source "Classes/Datatypes/WarpPNG.datatype")
  86.     (dest "SYS:Classes/DataTypes")
  87.     (confirm)
  88. )
  89.  
  90. (if (exists "DEVS:Datatypes/PNG")
  91.     (if    (askbool
  92.             (prompt #str-backupdesc)
  93.             (help "")
  94.             (default 0)
  95.             (choices #str-backup #str-overwrite)
  96.         )
  97.         (
  98.             (set #bakdir
  99.                 (askdir
  100.                     (prompt #str-backupdir)
  101.                     (help @askdir-help)
  102.                     (default "SYS:Storage/Datatypes")
  103.                 )
  104.             )
  105.             (copyfiles
  106.                 (help @copyfiles-help)
  107.                 (prompt #str-backingup)
  108.                 (source "DEVS:DataTypes/PNG")
  109.                 (dest #bakdir)
  110.                 (infos)
  111.                 (confirm)
  112.             )
  113.         )
  114.     )
  115. )
  116.  
  117. (copyfiles
  118.     (help @copyfiles-help)
  119.     (prompt #str-installdes)
  120.     (source "Devs/DataTypes/PNG")
  121.     (dest "DEVS:DataTypes")
  122.     (infos)
  123.     (confirm)
  124. )
  125.  
  126. (run "C:AddDataTypes >NIL: REFRESH")
  127.  
  128. (exit #str-reboot)
  129.