home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / gfx / board / ttviewer.lha / ttviewer / Viewer.install < prev   
Encoding:
Text File  |  1980-03-16  |  17.8 KB  |  606 lines

  1. ;*********************************************************
  2. ;*                                                       *
  3. ;*         $VER: Viewer.install 1.1 (03.11.96)           *
  4. ;*                                                       *
  5. ;*              $Filename: Viewer.install $              *
  6. ;*              $Version: 1.1 $                          *
  7. ;*              $Date: 03.11.96 $                        *
  8. ;*              $Creation: 03.11.96 $                    *
  9. ;*                                                       *
  10. ;*        Installer script to install Viewer             *
  11. ;*        for CyberGraphX or Picasso2 direct             *
  12. ;*                                                       *
  13. ;*     © Copyright 1996 by T&T, all rights reserved      *
  14. ;*                                                       *
  15. ;*********************************************************
  16.  
  17. ;-------------- Neudefinitionen ---------------
  18. (set os_ver (/ (getversion "LIBS:version.library") 65536))
  19. (if (= os_ver 37)
  20.   (set workbench "2.0")
  21. )
  22. (if (= os_ver 38)
  23.   (set workbench "2.1")
  24. )
  25. (if (= os_ver 39)
  26.   (set workbench "3.0")
  27. )
  28. (if (= os_ver 40)
  29.   (set workbench "3.1")
  30. )
  31. (if (= os_ver 41)
  32.   (set workbench "4.0")
  33. )
  34. (set cpu (database "cpu"))
  35. (set chip_mem (database "graphics-mem"))
  36. (set all_mem (database "total-mem"))
  37. (set fast_mem (- all_mem chip_mem))
  38. (set #sys_info (cat " \nRechnerkonfiguration:\n\n\n"
  39.                     " OS-Version: " workbench "\n\n"
  40.                     " Prozessor: " cpu "\n\n"
  41.                     " verfügbarer ChipRAM: " chip_mem " Byte\n"
  42.                     "             FastRAM: " fast_mem " Byte")
  43. )
  44. (set @abort-button "Abbruch")
  45. (set @user-level 1) 
  46. ;-------------- language env ------------------
  47. (set @language "Deutsch")
  48. ;-------------- version txt ------------------
  49. (set #version "v1.1")
  50. ;-------------- kickstart txt -----------------
  51. (set #bad-kick "Viewer laufen nur ab Kickstart 2.04 !")
  52. ;-------------- system txt ------------------
  53. (set #bad-system (cat "     Es ist weder eine Picasso 2,\n"
  54.                       "    noch 'CyberGraphX' auf diesem\n"
  55.                       "   Rechner installiert !!!\n\n\n"
  56.                       "*-----------------------------------------*\n"
  57.                       "| Bitte Viewer.guide - Einleitung lesen ! |\n"
  58.                       "*-----------------------------------------*")
  59. )
  60. ;-------------- default paths -------------------
  61. (set #Picasso "Picasso2/")
  62. (set #CyberGraphX "CyberGraphX/")
  63. (set #source_test_pic "Test.lbm")
  64. (set #source_viewer_guide "Viewer.guide")
  65. (set #source_tools_ScrModeID "tools/ScrModeID")
  66. (set #source_tools_Switcher "tools/Switcher.install")
  67. (set #source_library "libs/support.library")
  68. (set #source_intui "IntuiView/IntuiView.class")
  69. (set #source_bmp_low "ViewBMP/ViewBMP_low")
  70. (set #source_bmp_pc_low "ViewBMP/ViewBMP_pc_low")
  71. (set #source_bmp_plus "ViewBMP/ViewBMP+")
  72. (set #source_iff_low "ViewIFF/ViewIFF_low")
  73. (set #source_iff_pc_low "ViewIFF/ViewIFF_pc_low")
  74. (set #source_iff_plus "ViewIFF/ViewIFF+")
  75. (set #source_pcx_low "ViewPCX/ViewPCX_low")
  76. (set #source_pcx_pc_low "ViewPCX/ViewPCX_pc_low")
  77. (set #source_pcx_plus "ViewPCX/ViewPCX+")
  78. (set #default_path "SYS:Tools/T&TViewer")
  79. (set #default_tools "SYS:Tools/T&TViewer/tools")
  80. (set #default_bmp "SYS:Tools/T&TViewer/ViewBMP")
  81. (set #default_iff "SYS:Tools/T&TViewer/ViewIFF")
  82. (set #default_pcx "SYS:Tools/T&TViewer/ViewPCX")
  83. (set #default_intui "SYS:Tools/T&TViewer/IntuiView")
  84. (set #default_lib "libs:")
  85. ;-------------- welcome txt -------------------
  86. (set #infos
  87.    (cat "\nT&TViewer Installation\n"
  88.          "------------------------\n\n"
  89.           "Dieses script installiert\n"
  90.           "T&TViewer "#version"\n"
  91.           "auf Ihrem Amiga.\n\n\n"
  92.           "T&TViewer ©'96 by T&T\n"
  93.    )
  94. )
  95. ;-------------- titles txt ------------------
  96. (set #gfx 
  97.    (cat "\nFür welchen Treiber ?\n"
  98.         "(selektierter Treiber wurde automatisch erkannt)"
  99.    )
  100. )
  101. (set #choices "\nSie haben die Wahl :\n")
  102. (set #dest_viewer "In welches Verzeichnis installieren?")
  103. (set #dest_intui "Installationsverzeichnis 'Intuiview.class':")
  104. (set #dest_guide "Installationsverzeichnis 'Viewer.guide':")
  105. (set #dest_tools "Installationsverzeichnis tools:")
  106. (set #dest_lib "Wo soll die support.library installiert werden ?")
  107. (set #dest_bmp "Wo sollen die BMP Viewer installiert werden ?")
  108. (set #dest_iff "Wo sollen die IFF Viewer installiert werden ?")
  109. (set #dest_pcx "Wo sollen die PCX Viewer installiert werden ?")
  110. ;-------------- help txt ---------------------
  111.  
  112. (set #help_gfx
  113.    (cat "\n * Es werden Bildanzeiger speziell\n"
  114.         "   für die Picasso 2 oder CyberGraphX\n"
  115.         "   installiert.\n\n"
  116.         "   Die Voreinstellung entspricht dem\n"
  117.         "   auf Ihrem Rechner installierten\n"
  118.         "   Treiber.\n\n"
  119.         "   Bei Wahl eines anderen Treibers,\n"
  120.         "   kann es zu Fehlfunktionen kommen !"
  121.    )
  122. )
  123. (set #help_main
  124.    (cat "\n * ViewBMP, ViewIFF und ViewPCX sind\n"
  125.         "   Bildanzeiger für die Formate:\n"
  126.         "   BMP, IFF und PCX\n\n"
  127.         " * IntuiView.class......Konfigurationsdatei\n"
  128.         "                        für IntuiView\n\n"
  129.         " * Viewer.guide.........Dokumentation\n\n"
  130.         " * tools................Hilfsprogramme"
  131.    )
  132. )
  133. (set #help_bmp
  134.    (cat "\n * ViewBMP_pc_low.....ohne Effektmodule, pc relativ\n\n"
  135.         " * ViewBMP_low........ohne Effektmodule\n\n"
  136.         " * ViewBMP+...........mit Effektmodulen\n\n"
  137.         "   (siehe auch Viewer.guide)"
  138.    )
  139. )
  140. (set #help_iff
  141.    (cat "\n * ViewIFF_pc_low.....ohne Effektmodule, pc relativ\n\n"
  142.         " * ViewIFF_low........ohne Effektmodule\n\n"
  143.         " * ViewIFF+...........mit Effektmodulen\n\n"
  144.         "   (siehe auch Viewer.guide)"
  145.    )
  146. )
  147. (set #help_pcx
  148.    (cat "\n * ViewPCX_pc_low.....ohne Effektmodule, pc relativ\n\n"
  149.         " * ViewPCX_low........ohne Effektmodule\n\n"
  150.         " * ViewPCX+...........mit Effektmodulen\n\n"
  151.         "   (siehe auch Viewer.guide)"
  152.    )
  153. )
  154. (set #help_viewer
  155.    (cat "\n Wählen Sie das Verzeichnis, in dem Sie die zuvor\n"
  156.         "  ausgewählten Komponenten installieren möechten!\n"
  157.         " Mittels Make New Drawer können Sie ein neues\n"
  158.         "  Verzeichnis erstellen."
  159.    )
  160. )
  161. (set #help_intui
  162.    (cat "\n Wählen Sie das Verzeichnis, in dem sich entweder\n"
  163.         "  die alte Intuiview.class befindet oder ein neues!\n"
  164.         " Mittels Make New Drawer können Sie ein neues\n"
  165.         "  Verzeichnis erstellen."
  166.    )
  167. )
  168. (set #help_guide
  169.    (cat "\n Wählen Sie das Verzeichnis, in dem Sie die\n"
  170.         "  Dokumentation installieren möchten!\n"
  171.         " Mittels Make New Drawer können Sie ein neues\n"
  172.         "  Verzeichnis erstellen."
  173.    )
  174. )
  175. (set #help_lib
  176.    (cat "\n Wählen Sie das Verzeichnis, in dem Sie die\n"
  177.         "  support.library installieren möchten!\n"
  178.         " Mittels Make New Drawer können Sie ein neues\n"
  179.         "  Verzeichnis erstellen."
  180.    )
  181. )
  182. (set #help_tools
  183.    (cat "\n * Es werden folgende Hilfsprogramme\n"
  184.         "   installiert:\n\n"
  185.         "    * ScrModeID (zeigt DisplayID)\n"
  186.         "    * Switcher.install (schaltet\n"
  187.         "       zwischen Picasso2 und CyberGraphX -\n"
  188.         "       Treibern um)"
  189.    )
  190. )
  191. ;-------------- kickstart & workbench --------------
  192. (if (< (/ (getversion) 65536) 37)
  193.    (abort #bad-kick)
  194. )
  195. ;-------------- Picasso oder CyberGraphX ? ---------------------
  196. (if (and (< (exists ("libs:cybergraphics.library")) 1)(< (exists ("sys:expansion/village.library")) 1))
  197.    (abort #bad-system) ;Viewer werden nicht installiert !
  198. )
  199. (if (> (exists ("libs:cybergraphics.library")) 0)
  200.    (set driver 0) ;"cybergraphics.library" in "libs:" vorhanden
  201. )
  202. (if (> (exists ("sys:expansion/village.library")) 0)
  203.    (set driver 1) ;"village.library" in "sys:expansion" vorhanden
  204. )
  205. (user 1)                                ;Voreinstellung user 1
  206. (message #infos "\n\n")                 ;Titelbild
  207. (message #sys_info)            ;Systeminformation
  208. (welcome)                               ;Installationsmethode
  209. ;-------------- prepare paths --------------------
  210. (if (= @user-level 0)                   ;nötig, da nur ein directory
  211.    (makedir "SYS:Tools/T&TViewer")      ;  erzeugt wird (!)
  212. )
  213. ;-------------- show mainmenu T&TViewer ----------
  214. (set radio_driver                       ;Hauptmenu variable
  215.    (askchoice
  216.       (prompt #gfx)
  217.       (help #help_gfx)
  218.       (choices
  219.         " CyberGraphX"                  ;bit  1
  220.         " Picasso 2"                    ;bit  2
  221.       )
  222.       (default driver)
  223.    )
  224. )
  225. ;-------------- show viewer menu ----------------
  226. (set point_main                         ;Hauptmenu variable
  227.    (askoptions
  228.       (prompt #choices)
  229.       (help #help_main)
  230.       (choices
  231.         " ViewBMP"                      ;bit 1 
  232.         " ViewIFF"                      ;bit 2
  233.         " ViewPCX"                      ;bit 3
  234.         " Intuiview.class"              ;bit 4
  235.         " Viewer.guide"                 ;bit 5
  236.     " tools"            ;bit 6
  237.       )
  238.       (default 63)                      ; alles
  239.    )
  240. )
  241. ;-------------- show submenu ViewBMP ------------
  242. (if (bitand point_main 1)
  243.    (set point_bmp
  244.       (askoptions
  245.          (prompt #choices)
  246.          (help #help_bmp)
  247.          (choices
  248.             "ViewBMP_pc_low"            ;bit 1
  249.             "ViewBMP_low"               ;bit 2
  250.             "ViewBMP+, support.library" ;bit 4
  251.          )
  252.          (default 7)                    ; alles
  253.       )
  254.    )
  255. )
  256. ;--------------- path for BMP viewer --------------------
  257. (if (and (not (bitand point_bmp 0))(bitand point_main 1))
  258.    (set destination
  259.       (askdir
  260.          (prompt #dest_bmp)
  261.          (help #help_viewer)
  262.          (default #default_bmp)
  263.          (newpath)
  264.       )
  265.    )
  266. ;-------------- create default directories ---------
  267.    (if (= destination #default_bmp) ;default path ?
  268.       ((makedir #default_path (infos)) ;create directories
  269.        (makedir #default_bmp (infos))) ;wegen else
  270.    )
  271. )
  272. ;-------------- copy "ViewBMP_pc_low.#?" -----------
  273. (if (and (bitand point_bmp 1)(bitand point_main 1))
  274.    (copyfiles
  275.       (prompt #dest_bmp)
  276.       (help #help_bmp)
  277.       (if (= radio_driver 0)
  278.          (source (cat #CyberGraphX #source_bmp_pc_low))
  279.       )
  280.       (if (= radio_driver 1)
  281.          (source (cat #Picasso #source_bmp_pc_low))
  282.       )
  283.       (dest destination)
  284.       (infos)                           ;infos kopieren
  285.       (confirm)                         ;kopierte files anzeigen
  286.       (optional "force")                ;überschreibt auch
  287.    )                                    ;  löschgeschützte files
  288. )
  289. (complete 7)
  290. ;-------------- copy "ViewBMP_low.#?" --------------
  291. (if (and (bitand point_bmp 2)(bitand point_main 1))
  292.    (copyfiles
  293.       (prompt #dest_bmp)
  294.       (help #help_bmp)
  295.       (if (= radio_driver 0)
  296.          (source (cat #CyberGraphX #source_bmp_low))
  297.       )
  298.       (if (= radio_driver 1)
  299.          (source (cat #Picasso #source_bmp_low))
  300.       )
  301.       (dest destination)
  302.       (infos)
  303.       (confirm)
  304.       (optional "force")
  305.    )
  306. )
  307. (complete 14)
  308. ;-------------- copy "ViewBMP+.#?" -----------------
  309. (if (and (bitand point_bmp 4)(bitand point_main 1))
  310.    (copyfiles
  311.       (prompt #dest_bmp)
  312.       (help #help_bmp)
  313.       (if (= radio_driver 0)
  314.          (source (cat #CyberGraphX #source_bmp_plus))
  315.       )
  316.       (if (= radio_driver 1)
  317.          (source (cat #Picasso #source_bmp_plus))
  318.       )
  319.       (dest destination)
  320.       (infos)
  321.       (confirm)
  322.       (optional "force")
  323.    )
  324. )
  325. (complete 21)
  326. ;-------------- show submenu ViewIFF ----------
  327. (if (bitand point_main 2)
  328.    (set point_iff
  329.       (askoptions
  330.          (prompt #choices)
  331.          (help #help_iff)
  332.          (choices
  333.             "ViewIFF_pc_low"
  334.             "ViewIFF_low"
  335.             "ViewIFF+, support.library"
  336.          )
  337.          (default 7)  ; alles
  338.       )
  339.    )
  340. )
  341. ;--------------- path for IFF viewer --------------------
  342. (if (and (not (bitand point_iff 0))(bitand point_main 2))
  343.    (set destination
  344.       (askdir
  345.          (prompt #dest_iff)
  346.          (help #help_viewer)
  347.          (default #default_iff)
  348.          (newpath)
  349.       )
  350.    )
  351. ;-------------- create default directories ---------
  352.    (if (= destination #default_iff)
  353.       ((makedir #default_path (infos))
  354.        (makedir #default_iff (infos)))
  355.    )
  356. )
  357. ;-------------- copy "ViewIFF_pc_low.#?" ------------
  358. (if (and (bitand point_iff 1)(bitand point_main 2))
  359.    (copyfiles
  360.       (prompt #dest_iff)
  361.       (help #help_iff)
  362.       (if (= radio_driver 0)
  363.          (source (cat #CyberGraphX #source_iff_pc_low))
  364.       )
  365.       (if (= radio_driver 1)
  366.          (source (cat #Picasso #source_iff_pc_low))
  367.       )
  368.       (dest destination)
  369.       (infos)
  370.       (confirm)
  371.       (optional "force")
  372.    )
  373. )
  374. (complete 28)
  375. ;-------------- copy "ViewIFF_low.#?" ---------------
  376. (if (and (bitand point_iff 2)(bitand point_main 2))
  377.    (copyfiles
  378.       (prompt #dest_iff)
  379.       (help #help_iff)
  380.       (if (= radio_driver 0)
  381.          (source (cat #CyberGraphX #source_iff_low))
  382.       )
  383.       (if (= radio_driver 1)
  384.          (source (cat #Picasso #source_iff_low))
  385.       )
  386.       (dest destination)
  387.       (infos)
  388.       (confirm)
  389.       (optional "force")
  390.    )
  391. )
  392. (complete 35)
  393. ;-------------- copy "ViewIFF+.#?" ------------------
  394. (if (and (bitand point_iff 4)(bitand point_main 2))
  395.    (copyfiles
  396.       (prompt #dest_iff)
  397.       (help #help_iff)
  398.       (if (= radio_driver 0)
  399.          (source (cat #CyberGraphX #source_iff_plus))
  400.       )
  401.       (if (= radio_driver 1)
  402.          (source (cat #Picasso #source_iff_plus))
  403.       )
  404.       (dest destination)
  405.       (infos)
  406.       (confirm)
  407.       (optional "force")
  408.    )
  409. )
  410. (complete 42)
  411. ;-------------- show submenu ViewPCX ----------------
  412. (if (bitand point_main 4)
  413.    (set point_pcx
  414.       (askoptions
  415.          (prompt #choices)
  416.          (help #help_pcx)
  417.          (choices
  418.             "ViewPCX_pc_low"
  419.             "ViewPCX_low"
  420.             "ViewPCX+, support.library"
  421.          )
  422.          (default 7)  ; alles
  423.       )
  424.    )
  425. )
  426. ;--------------- path for PCX viewer --------------------
  427. (if (and (not (bitand point_pcx 0))(bitand point_main 4))
  428.    (set destination
  429.       (askdir
  430.          (prompt #dest_pcx)
  431.          (help #help_viewer)
  432.          (default #default_pcx)
  433.          (newpath)
  434.       )
  435.    )
  436. ;-------------- create default directories ---------
  437.    (if (= destination #default_pcx)
  438.       ((makedir #default_path (infos))
  439.        (makedir #default_pcx (infos)))
  440.    )
  441. )
  442. ;-------------- copy "ViewPCX_pc_low.#?" ------------
  443. (if (and (bitand point_pcx 1)(bitand point_main 4))
  444.    (copyfiles
  445.       (prompt #dest_pcx)
  446.       (help #help_pcx)
  447.       (if (= radio_driver 0)
  448.          (source (cat #CyberGraphX #source_pcx_pc_low))
  449.       )
  450.       (if (= radio_driver 1)
  451.          (source (cat #Picasso #source_pcx_pc_low))
  452.       )
  453.       (dest destination)
  454.       (infos)
  455.       (confirm)
  456.       (optional "force")
  457.    )
  458. )
  459. (complete 49)
  460. ;-------------- copy "ViewPCX_low.#?" ---------------
  461. (if (and (bitand point_pcx 2)(bitand point_main 4))
  462.    (copyfiles
  463.       (prompt #dest_pcx)
  464.       (help #help_pcx)
  465.       (if (= radio_driver 0)
  466.          (source (cat #CyberGraphX #source_pcx_low))
  467.       )
  468.       (if (= radio_driver 1)
  469.          (source (cat #Picasso #source_pcx_low))
  470.       )
  471.       (dest destination)
  472.       (infos)
  473.       (confirm)
  474.       (optional "force")
  475.    )
  476. )
  477. (complete 56)
  478. ;-------------- copy "ViewPCX+.#?" ------------------
  479. (if (and (bitand point_pcx 4)(bitand point_main 4))
  480.    (copyfiles
  481.       (prompt #dest_pcx)
  482.       (help #help_pcx)
  483.       (if (= radio_driver 0)
  484.          (source (cat #CyberGraphX #source_pcx_plus))
  485.       )
  486.       (if (= radio_driver 1)
  487.          (source (cat #Picasso #source_pcx_plus))
  488.       )
  489.       (dest destination)
  490.       (infos)
  491.       (confirm)
  492.       (optional "force")
  493.    )
  494. )
  495. (complete 63)
  496. ;-------------- copy "support.library" (plus) --------
  497. (if (or (bitand point_bmp 4)
  498.         (bitand point_iff 4)
  499.         (bitand point_pcx 4))
  500.    (copyfiles
  501.       (source #source_library)
  502.       (dest #default_lib)
  503.       (optional "force")
  504.    )
  505. )
  506. (complete 70)
  507. ;-------------- IntuiView.class ----------------
  508. (if (bitand point_main 8)
  509.    (set destination
  510.       (askdir
  511.          (prompt #dest_intui)
  512.          (help #help_intui)
  513.          (default #default_intui)
  514.          (newpath)
  515.       )
  516.    )
  517. ;-------------- create directories --------------------------
  518.    (if (= destination #default_intui)
  519.       ((makedir #default_path (infos))
  520.        (makedir #default_intui (infos)))
  521.    )
  522. )
  523. ;-------------- copy Intuiview.class ---------------
  524. (if (bitand point_main 8)
  525.    (copyfiles
  526.       (source #source_intui)
  527.       (dest destination)
  528.       (optional "force")
  529.    )
  530. )
  531. (complete 80)
  532. ;-------------- path for Viewer.guide ------------
  533. (if (bitand point_main 16)
  534.    (set destination
  535.       (askdir
  536.          (prompt #dest_guide)
  537.          (help #help_guide)
  538.          (default #default_path)
  539.       )
  540.    )
  541. )
  542. ;-------------- copy guide --------
  543. (if (bitand point_main 16)
  544.   ((copyfiles
  545.       (source #source_viewer_guide)
  546.       (dest destination)
  547.       (infos)
  548.       (optional "force")
  549.    )
  550. (complete 90)
  551. ;-------------- copy "ViewIFF+.#?" ------------------
  552.    (copyfiles
  553.       (prompt #dest_iff)
  554.       (help #help_iff)
  555.       (if (= radio_driver 0)
  556.          (source (cat #CyberGraphX #source_iff_plus))
  557.       )
  558.       (if (= radio_driver 1)
  559.          (source (cat #Picasso #source_iff_plus))
  560.       )
  561.       (dest destination)
  562.       (confirm)
  563.       (optional "force")
  564.    )
  565. ;-------------- copy test_pic --------
  566.    (copyfiles
  567.       (source #source_test_pic)
  568.       (dest destination)
  569.       (infos)
  570.       (optional "force")
  571.    ))
  572. )
  573. ;-------------- tools ----------------
  574. (if (bitand point_main 32)
  575.    ((set destination
  576.       (askdir
  577.          (prompt #dest_tools)
  578.          (help #help_tools)
  579.          (default #default_tools)
  580.          (newpath)
  581.       )
  582.     )
  583.     (if (= destination #default_tools)
  584.        ((makedir #default_path (infos))
  585.         (makedir #default_tools (infos)))
  586.     )
  587.     (copyfiles
  588.        (source #source_tools_ScrModeID)
  589.        (dest destination)
  590.        (infos)
  591.        (optional "force")
  592.     )
  593.     (copyfiles
  594.        (source #source_tools_Switcher)
  595.        (dest destination)
  596.        (infos)
  597.        (optional "force")
  598.     )
  599.    )
  600. )
  601. ;-------------- 100% complete ----------------
  602. (set @default-dest destination) ;Pfad für logfile setzen
  603. (complete 100)
  604. (exit)
  605. ;-------------- installation finished -------------------
  606.