Hello,
If anyone is using Eclipse + subclipse or a similar IDE to develop glest, you're probably aware that it likes to put a local .svn directory in all subdirectory that are mirrored on the SVN repo.
This conflicts with how glest loads its media; in the /maps, /tilesets etc. directories, it assumes every directory except "." and ".." contain stuff, and barfs if they don't ("throw runtime_error(...)").
There are two ways to resolve this: don't get game media from the SVN server, tell the IDE not to write these directories, or as I suggest, libglest should ignore "/.*" directories anyway.
Hence, my rather trivial change:
for win32:
Ln 183: shared_lib\sources\platform\win32\platform_util.cpp:
if(!(strcmp(".", fi.name)==0 || strcmp("..", fi.name)==0)){
to
if(!(('.'==fi.name[0]) || strcmp("..", fi.name)==0 )){
I tested this and it seems to work.
for sdl:
Ln 147: shared_lib\sources\platform\sdl\platform_util.cpp:
something like:
results.push_back(begin);
to
if(begin[0]!='.') {results.push_back(begin);}
might work, though I haven't tested that.
Apologies in advance for not putting this in the right forum directory and clogging the forums with something not terribly important. I found this useful, so I thought someone else might.
-Mike