Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autotools vs SCons configure/build system
09-12-2005, 07:45 PM,
#16
Autotools vs SCons configure/build system
If you're compiling on windows, then _WIN32 will be defined. You can see examples in utility.cpp
Reply
09-12-2005, 07:51 PM,
#17
Autotools vs SCons configure/build system
Ah ok, so I can do<pre>#ifdef _WIN32//windoze code#else//POSIX code#endif</pre>Cool.
Reply
09-28-2005, 01:23 AM,
#18
Autotools vs SCons configure/build system
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.
Reply
09-28-2005, 08:50 AM,
#19
Autotools vs SCons configure/build system
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.
Reply
09-28-2005, 09:36 AM,
#20
Autotools vs SCons configure/build system
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.
Reply
09-28-2005, 09:43 AM,
#21
Autotools vs SCons configure/build system
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/.
Reply
09-28-2005, 12:41 PM,
#22
Autotools vs SCons configure/build system
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)
Reply
09-28-2005, 01:42 PM,
#23
Autotools vs SCons configure/build system
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. Smile
Reply
09-28-2005, 09:22 PM,
#24
Autotools vs SCons configure/build system
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.
Reply
09-29-2005, 08:15 AM,
#25
Autotools vs SCons configure/build system
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.
Reply
09-30-2005, 01:33 AM,
#26
Autotools vs SCons configure/build system
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
Reply
10-01-2005, 04:21 AM,
#27
Autotools vs SCons configure/build system
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 &amp; directories under ~/.vdrift/ and creates/copies them from the data directory if not. It works great with no data, or broken data.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)