Topic: Compilation problem on windows (original topic title : hideCursor)

IDK if it's a bug or my own error , so i Downloaded the sponza fps Demo and as the mouse was bugging me i simply added a hideCursor() to hide the mouse well its all good in the game (Working as i want it to ), but when i exit the game in the editor the editor has no mouse too (its hidden ) i think its a bug but not sure

And i was trying find the "Hide Cursor" code myself in the svn/source code i directed myself to MScript.cpp and in it has hideCursor() but it Directs to the MSystemContext.h which is a virtual class and i hit a dead end where is the "real code" of the function of hidden cursor  ?
Thank you for reading and hoping for a response soon big_smile

Re: Compilation problem on windows (original topic title : hideCursor)

Hi,
yes someone else told me about this bug,
I didn't find it yet, because the function MWindow::getInstance()->showCursor();
is normally called when the game is exited (in MaratisUi.cpp) so I don't understand why it stays hidden.

Re: Compilation problem on windows (original topic title : hideCursor)

what platform are you using ? windows ?
do you exit the game with "esc" or using the "exit()" script function ?

Re: Compilation problem on windows (original topic title : hideCursor)

hum, I maybe found something, on windows the function "int WINAPI ShowCursor(_In_  BOOL bShow);"
doesn't work as expected. Apparently it stores a counter that count each time the function is called,
if the function ShowCursor(0) is called 10 times, to unhide it ShowCursor(1) needs to be called 10 times (not very usable),

I'll see what we can do to bypass it...

Re: Compilation problem on windows (original topic title : hideCursor)

I think I fixed it, the code correction is on svn. I'm not on windows right now, is it possible for you to test it ?

Re: Compilation problem on windows (original topic title : hideCursor)

yeah i am in windows , used the esc and i have to build it first i think so i have to check how to build maratis from code  ill search for it and tell you if it works on windows big_smile

Re: Compilation problem on windows (original topic title : hideCursor)

how the hell do you compile maratis i used scons as well as the vs 2010 in trunk dev failed both the time

Re: Compilation problem on windows (original topic title : hideCursor)

http://www.pasteall.org/pic/show.php?id=40239 Here check the error when i open the scons.py in Dev please help

Re: Compilation problem on windows (original topic title : hideCursor)

I think your environment variables are not set :
http://msdn.microsoft.com/en-us/library … 90%29.aspx

Re: Compilation problem on windows (original topic title : hideCursor)

Sorry to be irritating but can someone pls give me an step guide it will help me and many others
i did from command prompt  VCVARS32.bat thing that you send me the link but i dont understand what to do with cl.exe and Link what should i set ? please any help will be appreciated

Re: Compilation problem on windows (original topic title : hideCursor)

I think you just need to run the VCVARS32.bat
probably located in something like : C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat

normally it will set your environment variables and the "cl" command will be recognized (what seems to be the problem when you run scons) and you can try running scons again by typing "python scons.py" from a command line in trunk/dev/.

Re: Compilation problem on windows (original topic title : hideCursor)

i did run VCVARS32.bat should i run vcvarsall.bat too

Re: Compilation problem on windows (original topic title : hideCursor)

I don't know about vcvarsall, the microsoft doc only speak about vcvars32.bat.

After running the bat, do you still have the error : "'cl' is not recognisez as an internal or external command"
when calling "python scons.py" ?

Re: Compilation problem on windows (original topic title : hideCursor)

yep i still have the error after running vcvars32.bat
if there is some another way setting enviroment variables then please tell me i was googling for it but no success

Last edited by Crucio777 (2012-11-12 09:46:12)

Re: Compilation problem on windows (original topic title : hideCursor)

I didn't find more info about it, I'm not using windows a lot,

is there someone in the forum able to compile on windows ?

Re: Compilation problem on windows (original topic title : hideCursor)

it seems pretty stupid it says to me that enviroment variables has been set and i get the error again when i compile in scons

Re: Compilation problem on windows (original topic title : hideCursor)

Btw i am using visual studio 2010 if its not a problem

Re: Compilation problem on windows (original topic title : hideCursor)

is your visual studio installed in a special location or the default ?
also check that cl.exe is defined in the "PATH" environment variable

Re: Compilation problem on windows (original topic title : hideCursor)

reinstalled it to the default now i have defined it same error can i use some other compiler ?
btw i have wriiten this direcotory in the path var "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe\"

Last edited by Crucio777 (2012-11-12 16:41:06)

Re: Compilation problem on windows (original topic title : hideCursor)

is there some another compiler i can use guys?

Re: Compilation problem on windows (original topic title : hideCursor)

There is the visual 2010 visual studio file (Maratis.sln) but it might not be up to date,
it probably miss some new files to add to the solution, in particular MEngine (the file MLog.h and MLog.cpp for example).

Or, with another compiler on windows, a contributor named skaiware added a CodeBlocks project (free open source IDE/compiler),
I think it needs the CodeBlocks/Mingw (gcc compiler) install : http://www.codeblocks.org/downloads/26

Re: Compilation problem on windows (original topic title : hideCursor)

So i dont have to use scons ? i just have to do the codeblocks stuff and btw when i wrtie cl in my cmd it detects it but when i run the scons.py it justs puts the error of unrecognized cl it might be a maratis error i have no clue how to edit Scons file so if you could take a look into it later

Re: Compilation problem on windows (original topic title : hideCursor)

I have codeblocks but i dont know how you build it

Re: Compilation problem on windows (original topic title : hideCursor)

scons is normally the best way to compile it, but there is maybe an issue with visual 2010 or something missing in windows.
after the alternative is to use a project file, visual studio or codeblocks.

the projects files are in trunk/dev/Projects/
a contributor added the codeblocks projects so I'm not sure how it works

Re: Compilation problem on windows (original topic title : hideCursor)

if you could later please check the Scons script i will try it in some other windows as well to see if the error is windows or scons
thank you for your help and hope anybody finds the error soon its driving me crazy