Closed TiZ-HugLife closed 8 years ago
Great! thats useful info... Ill check out the flags you suggested when i get a moment. Its good to know you got it working though! (Any screen shots btw??) :)
Funny you should mention that... #10 :P
It seems it can https://github.com/MattTuttle/haxe-glfw/blob/master/GLFW.hx#L4-L7
But do we want to use the os version or the bundled one?
I presume when you say bundled you mean inside the actual hxWidgets lib? (like for windows).
It would certainly be better (imo - but open for discussion), to be able to use a bundled version, however, there are two issues i think:
1) Size - im not sure its "ok" to be uploading these number, type and size of files to haxelib once it gets released there 2) Build - im not sure how easy it is to get the build running on mac / linux / windows from just a Build.xml. I know that manually doing it on all three platforms was relatively involved.
Yeah, both approach have pros and cons.
Using the bundled version limits the compatibility issues, but require a ridiculous amount of files since you also need gtk and its dependencies (there's a lot of those).
Using the os' wx could lead to issues, but if we require wxWidgets 3.X it should be ok. Linux doesn't have any issues installing wx and providing wx-config in the path. Not sure about mac and windows. It would also simplify build.xml.
I think using the os' is probably better.
I think for now you are probably right, there are windows .libs and dlls to get that running off the ground quickly as windows wx compile isnt as easy as linux / mac. For both of those platforms it was relatively straight forward, install some packages and thats about it.
The pathing in Build.xml could almost certainly use some work (mac especially).
To check but I think a simple
<flag value="`wx-config" />
<flag value="--cflags" />
<flag value="--libs`" />
could work (needs to be separated between compilation and linking).
Mac and linux directly use the result from wx-config now.
Ubuntu uses /usr/lib/x86_64-linux-gnu rather than /usr/lib64. It didn't throw a fit because /usr/lib64 didn't exist, so I think you might safely be able to add
<compilerflag value="-I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0"/>
to Build.xml and I think it won't negatively impact building for other distros. I was able to successfully compile after adding that entry.After some googling, it seems like the better way to handle this would be to use the output of
wx-config --cppflags
, but I don't know if Build.xml can use command output for flags.