Author Topic: Envvar plugin not retreaving vars from config-file  (Read 11573 times)

Offline buiteldk

  • Single posting newcomer
  • *
  • Posts: 4
Envvar plugin not retreaving vars from config-file
« on: April 30, 2007, 05:31:43 pm »
I am using environment variables with CodeBlocks (envvar - plugin). Adding vars  works great, but after closing C::B and opening it again, only the first Environment variable is restored from the settings file (default.conf) although four vars are stored in de the default.conf file (ENVVAR0 through ENVVAR3).
Is there a solution to this problem?
Extra info:
Using WinXP, nightly build 3899, wx2.8.3
Again: the first environment var is restored, others not (although they stay in the default.conf). I verified it compiling ReactOS with four environment variables.
« Last Edit: May 01, 2007, 09:25:49 pm by buiteldk »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Envvar plugin not retreaving vars from config-file
« Reply #1 on: May 01, 2007, 11:58:40 am »
I am using environment variables with CodeBlocks (envvar - plugin). Adding vars  works great, but after closing C::B and opening it again, only the first Environment variable is restored from the settings file (default.conf) although four vars are stored in de the default.conf file (ENVVAR0 through ENVVAR3).
It works very well for me - I can't reproduce. What tool are you using to verify what envvars are set? What OS / C::B version are you using? Please *always* put such information into reports!

You guys using wx28 already: This *could* be an issue with wx28?! Anybody can reproduce?

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Envvar plugin not retreaving vars from config-file
« Reply #2 on: May 01, 2007, 04:27:01 pm »
It worked for me with a highly patched CB, SVN 3909, using wxWidgets/wxMSW/XP with 2.6 compatible mode disabled.

Note, I only added a single Env. Var.
Note, CB crashes for me on a couple of releases ago during program close; it is possible that the crash was occurring before saving env var changes. I never got a useful crash info so did not report it. Does NOT seem to crash with SVN 3909.

Re-compiling C::B with no patches now.

Tim S
« Last Edit: May 01, 2007, 04:29:11 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Envvar plugin not retreaving vars from config-file
« Reply #3 on: May 01, 2007, 04:51:19 pm »
Just tried C::B SVN 3909 on XP SP2 and had no problems; using wxWidgets 2.8.3 CVS. Both C::B and wxWidgets with no patches.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Envvar plugin not retreaving vars from config-file
« Reply #4 on: May 01, 2007, 05:11:24 pm »
Note, I only added a single Env. Var.
Note, CB crashes for me on a couple of releases ago during program close; it is possible that the crash was occurring before saving env var changes. [...]
The issue is that the envvars do not get applied on C::B startup - but they seem to be saved (if I got buiteldk right). Anyways - when you tried with your "latest" version - did you have a single envvar there, too? If so, could you try having a few more ones?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Envvar plugin not retreaving vars from config-file
« Reply #5 on: May 01, 2007, 05:27:05 pm »
I tried 5 env var on the test without patches(wxMSW2.8.3); I then added an sixth using Nightly build 3504 and it worked also.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Envvar plugin not retreaving vars from config-file
« Reply #6 on: May 01, 2007, 05:32:14 pm »
I tried 5 env var on the test without patches(wxMSW2.8.3); I then added an sixth using Nightly build 3504 and it worked also.
Thanks Tim! :)

So I guess it's up to buiteldk again to give a few more details / steps to reproduce / a  sample project or anything similar. And again my question: What OS, what wx version, what C::B version?

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline buiteldk

  • Single posting newcomer
  • *
  • Posts: 4
Re: Envvar plugin not retreaving vars from config-file
« Reply #7 on: May 01, 2007, 09:33:37 pm »
I have added some extra info in the startpost. Sorry for providing incomplete info.
The envvar section contains the folowing vars:
<envvars>
   <ENVVAR0>
      <str>
         <![CDATA[1;ROS_BUILDNOSTRIP;yes]]>
      </str>
   </ENVVAR0>
   <ENVVAR1>
      <str>
         <![CDATA[1;CPLUS_INCLUDE_PATH;G:\RosBE\4.1.3\include;G:\RosBE\4.1.3\include\c++\4.1.3;G:\RosBE\4.1.3\include\c++\4.1.3\mingw32;G:\RosBE\4.1.3\lib\gcc\mingw32\4.1.3\include]]>
      </str>
   </ENVVAR1>
   <ENVVAR2>
      <str>
         <![CDATA[1;C_INCLUDE_PATH;G:\RosBE\4.1.3\include;G:\RosBE\4.1.3\lib\gcc\mingw32\4.1.3\include]]>
      </str>
   </ENVVAR2>
   <ENVVAR3>
      <str>
         <![CDATA[1;LIBRARY_PATH;G:\RosBE\4.1.3\lib;G:\RosBE\4.1.3\lib\gcc\mingw32\4.1.3]]>
      </str>
   </ENVVAR3>
</envvars>
After closing C::B and opening again, only the first var is showing (and working) in the plugin, the others not. I have to add the last three again and then they work, until I close C::B again...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Envvar plugin not retreaving vars from config-file
« Reply #8 on: May 01, 2007, 11:31:58 pm »
It does NOT like semi colons is my guess. Try replacing ; with : if minGW GCC is being used, it might work till they can figure out the cause/fix.

I duplicated the issue using C:\apps\RosBE\4.1.2\include;C:\apps\RosBE\4.1.2\include\c++\4.1.2
Note, the above are valid paths on my system. It seems to check for valid paths somewhere on saving.

Tim S

CPLUS_INCLUDE_PATH
G:\RosBE\4.1.3\include|G:\RosBE\4.1.3\include\c++\4.1.3|G:\RosBE\4.1.3\include\c++\4.1.3\mingw32|G:\RosBE\4.1.3\lib\gcc\mingw32\4.1.3\include

« Last Edit: May 01, 2007, 11:36:10 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Envvar plugin not retreaving vars from config-file
« Reply #9 on: May 02, 2007, 09:37:39 am »
It does NOT like semi colons is my guess.
...right - that will give me a hint. I believe it's related to the way configmanager stores/restores the information, but I'll check out... be patient... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Envvar plugin not retreaving vars from config-file
« Reply #10 on: May 02, 2007, 10:34:53 am »
...right - that will give me a hint.
It did. I'm using a SDK function there (GetArrayFromString) that obviously doesn't like semi-colons. We had that issue some time ago already (Thomas: remember?! ;-)) - I'll think about what to do...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Envvar plugin not retreaving vars from config-file
« Reply #11 on: May 02, 2007, 11:42:28 am »
Should be fixed now. SVN r3917... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline buiteldk

  • Single posting newcomer
  • *
  • Posts: 4
Re: Envvar plugin not retreaving vars from config-file
« Reply #12 on: May 02, 2007, 09:25:21 pm »
Thank you! I will try it soon.

Offline buiteldk

  • Single posting newcomer
  • *
  • Posts: 4
Re: Envvar plugin not retreaving vars from config-file
« Reply #13 on: May 02, 2007, 10:27:40 pm »
Great! It works now using the '|'-symbol instead of the ';'. Thank you very much.