Thank you for the patch. I really appreciate your effort!

My experience this time was much smoother, but still not 100%. I fetched the newest revision from SVN and combined it with revision 7 of dokan.h. dmake ran through without error and resulted in a Dokan.dll in the blib\arch\auto\Win32\Dokan directory.

But, as it seems, the dmake install routined did something wrong, I had to manually copy the .dll into my strawberry directory, so that Dokan.pm's "package Win32::Dokan::_DLL;" could find it in the ENV. (btw, I opted for the sub dir C:\strawberry\c\bin).

In test-fs.t, ~line 33, there's is a typo in the path, see:
for my $p (split(/;/, $ENV{PATH}), 'C:\\Program Files\\Dokan\\DokanLIbrary', 'D:\\Program Files\\Dokan\\DokanLIbrary',) {
the capital "I". And the sub assumes Dokan to reside in the default location (which wasn't the case on my system, I installed it in Program Files\\DokanLibrary...

Then:
E:\Dev\Win32-Dokan>dmake test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib\lib', 'blib\arch')" t/*.t t/Fuse.t ......... ok t/test-fs.t ...... 1/20 t/test-fs.t ...... 2/20 # Failed test 'create a file' # at t/test-fs.t line 60. print() on closed filehandle FH at t/test-fs.t line 61. # Failed test 'open a file' # at t/test-fs.t line 64. readline() on closed filehandle FH at t/test-fs.t line 65. # Failed test at t/test-fs.t line 65. # got: '' # expected: 'test: create a file # ' # Failed test 'append to file' # at t/test-fs.t line 68. print() on closed filehandle FH at t/test-fs.t line 69. # Failed test 'open a file (2)' # at t/test-fs.t line 72. readline() on closed filehandle FH at t/test-fs.t line 73. # Failed test at t/test-fs.t line 73. # got: '' # expected: 'test: create a file # test2: append to file # ' # Failed test 'open a file (3)' # at t/test-fs.t line 76. readline() on closed filehandle FH at t/test-fs.t line 77. # Failed test at t/test-fs.t line 77. # got: '' # expected: 'test: create a file # test2: append to file # ' # Failed test 'open a file (4)' # at t/test-fs.t line 80. # Failed test at t/test-fs.t line 87. # got: undef # expected: '0' # Failed test 'test directory .' # at t/test-fs.t line 92. # Failed test 'test directory ..' # at t/test-fs.t line 93. # Failed test 'test file' # at t/test-fs.t line 94. # Failed test 'unlink' # at t/test-fs.t line 96. # Failed test 'mkdir' # at t/test-fs.t line 99. # Failed test 'test created directory' # at t/test-fs.t line 100. # Failed test 'rmdir' # at t/test-fs.t line 101. # Looks like you failed 17 tests of 20. Terminating on signal SIGINT(2) Caught SIGINT. Trying to quit ... dmake: Error code 130, while making 'test_dynamic'
When it reaches the t/test-fs.t tests, another console fires up and after a good 15 seconds (at least on my machine...) dokan tells me that it had mounted a drive, which actually shows up in File Explorer. But the problem is the many failed tests above seem to start prior to the mounting, thus they fail. They have failed a few seconds before dokan answers.
I changed sleep to "sleep(20);" and all tests passed.
E:\Dev\Win32-Dokan>dmake test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib\lib', 'blib\arch')" t/*.t t/Fuse.t ......... ok t/test-fs.t ...... ok t/Win32-Dokan.t .. ok All tests successful. Files=3, Tests=28, 56 wallclock secs ( 0.12 usr + 0.11 sys = 0.23 CP +U) Result: PASS

Another note: I think I was under a misconception about how Dokan works. I wasn't aware that I need to have Dokan installed! I thought, having the Dokan.dll alone would suffice. But a call for dokanctl.exe during the tests told me that I need to have it.

In reply to Re^5: Perl to mount a virtual filesystem on Windows? by isync
in thread Perl to mount a virtual filesystem on Windows? by isync

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.