martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
631 stars 71 forks source link

How do I build for windows. I #540

Open Awire9966 opened 6 months ago

Awire9966 commented 6 months ago

Ive used cygwin but it hasnt worked

PartialVolume commented 6 months ago

I'm no cygwin expert but I suspect one reason why it won't work is that nwipe is not 100% POSIX compliant which is a requirement of cygwin, nwipe also makes use of various libraries and programs, which would also have to be build and be POSIX compliant.

Personally if I wanted to run nwipe and Windows apps together I would install Linux on a system as the host O.S. and virtualize windows with something like virtual box. In that way nwipe would have full root access to the entire system and it's devices while you could still be running Windows apps alongside Linux.

Doing it with Linux as the host would mean nwipe wasn't subjected to any I/O performance penalties when wiping drives as it possibly would be if virtualized.

As for nwipe becoming 100% POSIX compliant, along with all it's libraries, including hdparm and smartmontools. I think there is more chance of SpaceX discovering Warp drive....

Of course if Microsoft want me to port it to Windows, so Windows has a native version. I'll do it. £50K plus windows freebies like compilers and office suites plus expenses. 😊

Awire9966 commented 6 months ago

Its not really that I want to run it on windows, but I want to run it on windows pe like hiren's boot CD.

PartialVolume commented 6 months ago

Looking at the list of packages that cygwin has available, there are two notable libraries that are missing that nwipe requires. libparted and libconfig, these would need to be provided or if that wasn't possible, these libraries would need to be written out of nwipe. On the plus side libncurses is available.

It might be an interesting project for somebody, but probably not for me as I need to stay focused on adding new core features to nwipe like ATA secure erase.

Awire9966 commented 6 months ago

@PartialVolume Understandable. MSYS2 has libconfig as a package, however with it installed i still get an error

 checking for libconfig... no
checking for main in -llibconfig... no
configure: error: libconfig library not found
PartialVolume commented 6 months ago

Could it be that it can't find libconfig because it's called mingw-w64-x86_64-libconfig?

If that's the case you would need to edit nwipes configure.ac or rename the mingw-w64-x86_64-libconfig library as libconfig assuming that's what the problem is.