wgois / OIS

Official OIS repository. Object oriented Input System
https://wgois.github.io/OIS/
zlib License
254 stars 87 forks source link

Mingw support #10

Closed azmeuk closed 6 years ago

azmeuk commented 8 years ago

I applied the patches in the patches Alexpux repository that are used to build the archlinux mingw-w64-ois package, and so, allow to build libOIS with mingw on GNU/Linux. If #9 is merged, I would like to add the mingw builds to the continuous integration script, and so, make sure the build is perennial. Please have a look.

Alexpux commented 7 years ago

Here is patches rebased to current state: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-ois-git

Ybalrid commented 6 years ago

I am unsure if this is still relevant. I will need some time to review this

azmeuk commented 6 years ago

@Alexpux new patches seem more relevant than this PR :)

Ybalrid commented 6 years ago

I need to setup mingw to be able to test this. I will get back to you about that ;-)

Ybalrid commented 6 years ago

I haven't took the time to setup the mingw toolchain, but I looked at the patches, they should be easy to re-apply by hand, but some things should probably be done differently.

The patches basically boils into the following :

Mingw probably (I hope) implemented the missing features by now, autotools are gone (long live CMake!), the hard-coding for non-Unicode is strange but understandable (but if the rest of the code cannot use wchar strings, you should explicitly call the ASCII function, not redefine the macro to something else. You could break somebody else's code if not done carefully).

Ybalrid commented 6 years ago

mingw support only required the change of one line of code in the Win32 Input Manager. See PR #37 I'm going to drop theses outdated patches now ;-)