Author Topic: cb nightly on flash drive  (Read 8921 times)

Offline MVP

  • Multiple posting newcomer
  • *
  • Posts: 20
cb nightly on flash drive
« 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

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: cb nightly on flash drive
« Reply #1 on: September 27, 2006, 09:35:50 pm »
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.
« Last Edit: September 27, 2006, 09:39:38 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline MVP

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: cb nightly on flash drive
« Reply #2 on: September 27, 2006, 09:39:25 pm »
thank you

how do you tell it otherwise?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: cb nightly on flash drive
« Reply #3 on: September 27, 2006, 09:42:17 pm »
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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline MVP

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: cb nightly on flash drive
« Reply #4 on: September 27, 2006, 10:14:05 pm »
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.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: cb nightly on flash drive
« Reply #5 on: September 28, 2006, 01:06:03 pm »
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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9597
Re: cb nightly on flash drive
« Reply #6 on: September 28, 2006, 03:54:06 pm »
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: cb nightly on flash drive
« Reply #7 on: September 28, 2006, 04:32:05 pm »
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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline MVP

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: cb nightly on flash drive
« Reply #8 on: October 06, 2006, 12:14:37 pm »
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.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: cb nightly on flash drive
« Reply #9 on: October 06, 2006, 12:23:05 pm »
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).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: cb nightly on flash drive
« Reply #10 on: October 06, 2006, 12:27:13 pm »
make sure you use relative paths. else on a diffrent computer it won't work...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline MVP

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: cb nightly on flash drive
« Reply #11 on: March 27, 2007, 02:26:43 am »
I tried this again and it doesnt seem to work:


I guess it doesnt find it, im not sure.

SquareHead

  • Guest
Re: cb nightly on flash drive
« Reply #12 on: March 28, 2007, 01:12:42 pm »
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
« Last Edit: March 28, 2007, 01:22:06 pm by SquareHead »

Offline MVP

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: cb nightly on flash drive
« Reply #13 on: March 29, 2007, 12:59:59 am »
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?

Offline thatgui

  • Single posting newcomer
  • *
  • Posts: 4
Re: cb nightly on flash drive
« Reply #14 on: March 29, 2007, 06:07:08 am »
Is this working for anyone ?? Using $(codeblocks) does the trick for compiling, but not for debugging.

Offline MVP

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: cb nightly on flash drive
« Reply #15 on: March 29, 2007, 10:55:43 am »
I got it to work, just had my slashes going the wrong way, thanks guys. :D

SquareHead

  • Guest
Re: cb nightly on flash drive
« Reply #16 on: March 30, 2007, 10:43:34 am »
Glad to hear it. Anyone have any thoughts on making an entry in the wiki?

Offline code2008

  • Single posting newcomer
  • *
  • Posts: 3
Re: cb nightly on flash drive
« Reply #17 on: April 02, 2007, 12:39:51 pm »
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.