Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: MVP on September 27, 2006, 09:30:15 pm
-
is there a way to change the path of cb's settings?
ie C:\Documents and Settings\mvp\Application Data\codeblocks
-
Move your .conf file from the default location to the same directory as codeblocks.exe. C::B looks for a .conf file (default.conf unless you tell it otherwise) in various places before creating a new one in the default place.
EDIT:
This will help you in running C::B from removable media such as flash drives. If you actually do want to change the paths being searched for the .conf file, you'll need to tinker around with the C::B source code.
-
thank you
how do you tell it otherwise?
-
In the command line, you use the /p or --personality switch: for example, "codeblocks.exe /p myname". This will tell C::B to look for the file myname.conf.
-
Do you know how to use relative file linking for includes, etc? I want to put my wxWidgets folder and MinGW inside of the Code Blocks folder.
-
Move your .conf file from the default location to the same directory as codeblocks.exe. C::B looks for a .conf file (default.conf unless you tell it otherwise) in various places before creating a new one in the default place.
That is only 95% correct. Code::Blocks will use a configuration file from the same path where the executable is located if none can be found in the normal location, not by default.
This is to allow you to put Code::Blocks onto a CD-ROM or similar medium with a custom configuration, and yet users can have personalised settings on their indidvidual PCs (falling back to whatever the distribution packager deems a good default).
If you want to use the config file on a flash drive regardless of any other settings on the computer, then use a different profile (anything that's different from "default"). This profile will obviously not be found on the PC and the one on the flash drive will be used (and saved to).
In case you already have some settings saved as "default" profile, feel free to simply rename the file, Code::Blocks won't get angry about it.
-
If you want to use the config file on a flash drive regardless of any other settings on the computer, then use a different profile (anything that's different from "default").
I was just about to ask to provide C::B with a command line parameter to set the config file but this is *much* better. That idea didn't cross my mind.
Morten.
-
That is only 95% correct. Code::Blocks will use a configuration file from the same path where the executable is located if none can be found in the normal location, not by default.
... That's what I said. To rephrase it once more: if you move the .conf file from the default location to the same directory as codeblocks.exe on the removable media, C::B will look for the .conf in the default location and not find it, then find it on the removable media. If C::B can't find the .conf file, it will be created in the default location.
-
Do you know how to use relative file linking for includes, etc? I want to put my wxWidgets folder and MinGW inside of the Code Blocks folder.
Im just bringing this back up in case it was missed, instead of using C:/Mingw, I want to have Mingw in the code blocks folder and no matter where i put that folder, code blocks should still be able to find mingw.
-
That doesn't matter much, you can put it where you want.
You will only have to set the compiler path correctly after that (which will be saved with the settings).
-
make sure you use relative paths. else on a diffrent computer it won't work...
-
I tried this again and it doesnt seem to work:
(http://armorycore.com/keep/codeblocksflash.png)
I guess it doesnt find it, im not sure.
-
Edit: Heres a link to a thread that helped me get Code::Blocks set up on my usb drive.
Dang I guess I better post the link.
http://forums.codeblocks.org/index.php/topic,4475.0.html (http://forums.codeblocks.org/index.php/topic,4475.0.html)
-
Thanks, I tried some stuff from there but still having problems, could you send me your directory 7z'd or explain step by step how to do it?
-
Is this working for anyone ?? Using $(codeblocks) does the trick for compiling, but not for debugging.
-
I got it to work, just had my slashes going the wrong way, thanks guys. :D
-
Glad to hear it. Anyone have any thoughts on making an entry in the wiki?
-
I just posted:
http://forums.codeblocks.org/index.php/topic,4475.msg43203.html#msg43203
Re: Can I make C::B portable? .. making codeblocks "portable"
Related to getting nightly build setup to be "portable".
Followups there would be appreciated.
Thanks.