home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1998 #5 / AmigaPlus_CD-ROM_Nr.5-98.iso / pd / daten / mt-rechnungiii / install_mtriii next >
Text File  |  1998-03-02  |  13KB  |  518 lines

  1. ; $VER: Install_MTRIII 0.96 (02.03.98)
  2. ; Script to install MT-RechnungIII
  3.  
  4. (complete 0)
  5.  
  6. (set old_level @user-level)
  7. (set @default-dest "sys:")
  8.  
  9. ;=============================================================================
  10. ; Deutsch strings
  11. ;(if (= @languge "Deutsch")
  12. ;(
  13.    (set #bad-kick "Sie benötigen AMIGA OS 2.1+ zum Installieren von MT-RechnungIII!")
  14.     (set #bad-proz "Sie benötigen mindestens einen MC68020 oder MC68EC020 Prozessor")
  15.  
  16.     (set #ask-dir    "Wohin soll MT-RechnungIII installiert werden?\nAchtung es wird kein Verzeichnis erstellt!")
  17.  
  18.  
  19.     (set #ask-psvs "Wie soll die PostScript-Druckvorschau erfolgen?\n(entsprechende ToolTypes/Merkmale werden gesetzt)")
  20.     (set #ask0-psvs "HWGPost + Multiview (hwgpost.datatype)")
  21.     (set #ask1-psvs "GhostScript Vorschaufenster")
  22.     (set #ask2-psvs "GhostScript -> pcxmono -> MultiView")
  23.     (set #ask3-psvs "GhostScript -> pcxgray -> MultiView")
  24.     (set #ask4-psvs "GhostScript -> pcx16 -> MultiView")
  25.     (set #ask5-psvs "GhostScript -> pcx256 -> MultiView")
  26.     (set #ask6-psvs "GhostScript -> pcx24b -> MultiView")
  27.  
  28.     (set #ask-ps "Wie soll die PostScript-Druckausgabe erfolgen?\n(entsprechende ToolTypes/Merkmale werden gesetzt)")
  29.     (set #ask0-ps "PostScript-fähiger Drucker")
  30.     (set #ask1-ps "HWGPost und prtps:")
  31.     (set #ask2-ps "HWGPost und psprt:")
  32.     (set #ask3-ps "GhostScript mit Wokbench-Druckertreiber")
  33.     (set #ask4-ps "GhostScript-Direkt Epson")
  34.     (set #ask5-ps "GhostScript-Direkt HP")
  35.     (set #ask6-ps "GhostScript-Direkt Canon")
  36.  
  37.     (set #ask0-ps-epson "Epson 9 Nadel (oder kompatibel)")
  38.     (set #ask1-ps-epson "Epson 24 Nadel (oder kompatibel)")
  39.     (set #ask2-ps-epson "Epson Stylus (Color)")
  40.  
  41.     (set #ask0-ps-hp "HP DeskJet 500C/540C")
  42.     (set #ask1-ps-hp "HP DeskJet 550C/560C")
  43.     (set #ask2-ps-hp "HP PaintJet XL300/DeskJet 1200C")
  44.     (set #ask3-ps-hp "HP PaintJet")
  45.     (set #ask4-ps-hp "HP PaintJet XL")
  46.     (set #ask5-ps-hp "HP LaserJet")
  47.     (set #ask6-ps-hp "HP LaserJet Plus")
  48.     (set #ask7-ps-hp "HP LaserJet 2p")
  49.     (set #ask8-ps-hp "HP LaserJet 3")
  50.     (set #ask9-ps-hp "HP LaserJet 4")
  51.  
  52.     (set #ask0-ps-canon "Canon BJ10e")
  53.     (set #ask1-ps-canon "Canon BJ200")
  54.     (set #ask2-ps-canon "Canon BJC-600/4000/70/Stylewriter2x00")
  55.     (set #ask3-ps-canon "Canon BJC-800")
  56.  
  57.     (set #ask-ps-help "Bitte beachten Sie, daß weder HWGPost, noch GhostScript im Lieferumfang enthalten sind.")
  58.     (set #ask-ps-device "An welcher Schnittstelle hängt der PostScript-Drucker (par:, ser:, ...)")
  59.  
  60.     (set #Install "Installiere ")
  61.  
  62.     (set #ask-test-inst "Testdaten installieren?")
  63.     (set #ask-test-upd "Testdaten aktualisieren?")
  64.  
  65.     (set #ask-script-upd "Scripts aktualisieren?")
  66.  
  67.     (set #ask-prido-upd "Druckdokumente aktualisieren?")
  68.  
  69.     (set #ask-funktion-2 "Welche Sprache(n) wollen Sie installieren?\n\n")
  70.     (set #default_lang 1)
  71. ;))
  72. ;=============================================================================
  73. ; Sicherstellen, daß mindestens OS2.1 (V38) installiert ist
  74.  
  75. (if (< (/ (getversion) 65536) 38)
  76.   (abort #bad-kick)
  77. )
  78.  
  79. ;=============================================================================
  80. ; Prüfen des Porzessors, ein 68020/68EC020 ist Mindestanforderung
  81.  
  82. (set CPUStr (database "cpu"))
  83. (if (< CPUStr "68020")
  84.   (abort #bad-proz)
  85. )
  86.  
  87. ;=============================================================================
  88. ; Verzeichnis auswählen:
  89.  
  90. (user 2)
  91. (set target_dir    (askdir    (prompt #ask-dir @askdir)
  92.                                    (help @askdir-help)
  93.                                     (default @default-dest)
  94.                                     (disk)
  95.                         )
  96. )
  97. (user old_level)
  98. (set @default-dest target_dir)
  99.  
  100. ;=============================================================================
  101. ; Kopieren des Programms MT-RechnungIII
  102.  
  103. (copylib    (prompt "MTRechnungIII" @copylib)
  104.             (help   @copylib-help)
  105.             (source "MTRechnungIII")
  106.             (dest target_dir)
  107.             (confirm 2)
  108. )
  109. (complete 30)
  110.  
  111. ;=============================================================================
  112. ; Kopieren der MT-Rechnung.wizard Oberflächendatei
  113.  
  114. (copylib    (prompt "MT-Rechnung.wizard Oberflächendatei" @copylib)
  115.             (help   @copylib-help)
  116.             (source "MT-Rechnung.wizard")
  117.             (dest target_dir)
  118.             (confirm 2)
  119. )
  120. (complete 45)
  121.  
  122. ;=============================================================================
  123. ; Kopieren der wizard.library
  124.  
  125. (copylib    (prompt "wizard.library" @copylib)
  126.             (help   @copylib-help)
  127.             (source "libs/wizard.library")
  128.             (dest "Libs:")
  129.             (confirm 2)
  130. )
  131. (complete 60)
  132.  
  133. ;=============================================================================
  134. ; Kopieren der Guide
  135.  
  136. (copylib    (prompt "MT_RechnungIII.guide" @copylib)
  137.             (help   @copylib-help)
  138.             (source "MT_RechnungIII.guide")
  139.             (dest target_dir)
  140.             (infos)
  141.             (confirm 2)
  142. )
  143. (complete 70)
  144.  
  145. ; ============================================================================
  146. ; Scripts-Verzeichnis gegebenenfalls anlegen und Inhalte kopieren
  147.  
  148. (if (= (exists (TACKON target_dir ("Scripts")) (noreq)) 2)
  149.     (
  150.         (set ask-script-bool
  151.             (askbool (prompt #ask-script-upd)
  152.                         (help @askbool-help)
  153.                         (default 1)
  154.             )
  155.         )
  156.     )
  157.     (
  158.         (makedir ((TACKON target_dir ("Scripts")))
  159.                     (infos)
  160.         )
  161.         (set ask-script-bool 1)
  162.     )
  163. )
  164. (if (= ask-script-bool 1)
  165.     (
  166.         (copyfiles    (prompt (cat #Install "Scripts") @copyfiles)
  167.                         (help   @copyfiles-help)
  168.                         (source ("Scripts/"))
  169.                         (dest  (TACKON target_dir ("Scripts")))
  170.                         (all)
  171.         )
  172.     )
  173. )
  174. (complete 75)
  175.  
  176. ; ============================================================================
  177. ; Testdaten-Verzeichnis gegebenenfalls anlegen und Inhalte kopieren
  178.  
  179. (if (= (exists (TACKON target_dir ("TestDaten")) (noreq)) 2)
  180.     (
  181.         (set ask-test-bool
  182.             (askbool (prompt #ask-test-upd)
  183.                         (help @askbool-help)
  184.                         (default 1)
  185.             )
  186.         )
  187.     )
  188.     (
  189.         (set ask-test-bool
  190.             (askbool (prompt #ask-test-inst)
  191.                         (help @askbool-help)
  192.                         (default 1)
  193.             )
  194.         )
  195.         (if (= ask-test-bool 1)
  196.             (
  197.                 (makedir ((TACKON target_dir ("TestDaten")))
  198.                             (infos)
  199.                 )
  200.             )
  201.         )
  202.     )
  203. )
  204.  
  205. (if (= ask-test-bool 1)
  206.     (
  207.         (copyfiles    (prompt (cat #Install " TestDaten") @copyfiles)
  208.                         (help   @copyfiles-help)
  209.                         (source ("TestDaten/"))
  210.                         (dest  (TACKON target_dir ("TestDaten")))
  211.                         (all)
  212.         )
  213.  
  214.         (if (<> (exists (TACKON target_dir ("MTRechnungIII-Testdaten.info")) (noreq)) 1)
  215.             (copyfiles    (prompt "MT-RechnungIII-Testdaten-Icon" @copyfiles)
  216.                             (help   @copyfiles-help)
  217.                             (source "MTRechnungIII-Testdaten.info")
  218.                             (dest target_dir)
  219.             )
  220.         )
  221.     )
  222. )
  223. (complete 85)
  224.  
  225. ;=============================================================================
  226. ; Icon für MT-Rechnung kopieren, wenn noch nicht vorhanden und ToolTypes
  227.  
  228.  
  229. (if (<> (exists (TACKON target_dir ("MTRechnungIII.info")) (noreq)) 1)
  230.     (
  231.         (copyfiles    (prompt "MT-RechnungIII-Icon" @copyfiles)
  232.                         (help   @copyfiles-help)
  233.                         (source "MTRechnungIII.info")
  234.                         (dest target_dir)
  235.         )
  236.  
  237.         (user 2)
  238.         (set pstype
  239.             (askchoice (prompt #ask-psvs)
  240.             (help #ask-ps-help)
  241.             (choices #ask0-psvs
  242.                         #ask1-psvs
  243.                         #ask2-psvs
  244.                         #ask3-psvs
  245.                         #ask4-psvs
  246.                         #ask5-psvs
  247.                         #ask6-psvs
  248.             )
  249.             (default 0)
  250.         ))
  251.  
  252.         (if (= pstype 0)
  253.             (set Preview "Scripts/ZeigMultiView %s %s")
  254.         )
  255.         (if (= pstype 1)
  256.             (set Preview "Scripts/GhostPreview %s %s")
  257.         )
  258.         (if (= pstype 2)
  259.             (set Preview "Scripts/GhostPreview_PCXmono %s %s")
  260.         )
  261.         (if (= pstype 3)
  262.             (set Preview "Scripts/GhostPreview_PCXgray %s %s")
  263.         )
  264.         (if (= pstype 4)
  265.             (set Preview "Scripts/GhostPreview_PCX16 %s %s")
  266.         )
  267.         (if (= pstype 5)
  268.             (set Preview "Scripts/GhostPreview_PCX256 %s %s")
  269.         )
  270.         (if (= pstype 6)
  271.             (set Preview "Scripts/GhostPreview_PCX24b %s %s")
  272.         )
  273.  
  274.         (set pstype
  275.             (askchoice (prompt #ask-ps)
  276.             (help #ask-ps-help)
  277.             (choices #ask0-ps
  278.                         #ask1-ps
  279.                         #ask2-ps
  280.                         #ask3-ps
  281.                         #ask4-ps
  282.                         #ask5-ps
  283.                         #ask6-ps
  284.             )
  285.             (default 0)
  286.         ))
  287.  
  288.         (set PSPrintDevice "")
  289.         (set PSPrintProgram "")
  290.         (if (= pstype 0)
  291.             (set PSPrintDevice
  292.                 (askstring    (prompt #ask-ps-device)
  293.                                 (help @askstring-help)
  294.                                 (default "par:")
  295.                 )
  296.             )
  297.         )
  298.         (if (= pstype 1)
  299.             (set PSPrintDevice "prtps:")
  300.         )
  301.         (if (= pstype 2)
  302.             (set PSPrintDevice "psprt:")
  303.         )
  304.         (if (= pstype 3)
  305.             (set PSPrintProgram "Scripts/GhostPrintMTR %s")
  306.         )
  307.         (if (= pstype 4)
  308.             (
  309.                 (set pstypedr
  310.                     (askchoice (prompt #ask-ps)
  311.                     (help #ask-ps-help)
  312.                     (choices #ask0-ps-epson
  313.                                 #ask1-ps-epson
  314.                                 #ask2-ps-epson
  315.                     )
  316.                     (default 0)
  317.                 ))
  318.                 (if (= pstypedr 0)
  319.                     (set PSPrintProgram "Scripts/GhostPrintMTREPS9N %s")
  320.                 )
  321.                 (if (= pstypedr 1)
  322.                     (set PSPrintProgram "Scripts/GhostPrintMTREPS24N %s")
  323.                 )
  324.                 (if (= pstypedr 2)
  325.                     (set PSPrintProgram "Scripts/GhostPrintMTRSC %s")
  326.                 )
  327.             )
  328.         )
  329.         (if (= pstype 5)
  330.             (
  331.                 (set pstypedr
  332.                     (askchoice (prompt #ask-ps)
  333.                     (help #ask-ps-help)
  334.                     (choices #ask0-ps-hp
  335.                                 #ask1-ps-hp
  336.                                 #ask2-ps-hp
  337.                                 #ask3-ps-hp
  338.                                 #ask4-ps-hp
  339.                                 #ask5-ps-hp
  340.                                 #ask6-ps-hp
  341.                                 #ask7-ps-hp
  342.                                 #ask8-ps-hp
  343.                                 #ask9-ps-hp
  344.                     )
  345.                     (default 0)
  346.                 ))
  347.                 (if (= pstypedr 0)
  348.                     (set PSPrintProgram "Scripts/GhostPrintMTRCDJ500 %s")
  349.                 )
  350.                 (if (= pstypedr 1)
  351.                     (set PSPrintProgram "Scripts/GhostPrintMTRCDJ550 %s")
  352.                 )
  353.                 (if (= pstypedr 2)
  354.                     (set PSPrintProgram "Scripts/GhostPrintMTRPJXL300 %s")
  355.                 )
  356.                 (if (= pstypedr 3)
  357.                     (set PSPrintProgram "Scripts/GhostPrintMTRPJTEST %s")
  358.                 )
  359.                 (if (= pstypedr 4)
  360.                     (set PSPrintProgram "Scripts/GhostPrintMTRPJXLTEST %s")
  361.                 )
  362.                 (if (= pstypedr 5)
  363.                     (set PSPrintProgram "Scripts/GhostPrintMTRLASERJET %s")
  364.                 )
  365.                 (if (= pstypedr 6)
  366.                     (set PSPrintProgram "Scripts/GhostPrintMTRLJETPLUS %s")
  367.                 )
  368.                 (if (= pstypedr 7)
  369.                     (set PSPrintProgram "Scripts/GhostPrintMTRLJET2P %s")
  370.                 )
  371.                 (if (= pstypedr 8)
  372.                     (set PSPrintProgram "Scripts/GhostPrintMTRLJET3 %s")
  373.                 )
  374.                 (if (= pstypedr 9)
  375.                     (set PSPrintProgram "Scripts/GhostPrintMTRLJET4 %s")
  376.                 )
  377.             )
  378.         )
  379.         (if (= pstype 6)
  380.             (
  381.                 (set pstypedr
  382.                     (askchoice (prompt #ask-ps)
  383.                     (help #ask-ps-help)
  384.                     (choices #ask0-ps-canon
  385.                                 #ask1-ps-canon
  386.                                 #ask2-ps-canon
  387.                                 #ask3-ps-canon
  388.                     )
  389.                     (default 0)
  390.                 ))
  391.                 (if (= pstypedr 0)
  392.                     (set PSPrintProgram "Scripts/GhostPrintMTRBJ10E %s")
  393.                 )
  394.                 (if (= pstypedr 1)
  395.                     (set PSPrintProgram "Scripts/GhostPrintMTRBJ200 %s")
  396.                 )
  397.                 (if (= pstypedr 2)
  398.                     (set PSPrintProgram "Scripts/GhostPrintMTRBJC600 %s")
  399.                 )
  400.                 (if (= pstypedr 3)
  401.                     (set PSPrintProgram "Scripts/GhostPrintMTRBJC800 %s")
  402.                 )
  403.             )
  404.         )
  405.  
  406.         (tooltype    (dest (TACKON target_dir ("MTRechnungIII")))
  407.                         (settooltype "Preview" Preview)
  408.                         (settooltype "PSPrintProgram" PSPrintProgram)
  409.                         (settooltype "PSPrintDevice" PSPrintDevice)
  410.                         (setstack 60000)
  411.         )
  412.  
  413.         (if (= (exists (TACKON target_dir ("MTRechnungIII-Testdaten.info")) (noreq)) 1)
  414.             (tooltype    (dest (TACKON target_dir ("MTRechnungIII-Testdaten")))
  415.                             (settooltype "Preview" Preview)
  416.                             (settooltype "PSPrintProgram" PSPrintProgram)
  417.                             (settooltype "PSPrintDevice" PSPrintDevice)
  418.                             (setstack 60000)
  419.             )
  420.         )
  421.  
  422.         (user old_level)
  423.     )
  424. )
  425. (complete 90)
  426.  
  427.  
  428. ; ============================================================================
  429. ; Druckdokumente-Verzeichnis gegebenenfalls anlegen und Inhalte kopieren
  430.  
  431. (if (<> (exists (TACKON target_dir ("PrintDoks")) (noreq)) 2)
  432.     (
  433.         (set ask-prido-bool 1)
  434.         (makedir ((TACKON target_dir ("PrintDoks")))
  435.                     (infos)
  436.         )
  437.     )
  438.     (
  439.         (set ask-prido-bool
  440.             (askbool (prompt #ask-prido-upd)
  441.                         (help @askbool-help)
  442.                         (default 1)
  443.             )
  444.         )
  445.     )
  446. )
  447.  
  448. (if (= ask-prido-bool 1)
  449.     (
  450.         (copyfiles    (prompt (cat #Install " PrintDoks") @copyfiles)
  451.                         (help   @copyfiles-help)
  452.                         (source ("PrintDoks/"))
  453.                         (dest  (TACKON target_dir ("PrintDoks")))
  454.                         (all)
  455.         )
  456.     )
  457. )
  458. (complete 95)
  459.  
  460. ;(if (exists "LOCALE:")
  461. ;(
  462. ;    (user 2)
  463. ;    (set lang
  464. ;        (askoptions (prompt #ask-funktion-2)
  465. ;                        (help @askoptions-help)
  466. ;                        (choices
  467. ;                                    "dansk"
  468. ;                                    "deutsch"
  469. ;                                    "english"
  470. ;                                    "español"
  471. ;                                    "français"
  472. ;                                    "italiano"
  473. ;                                    "nederlands"
  474. ;                                    "norsk"
  475. ;                                    "portoguês"
  476. ;                                    "svenska"
  477. ;                        )
  478. ;                        (default #default_lang)
  479. ;        )
  480. ;    )
  481. ;    (user old_level)
  482. ;
  483. ;    (set m 0)
  484. ;    (while (set language
  485. ;        (select m
  486. ;                    "dansk"
  487. ;                    "deutsch"
  488. ;                    "english"
  489. ;                    "español"
  490. ;                    "français"
  491. ;                    "italiano"
  492. ;                    "nederlands"
  493. ;                    "norsk"
  494. ;                    "portoguês"
  495. ;                    "svenska"
  496. ;                    ""
  497. ;    ))
  498. ;    (
  499. ;        (set LocSource (cat "Locale/Catalogs/" language))
  500. ;        (if (exists LocSource)
  501. ;        (
  502. ;            (if (IN lang m)
  503. ;            (
  504. ;                (makedir (cat "LOCALE:Catalogs/" language))
  505. ;                (copyfiles    (prompt "Locale-Files" @copyfiles)
  506. ;                                (help   @copyfiles-help)
  507. ;                                (source LocSource)
  508. ;                                (dest (cat "Locale:Catalogs/" language)
  509. ;                                (all)
  510. ;                )
  511. ;            ))
  512. ;        ))
  513. ;        (set m (+ m 1))
  514. ;    ))
  515. ;))
  516.  
  517. (complete 100)
  518.