Autotools vs SCons configure/build system - joevenzon - 09-12-2005
If you're compiling on windows, then _WIN32 will be defined. You can see examples in utility.cpp
Autotools vs SCons configure/build system - thelusiv - 09-12-2005
Ah ok, so I can do<pre>#ifdef _WIN32//windoze code#else//POSIX code#endif</pre>Cool.
Autotools vs SCons configure/build system - thelusiv - 09-28-2005
As of revision 322, SCons builds VDrift completely, the install target puts it where it needs to go, and the settings, logs and replays are stored in the home directory. The vdrift binary now runs from /usr/games/ quite well reading its static data from /usr/share/games/vdrift/ and its settings from ~/.vdrift/. It figures out the home directory at runtime from environment variables (using getenv()).A few remaining things to do for the SCons branch:* Include scons-local package in the source package SCons creates so people don't have to have scons installed to compile from source release* Set VDrift up to check for the settings directory ~/.vdrift/, and if it doesn't exist, to create it and copy the default contents there.
Autotools vs SCons configure/build system - thelusiv - 09-28-2005
Well I just included the scons tarball in tools/ in the source distribution. I guess that is actually better than untarring it in the root of the source package, because some people won't need it. We'll need something in the README saying to untar it in the root vdrift source dir if you don't have scons. Something like<pre>tar zxvf tools/scons-local-0.96.1.tar.gz</pre>should do the trick. Then instead of running "scons" they run<pre>./scons.py [scons options...]</pre>where [scons options...] is the usual options for build/installation.The SCons branch is as ready as its going to be for the main branch. I'd like to merge it in, but I want Joe to check it out before I do that, so he can make sure he likes SCons and the new slightly restructured directories.
Autotools vs SCons configure/build system - joevenzon - 09-28-2005
is it possible for scons to do this:Set VDrift up to check for the settings directory ~/.vdrift/, and if it doesn't exist, to create it and copy the default contents there.
Autotools vs SCons configure/build system - thelusiv - 09-28-2005
The only thing about that, is that if you install it system wide, and run it as a user other than the one who did the installation, then other users won't have a .vdrift directory in their /home/.
Autotools vs SCons configure/build system - FFuser - 09-28-2005
isn't it more logic that vdrift checks if ~/.vrift exists. otherwise if it got (accidently) deleted vdrift won't run anymore.It also needs to check if all needed files exists and if one is missing, load it from the defaults (which are in data/vdrift I assume)
Autotools vs SCons configure/build system - thelusiv - 09-28-2005
This is why I put code in to find the user's home dir at runtime - this can't be hard-coded or it simply won't work.
Autotools vs SCons configure/build system - joevenzon - 09-28-2005
Hmm, good points. I just hate having to write in filesystem code, since it's totally unportable (will have to do it differently for each platform), but I guess it's the only way.
Autotools vs SCons configure/build system - thelusiv - 09-29-2005
Yeah, it's a pain, but probably not a ton of code. I'll see if I can get the basic Linux code for this done before I merge this into the main branch.
Autotools vs SCons configure/build system - joevenzon - 09-30-2005
you should add a class that takes care of this sort of thingjust follow the example of all of the other classes in terms of code structure and stylethat way main.cpp doesn't get any messier -- it's already in need of some cleaning up
Autotools vs SCons configure/build system - thelusiv - 10-01-2005
OK, update to the latest revision of the scons-test branch. You will get the files I just finished writing, settings.h and settings.cpp. These contain classes similar to the others in the project but these check for all the necessary files & directories under ~/.vdrift/ and creates/copies them from the data directory if not. It works great with no data, or broken data.
|