Jump to content
Sign in to follow this  
merijnb

Open File expert and Uses Clause Manager don't understand environment variables

Recommended Posts

We have many projects, all with a huge list of search paths defined. Many of these search paths are identical. Once a path needs to be added to this, we need to update the search path on many projects, which is a pita.

 

I'm now experimenting with putting all these paths in an environment variable, this way, I only need to update the environment variable, use that environment variable in the search path of the project and it's done.

This all works well and looks like this:
set MY_DELPHI_PATHS = 'lots and lots of paths'

in Delphi set this in the search path of the project configuration:
$(MY_DELPHI_PATHS)

but unfortunately both the Open File expert and the Uses Clause Manager seem unable to cope with this. The uses clause manager shows the files in these search paths in the 'project' tab, but not in the 'search path' tab, the Open Files Expert doesn't show the files in these search paths anywhere.

 

Can these editors be made environment variable aware?

 

Thanks!

 

I've just noticed the feature request list on sourceforge, so I've added this there as well

Edited by merijnb
added to sourceforge as well

Share this post


Link to post
11 minutes ago, merijnb said:

I've just noticed the feature request list on sourceforge, so I've added this there as well

Thanks, I was just about to ask you to do that.

I'm sure there are other places where support for environment variables would be convenient. I'll have a look when I find the time.

  • Like 1

Share this post


Link to post
1 minute ago, dummzeuch said:

Thanks, I was just about to ask you to do that.

I'm sure there are other places where support for environment variables would be convenient. I'll have a look when I find the time.

Is this still open source? I might take look myself if you can't find the time.

Share this post


Link to post
3 hours ago, merijnb said:

 And that one says resolved

That one only applies to the map file.

Of course, the same code should probably also work for the search path. It's just not called.

  • Like 1

Share this post


Link to post

I've made a patch for this, here a copy/paste from my comment on the issue on sourceforge.

 

Quote

I dug into this, it turns out that environment variables actually where unrolled, but couldn't cope with multiple paths in one environment variable. I've patched GX_OtaUtils to enable it to handle this. This solved the issue in both the Open File Expert as well as the Use Clause Manager, and I suspect it will solve the same issue in other places as well.

 

I've attached the patched file on sourceforge.

Edited by merijnb
  • Thanks 1

Share this post


Link to post

While updating to 12 I found out this feature request is still open, so I patched my GX_OtaUtils and build a new DLL locally.

 

Can I get these changes into the trunk somehow for the future?

I've attached a the newly patched version on sourceforge again.

  • Thanks 2

Share this post


Link to post
2 hours ago, merijnb said:

While updating to 12 I found out this feature request is still open, so I patched my GX_OtaUtils and build a new DLL locally.

 

Can I get these changes into the trunk somehow for the future?

I've attached a the newly patched version on sourceforge again.

Applied in revision #4097. Thanks for your contribution. And sorry I forgot about that patch.

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×