User forums > Using Code::Blocks

[HELP] How to use $(codeblocks) in help system

<< < (2/2)

mandrav:

--- Quote from: Ceniza on March 08, 2007, 02:15:45 am ---Could you tell me what $(codeblocks) should return and why it is so important? :)

--- End quote ---

$(codeblocks) returns the C::B installation dir and is mainly used when people put C::B in a portable medium, like a usb key, so that they don't have any absolute paths in the configuration file.

wxLearner:
Hello,
on windows, I also like portability. One reason is, because there is no standard location for include files or libs. If you compile Code::Blocks yourself, you only have to say
--- Code: ---Manager::Get()->GetMacrosManager()->ReplaceMacros(helpfile);
--- End code ---
in help_plugin.cpp and you're done and can locate your help files relatively to Code::Blocks. Of course it would be nicer, if there was official support.

There are some other issues with portability too, for example regrettably you can't port "User templates". The relocation-mode works much better, if the ConfigManager::GetConfigFolder() API semantics change and the currently used config directory is returned, so essential facilities like "User templates" are also portable, but regarding this discussion it looks like that won't be officially supported and you're left on your own. On windows I use a portable version with a folder for the config files next to the Code::Blocks executable, if I don't want portability I remove the folder or move the files into the profile and in relocation mode all facilities including User templates a portable. And all that with a very very small patch (in FindConfigFile in configmanager.cpp), if Code::Blocks doesn't find the config in the profile it doesn't look next to the executable but in a folder next to the executable and while changing to relocation mode in the version I use it also sets ConfigManager::config_folder to the currently used config folder relative to the Code::Blocks executable.

Thank you for all the possibilities   :D

Ceniza:
Done.

shajunxing:
Thank you very much. Now i can pack everything together and let my students use it everywhere. :lol: :lol: :lol:

Navigation

[0] Message Index

[*] Previous page

Go to full version