alex-berman / sonotopy

Library for perceptually analyzing an acoustic signal in real time
GNU General Public License v3.0
9 stars 1 forks source link

windows compatibility #11

Open alex-berman opened 13 years ago

alex-berman commented 13 years ago

Verify Windows compatibility, and extend documentation and build scripts if required.

pbouda commented 12 years ago

Could you give a hint how to do this? I will definitely try it out.

alex-berman commented 12 years ago

That would be great, Peter!

I suppose that the first step would be to try to compile the library itself with Visual Studio. I'm guessing that this shouldn't be too difficult, as there shouldn't be many low-level OS-specific system calls in the library. The unit tests can be used to verify this step.

After that, one could move on to the demo and uilib, which the demo relies on. This is probably more tedious. I can imagine that the GlWindow class will require some Windows-specific additions. If it does, one can of course consider using some cross-platform GUI library instead.

Finally, if all goes well, it would be interesting to test whether scons can used for Windows builds, rather than having Visual Studio files (.dsp, .dsw, .sln and .vcproj) in the repo.

pbouda commented 12 years ago

OK, I will try with Visual Studio and update here as soons as I got a working binary.

pbouda commented 12 years ago

Just an intermediate result:

it was not difficult to compile with scons, as it supports MS tools (compiler/linker/...) from Visual Studio. I had to apply minor changes (3 changes, see below) to the scons script, I am currently trying to figure out what scons does and will send more details later.

1) The libm dependency is not necessary under Windows, instead I had to add a "#define _USE_MATH_DEFINES" in every source file that uses math.

2) I load the envorinment like this:

import os env = Environment(ENV = os.environ) platform = env['PLATFORM'] Prefix = ARGUMENTS.get('Prefix','/usr/local') env = Environment(ENV = os.environ, CCFLAGS = '-Wall -pedantic -ffast-math -fPIC ')

3) I do not really no what PGK_INFO does, so I deleted it from the script and was able to compile a static library. I am trying to make a simple demo to see if it works. As soon as I find some time.

alex-berman commented 12 years ago

Great!