FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Patch to support environment variables

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Sat Dec 02, 2006 1:47 am    Post subject: Patch to support environment variables Reply with quote

I made a patch that adds support for environment variables in .brf "response" files. So in your response file you can have something like:

Code:

-release
-I$(HOME)\D
-I$(DMDDIR)\baxissimo
-I$(DMDDIR)\ext
example1
$(DMDDIR)\Derelict\lib\DerelictGL.lib
$(DMDDIR)\Derelict\lib\DerelictGLU.lib
$(DMDDIR)\Derelict\lib\DerelictUtil.lib


The patch is here:
http://www.dsource.org/projects/build/ticket/42

Is this of any interest to anyone else?

Hard coded paths really give me trouble because I move code back and forth between a few machines where D isn't necessarily installed in the same place.
Back to top
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Sat Dec 02, 2006 11:35 am    Post subject: Re: Patch to support environment variables Reply with quote

baxissimo wrote:
I made a patch that adds support for environment variables in .brf "response" files.

Thanks. However I have already coded the enhancement into my copy of the source. It supports symbols in the forms ...

?SYM?
$SYM
${SYM}
${SYM=default}
$(SYM)

I'm just finalizing the testing before this and a few other goodies are released.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Sat Dec 02, 2006 3:41 pm    Post subject: Re: Patch to support environment variables Reply with quote

Derek Parnell wrote:
baxissimo wrote:
I made a patch that adds support for environment variables in .brf "response" files.

Thanks. However I have already coded the enhancement into my copy of the source. It supports symbols in the forms ...

?SYM?
$SYM
${SYM}
${SYM=default}
$(SYM)

I'm just finalizing the testing before this and a few other goodies are released.


Wonderful! I can live without the multiple args per line that my patch added as long as environment variables work.

What's the recommended approach when you outgrow the capabilities of brf files and need real per-platform conditionals and things like that. My first reaction would be to use good old make to call bud, but maybe there's something simpler which doesn't require a dependency on make?
Back to top
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Sat Dec 02, 2006 4:41 pm    Post subject: Re: Patch to support environment variables Reply with quote

baxissimo wrote:
What's the recommended approach when you outgrow the capabilities of brf files and need real per-platform conditionals and things like that. My first reaction would be to use good old make to call bud, but maybe there's something simpler which doesn't require a dependency on make?

The method I used for Configuration files is to have 'sections' inside the file. For example, to have some options that only apply in the Windows platform and others in Linux ...
Code:

 [Windows]
 CMD=some toption
 [Linux]
 CMD=something else


Is this the sort of issue you were thinking about?
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Sat Dec 02, 2006 7:11 pm    Post subject: Re: Patch to support environment variables Reply with quote

Derek Parnell wrote:

The method I used for Configuration files is to have 'sections' inside the file. For example, to have some options that only apply in the Windows platform and others in Linux ...
Code:

 [Windows]
 CMD=some toption
 [Linux]
 CMD=something else


Is this the sort of issue you were thinking about?


Yeh, that sounds good.

--bb
Back to top
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Sat Feb 17, 2007 12:46 am    Post subject: Re: Patch to support environment variables Reply with quote

Derek Parnell wrote:
baxissimo wrote:
I made a patch that adds support for environment variables in .brf "response" files.

Thanks. However I have already coded the enhancement into my copy of the source. It supports symbols in the forms ...

?SYM?
$SYM
${SYM}
${SYM=default}
$(SYM)

I'm just finalizing the testing before this and a few other goodies are released.


Any word on when this super-duper enhanced version of Bud of yours is going to hit the streets? Or at least the SVN repository?

Thanks.
Back to top
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Sat Feb 17, 2007 6:34 pm    Post subject: Re: Patch to support environment variables Reply with quote

Derek Parnell wrote:
baxissimo wrote:
I made a patch that adds support for environment variables in .brf "response" files.

Thanks. However I have already coded the enhancement into my copy of the source. It supports symbols in the forms ...

?SYM?
$SYM
${SYM}
${SYM=default}
$(SYM)

I'm just finalizing the testing before this and a few other goodies are released.

I have completed most things I wanted to do this round, and I was expecting to finish off this weekend, so if the heat here doesn't prevent me thinking (another day over 100) ...
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group