Forums

Full Version: Boost
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I hear that Boost gives a lot of flexibility to using the filesystem in cross-platform C++ applicatoins. Check out the boost docs and tell me what you think.
Is there anything we need this for?
In settings.cpp you can find "system()" calls to "cp" command to copy the settings dir to the user's dir.In windows that doesn't work and I think that it is an "ugly" way to do that. I've got mkdir to work on windows so the only problem is "system()" call to "cp". Perhaps creating a homemade "CopyDirectory" method would be a good idea.
chris, could you change your settings code to do something a bit more fancy than system()? for example, do mkdirs to create the dir structure, then load the default config file and use the configfile's save method to write a new file to the user settings dir. i added a overload of CONFIGFILE::Write that takes a filename to save as (untested). do you have any other non-portable code in your settings class, or is it cleaned up enough to where i can pump out a windows release?
Well, the only file that isn't the configfile format is the controls file. In the meantime, Nenillo has released a Windows build with an installer.We can work around problems like this but Boost's filesystem stuff helps on many other levels, like providing a cross-platform way to express paths.
so the questions are:1) why do we need a cross-platform way to express paths beyond what's already there (what specifically would this fix?)2) is it worth the extra dependency?also, i'll move the controls file over to the configfile format (or at least provide you with a way to output the controls to a different file) so you can get rid of the system() stuff