Hi Christian,
On Tue, 2 Mar 2010, Christian Franke wrote:
Hi Martin,
Hi Antonio,
Martin Koeppe wrote:
> Unfortunately gddrescue is not available for Windows.
There is at least a cygwin port of ddrescue. Just search for "ddrescue
cygwin".
yes, but I prefer a native Windows build because I need it on many
different boxes and only occasionally on one particular box. And all of the
boxes don't have cygwin installed.
The Cygwin version of ddrescue does not require a Cygwin install. It requires
only cygwin1.dll is in same directory or in the PATH. I have successfully run
this ddrescue.exe also from a UBCD4Win Live CD without a Cygwin install.
Thanks for the info. This could be a usable construction. Does it work
with raw devices? Did you happen to make a performance test?
I've done a quick build of a native Windows ddrescue.exe with MinGW g++.
Required only few hacks (attached).
to build on MSYS:
$ ./configure
$ make
to build on Cygwin:
$ ./configure CXX=g++-3 CPPFLAGS=-mno-cygwin LDFLAGS=-mno-cygwin
$ make
(Or: cross-compile it on Linux :-)
But this version does not work with raw devices (e.g. '\\.\PhysicalDrive1')
because lseek(., 0, SEEK_END) fails. The lseeki64() from MSVCRT.dll
apparently cannot be used to determine the size of a raw device.
Did you actually try your code with a raw disk or CD/DVD device? Which MSVC
version did you use?
Yes, I have approximately the same hacks for the MSVC build. The
warnings are just warnings, obviously, and don't make the build
impossible. And you are right, this version also doesn't work with raw
devices. I need to replace open() etc. and I didn't yet. I wanted to
coordinate with Antonio first, to avoid the hacks and make ddrescue
more portable first. My suggestion was the os.h thing for all platform
specific code. But there may be other solutions, and Antonio should
ideally follow one of them.
Even if he doesn't want the platform specific code in the main source,
reapplying the windows specific things to new versions of ddrescue
should be easily possible.
Regards,
Martin
_______________________________________________
Bug-ddrescue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-ddrescue