Hello,

In Platform Builder 5.0 you have a dialog "Platform Settings" where you can
also define environment variables. I need to dereference an existing
variable. That means I want to define something like TEMP_STORAGE that is
defined by the value of the TEMP environment variable.

If the TEMP variable is defined as "C:\tmp" the variable should be
"C:\tmp\my_storage".

You can define this in a batch file with "set
TEMP_STORAGE=%TEMP%\my_storage".

You can dereference the variable in make files and several Platform Build
files in this way: "$(TEMP)\my_storage".

But no approach works, neither in Platform Builder GUI nor when opening the
command line build window. The existing variable value is never used. How
can I use the value of an environment variable to define a new one inside
Platform Builder?

Best regards,

Helge


--
Time is an ocean but it ends at the shore.

Re: Dereferencing environment variables in PB5 by Paul

Paul
Wed May 07 08:22:40 PDT 2008

I think you're going to have to do this via one of the batch files that are
used during build, not the configuration settings dialog. For BSP-specific
settings, of course, you'd use <bspname>.bat in
\wince500\platform\<bspname>\. For project-specific settings, you'd use
<projectname>.bat found in
WINCE500\PBWorkspaces\<projectname>\WINCE500\<bspname>\OAK\MISC. Obviously,
if you're targeting several BSPs, you'll have several batch files to edit.

Paul T.

"Helge Kruse" <Helge.Kruse-nospam@gmx.net> wrote in message
news:%23NuJLpBsIHA.3680@TK2MSFTNGP05.phx.gbl...
> Hello,
>
> In Platform Builder 5.0 you have a dialog "Platform Settings" where you
> can also define environment variables. I need to dereference an existing
> variable. That means I want to define something like TEMP_STORAGE that is
> defined by the value of the TEMP environment variable.
>
> If the TEMP variable is defined as "C:\tmp" the variable should be
> "C:\tmp\my_storage".
>
> You can define this in a batch file with "set
> TEMP_STORAGE=%TEMP%\my_storage".
>
> You can dereference the variable in make files and several Platform Build
> files in this way: "$(TEMP)\my_storage".
>
> But no approach works, neither in Platform Builder GUI nor when opening
> the command line build window. The existing variable value is never used.
> How can I use the value of an environment variable to define a new one
> inside Platform Builder?
>
> Best regards,
>
> Helge
>
>
> --
> Time is an ocean but it ends at the shore.
>
>



Re: Dereferencing environment variables in PB5 by Helge

Helge
Wed May 07 20:48:01 PDT 2008

Paul,

Thanks for reply. I know that I have a bunch of bat files, where environment variables are set and of course others can be
evaluated.

But I get customer's OS designs where a variable like TEMP_STORAGE is defined that points to a directory tree. It is referenced in a
lot of further bat files to access files in the tree. So it is not eazy to replace the use of this variable.

Since the tree location is defined by an system wide variable I would need this dereference. It's too bad that you have to
discourage me to dereference it in this way. I will evaluate the use of your suggested locations.

Regards,
Helge

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com> wrote in message
news:%23HqDqYFsIHA.1772@TK2MSFTNGP03.phx.gbl...
>I think you're going to have to do this via one of the batch files that are used during build, not the configuration settings
>dialog. For BSP-specific settings, of course, you'd use <bspname>.bat in \wince500\platform\<bspname>\. For project-specific
>settings, you'd use <projectname>.bat found in WINCE500\PBWorkspaces\<projectname>\WINCE500\<bspname>\OAK\MISC. Obviously, if
>you're targeting several BSPs, you'll have several batch files to edit.
>
> Paul T.


Re: Dereferencing environment variables in PB5 by Paul

Paul
Thu May 08 10:36:55 PDT 2008

Huh? How is changing a batch file, or, say, two batch files, one for the
emulator and one for the actual target BSP, so much harder than changing the
project settings in several configurations (one for emulator-debug, one for
emulator-retail, one for actual target BSP-debug and one for target
BSP-retail)? Seems like just different, not better or worse. If I had
infinite free time, I'd play around with PB and see if there isn't some way
to get environment variables 'deeply' evaluated during the build, but I
don't. I've done something similar enough to this with the various
BSP-specific and project-specific batch files to be highly confident that
you can do it this way.

Paul T.

