EngoEngine / engo

Engo is an open-source 2D game engine written in Go.
https://engoengine.github.io
MIT License
1.74k stars 136 forks source link

Removed fallthrough case since it caused build errors #739

Closed kori-irrlicht closed 4 years ago

kori-irrlicht commented 4 years ago

I removed the fallthrough statement. Otherwise it already looked like the glfw version, so I think this should be the necessary changes to fix the compile error I received in #738

There is still another problem with the headless build: The oto dependency is causing trouble, if no drivers are installed on a build system. But I'm not sure if this should be fixed in this pull request (or even in this repository)

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-1.2%) to 37.325% when pulling d3e25cd8af976f5092e34e6ec9fa7335abb9307e on kori-irrlicht:fix_headless_build into c5b322f6d91e2004aec7809a4dc5dc4b0eacedad on EngoEngine:master.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+1.2%) to 38.512% when pulling 28180883eaecca55c018a0ac0b496c9cdc9c2ae8 on kori-irrlicht:fix_headless_build into 79b3599270a995ecb42a1b97f993b407bef27ed1 on EngoEngine:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-10.3%) to 28.2% when pulling d3e25cd8af976f5092e34e6ec9fa7335abb9307e on kori-irrlicht:fix_headless_build into c5b322f6d91e2004aec7809a4dc5dc4b0eacedad on EngoEngine:master.

Noofbiz commented 4 years ago

The failures are not due to anything you did, and the PR looks good to me. Also, fixing oto should be relatively easy, just have to use the same method we do for running tests. Try building it with engo.RunOptions has Headless = true. That should skip over oto and use a fake readwriteseeker instead of oto

Noofbiz commented 4 years ago

Thanks for the help! Let me know if the headless option works!

kori-irrlicht commented 4 years ago

Thanks for the hint, but I was already using the headless option and the error occurs while building the project. Would it be possible to skip the oto dependency this way? I can build it on my machine, but building it on a build server causes an error, because it can't find the alsa package required by the Linux drivers of oto.

For now, I created a workaround by forking oto and adding an empty driver, which will ignore everything. It works for me, but I'm not sure if this is the best solution overall.

The error message:

Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing 'alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
pkg-config: exit status 1

If it would help, I can also post a link to my project