Author Topic: code::blocks : how to make it a portable app (on usb drives)?  (Read 5503 times)

Offline cyber igor

  • Single posting newcomer
  • *
  • Posts: 4
hi
I actually use an external HD to use a certain number of programs, but I dont manage to use c::b like that, e.g it don't find the good path to install new package's dlls
Does so know how to fix it?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #1 on: March 14, 2006, 06:37:12 pm »
Quote
it don't find the good path to install new package's dlls
Does that refer to the DevPak plugin?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline cyber igor

  • Single posting newcomer
  • *
  • Posts: 4
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #2 on: March 14, 2006, 06:40:36 pm »
yes

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #3 on: March 14, 2006, 07:11:43 pm »
That makes it complicated, because the dialog where you can set this somehow got lost in this plugin.

So, for the first time, there is really a valid reason why someone would want to edit the config file by hand... *sigh*.

Search for <devpak_plugin> and edit the text inside the <str> tag.

Regarding installation on a memory stick (or on CDROM), please note as a special bonus that you can put your config file into the same directory as the Code::Blocks executable. If it cannot find a config file in the current user's application data folder, the one on the stick/CDROM will be used!
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline cyber igor

  • Single posting newcomer
  • *
  • Posts: 4
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #4 on: March 14, 2006, 07:28:27 pm »
thansk  :D
but where's that <devpak_plugin> ?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #5 on: March 14, 2006, 07:31:29 pm »
thansk  :D
but where's that <devpak_plugin> ?

In the default.conf file :D.

Best wishes,
Michael

Offline cyber igor

  • Single posting newcomer
  • *
  • Posts: 4
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #6 on: March 14, 2006, 08:53:25 pm »
2nd question  :):
I have a code like that
Code: [Select]
[devpak_plugin]
master_path=K:\Data\logiciels\CodeBlocks
(i assume
Code: [Select]
[main_frame]
maximized=1
[main_frame/layout]
left_block_selection=0
bottom_block_selection=3
, which is just after, is not for devpack plugin)
Is the [str] tag to indicate the windows directory location?
And in this case, do I write
Code: [Select]
[str]
C:\windows...
?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #7 on: March 14, 2006, 09:09:44 pm »
What you have there looks like a registry dump rather than an xml file... are you using RC2?

If so, you should be able to set the path using the config dialog, too (which is easier).

Anyway, master_path=... is what you want to change.


The section in the config file if you use HEAD looks like this:
<devpak_plugin>
   <MASTER_PATH>
      <str>D:\Eigene Dateien</str>
   </MASTER_PATH>
</devpak_plugin>

The italic text is what you need to change.
« Last Edit: March 14, 2006, 09:11:19 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #8 on: March 14, 2006, 09:49:49 pm »
What you have there looks like a registry dump rather than an xml file... are you using RC2?
Yes, cyber igor is using RC2. :P
In any case, that's how a C::B configuration export in RC2 did looked, an ini file.

EDIT:
cyber igor: in any case, if you edit that exported data, it will not work, because C::B can't import exported settings.
You can edit the registry setting directly though, but you are better off using a C::B nightly build.
« Last Edit: March 14, 2006, 10:05:18 pm by Takeshi Miya »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: code::blocks : how to make it a portable app (on usb drives)?
« Reply #9 on: March 14, 2006, 10:36:41 pm »
Yes, cyber igor is using RC2. :P
In any case, that's how a C::B configuration export in RC2 did looked, an ini file.
Thanks for the clarification. I did not know :)

Anyway, if you want to use RC2, the easiest and safest way is to set the install path in the dialog that shows up when you first load the plugin. I don't remember how you call that dialog again later (it's like half a year since I last used that plugin), there is probably  some small button somewhere in its main dialog.
If you want to use the HEAD version (or a nightly build), then change the xml file as described above, the respective config dialog got lost, as mentioned.

The forementioned "just place a config file on a CDROM" feature will obviously only work with a recent build (RC2 uses the registry to store settings, there's no way to make it "independent").
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."