Author Topic: I apply for a new feature  (Read 5835 times)

Offline luoyonggang

  • Multiple posting newcomer
  • *
  • Posts: 14
I apply for a new feature
« on: March 21, 2008, 10:42:52 am »
I need a feature that codeblocks can import configure file in the folder that conation codeblocks.exe . Then we can place codeblocks on usb and running it everywhere. I think it would be good !!!!!!
And we just need to adjust a parameter to determine whether the configure files is place on the computer or the usb drivers.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: I apply for a new feature
« Reply #1 on: March 21, 2008, 11:40:20 am »
Hi !

You should search the forum and the wiki.
C::B is already able to do that.

Dje

Offline luoyonggang

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: I apply for a new feature
« Reply #2 on: March 23, 2008, 10:38:11 am »
I'm so sorry that i can't find that. I get a method but it doesn't work very well.
I created a automate bat file to running the codeblocks. even though it can specify the environment varibale USERPROFILE,
but in Windows Vista and Windows XP the APPDATA is different , so it's can't share the same configure file .
So can you tell me how to solve this problem.
If you have, please give me the answer.
Than you.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: I apply for a new feature
« Reply #3 on: March 23, 2008, 02:57:12 pm »
Code::Blocks will use a config file located in its installation directory if none is present in the current user's profile folder.

So, to put Code::Blocks onto an USB stick, simply move (not copy) the config file there.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: I apply for a new feature
« Reply #4 on: March 23, 2008, 06:17:55 pm »
Code::Blocks will use a config file located in its installation directory if none is present in the current user's profile folder.

So, to put Code::Blocks onto an USB stick, simply move (not copy) the config file there.

Just to clarify this..  does that mean that if i have codeblocks on my usb drive.. it will ignore my preferences if i use it on a computer that already has C::B?  Shouldnt any config file located in the installation override the generic 'global' config thats in the user profile?

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: I apply for a new feature
« Reply #5 on: March 23, 2008, 07:37:37 pm »
This seems to be a frequently returning question.
Maybe someone that knows how to get CB portable could write some lines in the Wiki?
Under Installing Code::Blocks for example...

Offline PsYhLo

  • Almost regular
  • **
  • Posts: 157
Re: I apply for a new feature
« Reply #6 on: March 23, 2008, 07:47:49 pm »
good idea i'm interest in such thinks :)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: I apply for a new feature
« Reply #7 on: March 23, 2008, 10:53:38 pm »
Just to clarify this..  [...]
No, that's not how it works. Read what I wrote above.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline luoyonggang

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: I apply for a new feature
« Reply #8 on: March 25, 2008, 11:45:58 am »
Please specify the relative path to the directory of CodeBlokcs.
If the CodeBlocks is $(CodeBlocks), then where I need to place the codeblocks' config files.
In the current time
I put these files in $(CodeBlocks)/AppData/Roaming/codeblocks when i'm using CodeBlocks under Windows Vista
and I put these files in $(CodeBlokcs/Application Data/codeblokcs when i'm using CodeBlocks under Windows XP

Then I generated a bat file whoes name is $(CodeBlokcs)/codeblocks.cmd
with the content that follow:

Code
echo off
set USERPROFILE=%~dp0Settings
START /D "%~dp0" CodeBlocks.exe %

The the problem was happend I have to use different Config File Under Different Operating System.
So can you help me to solve this problem?
Thanks.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: I apply for a new feature
« Reply #9 on: March 27, 2008, 04:51:38 pm »
If the CodeBlocks is $(CodeBlocks), then where I need to place the codeblocks' config files.
Make sure:
- place the default.conf file into the directory where  codeblocks.exe (or the C::B binary in general) is
- remove any default.conf file from APPDATA or USERPROFILE or wherever you have this now
- remove all bad hacks to modify USERPROFILE and/or APPDATA before C::B
- just run C::B from within the C::B path

A minor note: If C::B does not find default.conf (it's config) within the APPDATA/USERPROFILE path it looks within the C::B directory (the one where the C:B executable is) next. If there is no config file, too it will be created in APPDATA/USERPROFILE. So just make sure you are doing the right thing and C::B is portable just fine.

BTW: This does probably *not* apply for any other config file(s) where not C::B is the stakeholder but e.g. plugins. The main config file just works like that.
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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I apply for a new feature
« Reply #10 on: March 27, 2008, 05:15:45 pm »
You can even use the config-file from the C::B directory on a stick if C::B is installed on the computer.
Rename the "default.conf" on the stick to (for example) "stick.conf" and start C::B from a batch file with the parameter "--personality=stick".
If no "stick.conf" exists in APPDATA/USERPROFILE C::B will use the one from the stick.