Author Topic: Why is codeblocks config outside codeblocks folder!  (Read 6490 times)

Offline ham

  • Multiple posting newcomer
  • *
  • Posts: 23
Why is codeblocks config outside codeblocks folder!
« on: August 25, 2011, 01:15:50 am »

i have a folder in my profile (WinXP) that is related to Codeblocks,

how do i CodeBlocks have the files to find inside CodeBlocks Program folder.

thx

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Why is codeblocks config outside codeblocks folder!
« Reply #1 on: August 25, 2011, 01:51:25 am »
What?!!!
Hardly can I compute something....
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Why is codeblocks config outside codeblocks folder!
« Reply #2 on: August 25, 2011, 08:32:42 am »
how do i CodeBlocks have the files to find inside CodeBlocks Program folder.
Search for "portable" in the forums and in the WiKi. I recall a long article in the WiKi on that topic.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Why is codeblocks config outside codeblocks folder!
« Reply #3 on: August 25, 2011, 10:03:23 am »
You can try this: http://framakey.org/Portables/Index
But this site is in french (it is a french site dedicated to make some useful open source software portable ( we could use the term "movable" instead I think), in the way you can copy them on an external media and use it on any Windows system without impacting on it.) so you have to guess how it (the site) work, or use something to translate the site...

Well, I have to admit, the version is everything but recent (8.02), but it shouldn't be hard to use it to use a more recent nightly build or the last stable.
Another potentially problem is that it is in the section called: "en test". It mean that it's not sure it will work perfectly.
They have some other tools to help making "portable" an application, too. But I don't know it all this stuff is maintained. The system they use is to make an overlay to record the software's entries in regedit or hard disk, and then, remove them (maybe they move those parameters after, I didn't really search infos).

I know (and understand why) that it is forbidden to speak in any other language than english, so if this link break rules, just tell me, I'll remove this post.

Offline codeur

  • Multiple posting newcomer
  • *
  • Posts: 113
    • Code::Blocks EDU-Portable
Re: Why is codeblocks config outside codeblocks folder!
« Reply #4 on: August 26, 2011, 12:40:45 am »

how do i CodeBlocks have the files to find inside CodeBlocks Program folder.

thx

The portable Code::Blocks launcher will do that for you. It is a simple executable that launches CB and makes it fully portable under Windows. That includes writing the .ini files and default.conf, etc.. inside an AppData subdirectory of CB.

You can download the binary from http://cblauncher.codecutter.org/CbLauncher_1.0.1.zip
If you want to build it yourself, the source is part of trunk: svn checkout http://svn.berlios.de/svnroot/repos/codeblocks/trunk/src/tools/CBLauncher
or from http://cblauncher.codecutter.org/CbLauncher_1.0.1_src.zip

To install and use, consult README.txt in "doc" subdir.
« Last Edit: August 26, 2011, 12:54:12 am by codeur »

Offline ham

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Why is codeblocks config outside codeblocks folder!
« Reply #5 on: August 26, 2011, 01:50:56 am »
hi, thx,

no data is written to my profiles anymore, so my settings are portable now.

but i wished this were the default behavior of cb, and controllable within cb.

new question: Can there be a relative path for the compiler?

Quote
quoteWhat?!!!!

sorry for my bad english, its not my native language

EDIT: i could add a entry to the system PATH variable with *.bat skript, would cb understand this?
« Last Edit: August 26, 2011, 01:57:36 am by ham »

Offline codeur

  • Multiple posting newcomer
  • *
  • Posts: 113
    • Code::Blocks EDU-Portable
Re: Why is codeblocks config outside codeblocks folder!
« Reply #6 on: August 26, 2011, 02:39:26 am »
You can set the toolchain path relative to the Codeblocks installation directory in [Settings]->[Compiler and Debugger], "Toolchain executables" tab:

For example if you use MinGW as your compiler in subdirectory MinGW of your installation, set the toolchain path to
$(CODEBLOCKS)\MinGW

The portable setup (assuming only one user) cannot be the default CB setup because Code::Blocks is used on multi-user operating systems.
In many real-world situations several users may use the same workstation at different times and each will want to have a different setup and are working on different projects.
« Last Edit: August 26, 2011, 02:47:45 am by codeur »

Offline ham

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Why is codeblocks config outside codeblocks folder!
« Reply #7 on: August 26, 2011, 06:11:10 pm »
hi,

thx the compiler path is now also portable

Imho different setups can be saved in program folder too and dont need spamming my system.

h.a.n.d.

Offline codeur

  • Multiple posting newcomer
  • *
  • Posts: 113
    • Code::Blocks EDU-Portable
Re: Why is codeblocks config outside codeblocks folder!
« Reply #8 on: August 27, 2011, 06:38:16 am »
Writing the user settings in a subdirectory of the user directory is a standard and recommended way of setting up any application on any multi-user operating system, unless you write everything to registry. It is not "spamming the system".

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Why is codeblocks config outside codeblocks folder!
« Reply #9 on: August 27, 2011, 02:35:20 pm »
hi,

thx the compiler path is now also portable

Imho different setups can be saved in program folder too and dont need spamming my system.

h.a.n.d.


When I discovered this way of configuration (coming to xp from w98), I was thinking it is stupid, too. Now, I had to save and reinit OS's and softwares configuration many times (repairing friend's machines, by example) , and I understand the logic behind this. No more need to go in each program's binary directory to try to find (a part of) the config, in hope there is nothing elsewhere (regedit...), and searching which file is the configuration one (there are ini, inf, dat, or no extension, sometimes, and they are not necessarily configuration ones...).

The separation allow to use different partitions for each things too (the standard with linux).
The use of this, is that if a problem appear on a partition (XP not always make things you ask him to, and had often make some self-destruction on my side, or you can have a power problem, damaging the partition where a file was, the whole system if it is not partitioned correctly) you can always save the system, or a part of it, because softwares can rebuild their configuration (but you have to redo the configuration, but save the time needed to install them), or if you have configuration you can reinstall softwares. In all cases, you have a big time gain.
Making backup of configuration is easier, too. Just save a directory's files instead of the whole disk.
There is also the performance issue: different partitions means you can use different file systems, because configuration files are often small, but not software. You can also choose which data could be at beginning of hard disk, to make access faster.
With windows, it allow to reduce fragmentation, too.
Another point is that the user may not have rights to write in program files, but can be allowed to execute binaries there. But he always have rights on his own home.

But, as far as I know, ms windows don't make smart partitioning of the system by default, so many of those advantages don't appear on a default configuration (but it is possible to send "program files" , "docs&settings", "pagefile.sys" and "windows" directory on their own partition manually)