User forums > Help

Portability

<< < (3/5) > >>

thomas:

--- Quote from: killerbot on May 03, 2006, 11:17:18 am ---4) reread Thomas's reply, with these newer version you can specify which configuration file to use (--profile=anyname).
Come to think of it, should check ; anyname is profile name or just the conf file name (@Thomas : do you know this by heart ?)
--- End quote ---
As it happens, I do :)
But he does not need to use the --profile switch, he can just copy the default config file to the app's directory too.
That is, if he ever cares to read the above posts...

killerbot:

--- Quote from: thomas on May 03, 2006, 10:32:57 am ---Code::Blocks will always use a configuration file that it finds in your user profile directory. However, it will also accept a configuration file that is inside the executable folder, if none is found elsewhere.

--- End quote ---

Well, this gives the impression it first looks in the profile dir, and if nothing there, only then next to the exe. That meanss if you connect your stick into a CB-equipped PC, it will take the PC-config and not the stick one. Or am I seeing ghosts ?

thomas:
Yes, that is exactly what is done. It makes sense, too, think about it.

If there is a config file in the user's profile folder, then obviously, the user will want to use this one.  It is a valid assumption that if you have settings saved in your user profile, then you really want to use these. Nothing else makes sense.

However, if no config file can be found in the user's profile, then Code::Blocks does not know about the user's wishes to start with. This may change after RC3, when we include the divination plugin, but to date, we are utterly clueless about our user's thoughts.

However, if you put the application onto a CDROM or a Flash-Stick, and you pack a config file into the same directory as the application, then it is a reasonable guess that you actually want Code::Blocks to use that configuration rather than factory settings.
Again, we cannot possibly know what is going on inside someone's head, but this is what people would probably want.

Finally, in the case that no configuration can be found in any place (including the executable's directory), Code::Blocks creates the well-known default.conf in the user's profile folder. Obviously, the vast majority of users wants settings to be persistent, and people would be upset if they had to turn off "Tip of the day" every time the application starts ;)

Hint:
I forgot to mention that earlier, sorry: If you really want to be roaming, roaming, roaming, roooooaming, then put your config file onto a webserver and start Code::Blocks with the option
--profile=http://url.to/your.conf. That way, Code::Blocks gets its configuration off the internet, and it starts exactly the same way every time, on every PC.

Guest:
I'm using the latest nightly on WinXP-SP2. I renamed the codeblocks-folder in my profile and put the conf-file into the app-directory, but it didn't use this file. Instead a new config has been created in my profile. I've also tried using the --profile option with relative and absolute paths without having any success.

thomas:
Yes my bad, fixed that.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version