Desktop target builds running on Win 7 and Win 8

Monkey Targets Forums/Desktop/Desktop target builds running on Win 7 and Win 8

Sensei(Posted 2014) [#1]
So, I'm trying to understand something here. I was under the impression that most, if not all Win 7 software can and does run on Win 8. In my experience, this appears to be the case.
Saying that, I am curious to know why GLFW (desktop) built monkey apps do not run on Win 8 when built on Win 7. I'm unsure if Win 8 built apps will run on Win 8 AND Win 7, since I only have Win 7 on my PC.
I tried both my game and some Monkey bananas, built using GLFW target and trying to run them on Win 8 on my wife's laptop. None worked as it seems to exit as soon as the window appears.
What does Monkey do to build a GLFW target app that would cause it to not run on Win 8?


ziggy(Posted 2014) [#2]
Did you install OpenAL in your wife computer?


Sensei(Posted 2014) [#3]
Yeah ziggy, that was the first thing I did :)
Unfortunately I don't think she'd appreciate me installing all my dev tools on her laptop, along with accosting it to do work on. I might just be in line for a divorce then :)
Like I said, I tried some of the bananas and they don't work when built from a Win 7 machine. I guess using Win 8 and not MinGW but VS 2012, it must compile it with the relevant Win 8 dll's to make it work on there.. It's a real shame.
I even tried running them in compatibility modes and with admin permissions etc. Made no difference.


ImmutableOctet(SKNG)(Posted 2014) [#4]
This sounds like either you forgot to move your data folder, or your Wife's computer doesn't have OpenGL capable drivers. Either that, or your code is requiring a file that doesn't actually exist (Or something to that effect). I actually gave a friend of mine a copy of a game I'm working on, and every time he tried to run it, it just instantly closed. This was because I was testing out a menu system I wrote, and I was generating a file on my 'E' drive, and he didn't have one. Needless to say, I spent a couple hours going crazy, just to remember I was testing something like that. The 'insta-close' thing usually happens for me when I'm missing my data folder (For obvious reasons).

The Desktop/GLFW target compiles for versions of Windows (Generally XP and later) based on the x86/64 architecture, so any PC made within the last 10-15 years should be okay running your program. The only problem is terrible OpenGL implementations, which is becoming less of an issue these days. Intel is notorious for having bad drivers, and may not even run something OpenGL based.

Other than that, you should be fine compiling with MinGW/GCC for any current version of Windows. The same goes for Visual Studio 2010, but you won't be able to use 2012/2013 without modifying the target via the upgrade system Microsoft has. Also note that using later Visual Studio versions requires different redistributables (If you don't get the XP compatibility 'toolset', at least).

And, as always, all versions of Visual Studio (C++) require their redistributables, but Windows 7 and 8 generally shouldn't have an issue with 2010, at least. If nothing else, you can download the redists from Microsoft's website, or even through Windows Update (Depending on the OS). Or if you're lazy, you could always just move the relevant DLLs to your wife's computer. (But you could always just use MinGW/GCC, and assuming nothing is dynamically linked, it'll just run)


Even then, this doesn't sound like a redist issue.


Sensei(Posted 2014) [#5]
OK thanks ImmutableOctet. I didn't think about opengl drivers. I use Mingw as I'm not a fan of VS really so hence my surprise it didn't work. I'll look into her chip set tomorrow and see if it supports opengl.


SLotman(Posted 2014) [#6]
Compiled games on Monkey (I'm compiling them on Win8) works even on XP, you only need to install OpenAL - that is, if you're using MINGW (I have tried that myself!). As said before, for Visual Studio you'll need the redistributable.

If you are copying your whole data folder, and everything needed by your game, then there could be a few issues:

1) OpenAL can bug out if it doesn't detect the sound card correctly, hence exactly this happens, "the window will open and close";
OpenAL in Monkey is initialized as alcDevice=alcOpenDevice( 0 ) - which tries to get the "best" sound card available... and apparently if you don't have the correct driver installed, this won't work. The only option I found is to initialize as alcOpenDevice("Generic Software"). This will be *much* slower, but it should work everywhere. (Change that in mojo/native/mojo.glfw.cpp)

2) If your window will then remain opened, but nothing is displayed - it's a graphics problem. Most likely OpenGL couldn't get a video mode with hardware accelerated pixel format. Try updating your drivers... but if you're on an Intel graphics, don't get your hopes up.


Sensei(Posted 2014) [#7]
Thanks Slotman. The problem is when compiling a game from win 7 and trying to run it on win 8. OpenAl is not the problem. It's likely the wife's laptop cannot handle openGL graphics. however, saying that, previously it ran win 7 and Ubuntu before I upgraded it to win 8 for her. Both those times the tests I did worked fine on it. So it's very likely a win 8 driver issue.
I've not had a chance to test this yet so wondering if anyone can try compile a game using MinGW on win 7 and try to run it on win 8?
Like I said, I tried it with some bananas and copied the entire build folders over, so it's not like I've missed something.