User forums > Using Code::Blocks
Can I set/create environment variables from Wizard Script ?
kccheng:
Hi,
Can I set/create environment variables from Wizard Script ?
I'm working on a DLL wizard script. And I want to set/create some environment
variable for my Host Application so it can find the DLL.
Is it possible ?
I check SetVar() function, which is not what I expected.
Thanks a lot.
Regards,
KC
oBFusCATed:
You want to set variables in Environment variables plugin (envvar) оr you want to use something like putenv() C lib function?
kccheng:
--- Quote from: oBFusCATed on June 02, 2011, 10:02:56 am ---You want to set variables in Environment variables plugin (envvar) оr you want to use something like putenv() C lib function?
--- End quote ---
Either way which can be used in Wizard script.
I want to add (export) some environment variables from my DLL Wizard
which will be available when user click "Build->Run" or "Debug->Start" to
launch my host application.
My application will search a special path for DLL. The default path could be
changed by environment variable MYAPP_DLL_DIR.
What I want is set MYAPP_DLL_DIR (at the time user create the project
via my Wizard) to the target output dir so the host app
can find the DLL created in C::B by default.
Is that possible ?
Regards,
KC
oBFusCATed:
kccheng: Take a look at the envvar plugin. It does what you want in terms of features (you can set env variables, when your applications is executed from inside C::B).
I'm not sure how scriptable it is, probably not much, but it could be made. It is not that difficult.
kccheng:
--- Quote from: oBFusCATed on June 02, 2011, 12:40:03 pm ---kccheng: Take a look at the envvar plugin. It does what you want in terms of features (you can set env variables, when your applications is executed from inside C::B).
--- End quote ---
Hi
Thanks for reply. Would you mind give me more info ?
I only find this Wiki page:
http://wiki.codeblocks.org/index.php?title=Environment_Variables_plugin
and after reading this page, I don't even know how to use this
plugin ??
Regards
KC
Navigation
[0] Message Index
[#] Next page
Go to full version