home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / grafica / redfix / install_redfix < prev    next >
Text File  |  1999-11-07  |  19KB  |  877 lines

  1. ; $VER: Install_REDFiX 1.5 (07.11.99) ® 1999 by Przemyslaw 'SENSEI' Gruchala
  2.  
  3. ; Inicjalizacja
  4.  
  5. ; Ustawienie wersji REDFiX'a jaka instalujemy.
  6. (set #redfixversion 1)
  7. (set #redfixrevision 5)
  8.  
  9. ; Ustawiamy nazwe wersji REDFiX'a.
  10. (set #redfixversionname ("%ld.%ld" #redfixversion #redfixrevision))
  11.  
  12. ; Ustawienie minimalnego poziomu REDFiX'a. W wersji demo nie ma wyboru...
  13. (set #redfixminlevel 3)
  14.  
  15. ; Ustawienie wersji installera REDFiX'a.
  16. (set #redfixinstallversionname "1.5")
  17. (set #redfixinstalldate "07.11.99")
  18.  
  19. ; Ustawienie minimalnej wersji systemu operacyjnego.
  20. (set #kickstartminversion 36)
  21.  
  22. ; Ustawienie nazwy minimalnej wersji systemu operacyjnego.
  23. (set #kickstartminversionname "2.0")
  24.  
  25. ; Pobranie aktualnej wersji systemu operacyjnego.
  26. (set #kickstartversion (/ (getversion) 65536) )
  27.  
  28. ; Zapamietanie poziomu uzytkownika.
  29. (set #userlevel @user-level)
  30.  
  31. ; Domyslna wersja angielska.
  32. (set #languagetemp 0)
  33.  
  34. ; Ustawiamy pytanie o wersje jezykowa po angielsku.
  35. (set #selectlanguage "Select your language...")
  36.  
  37. ; Ustawiamy tekst powitania po angielsku.
  38. (set #welcome
  39.     (cat
  40.         "\n\n\n\nWelcome in the REDFiX v" #redfixversionname " installation script.\n\n\n"
  41.         "Copyright (c) 1999 by R.E.D. Group.\n\n\n"
  42.         "Install_REDFiX v" #redfixinstallversionname " (" #redfixinstalldate ") by Przemyslaw 'SENSEI' Gruchala.\n"
  43.     )
  44. )
  45.  
  46. ; Ustawiamy wersje angielska.
  47. (if
  48.     (= @language "english")
  49.     (set #languagetemp 0)
  50. )
  51.  
  52. ; Ustawiamy wersje niemiecka.
  53. (if
  54.     (= @language "deutsch")
  55.     (
  56.         (set #languagetemp 1)
  57.  
  58. ; Ustawiamy pytanie o wersje jezykowa po niemiecku.
  59. ;        (set #selectlanguage "Select your language...")
  60.  
  61. ; Ustawiamy tekst powitania po niemiecku.
  62. ;        (set #welcome
  63. ;            (cat
  64. ;                "\n\n\n\nWelcome in the REDFiX v" #redfixversionname " installation script.\n\n\n"
  65. ;                "Copyright (c) 1999 by R.E.D. Group.\n\n\n"
  66. ;                "Install_REDFiX v" #redfixinstallversionname " (" #redfixinstalldate ") by Przemyslaw 'SENSEI' Gruchala.\n"
  67. ;            )
  68. ;        )
  69.     )
  70. )
  71.  
  72. ; Ustawiamy wersje polska.
  73. (if
  74.     (= @language "polski")
  75.     (
  76.         (set #languagetemp 2)
  77.  
  78. ; Ustawiamy pytanie o wersje jezykowa po polsku.
  79.         (set #selectlanguage "Wybierz swój jëzyk...")
  80.  
  81. ; Ustawiamy tekst powitania do polsku.
  82.         (set #welcome
  83.             (cat
  84.                 "\n\n\n\nWitam w skrypcie instalacyjnym REDFiX'a v" #redfixversionname ".\n\n\n"
  85.                 "Copyright (c) 1999 by R.E.D. Group.\n\n\n"
  86.                 "Install_REDFiX v" #redfixinstallversionname " (" #redfixinstalldate ") by Przemysîaw 'SENSEI' Gruchaîa.\n"
  87.             )
  88.         )
  89.     )
  90. )
  91.  
  92. ; Poczatkowe powitanie.
  93. (message #welcome (all))
  94.  
  95. (if
  96.     (>= #userlevel 2)
  97.     (
  98.  
  99. ; Wybor jezyka w ktorym bedziemy informowani w installer'ze.
  100.         (set #language
  101.             (select
  102.                 (askchoice
  103.                     (prompt    #selectlanguage)
  104.                     (help        @askoptions-help)
  105.                     (choices
  106.                         "English"
  107.                         "Deutsch"
  108.                         "Polski"
  109.                     )
  110.                     (default #languagetemp)
  111.                 )
  112.                 "English"
  113.                 "Deutsch"
  114.                 "Polski"
  115.             )
  116.         )
  117.     )
  118. )
  119.  
  120. ; Wersja angielska jest domyslna, dlatego najpierw wypelniamy nia wszystkie ciagi tekstowe.
  121. (set #kickstartmsg
  122.     (cat
  123.         "REDFiX requires KickStart V" #kickstartminversion "+ (AmigaDOS v" #kickstartminversionname "+)."
  124.     )
  125. )
  126.  
  127. (set #installermsg
  128.     (cat
  129.         "Install_REDFiX script requires Installer V43+.\n"
  130.     )
  131. )
  132.  
  133. (set #imagefxpathmsg
  134.     (cat
  135.         "Select path where your have installed ImageFX..."
  136.     )
  137. )
  138.  
  139. (set #imagefxnotexistmsg
  140.     (cat
  141.         "Sorry! No installed ImageFX found...\n\n"
  142.         "Please install ImageFX before you attempt installing the REDFiX.\n"
  143.     )
  144. )
  145.  
  146. (set #whichcpumsg
  147.     (cat
  148.         "Which CPU version of the REDFiX modules do you want to install?\n"
  149.         "(Default is that you have in computer)"
  150.     )
  151. )
  152.  
  153. (set #whichredfixlevelmsg
  154.     (cat
  155.         "Which REDFiX LEVEL do you want to install?\n"
  156.         "LEVEL1 - demo, in C.\n"
  157.         "LEVEL2 - optimized, in C.\n"
  158.         "LEVEL3 - optimized, in Assembler."
  159.     )
  160. )
  161.  
  162. (set #selectmodulesmsg
  163.     (cat
  164.         "Select REDFiX modules to install..."
  165.     )
  166. )
  167.  
  168. (set #helpselectmodulesmsg
  169.     (cat
  170.         "In this place you can select which modules of the REDFiX you find "
  171.         "interesting and you want install them.\n"
  172.     )
  173. )
  174.  
  175. (set #selectbonusfilesmsg
  176.     (cat
  177.         "Select REDFiX bonus files to install..."
  178.     )
  179. )
  180.  
  181. (set #helpselectbonusfilesmsg
  182.     (cat
  183.         "In this place you can select which bonus files of the REDFiX you find "
  184.         "interesting and you want install them.\n"
  185.     )
  186. )
  187.  
  188. (set #bonusfilenotfoundmsg
  189.     (cat
  190.         "Sorry! I didn't find REDFiX bonus file.\n"
  191.         "We searched for:\n"
  192.     )
  193. )
  194.  
  195. (set #modulenotfoundmsg
  196.     (cat
  197.         "Sorry! I didn't find REDFiX module in interesting you configuration.\n"
  198.         "We searched for:\n"
  199.     )
  200. )
  201.  
  202. (set #copymodulemsg
  203.     (cat
  204.         "Should I copy module?"
  205.     )
  206. )
  207.  
  208. (set #exitmsg
  209.     (cat
  210.         "\n\n\n\n\nEnjoy and feel the power of the REDFiX!!!\n"
  211.     )
  212. )
  213.  
  214. ; Wersja niemiecka.
  215. (if
  216.     (= #language "Deutsch")
  217.     (
  218.         (message
  219.             (cat
  220.                 "Sorry! Deutsch version currently not implemented!\n"
  221.                 "English will be used...\n"
  222.             )
  223.         )
  224.     )
  225. )
  226.  
  227. ; Wersja Polska.
  228. (if
  229.     (= #language "Polski")
  230.     (
  231.         (set #kickstartmsg
  232.             (cat
  233.                 "REDFiX wymaga KickStart'u V" #kickstartminversion "+ (v" #kickstartminversionname "+)."
  234.             )
  235.         )
  236.  
  237.         (set #installermsg
  238.             (cat
  239.                 "Skrypt Install_REDFiX wymaga Installer'a w wersji V43+.\n"
  240.             )
  241.         )
  242.  
  243.         (set #imagefxpathmsg
  244.             (cat
  245.                 "Proszë wybraê katalog w którym masz zainstalowanego ImageFX'a..."
  246.             )
  247.         )
  248.  
  249.         (set #imagefxnotexistmsg
  250.             (cat
  251.                 "Przykro mi! Nie znalazîem zainstalowanego ImageFX'a...\n\n"
  252.                 "Proszë zainstalowaê ImageFX'a przed próbâ instalacji REDFiX'a.\n"
  253.             )
  254.         )
  255.  
  256.         (set #whichcpumsg
  257.             (cat
  258.                 "Dla jakiego procesora chciaî(a)byô zainstalowaê moduîy REDFiX'a?\n"
  259.                 "(Domyôlnie taki jaki masz w komputerze)"
  260.             )
  261.         )
  262.  
  263.         (set #whichredfixlevelmsg
  264.             (cat
  265.                 "Który poziom REDFiX'a chcesz zainstalowaê?\n"
  266.                 "LEVEL1 - demo, w C.\n"
  267.                 "LEVEL2 - zoptymalizowany, w C.\n"
  268.                 "LEVEL3 - zoptymalizowany, w Assembler'ze."
  269.             )
  270.         )
  271.  
  272.         (set #selectmodulesmsg
  273.             (cat
  274.                 "Proszë wybraê moduîy REDFiX'a jakie chcesz zainstalowaê..."
  275.             )
  276.         )
  277.  
  278.         (set #helpselectmodulesmsg
  279.             (cat
  280.                 "W tym miejscu moûesz wybraê jakie moduîy REDFiX'a interesujâ Cië "
  281.                 "i chcesz je zainstalowaê.\n"
  282.             )
  283.         )
  284.  
  285.         (set #selectbonusfilesmsg
  286.             (cat
  287.                 "Proszë wybraê pliki bonusowe REDFiX'a jakie chcesz zainstalowaê..."
  288.             )
  289.         )
  290.  
  291.         (set #helpselectbonusfilesmsg
  292.             (cat
  293.                 "W tym miejscu moûesz wybraê jakie pliki bonusowe REDFiX'a "
  294.                 "interesujâ Cië i chcesz je zainstalowaê.\n"
  295.             )
  296.         )
  297.  
  298.         (set #bonusfilenotfoundmsg
  299.             (cat
  300.                 "Przykro mi! Niestety nie znalazîem pliku bonusowego.\n"
  301.                 "Poszukiwany byî plik:\n"
  302.             )
  303.         )
  304.  
  305.         (set #modulenotfoundmsg
  306.             (cat
  307.                 "Przykro mi! Niestety nie znalazîem moduîu w interesujâcej Cië konfiguracji.\n"
  308.                 "Poszukiwany byî moduî:\n"
  309.             )
  310.         )
  311.  
  312.         (set #copymodulemsg
  313.             (cat
  314.                 "Czy skopiowaê moduî?"
  315.             )
  316.         )
  317.  
  318.         (set #exitmsg
  319.             (cat
  320.                 "\n\n\n\n\nMiîego uûywania i poczuj moc REDFiX'a!!!\n"
  321.             )
  322.         )
  323.  
  324.     )
  325. )
  326.  
  327. ; Wlasciwy skrypt instalacyjny.
  328. (complete 0)
  329.  
  330. ; Sprawdzenie czy mamy odpowiednia wersje systemu operacyjnego.
  331. (if (< #kickstartversion #kickstartminversion)
  332.     (abort #kickstartmsg)
  333. )
  334.  
  335. ; Sprawdzenie wersji Installer'a. Wymagamy V42.9. Nie chcialo mi sie sprawdzac revision ;)
  336. (if (< (/ @installer-version 65536) 43)
  337.     (abort #installermsg)
  338. )
  339.  
  340. ;
  341. ; Etap 1:
  342. ; - Dobranie najblizszej sciezki z ImageFX'em.
  343. ; - Wyswietlenie requester'a w ktorym mozna wybrac wlasciwa wersje ImageFX'a.
  344. ; - Sprawdzenie czy w podanej sciezce znajduje sie zainstalowany ImageFX.
  345. ; - Odczyt wersji ImageFX'a i obliczenie przyrostka dla modulow wymagajacych odpowiedniej wersji ImageFX'a.
  346. ;
  347.  
  348. ; Ustawienie sciezki do ImageFX'a.
  349. (set #imagefxpath "")
  350.  
  351. ; Sprawdzenie czy ImageFX: istnieje.
  352. (if
  353.     (exists "ImageFX:" (noreq))
  354.     (set #imagefxpath "ImageFX:")
  355. )
  356.  
  357. ; Sprawdzenie czy ImageFX2: istnieje.
  358. (if
  359.     (exists "ImageFX2:" (noreq))
  360.     (set #imagefxpath "ImageFX2:")
  361. )
  362.  
  363. ; Sprawdzenie czy ImageFX3: istnieje.
  364. (if
  365.     (exists "ImageFX3:" (noreq))
  366.     (set #imagefxpath "ImageFX3:")
  367. )
  368.  
  369. ; Sprawdzenie czy ImageFX4: istnieje.
  370. (if
  371.     (exists "ImageFX4:" (noreq))
  372.     (set #imagefxpath "ImageFX4:")
  373. )
  374.  
  375. ; Spytanie sie o sciezke dostepu do ImageFX'a.
  376. (set #imagefxpath
  377.     (askdir
  378.         (prompt    #imagefxpathmsg)
  379.         (help        @askdir-help)
  380.         (default    #imagefxpath)
  381.     )
  382. )
  383.  
  384. (complete 10)
  385.  
  386. ; Sprawdzamy czy ImageFX jest zainstalowany.
  387. (if
  388.     (not
  389.         (exists
  390.             (tackon #imagefxpath "ImageFX" (noreq))
  391.         )
  392.     )
  393.     (abort #imagefxnotexistmsg)
  394. )
  395.  
  396. (complete 20)
  397.  
  398. ; Skopiowanie sciezki do ImageFX jako standardowa.
  399. (set @default-dest #imagefxpath)
  400.  
  401. ; Pobranie wersji ImageFX'a dla ktorej powinnismy instalowac REDFiX'a.
  402. (set #imagefxversion (/ (getversion (tackon #imagefxpath "ImageFX")) 65536))
  403.  
  404. ; Przeliczamy wersje ImageFX'a na przyrostek.
  405. ;(set #imagefxversionsuffix
  406. ;    (select #imagefxversion
  407. ;        ""
  408. ;        "V1"
  409. ;        "V2"
  410. ;        "V3"
  411. ;    )
  412. ;)
  413.  
  414. ; Przeliczamy wersje ImageFX'a na przyrostek.
  415. ; Uzywamy nowego sposobu przeliczania (v1.5+) ktory obsluzy kazda wersje ImageFX'a.
  416. (set #imagefxversionsuffix
  417.     ("V%ld" #imagefxversion)
  418. )
  419.  
  420. (complete 30)
  421.  
  422. ;
  423. ; Etap 2:
  424. ; - Pobranie wersji procesora.
  425. ; - Przeliczenie typu procesora (zgodnego z askchoice).
  426. ; - Przeliczenie procesora PPC.
  427. ; - Spytanie sie uzytkownika o wlasciwa wersje procesora.
  428. ;
  429.  
  430. ; Pobranie wersji procesora.
  431. (set #cpu (database "CPU"))
  432.  
  433. ; Domyslna wartosc.
  434. (set #cputype 0)
  435.  
  436. ; Przeliczamy typ procesora na wersje.
  437. (if
  438.     (= #cpu 68000)
  439.     (set #cputype 0)
  440. )
  441.  
  442. (if
  443.     (= #cpu 68010)
  444.     (set #cputype 0)
  445. )
  446.  
  447. (if
  448.     (= #cpu 68020)
  449.     (set #cputype 1)
  450. )
  451.  
  452. (if
  453.     (= #cpu 68030)
  454.     (set #cputype 2)
  455. )
  456.  
  457. (if
  458.     (= #cpu 68040)
  459.     (set #cputype 3)
  460. )
  461.  
  462. (if
  463.     (= #cpu 68060)
  464.     (set #cputype 4)
  465. )
  466.  
  467. ; PPC 603e/604e maja kody 5,6.
  468.  
  469. (if
  470.     (>= #userlevel 2)
  471.     (
  472.  
  473. ; Pytamy sie uzytkownika pod jaki procesor chce zainstalowac moduly.
  474. ; Domyslnie taki jak ma w komputerze.
  475.         (set #cputype
  476.             (askchoice
  477.                 (prompt    #whichcpumsg)
  478.                 (help        @askchoice-help)
  479.                 (choices
  480.                     "MC 68000+"
  481.                     "MC 68020+"
  482.                     "MC 68030+"
  483.                     "MC 68040+"
  484.                     "MC 68060"
  485. ;                    "PPC 603e+/604e+, MC 68040+"
  486. ;                    "PPC 603e+/604e+, MC 68060"
  487.                 )
  488.                 (default #cputype)
  489.             )
  490.         )
  491.     )
  492. )
  493.  
  494. (complete 40)
  495.  
  496. ; Pytamy sie uzytkownika jaki level chce zainstalowac.
  497. ; Domyslnie taki jaki zdefiniowany w naglowku installer'a.
  498. (if
  499.     (>= #userlevel 2)
  500.     (
  501.         (set #redfixminlevel
  502.             (+
  503.                 (askchoice
  504.                     (prompt    #whichredfixlevelmsg)
  505.                     (help        @askchoice-help)
  506.                     (choices
  507.                         "LEVEL1"
  508.                         "LEVEL2"
  509.                         "LEVEL3"
  510.                     )
  511.                     (default
  512.                         (- #redfixminlevel 1)
  513.                     )
  514.                 )
  515.             1)
  516.         )
  517.     )
  518. )
  519.  
  520. (complete 50)
  521.  
  522. (if
  523.     (>= #userlevel 2)
  524.     (
  525.  
  526. ; Pytamy sie ktore moduly uzytkownik chce zainstalowac.
  527. ; Domyslnie instalowane sa wszystkie moduly.
  528.         (set #redfixmodules
  529.             (askoptions
  530.                 (prompt #selectmodulesmsg)
  531.                 (help #helpselectmodulesmsg)
  532.                 (choices
  533. ; REDFiX v0.9+
  534.                     "Modules/Preview/REDFiX_Standard"
  535.                     "Hooks/REDFiX_AutoContrast"
  536.                     "Hooks/REDFiX_LowPass"
  537. ; REDFiX v1.5+
  538.                     "Modules/Loaders/REDFiX_NewIcon"
  539.                     "Modules/Savers/REDFiX_NewIcon"
  540.                     "Hooks/REDFiX_Swirl"
  541. ; REDFiX v1.7+
  542. ;                    "Modules/Loaders/REDFiX_XFA"
  543. ;                    "Modules/Savers/REDFiX_XFA"
  544. ;                    "Hooks/REDFiX_Pulsar"
  545.                 )
  546.                 (default %111111111)
  547.             )
  548.         )
  549.     )
  550.     (set #redfixmodules %111111111)
  551. )
  552.  
  553. (complete 60)
  554.  
  555. (if
  556.     (>= #userlevel 2)
  557.     (
  558.  
  559. ; Pytamy sie ktore pliki bonusowe uzytkownik chce zainstalowac.
  560. ; Domyslnie instalowane sa wszystkie pliki bonusowe.
  561.         (set #redfixbonusfiles
  562.             (askoptions
  563.                 (prompt    #selectbonusfilesmsg)
  564.                 (help        #helpselectbonusfilesmsg)
  565.                 (choices
  566. ; REDFiX v1.5+
  567.                     "Rexx/AutoFX/ColorToCMAP.ifx"
  568.                     "Rexx/AutoFX/ColorToCMAP.ifx.pre"
  569.                     "Rexx/AutoFX/ColorToCMAP_Best.ifx"
  570.                     "Rexx/AutoFX/SaveBufferAs_NewIcon.ifx"
  571.                     "Rexx/AutoFX/SaveBufferAs_NewIcon.ifx.pre"
  572.                     "Rexx/AutoFX/SaveRenderedAs_NewIcon.ifx"
  573.                     "Rexx/AutoFX/SaveRenderedAs_NewIcon.ifx.pre"
  574.                     "Rexx/AutoFX/Scale_NewIcon.ifx"
  575.                     "Storage/AutoFX/CmdSets/ConvertCMAPBestToNewIcon"
  576.                     "Storage/AutoFX/CmdSets/ConvertCMAPToNewIcon"
  577.                     "Storage/AutoFX/CmdSets/ConvertRenderedToNewIcon"
  578. ; REDFiX v1.7+
  579.                 )
  580.                 (default %11111111111)
  581.             )
  582.         )
  583.     )
  584.     (set #redfixbonusfiles %11111111111)
  585. )
  586.  
  587. ; Ustawiamy licznik plikow bonusowych.
  588. (set #actualbonus 0)
  589.  
  590. ; Petla kopiujaca pliki bonusowe.
  591. ; Kopiowane sa tylko te pliki ktore chce uzytkownik. Jesli plik nie istnieje
  592. ; to pojawia sie komunikat o bledzie. Potrzebna sciezka dostepu jest tworzona.
  593. (while
  594.     (set #actualbonusname
  595.         (select #actualbonus
  596. ; REDFiX v1.5+
  597.             "Rexx/AutoFX/ColorToCMAP.ifx"
  598.             "Rexx/AutoFX/ColorToCMAP.ifx.pre"
  599.             "Rexx/AutoFX/ColorToCMAP_Best.ifx"
  600.             "Rexx/AutoFX/SaveBufferAs_NewIcon.ifx"
  601.             "Rexx/AutoFX/SaveBufferAs_NewIcon.ifx.pre"
  602.             "Rexx/AutoFX/SaveRenderedAs_NewIcon.ifx"
  603.             "Rexx/AutoFX/SaveRenderedAs_NewIcon.ifx.pre"
  604.             "Rexx/AutoFX/Scale_NewIcon.ifx"
  605.             "Storage/AutoFX/CmdSets/ConvertCMAPBestToNewIcon"
  606.             "Storage/AutoFX/CmdSets/ConvertCMAPToNewIcon"
  607.             "Storage/AutoFX/CmdSets/ConvertRenderedToNewIcon"
  608. ; REDFiX v1.7+
  609.             ""
  610.         )
  611.     )
  612.     (
  613.  
  614. ; Sprawdzamy czy uzytkownik chce zainstalowac ten plik bonusowy.
  615.         (if
  616.             (IN #redfixbonusfiles #actualbonus)
  617.             (
  618.  
  619.                 (if
  620.                     (exists #actualbonusname (noreq))
  621.                     (
  622.  
  623. ; Czy istnieje katalog docelowy? Jesli nie to stworzmy go!
  624.                         (if
  625.                             (not
  626.                                 (exists
  627.                                     (tackon #imagefxpath (pathonly #actualbonusname))
  628.                                     (noreq)
  629.                                 )
  630.                             )
  631.                             (
  632.                                 (makedir
  633.                                     (tackon #imagefxpath (pathonly #actualbonusname))
  634.                                     (infos)
  635.                                 )
  636.                             )
  637.                         )
  638.  
  639. ; Upewniamy sie czy katalog docelowy istnieje.
  640.                         (if
  641.                             (exists
  642.                                 (tackon #imagefxpath (pathonly #actualbonusname))
  643.                                 (noreq)
  644.                             )
  645.                             (
  646.  
  647. ; Skopiowanie pliku bonusowego (jesli nowszy).
  648. ; Sorry, ze nie uzylem copylib'a, ale robil "dziwne" rzeczy...
  649. ; Majac modul 0.93 traktowal go jako nowszego od 1.0...
  650.                                 (copyfiles
  651.                                     (prompt    #copybonusmsg)
  652.                                     (help        @copyfiles-help)
  653.                                     (source    #actualbonusname)
  654.                                     (dest
  655.                                         (tackon #imagefxpath (pathonly #actualbonusname))
  656.                                     )
  657.                                     (confirm "expert")
  658.                                     (optional "askuser" "nofail")
  659.                                 )
  660.                             )
  661.                         )
  662.                     )
  663.  
  664. ; Nie znalezlismy modulu wiec grzecznie o tym poinformujemy.
  665.                     (message
  666.                         (cat #bonusfilenotfoundmsg #actualbonusname)
  667.                     )
  668.                 )
  669.             )
  670.         )
  671.  
  672. ; Zwiekszamy licznik plikow bonusowych
  673.         (set #actualbonus (+ #actualbonus 1))
  674.  
  675.     )
  676. )
  677.  
  678. (complete 90)
  679.  
  680. ; Ustawiamy licznik modulow.
  681. (set #actualmodule 0)
  682.  
  683. ; Petla kopiujaca wlasciwe moduly do katalogu z ImageFX'em.
  684. ; Zostawilem kod obslugujacy rozne wersje modulow w zaleznosci od wersji ImageFX'a
  685. ; moze sie jeszcze przydac... ;) (Elf sygnalizowal problemy z tworzeniem modulow
  686. ; ponizej V3.2 pod PowerPC... Zobaczymy co przyniesie przyszlosc... :).
  687. (while
  688.     (set #actualmodulename
  689.         (select #actualmodule
  690. ; REDFiX v0.9+
  691.             "0Modules/Preview/REDFiX_Standard"
  692.             "0Hooks/REDFiX_AutoContrast"
  693.             "0Hooks/REDFiX_LowPass"
  694. ; REDFiX v1.5+
  695.             "0Modules/Loaders/REDFiX_NewIcon"
  696.             "0Modules/Savers/REDFiX_NewIcon"
  697.             "0Hooks/REDFiX_Swirl"
  698. ; REDFiX v1.7+
  699. ;            "0Modules/Loaders/REDFiX_XFA"
  700. ;            "0Modules/Savers/REDFiX_XFA"
  701. ;            "0Hooks/REDFiX_Pulsar"
  702.             ""
  703.         )
  704.     )
  705.     (
  706.  
  707. ; Sprawdzamy czy uzytkownik chce zainstalowac ten modul.
  708.         (if
  709.             (IN #redfixmodules #actualmodule)
  710.             (
  711.  
  712. ; Ustawienie nazwy modulu do instalacji.
  713.                 (set #redfixmodulename
  714.                     (substr #actualmodulename 1 (- (strlen #actualmodulename) 1))
  715.                 )
  716.  
  717. ; Sprawdzenie czy modul ma specjalne wersje dla ImageFX'a.
  718.                 (if
  719.                     (=
  720.                         (substr #actualmodulename 0 1)
  721.                         "1"
  722.                     )
  723.                     (set #imagefxversionsuffixtemp #imagefxversionsuffix)
  724.                     (set #imagefxversionsuffixtemp "")
  725.                 )
  726.  
  727. ; Skasowanie znacznika znalezienia modulu w petli procesora.
  728.                 (set #foundbestmodule FALSE)
  729.  
  730. ; Ustawiamy wersje procesora.
  731.                 (set #cputypetemp #cputype)
  732.  
  733.                 (while
  734.                     (not #foundbestmodule)
  735.                     (
  736.  
  737. ; Ustawienie przyrostka procesora.
  738.                         (set #cpusuffix
  739.                             (select #cputypetemp
  740.                                 ".000"
  741.                                 ".020"
  742.                                 ".030"
  743.                                 ".040"
  744.                                 ".060"
  745. ;                                ".PPC040"
  746. ;                                ".PPC060"
  747.                             )
  748.                         )
  749.  
  750.  
  751. ; Skasowanie znacznika znalezienia modulu w petli poziomu.
  752.                         (set #foundbestmodule1 FALSE)
  753.  
  754. ; Ustawienie poziomu.
  755.                         (set #redfixlevel #redfixminlevel)
  756.  
  757.                         (while
  758.                             (not #foundbestmodule1)
  759.                             (
  760.  
  761. ; Ustawienie przyrostka poziomu.
  762.                                 (set #redfixlevelsuffix
  763.                                     (select #redfixlevel
  764.                                         ""
  765.                                         "L1"
  766.                                         "L2"
  767.                                         "L3"
  768.                                     )
  769.                                 )
  770.  
  771. ; Jesli chcesz to mozesz sobie odrem'owac ta linie i przygladac sie jak przebiega
  772. ; proces szukania modulu w odpowiedniej konfiguracji... Enjoy!
  773. ;                                (message (cat #redfixmodulename #cpusuffix #redfixlevelsuffix #imagefxversionsuffixtemp))
  774.  
  775.                                 (if
  776.                                     (exists
  777.                                         (cat #redfixmodulename #cpusuffix #redfixlevelsuffix #imagefxversionsuffixtemp)
  778.                                     )
  779.                                     (
  780.                                         (set #redfixmodulename
  781.                                             (cat #redfixmodulename #cpusuffix #redfixlevelsuffix #imagefxversionsuffixtemp)
  782.                                         )
  783.                                         (set #foundbestmodule1 TRUE)
  784.                                         (set #foundbestmodule TRUE)
  785.                                     )
  786.                                 )
  787.  
  788. ; Zmniejszenie licznika poziomu. Zeby wyjsc z petli to troche oszukujemy...
  789.                                 (if
  790.                                     (> #redfixlevel 1)
  791.                                     (set #redfixlevel (- #redfixlevel 1))
  792.                                     (set #foundbestmodule1 TRUE)
  793.                                 )
  794.                             )
  795.                         )
  796.  
  797. ; Zmniejszenie licznika procesora. Patrz wyzej.
  798.                         (if
  799.                             (> #cputypetemp 0)
  800.                             (set #cputypetemp (- #cputypetemp 1))
  801.                             (set #foundbestmodule TRUE)
  802.                         )
  803.                     )
  804.                 )
  805.  
  806. ; Czy znalezlismy modul w odpowiedniej konfiguracji?
  807.                 (if
  808.                     (exists #redfixmodulename (noreq))
  809.                     (
  810.  
  811. ;                        (message (cat "Source: " #redfixmodulename "\nDest: " (tackon #imagefxpath (pathonly #redfixmodulename)) "\nName: " (fileonly (substr #actualmodulename 1 (- (strlen #actualmodulename) 1)))))
  812.  
  813. ; Czy istnieje katalog docelowy? Jesli nie to stworzmy go!
  814.                         (if
  815.                             (not
  816.                                 (exists
  817.                                     (tackon #imagefxpath (pathonly #redfixmodulename))
  818.                                     (noreq)
  819.                                 )
  820.                             )
  821.                             (
  822.                                 (makedir
  823.                                     (tackon #imagefxpath (pathonly #redfixmodulename))
  824.                                     (infos)
  825.                                 )
  826.                             )
  827.                         )
  828.  
  829. ; Upewniamy sie czy katalog docelowy istnieje.
  830.                         (if
  831.                             (exists
  832.                                 (tackon #imagefxpath (pathonly #redfixmodulename))
  833.                                 (noreq)
  834.                             )
  835.                             (
  836.  
  837. ; Skopiowanie modulu (jesli nowszy).
  838. ; Sorry, ze nie uzylem copylib'a, ale robil "dziwne" rzeczy...
  839. ; Majac modul 0.93 traktowal go jako nowszego od 1.0...
  840.                                 (copyfiles
  841.                                     (prompt    #copymodulemsg)
  842.                                     (help        @copyfiles-help)
  843.                                     (source    #redfixmodulename)
  844.                                     (dest
  845.                                         (tackon #imagefxpath (pathonly #redfixmodulename))
  846.                                     )
  847.                                     (newname
  848.                                         (fileonly (substr #actualmodulename 1 (- (strlen #actualmodulename) 1)))
  849.                                     )
  850. ; Eksperci musza potwierdzic czy chca kopiowac. Zapomnialem tego odrem'owac w <1.5.
  851.                                     (confirm "expert")
  852.                                     (optional "askuser" "nofail")
  853.                                 )
  854.                             )
  855.                         )
  856.                     )
  857.                     (
  858.  
  859. ; Nie znalezlismy modulu wiec grzecznie o tym poinformujemy.
  860.                         (message
  861.                             (cat #modulenotfoundmsg #redfixmodulename)
  862.                         )
  863.                     )
  864.                 )
  865.             )
  866.         )
  867.  
  868. ; Zwiekszamy licznik modulow.
  869.         (set #actualmodule (+ #actualmodule 1))
  870.  
  871.     )
  872. )
  873.  
  874. (complete 100)
  875.  
  876. (exit #exitmsg (quiet))
  877.