Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

New PlugIn: Environment Variables Editor

(1/2) > >>

MortenMacFly:
Dear community,

it's ready: A plugin for Code::Blocks that allows setting environment variables in the focus of Code::Blocks. Find it attached.

--> What is does
Imagine you require to setup specific environment variables for your compiler / application to work. Think of "LIBS", "INCLUDES", "LD_LIBRARY_PATH" or "LICENSE_FILE" you would like to setup specifically. If you don't want to setup these system wide for any reason you can now use this plugin to apply them only within the focus of Code::Blocks. Thus all applications you call / run from C::B have access to the environment variables setup but ones you close C::B all setings are back to "normal". The variables are applied on-the-fly and saved through the C::B configuration file from one to another Code::Blocks session.

--> How to compile/install
If this plugin is placed under [CodeBlocks_SVN]\plugins\contrib\envvars in the source-code distribution of Code::Blocks it should compile fine (relative path's are set).

--> Help wanted
I don't have access to a linux box. Allthough this plugin should work fine under linux (there is no platform specific code) it requires testing.

Comments and hints are appreciated.

With regards, Morten.

Edit: Updated to version 0.91 (fixing the bug reported by Ceniza).

[attachment deleted by admin]

Ceniza:
I created a new envvar named INCLUDE_DIR with value C:\MinGW\include, clicked Set now, closed the window and then checked with Process Explorer and found INCLUDE_DIR was added but without a value.

I tried again and the envvar was listed with its value. I clicked Set now again, closed the window and now the value was set.

Created another envvar named LIB_DIR with value C:\MinGW\lib, clicked Set now and closed the window. Now Process Explorer shows INCLUDE_DIR and LIB_DIR empty. I tried again clicking on INCLUDE_DIR first and then on Set now, but now both INCLUDE_DIR and LIB_DIR have C:\MinGW\include as value. I tried again clicking on LIB_DIR and then Set now, but now both have C:\MinGW\lib as value.

Bugs? :)

MortenMacFly:

--- Quote from: Ceniza on May 08, 2006, 10:13:50 pm ---Bugs? :)

--- End quote ---
Well... The "Set now" button is actually not really required. The environment variables are applied on-the-fly when another variable is added or an existing one is changed.
Anyway: I found this bug and fixed it... I'll update the plugin in a minute...
Thanks for that!
With regards, Morten.

Edit: Updated. Could you (Ceniza) please give it a try again?  Thanks in advance!

mandrav:
Thanks for this plugin Morten. It has been added in the contrib plugins.
I expect a post or PM with your BerliOS account to add you as this plugins maintainer (i.e. commit access).

Ceniza:
I just tried the new one and it seems to be working fine :)

It's nice Don Corleone added it to SVN now. It took what? 1 hour? :D

Navigation

[0] Message Index

[#] Next page

Go to full version