cbrnr / sigviewer

SigViewer is a viewing application for biosignals.
GNU General Public License v3.0
144 stars 38 forks source link

64bit build for Windows #62

Open cbrnr opened 7 years ago

cbrnr commented 7 years ago

We have 64bit builds for Linux and macOS, but currently we only have 32bit Windows binaries. We should really try to build a 64bit binary also on Windows, because right now this severely limits the capability of opening large files (and this problem seems to occur already with files around 1GB, which are common file sizes for XDF files).

Yida-Lin commented 7 years ago

@cbrnr I looked into the Qt source, however in the README it suggests mingw32-make?

2017-03-20 16 _li

cbrnr commented 7 years ago

Ideally, we should use the Visual C version, because this is available in 64bit. Have you tried if this works? I know that if you disable the external dependencies (i.e. comment out everything that uses them), SigViewer compiles with VC. We can build libxdf with VC (this should work, right?), but we cannot do this for libbiosig, but maybe the binary built with mingw works with VC as well?

Yida-Lin commented 7 years ago

@cbrnr I agree that a 64 bit build for Windows is a must. Since MinGW is not available for 64 bit I agree we should try VC. But the result will hence not support any format other than XDF. How do we wanna handle this? Do we say this is a Windows 64bit Special Deluxe Edition? :)

Update: I think last year I tried using the binaries directly in VC SigViewer project but it didn't work at all. There are some duplicate definitions in biosig.h, colliding with something defined by microsoft. I can later try again though when I get time.

cbrnr commented 7 years ago

Having a special Windows 64-bit XDF-only edition is the worst option, but definitely better than no 64-bit at all. After all, XDF files tend to be larger than other file types, so at least this would make some sense.

The second best option is to use MinGW-w64 to create a 64-bit Windows app. This is also the most feasible and realistic option IMO. This site has a lot of general information, and I take it that this binary installer could be used. The next step is to build Qt from scratch, this might cause some headaches, but I'm sure others have done it before and documented it.

The third option is to cross-compile a 64-bit Windows binary on a Linux system. I have never done that before, so some reading up is required, but this should be no problem. Although this produces the desired binary, it is difficult for other people to replicate (because Windows people will want to build SigViewer on Windows).

The fourth, least realistic but best option is to try to build libbiosig with VC. This would enable us to build SigViewer with VC, which is the default toolchain on Windows and most people will be familiar with it. However, I'm afraid that libbiosig uses lots of GCC-specific stuff - but who knows, if you have time it would be nice to get an idea how much work this really is.

In summary, I'd go with option 2 or 3. My gut feeling tells me that option 3 is the least effort, but without exploring a bit it is hard to say.

Yida-Lin commented 7 years ago

@cbrnr Thanks Clemens. By the way, here is a project providing pre-built Qt MingW 64 bit. Unfortunately it's a bit outdated and the newest Qt Version it provides is 5.5, which is actually not too bad. At least it is something out of box, and I think the user wouldn't feel any difference between 5.5 and 5.8. This is a short term solution.

In long term when we get time, maybe we can then look into how to build Qt 64 bit from source so that we can align SigViewer with the newest Qt Version.

Yida-Lin commented 7 years ago

@cbrnr Hi Clemens,

I am trying to compile a 64bit SigViewer but apparently seems I need a 64 bit libbiosig for windows first: not sure how I can do that.

image

Using the binary downloaded from BioSig website doesn't work:

image

cbrnr commented 7 years ago

Yes, the precompiled binary from the website depends on zlib and cholmod (from suitesparse). That's why I wanted to build libbiosig myself, because you can comment out these dependencies in the Makefile.

Can you try building libbiosig (comment lines 199 and 207 in Makefile) and see which error you get?

The second option is to install these dependencies and use the pre-built binary (not ideal because we'd need to distribute these deps with SigViewer then).

Yida-Lin commented 7 years ago

@cbrnr Unfortunately still the same as last year.

I might try the second option later. We could also consider cross compile from Linux...

2017-04-10 2

cbrnr commented 7 years ago

cf #47

cbrnr commented 7 years ago

I managed to build a 64bit Windows executable via MXE cross-compilation. We need to test it, but we might use this method as a temporary workaround to create 64bit Windows builds. However, I don't want to be able to build a Windows app only on non-Windows platforms, so our goal should still be to build everything on Windows (preferably with VC). Again, SigViewer does compile with VC, the only problem is libbiosig.

Yida-Lin commented 7 years ago

@cbrnr Hi Clemens,

I just noticed that the 64-bit build was never uploaded to the release page :)

cbrnr commented 7 years ago

Yes, I know. It will be available from 0.6.2. I think we're ready, right?

Yida-Lin commented 7 years ago

@cbrnr Except I really wanted to include the auto-updater! I think somebody posted a very good idea, that you can use Qt Installer Framework internally without launching its GUI, which I thought is a fantastic idea. Haven't got a chance to try that yet though.

LenaHdk commented 6 years ago

Do you know when you will release the 0.6.2 win10 64bit binary? I am eager to use it as we are soon piloting a new eeg study in order to check our LSL setup.

cbrnr commented 6 years ago

@LenaHdk I will send you a pre-release 64bit binary when I'm back in my office next Monday.

LenaHdk commented 6 years ago

Wonderful! Thank you very much!

Den 3. jan. 2018 kl. 16.21 skrev Clemens Brunner notifications@github.com:

@LenaHdk I will send you a pre-release 64bit binary when I'm back in my office next Monday.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

cbrnr commented 6 years ago

@LenaHdk unfortunately I just trapped myself into dependency hell. It seems like some update (presumably the update of libbiosig) broke the MXE build process since I get an error now. It is also not that easy to go back to an older version (or at least I couldn't figure out how). I'm sorry about this, it is currently still really difficult to build libbiosig on Windows, and I can't promise when I manage to provide a 64bit build.

In the meantime, could you maybe try to use SigViewer on Linux or macOS? 64bit versions for these platforms have been available for quite a while.

Yida-Lin commented 6 years ago

@LenaHdk Hi I have the Windows 64bit SigViewer which Clemens sent me earlier

cbrnr commented 6 years ago

Thanks @Yida-Lin, I forgot about this file because it uses some older code base. Anyway, as expected building SigViewer on Windows turned out to be a nightmare because of libbiosig. I don't have the time to work on this in the near future.

Yida-Lin commented 6 years ago

@cbrnr Yes Clemens, maybe put the 64bit in the 0.6.1 release so that people can download it as needed? I think the code is exactly inline with 0.6.1.

cbrnr commented 6 years ago

Here is the link to SigViewer 0.6.1 Windows 64bit (the link you provided above required authentication): https://drive.google.com/file/d/0Bzq48JpOZMxLM0VvTXVKbDNvbTg/view?usp=sharing Before putting it on the release page, I have to create an installer first. This might be difficult without actually having built it now, but when I have time I'll try to work on this some more.

For now, @LenaHdk you have the official 0.6.1 64bit version without an installer. I'm not sure if it works out of the box, because you might have to install Qt first. Let me know if it worked.

cbrnr commented 6 years ago

I finally managed to build SigViewer 0.6.1 as a 64bit Windows binary again - you can find a link to the official installer on the homepage. :tada: :balloon: :birthday:

LenaHdk commented 6 years ago

Thank you !!!!!! I just installed it and so far its running. I can see our EEG data and all the events that should be marked are listed. I really can not thank you enough! =)

cbrnr commented 5 years ago

FWIW, the latest Qt release for Windows now officially supports MinGW64.