Okay.

  • First you need the patching program. Download this zip of unix tools for win32. unizip them in to a subdirectory and add that directory to your system path.
  • Then download the patch. Click here, select the whole page, and past it into notepad or your favorite text editor (not WORD!!)

    At this point, you may need to edit 10 lines of the patch file manually :(

    When I just c&p'd the patch from the link above, every line that should look like these

    --- Win32-Clipboard-0.52\Clipboard.pm Fri Sep 10 16:05:35 2004 +++ Win32-Clipboard-0.53-saved\Clipboard.pm Fri Oct 14 07:01:43 200 +5

    Looked like these (note the missing whitespace between the filename and the date!)

    --- Win32-Clipboard-0.52\Clipboard.pmFri Sep 10 16:05:35 2004 +++ Win32-Clipboard-0.53-saved\Clipboard.pmFri Oct 14 07:01:43 2005

    So, check these after you paste and if the whitespace is missing insert a space or tab after the filename and before the date. Check all 10 lines (in five groups of 2).

    I'm not sure what PM is doing with these line that causes this?

    Then save it as C:\Clipboard\Win32-Clipboard-0.52\53.patch.

  • Then do the patching by running the command: patch -p 1 -i 53.patch
    Win32-Clipboard-0.53>patch -p 1 -i 53.patch patching file `Clipboard.pm' patching file `Clipboard.xs' patching file `Makefile' Hunk #2 succeeded at 239 (offset -6 lines). Hunk #3 FAILED at 490. Hunk #4 FAILED at 812. 2 out of 4 hunks FAILED -- saving rejects to Makefile.rej patching file `META.yml' patching file `t\test.t'

    Ignore the "Hunk#3 FAILED at 490" and "Hunk #4 FAILED at 812", they are not critical to your installation. (I don't understand why they fail at this point, the patch seems to correspond to the file perfectly, but patch doesn't give any useful reasons).

    Final step. Re-build the package using nmake test. The last couple of lines of output should read:

    ... All tests successful. Files=1, Tests=10, 1 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 +CPU)

    The number of tests has gone from 9 to 10 and your ready to install it using nmake install

    Assuming no errors, you should be able to type:

    perl -MWin32::Clipboard -wle" print $Win32::Clipboard::VERSION" 0.53

    And you are ready to try it. Run a script like this:

    #! perl -w use strict; use Win32::Clipboard; my $clip = Win32::Clipboard(); ## If you use double quotes, double your backslashes \\. ## Don't use forward slashes as Exploerer won't like em. $clip->SetFiles( 'c:\Clipboard\Win32-Clipboard-0.53\53.patch' );

    Then go to the explorer and paste into wherever you want the file copied.

    Note that you can place as many files into the clipboard as you want copied; the paths must be fully qualified; when you paste in explorer, the file is always copied, even if you hold the control key--I haven't worked out how to make it move (yet).


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

    In reply to Re^13: Move/Copy files using Clipboard! by BrowserUk
    in thread Move/Copy files using Clipboard! by Ace128

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.