"Helge Kruse" <Helge.Kruse-nospam@gmx.net> wrote in message
news:fvtt66$4dg$03$1@news.t-online.com...
> Paul,
>
> Thanks for reply. I know that I have a bunch of bat files, where
> environment variables are set and of course others can be evaluated.
>
> But I get customer's OS designs where a variable like TEMP_STORAGE is
> defined that points to a directory tree. It is referenced in a lot of
> further bat files to access files in the tree. So it is not eazy to
> replace the use of this variable.
>
> Since the tree location is defined by an system wide variable I would need
> this dereference. It's too bad that you have to discourage me to
> dereference it in this way. I will evaluate the use of your suggested
> locations.
>
> Regards,
> Helge
>
> "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
> com> wrote in message news:%23HqDqYFsIHA.1772@TK2MSFTNGP03.phx.gbl...
>>I think you're going to have to do this via one of the batch files that
>>are used during build, not the configuration settings dialog. For
>>BSP-specific settings, of course, you'd use <bspname>.bat in
>>\wince500\platform\<bspname>\. For project-specific settings, you'd use
>><projectname>.bat found in
>>WINCE500\PBWorkspaces\<projectname>\WINCE500\<bspname>\OAK\MISC.
>>Obviously, if you're targeting several BSPs, you'll have several batch
>>files to edit.
>>
>> Paul T.
>



Re: Dereferencing environment variables in PB5 by Bruce

Bruce
Thu May 08 11:00:24 PDT 2008

Since this is just for that OS design and it doesn't seem to overlap with
anything "standard", can you just set it as a global environment variable
for your workstation?

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com

EuroTech Inc.
www.EuroTech.com

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:OIEwTITsIHA.1768@TK2MSFTNGP03.phx.gbl...
> Huh? How is changing a batch file, or, say, two batch files, one for the
> emulator and one for the actual target BSP, so much harder than changing
> the project settings in several configurations (one for emulator-debug,
> one for emulator-retail, one for actual target BSP-debug and one for
> target BSP-retail)? Seems like just different, not better or worse. If I
> had infinite free time, I'd play around with PB and see if there isn't
> some way to get environment variables 'deeply' evaluated during the build,
> but I don't. I've done something similar enough to this with the various
> BSP-specific and project-specific batch files to be highly confident that
> you can do it this way.
>
> Paul T.
>
> "Helge Kruse" <Helge.Kruse-nospam@gmx.net> wrote in message
> news:fvtt66$4dg$03$1@news.t-online.com...
>> Paul,
>>
>> Thanks for reply. I know that I have a bunch of bat files, where
>> environment variables are set and of course others can be evaluated.
>>
>> But I get customer's OS designs where a variable like TEMP_STORAGE is
>> defined that points to a directory tree. It is referenced in a lot of
>> further bat files to access files in the tree. So it is not eazy to
>> replace the use of this variable.
>>
>> Since the tree location is defined by an system wide variable I would
>> need this dereference. It's too bad that you have to discourage me to
>> dereference it in this way. I will evaluate the use of your suggested
>> locations.
>>
>> Regards,
>> Helge
>>
>> "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
>> DOT com> wrote in message news:%23HqDqYFsIHA.1772@TK2MSFTNGP03.phx.gbl...
>>>I think you're going to have to do this via one of the batch files that
>>>are used during build, not the configuration settings dialog. For
>>>BSP-specific settings, of course, you'd use <bspname>.bat in
>>>\wince500\platform\<bspname>\. For project-specific settings, you'd use
>>><projectname>.bat found in
>>>WINCE500\PBWorkspaces\<projectname>\WINCE500\<bspname>\OAK\MISC.
>>>Obviously, if you're targeting several BSPs, you'll have several batch
>>>files to edit.
>>>
>>> Paul T.
>>
>
>



Re: Dereferencing environment variables in PB5 by Helge

Helge
Thu May 08 12:08:03 PDT 2008


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com> wrote in message
news:OIEwTITsIHA.1768@TK2MSFTNGP03.phx.gbl...
> Huh? How is changing a batch file, or, say, two batch files, one for the emulator and one for the actual target BSP, so much
> harder than changing the project settings in several configurations?

No it isn't. We will find another approach. I also haven't plenty of time for such plays. I was only astonished that no variable
substitution is done at this place and I though I did it wrong. But I am sure we will find another way, probably access the system
defined env variable directly. It's just a question of coordination.

Many thanks,
Helge