Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fixing Win32 build with SCons
07-10-2007, 07:43 AM,
#16
 
probably glew references should be put under a ifdef WIN32, or it will no more compile on other platforms...

hwv i can compile your last build, but in XP vm it crashes with a stack trace in deinit(), i don't get any message on opengl... it continues to open window and close immediately on Vista Sad
Reply
07-10-2007, 10:13 AM,
#17
 
I noticed in R1764 you're using glewGetExtension. Don't use the glew extensions functions! I've already got a dedicated cardinfo class set up to manage them. So replace any lines like
Code:
if( glewGetExtension("GL_ARB_multitexture") )
with
Code:
if (game.gfxcard.GetCapability(CARDINFOTYPE::MULTITEXTURE) )
Reply
07-10-2007, 11:56 AM,
#18
 
I was going to ask you about that, Joe. You might have noticed I only put one of those in there. Should GLEW be used to (enhance, replace, supplement) the CARDINFO class?
Reply
07-10-2007, 09:01 PM,
#19
 
Nah, the cardinfo class already checks for extensions using the standard OpenGL API. Nothing would be gained by changing the cardinfo class to use GLEW instead of GL.
Reply
07-11-2007, 04:20 PM,
#20
 
to readd the vdrift icon to the exe add to tools/win a resource.rc containing

Code:
#include <windows>
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
100     ICON    VDrift.ico

then modify src/sconscript like

Code:
if sys.platform == 'win32':
    vdrift = local_env.Program(target='vdrift', source=[src, vamosobjs, guiobjs, env.RES('../tools/win/resource.rc')])
else:
    vdrift = local_env.Program(target='vdrift', source=[src, vamosobjs, guiobjs])

notice that this way the resource.rc is compiled into tools/win/resource.o, while it should compile to build folder
Reply
07-12-2007, 05:38 AM,
#21
 
i have moved the build (with the new data folder) to Vista with a 7900GS and it works!

It's not very stable, i have often crashes (and in virtual machine without a 3D card it crashes instead of tell me that my card is not supported) and suffer of graphic glitches... Also changing the resolution makes all menu texture disappear
Reply
07-13-2007, 02:36 PM,
#22
 
mak77, maybe we should make this stuff in resource.rc part of the header that's generated by SCons (definitions.h). It would not be too difficult to add, we just need a switch for windows that puts that stuff at the beginning of the file. How does that sound? Do we have to use env.RES()? I've never seen that before, what exactly does it do?
Reply
07-14-2007, 05:18 AM,
#23
 
.rc files MUST be compiled by windres (see in dev-cpp bin folder or mingw32 i think), it takes a .rc and resources (.ico in our case) and compiles them together in a .res file (it's however a .o in mingw)

env.RES does recognize that as a resource file and uses windres to compile it, the result is a (.res).o file that can be linked with others, containing the icon... i don't think that you can add those headers to a common .h...
Reply
07-16-2007, 01:46 AM,
#24
 
Alright, I see, I will commit these changes shortly...

What other issues remain with the Win32 build? It seems to be working for you on Vista, I haven't yet tested it on any other machines besides my VM. Has anyone else tried this? Perhaps I should prepare a pared down test package so people don't have to check out SVN, install all the dependencies, and build it themselves. Anyone interested?
Reply
07-16-2007, 06:22 AM,
#25
 
don't remember if this has already been fixed but stdout.txt and stderr.txt should not be written to game dir, but they should be written to user dir, in Vista the program cannot write to its folder

i don't know what other problems are related to windows, what are related to incomplete data, what to normale development... i get frequent crashes but different results selecting different tracks or cars

however i compile on XP, on Vista i have only tested the game

latest build does not compile because it lacks SDL into libs

else:
libs_link = [ 'opengl32', 'glu32', 'glew32', 'mingw32', 'SDLmain', 'SDL', common_libs ]

I could also suggest to compress (don't know if scons can call external tools) the executable using UPX, the final exe is now 31MB while compressed it's about 4.5MB

also "Status: Using GLEW 1.4.0" is probably lacking a \n
Reply
07-16-2007, 10:13 AM,
#26
 
If you compile without debugging (used to be release=1, does that still work?) the executable is on the order of a meg or two.
Reply
07-16-2007, 11:41 AM,
#27
 
joevenzon Wrote:If you compile without debugging (used to be release=1, does that still work?) the executable is on the order of a meg or two.

yes, you're right, sorry!
Reply
07-16-2007, 12:50 PM,
#28
 
Well I didn't check the changes in yet, I created the resource.rc file but wanted to retool a little of the stuff in src/SConscript before I check it in. It'll be done soon...

Also I noticed bugsyv used env['PLATFORM'] to detect which platform compilation is being done on, but I've been using sys.platform. I guess we should be using the same thing everywhere instead of different things...I think I'll change the sys.platform ones to env['PLATFORM'], that seems like a more SCons-y way to do it.
Reply
07-17-2007, 07:10 AM,
#29
 
Is GLEW going to be a required library in Linux as well? My copy of svn trunk does not compile now in Linux without GLEW.
Reply
07-17-2007, 11:33 PM,
#30
 
For now GLEW is used in all the builds. I'm not sure if it will be that useful in the long run, as it generally duplicates functionality in the CARDINFO class.
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)