User forums > General (but related to Code::Blocks)
Where to store the configuration of Code::Blocks
Urxae:
--- Quote from: squizzz on August 13, 2005, 12:46:42 pm ---I think I vote for Thomas' "something like %APPDATA%/codeblocks/codeblocks.ini on Windows and something like ~/.codeblocks under Linux" as default setting, with user's ability to change it to any other dir at Settings->Environment. ;)
--- End quote ---
So you want to make it a setting where to store the settings? Where would you store that setting then?
I suppose if you drop the "any other dir" and just allow %APPDATA%/codeblocks and the installation directory you can look for it in those locations (preferably in that order, so if one user wants different settings from any system-wide ones he can have C::B create one in his %APPDATA% folder).
thomas:
Letting the user place the config files may be disadvantageous (and Urxae is right... where to store that info, in the registry? :) )
%APPDATA% is really the place that is designated for that purpose under Windows, it works like a charm, too.
When I lately got a new PC, I just copied the Thunderbird and Firefox folders from %APPDATA% over the network, and I had all my email and all my settings on the new PC. That is really how software should work :)
I wish Office worked that way, too!
Under Linux, I think that ~/.bash_profile, ~/.fetchmailrc, ~/.gnome, ~/.ssh, or ~/.mozilla are good examples for a scheme that works and that each user is able to understand.
tiwag:
--- Quote from: Urxae on August 13, 2005, 01:37:41 pm ---Where would you store that setting then?...
--- End quote ---
it could be a commandline option which overrules the standard %APPDATA%/codeblocks/codeblocks.ini on Windows when it's given
[update]
more clearly spoken:
if there is no overruling commandline option which tells codeblocks to use a specific codeblocks.ini it should use the standard %APPDATA%/codeblocks/codeblocks.ini
so for testing and temporary configurations one can use a specific config.ini by using that commandline option, while the user-specific config.ini is used normally
thomas:
Now there is a really good idea :)
Urxae:
--- Quote from: tiwag on August 13, 2005, 03:51:52 pm ---if there is no overruling commandline option which tells codeblocks to use a specific codeblocks.ini it should use the standard %APPDATA%/codeblocks/codeblocks.ini
so for testing and temporary configurations one can use a specific config.ini by using that commandline option, while the user-specific config.ini is used normally
--- End quote ---
Yes of course that works, but I was replying to squizzz suggesting it should be an option under Settings->Environment which doesn't. This is indeed probably the best solution, provided you substitute .xml for .ini ;).
Another idea is to do the above, and if no command line option is given and the appdata file isn't found (ie. this is the first time this user starts C::B), look for a settings file in the C::B directory and copy it to the appdata location. That way, if some [company/group] wants to use certain coding standards that deviate from the default C::B options, it can provide its own default options [on disk images/in custom installers/as a separate download]. Doesn't hurt to be optimistic, does it? 8)
Oh, and I think %APPDATA%/codeblocks/codeblocks.[ini/xml] isn't the best filename, it's a bit redundant. %APPDATA%/codeblocks/settings.[ini/xml] is much better, I think. (and ~/.codeblocks/settings.[ini/xml] on Linux, of course)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version