User forums > General (but related to Code::Blocks)
"Portable" Code::blocks?
stahta01:
--- Quote from: mandrav on February 06, 2007, 12:13:17 pm ---
--- Quote from: dje on February 06, 2007, 11:35:48 am ---Hi !
--- Quote ---I don't think CB uses the windows registry except in the older RC2 version
--- End quote ---
Yes but configuration files are stored in the user profile (maybe all users ?).
Could it be possible to have the choice to store configuration in profile or in C::B install directory ?
Dje
--- End quote ---
That's the default behaviour. Just move default.conf from the user profile dir to the codeblocks dir and it will use that instead the next time you launch it.
<rant>Why does nobody use the forum search???</rant>
--- End quote ---
Yes, that will work after you apply my patch, if my patch is NOT applied please turn off the two plugins that don't work that way. They are mentioned at the end of the thread I linked to above.
Tim S
Pecan:
--- Quote from: mandrav on February 06, 2007, 12:13:17 pm ---<rant>Why does nobody use the forum search???</rant>
--- End quote ---
Because it's an awful implementation of search. It seems to come up with nothing or everything. The user can't use special characters, and words can't be grouped and {insert more complaints}...
I've found that google does a better job with"
"site:codeblocks.org {your search parameters}" or
"site:forums.codeblocks.org {your search parameters}"
mandrav:
--- Quote from: Pecan on February 06, 2007, 02:52:48 pm ---
--- Quote from: mandrav on February 06, 2007, 12:13:17 pm ---<rant>Why does nobody use the forum search???</rant>
--- End quote ---
Because it's an awful implementation of search. It seems to come up with nothing or everything. The user can't use special characters, and words can't be grouped and {insert more complaints}...
--- End quote ---
Can you be more specific? I never had problems searching the forums...
thomas:
--- Quote from: stahta01 on February 06, 2007, 12:23:01 pm ---Yes, that will work after you apply my patch, if my patch is NOT applied please turn off the two plugins that don't work that way. They are mentioned at the end of the thread I linked to above.
--- End quote ---
I looked at that patch a week or two ago (don't remember when exactly) and I'm reluctant to apply it because:
1. I don't understand what that patch is about
2. it changes the semantics of GetConfigFolder()
3. it makes relocation dependent on using a special hardcoded profile name ("portable"), which I don't understand... it works without a special name now, too
ad (1.): Code::Blocks confirmedly works fine from an USB stick. There are two third-party plugins (KeyBinder and DragScroll) which don't work properly, but that is because they do their own configuration saving.
In the particular case of KeyBinder, it may be hard to do differently (as it uses a wxCode class that does its own tampering and may not make custom saving easy at all).
However, for DragScroll, I see no reason why it cannot simply use the standard configuration system, which works fine.
ad (2.): Your patch changes GetConfigFolder() to "location where configuration was loaded from", which is not what it is. GetConfigFolder() is "location where Code::Blocks expects its configuration (under normal circumstances)". That is, it's the place where it looks before searching exotic places such as the executable's folder.
The reasoning behind this is to allow you to put Code::Blocks onto a CDROM (with customised settings, if wanted) and run it, but still be able to save individual settings on the client PC. The local user's settings folder on the hard disk is always the primary "correct" location for settings, as it is alterable.
The idea is comparable to how "Yield" signs and traffic lights work. In "normal operation", you will stop or drive according to the traffic light, and only if that fails, you will (hopefully) stop at the "Yield" sign.
A third-party plugin that does its own independent config handling should first look in the "correct" place, too, and should then fall back to locations like the executable's path, if not successful.
Pecan:
--- Quote from: thomas on February 07, 2007, 12:24:25 pm ---
ad (1.): Code::Blocks confirmedly works fine from an USB stick. There are two third-party plugins (KeyBinder and DragScroll) which don't work properly, but that is because they do their own configuration saving.
In the particular case of KeyBinder, it may be hard to do differently (as it uses a wxCode class that does its own tampering and may not make custom saving easy at all).
However, for DragScroll, I see no reason why it cannot simply use the standard configuration system, which works fine.
--- End quote ---
Those plugins are asking CB where it should store and find its config files.
So what's the call to get that information if not GetconfigFolder() ?
Is there a "GetConfusingCurrentConfigFolder()" call?
@Tim
Maybe you should just patch an entirely new GetCurrentConfigFolder(). Then thomas can use his and the rest of us could get the necessary info needed to make the plugins work correctly.
--- Quote from: thomas on February 07, 2007, 12:24:25 pm ---A third-party plugin that does its own independent config handling should first look in the "correct" place, too, and should then fall back to locations like the executable's path, if not successful.
--- End quote ---
Here is another reason I've suggested that a plugin be as loosely coupled to the sdk as possible. It's getting such that a plugin just gets in trouble depending on it.
It looks like keybinder and dragscroll will have to de-couple from the sdk even more and start searching the directories themselves. Oh well....
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version