home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / biz / patch / pgs12_12a.lha / Patch / Update-Photogenics-1.2 next >
Text File  |  1995-12-21  |  8KB  |  395 lines

  1.  
  2. (procedure scrub
  3.     (
  4.     (if (exists (tackon "photogenics:" OLDKACK))
  5.         (
  6.         (delete (tackon "photogenics:" OLDKACK)
  7.             (prompt ("\n\nDeleting redundant program code:\n\n%s\n\n" OLDKACK) )
  8.             (help "\n\n\nRelease 1.2a of Photogenics makes this file redundant, so we're getting rid of it.")
  9.             (confirm)
  10.             )
  11.         )
  12.     )
  13.     )
  14. )
  15.  
  16. (procedure fresh
  17.     (
  18.     (copyfiles
  19.         (prompt ("\n\nInstalling new release of file:\n\n%s\n\n" NEWSTUFF))
  20.         (source (tackon "new" NEWSTUFF))
  21.         (dest (tackon "photogenics:" PATH))
  22.         (help @copyfiles-help)
  23.         (confirm)
  24.     )
  25.     )
  26. )
  27.  
  28. (procedure do_a_patch
  29.     (if (exists ("%s%s" PATH FILE))
  30.         (
  31.         (working ("Patching: %s\n\n" FILE))
  32.  
  33.         (run ( ("c/spatch -o%s%s -p%s%s.diff %s%s" PATH FILE PATCH FILE ORIGINAL FILE)))
  34.         )
  35.     )
  36. )
  37.  
  38. (message
  39.     "\n\n\nThis interim 1.2a set of patches can only be applied to a"
  40.     " previous installation of Photogenics 1.2 - it won't be compatible"
  41.     " with versions 1.1a and below, or any of the Special Edition"
  42.     " releases. If you're not using the full 1.2 version, please hit"
  43.     " ABORT now."
  44. )
  45.  
  46. (message
  47.     "\n\nGood, you're still with us ;->\n\n"
  48.     "The patch will only affect parts of Photogenics 1.2 which have"
  49.     " been installed on your hard disk - unfortunately, due to the"
  50.     " ever-growing size of the main code, the floppy distribution"
  51.     " for 1.2a has been heavily reorganised, and a patch to the"
  52.     " original floppies isn't easily possible <however Almathera"
  53.     " can update your original disk set from 1.2 to 1.2a if you"
  54.     " send in your disks, return postage and registration details>."
  55. )
  56.  
  57. (message
  58.     "\n\nIf you install extra parts of release 1.2 from your original"
  59.     " disks *after* applying this patch, you'll need to re-apply it"
  60.     " to patch the new stuff you install. <C'est la vie>\n\n"
  61.     " You really need to have this archive unpacked to the RAM disk or"
  62.     " a spare partition on your hard drive, as we patch against the"
  63.     " original 1.2 disks and so there's gonna be some disk-swapping"
  64.     " to do. <Hence you want to have this patch available at all times>"
  65. )
  66.  
  67. (askdisk
  68.     (prompt "Please insert Photogenics release 1.2 disk 1 in any drive")
  69.     (dest "Photogenics_1")
  70.     (help @askdisk-help)
  71. )
  72.                           ; loop for each one...
  73.  
  74. (set LOOP-FLAG -1)
  75.  
  76. (while (< LOOP-FLAG 93 )
  77.     (
  78.  
  79.     (set LOOP-FLAG (+ 1 LOOP-FLAG ))
  80.  
  81.     (set FILE
  82.         (select LOOP-FLAG
  83.  
  84.             "Photogenics"        ; 0
  85.             "pgs.library"        ; 1
  86.  
  87.             "ACBM.gio"        ; 2
  88.             "AmigaScreen.gio"
  89.             "Backdrop.gio"
  90.             "BMP.gio"
  91.             "CDXL.gio"
  92.             "GIF.gio"
  93.             "Ham6.gio"
  94.             "Ham8.gio"
  95.             "IFF-24.gio"
  96.             "IFFDeep.gio"
  97.  
  98.             "ILBM.gio"        ; 12
  99.             "Img.gio"
  100.             "JPEG.gio"
  101.             "Noise.gio"
  102.             "Pattern.gio"
  103.             "PBM.gio"
  104.             "PCX.gio"
  105.             "Plasma.gio"
  106.             "Ripples.gio"
  107.             "ShowHam6.gio"
  108.  
  109.             "ShowHam8.gio"        ; 22
  110.             "Streaks.gio"
  111.             "Targa.gio"
  112.             "Text.gio"
  113.  
  114.             "AddNoise"        ; 26
  115.             "AlterHue"
  116.             "Antique"
  117.             "Balance"
  118.             "BasRelief"
  119.             "Blur"
  120.             "BrightMap"
  121.             "Brightness"
  122.             "Cloner"
  123.             "Colourise"
  124.  
  125.             "Contrast"        ;36
  126.             "CrossHatch"
  127.             "Defocus"
  128.             "Deinterlace"
  129.             "DisplaceMap"
  130.             "Dither"
  131.             "Emboss"
  132.             "FalseColour"
  133.             "Flip"
  134.             "Gamma"
  135.  
  136.             "GradientTint"        ;46
  137.             "Greyscale"
  138.             "HueMap"
  139.             "Jitter"
  140.             "Limit"
  141.             "LineArt"
  142.             "MaskingPaint"
  143.             "Matrix"
  144.             "Median"
  145.             "Mirage"
  146.  
  147.             "Mix"            ; 56
  148.             "Monochrome"
  149.             "MotionBlur"
  150.             "Negative"
  151.             "Paint"
  152.             "Pixelise"
  153.             "Posterise"
  154.             "Randomise"
  155.             "Refract"
  156.             "Roll"
  157.  
  158.             "RubEmboss"        ; 66
  159.             "RubMix"
  160.             "RubTexture"
  161.             "RubThru"
  162.             "RubTint"
  163.             "Saturation"
  164.             "Sharpen"
  165.             "ShiftHue"
  166.             "ShiftRGB"
  167.             "Solarize"
  168.  
  169.             "Split"            ; 76
  170.             "Stellate"
  171.             "Tile"
  172.             "TileBrick"
  173.             "Tint"
  174.  
  175.             "EGS.gio"        ; 81
  176.             "Harlequin.gio"
  177.             "Impulse.gio"
  178.             "OpalVision.gio"
  179.             "Picasso-II.gio"
  180.             "QRT.gio"
  181.             "QuadAnim.gio"
  182.             "Raw.gio"
  183.             "Retina.gio"
  184.             "Sculpt.gio"
  185.  
  186.             "StudioII-Print.gio"    ; 91
  187.             "TIFF.gio"
  188.             "VLab.gio"        ; 93
  189.         )
  190.     )
  191.  
  192.            ; wind thru the list changing paths on the fly
  193.  
  194.     (if (= 1 LOOP-FLAG)
  195.         (
  196.         (set PATH "photogenics:data/libs/")
  197.         (set ORIGINAL "Photogenics_1:data/libs/")
  198.         (set PATCH "diffs/data/Libs/")
  199.         )
  200.     )
  201.  
  202.     (if (= 2 LOOP-FLAG)
  203.         (
  204.         (set PATH "photogenics:data/GIO/")
  205.         (set ORIGINAL "Photogenics_1:data/GIO/")
  206.         (set PATCH "diffs/data/GIO/")
  207.         )
  208.     )
  209.  
  210.     (if (= 26 LOOP-FLAG)
  211.         (
  212.         (set PATH "photogenics:data/PaintModes/")
  213.         (set ORIGINAL "Photogenics_1:data/PaintModes/")
  214.         (set PATCH "diffs/data/PaintModes/")
  215.         )
  216.     )
  217.  
  218.     (if (= 81 LOOP-FLAG)
  219.         (
  220.         (set PATH "photogenics:data/GIO/")
  221.         (set ORIGINAL "Photogenics_3:ExtraGIOs/")
  222.         (set PATCH "diffs/ExtraGIOs/")
  223.         )
  224.     )
  225.  
  226.     (if (= 0 LOOP-FLAG)
  227.         (
  228.  
  229.         (copyfiles
  230.             (prompt "Copying original core binary")
  231.             (help @copyfiles-help)
  232.             (source "Photogenics_1:Photogenics")
  233.             (dest "diffs/")
  234.         )
  235.  
  236.         (set PATH "diffs/")
  237.         (set ORIGINAL "Photogenics_1:")
  238.         (set PATCH "diffs/")
  239.  
  240.         (do_a_patch)
  241.         (working "Reuncompressing patched main program code")
  242.         (run ("c/Deplode diffs/Photogenics Photogenics:Photogenics")
  243.             (prompt "Reuncompressing patched main program code")
  244.             (help "Reuncompressing patched main program code")
  245.             )
  246.         )
  247.  
  248.         (
  249.         (if (> LOOP-FLAG 80 )
  250.             (askdisk
  251.                 (prompt "Please insert Photogenics release 1.2 disk 3 in any drive")
  252.                 (dest "Photogenics_3")
  253.                 (help @askdisk-help)
  254.             )
  255.         )
  256.         (do_a_patch)
  257.         )
  258.     )
  259.     )
  260. )
  261.  
  262. (if (> (exists "photogenics:data/GIO/FramestoreDisplay.gio") 0)
  263.     (
  264.     (run "Photogenics_3:c/lhex -qfw=diffs/ x Photogenics_3:Toaster.lha")
  265.     (set PATH "photogenics:data/GIO/")
  266.     (set ORIGINAL "diffs/")
  267.     (set PATCH "diffs/Toaster/")
  268.     (set FILE "FramestoreDisplay.gio")
  269.     (do_a_patch)
  270.     (set FILE "FramestoreFile.gio")
  271.     (do_a_patch)
  272.     (set FILE "FramestoreGrab.gio")
  273.     (do_a_patch)
  274.     )
  275. )
  276.  
  277. (set OLDKACK "Data/Paintmodes/Maximum")
  278. (scrub)
  279.  
  280. (set OLDKACK "Data/Paintmodes/Minimum")
  281. (scrub)
  282.  
  283. (set OLDKACK "Data/Paintmodes/Highlights")
  284. (scrub)
  285.  
  286. (set OLDKACK "Data/Paintmodes/Lowlights")
  287. (scrub)
  288.  
  289. (set OLDKACK "Data/GIO/Ascii-Art.gio")
  290. (scrub)
  291.  
  292. (set OLDKACK "Data/GIO/CyBERgraphics.gio")
  293. (scrub)
  294.  
  295. (set OLDKACK "Data/GIO/PCD.gio")
  296. (scrub)
  297.  
  298. (set OLDKACK "Data/GIO/PrefsPrinter.gio")
  299. (scrub)
  300.  
  301. ; okay, nuked from orbit, let's do the new stuff...
  302.  
  303. (set NEWSTUFF "data/PaintModes/Hi&LowLights")
  304. (set PATH "data/PaintModes")
  305. (fresh)
  306.  
  307. (set NEWSTUFF "data/GIO/Ascii-Art.gio")
  308. (set PATH "data/GIO")
  309. (fresh)
  310.  
  311. (set NEWSTUFF "data/GIO/CyberGraphX.gio")
  312. (fresh)
  313.  
  314. (set NEWSTUFF "data/GIO/PCD.gio")
  315. (fresh)
  316.  
  317. (set NEWSTUFF "data/GIO/PrefsPrinter.gio")
  318. (fresh)
  319.  
  320.  
  321. (run "c/Avail >nil: <nil: FLUSH") ; now wash your hands....
  322.  
  323. (set #PGX-ENV "Creating Photogenics directory in ENV:...")
  324.  
  325. (set #PREFS-MOVE
  326.     (cat "\nNow copying your Photogenics preferences into %s\n"
  327.          "(Photogenics v1.2a uses environmental variables"
  328.          " instead of the Photogenics file tree)")
  329. )
  330.  
  331. (if ( < (exists "envarc:Photogenics" (noreq) ) 2)
  332.     (
  333.     (makedir "envarc:Photogenics"
  334.         (prompt "Creating Photogenics directory in ENVARC:...")
  335.         (help @makedir-help)
  336.         )
  337.  
  338.     (makedir "env:Photogenics"
  339.         (prompt "Creating Photogenics directory in ENVARC:...")
  340.         (help @makedir-help) 
  341.         )
  342.     )
  343. )
  344.  
  345. (if (exists "photogenics:data/Preferences" (noreq))
  346.     (
  347.     (copyfiles
  348.         (prompt (#PREFS-MOVE "ENVARC:"))
  349.         (source "photogenics:Data/Preferences")
  350.         (dest "ENVARC:Photogenics/")
  351.         (help @copyfiles-help)
  352.         (newname "preferences")
  353.         (confirm)
  354.     )
  355.  
  356.     (copyfiles
  357.         (prompt (#PREFS-MOVE "ENV:"))
  358.         (source "photogenics:Data/Preferences")
  359.         (dest "ENV:Photogenics/")
  360.         (help @copyfiles-help)
  361.         (newname "preferences")
  362.         (confirm)
  363.     )
  364.  
  365.     (delete "photogenics:Data/Preferences"
  366.         (prompt "\n\n\n\nYour preferences have been copied into ENV: and ENVARC, so can now be deleted from the Photogenics file tree.")
  367.         (help "\n\n\n\n\n\n Installing v1.2a requires you to delete this file.")
  368.         (confirm)
  369.     )
  370.  
  371.     )
  372. )
  373.  
  374. (copyfiles
  375.     (prompt "Updating READ.ME")
  376.     (source "new/READ.ME")
  377.     (dest "photogenics:")
  378.     (help @copyfiles-help)
  379.     (confirm)
  380. )
  381.  
  382. (message
  383.     "\n\nPhotogenics 1.2a has now been patched into your existing"
  384.     " installation. Please remember to repatch should you"
  385.     " install extra data from your 1.2 release disks <or"
  386.     " simply have your 1.2 set updated to 1.2a>, and in"
  387.     " the meantime, enjoy the new update to the package"
  388.     " once you've read the new READ.ME file."
  389. )
  390.  
  391. (run "run photogenics_3:c/More photogenics:READ.ME")
  392.  
  393. (exit (quiet))
  394.  
  395.