Author Topic: Portability  (Read 13871 times)

Guest

  • Guest
Re: Portability
« Reply #15 on: May 03, 2006, 08:11:39 pm »
Thank you! Code::Blocks really rocks  :D

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Portability
« Reply #16 on: May 07, 2006, 09:03:04 pm »
Yes, that is exactly what is done. It makes sense, too, think about it.

If there is a config file in the user's profile folder, then obviously, the user will want to use this one.  It is a valid assumption that if you have settings saved in your user profile, then you really want to use these. Nothing else makes sense.

I don't think that is true at all.  What if you have one computer that already has CB on it, but you would like to use a specific self contained version, with a  configuration file in the exectuables directory.  Right now, the slef contained version of CB will use the current user config file, not the one in its current directory.  I think that if there is a config file in the directory with CB that should be used first, then the user configuration file.  After all, CB will never put a configuration file there on its own, so if there is a config file there, the user wants it used.

Of course there could be an environment variable that could tell CB to favor the application directory over the user directory, but that feels kind of hacky.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Portability
« Reply #17 on: May 07, 2006, 10:34:02 pm »
Well, you can do whatever you want, it does not matter, there will always be some people who are unhappy with it. We cannot fulfill every demand.

The sole reason why Code::Blocks will actually be so nice as to read a configuration file located in the executable folder at all is because someone wanted to distribute a pre-configured system on a CDROM and asked for a way to somehow do that. Personally, I don't see why you would want to do that at all (except if you wanted kind of a "rescue disk"), but alas... it was asked for, and there it is.

However, generally, Code::Blocks stores its configuration in the "correct" place (the user's profile dir), and it certainly uses the configuration from that place.
The normal mode of operation for an IDE (as for many programs) is being installed on a machine, not being run from a removable medium. While we do support the latter case (more than most other software, if I may dare say this), it is not the default behaviour.
Also, using the executable's directory as a fallback is a free operation in the normal case, while using it as a primary location adds constant overhead.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Portability
« Reply #18 on: May 10, 2006, 12:32:52 am »
You are correct that you can't make everyone happy, but I will stand by my statement that if a config file is found in executable directory it makes sense to use that one over the home directory config file.  That is all mute though because I just realized a simple shortcut that supplies the "--profile" switch will solve all the issues.  You just have to include that shortcut with your self contained copy of CB, and problem solved.

guigz

  • Guest
Re: Portability
« Reply #19 on: May 11, 2006, 08:47:01 am »
"The normal mode of operation for an IDE (as for many programs) is being installed on a machine, not being run from a removable medium"
I disagree.
Supposing I'm using CodeBlocks at work,it's kinda cool to be able to carry all my workspace/feature/IDE with me to bring it home without taking with me the whole PC,and without having to install it on each pc I'll be working on.Moreover,I just changed my pc and deployment of my portable apps was a lot easier than the nonportable ones since I didn't have to install them.Just copy them.Finally,supposing you have a kinda roaming work(well,you don't know which pc you'll be on),having it on a usb key is cool since you just have to plug your usb key on your client's pc and you're at home,even in guest session...One of my friend is using eclipse(for java developpement) and he's very happy with the fact that it's portable since he can put it on his usb key and use it on any pc at work,even the ones not connected to the domain network and this without installing anything nor creating sessions.It's cool for me too since he just gave me a copy of it to parse a java program.I do not have to install the whole thing and guess how it work or is configured to be able to read the java project with syntax highlighting and test and debug it to see how it works...That's definitely a good point since I'm not using java and definitely do not want to install the whole thing on my pc....

guigz

  • Guest
Re: Portability
« Reply #20 on: May 11, 2006, 09:00:36 am »
And sorry if the tone of my answers is a bit "in da face".

CodeBlocks rocks...really...It's light and is nearly(for the portability) exactly what I needed.Great work..

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Portability
« Reply #21 on: May 11, 2006, 09:25:16 am »
Well, you can do that by using a profile name other than default, as Game Ender wrote above. :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mmebane

  • Multiple posting newcomer
  • *
  • Posts: 33
Re: Portability
« Reply #22 on: July 01, 2006, 06:34:32 pm »
Just create an empty file named default.conf on your USB stick and you 're ready to go.

I just tried that with the June 30 nightly, but it didn't work. I deleted the codeblocks folder in my Application Data folder, created an empty file named default.conf in the same folder as codeblocks.exe on my USB drive. However, CodeBlocks doesn't start up. It creates an empty file named codeblocks.RPT then closes.

Should doing this still work? If so, I'll file a bug.