Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: rickg22 on August 04, 2005, 04:37:18 pm

Title: %USERPROFILE% bug
Post by: rickg22 on August 04, 2005, 04:37:18 pm
Guys, i pinpointed a configuration bug and I've managed to replicate it. But it seems the error lies inside the wxConfigBase class, and not in codeblocks itself... (i think). Actually I'm not sure...
this is why I need your help.

In windows, open a command prompt.

type the folowing:

SET OLDHOME=%HOME%
SET OLDUSERPROFILE=%USERPROFILE%
SET USERPROFILE=
SET HOME=%USERPROFILE%
SET USERPROFILE=%OLDUSERPROFILE%
(your app path)\Codeblocks.exe

Open, and close. You'll see an error saying a directory couldn't be created. The problem is, WHERE in the code is this error triggered?
Title: Re: %USERPROFILE% bug
Post by: tiwag on August 04, 2005, 04:46:31 pm
Hi rick !

i tried CB_CVS_HEAD with your batchfile and doesn't get an error  :?
Title: Re: %USERPROFILE% bug
Post by: rickg22 on August 04, 2005, 05:47:07 pm
Try it with VERSION_1_0 branch, with wx2.4.2. Oh, the commands must be typed DIRECTLY, not within a batch file!
Title: Re: %USERPROFILE% bug
Post by: tiwag on August 04, 2005, 05:53:34 pm
i tried it also with VERSION_1_0 built with wx242, but also no error message

can you please explain me the difference between typing the commands directly and running from a batchfile ?
i don't understand how this can make a difference.
Title: Re: %USERPROFILE% bug
Post by: rickg22 on August 04, 2005, 08:52:19 pm
In batch files i think you need to use double %'s.

Anyway my goal is to set the HOME variable to have %PROFILE% (with the % signs) as its value, and this is only possible if the PROFILE variable is not set.

Under these particular conditions, codeblocks (on exit) shows the weird error
Title: Re: %USERPROFILE% bug
Post by: tiwag on August 04, 2005, 09:04:19 pm
... my goal is to set the HOME variable to have %PROFILE% (with the % signs) as its value, and this is only possible if the PROFILE variable is not set.
Under these particular conditions, codeblocks (on exit) shows the weird error

Ahh OK ... now i could produce the error too ! with CB_HEAD