Menu

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

None
closed-fixed
None
5
2023-11-14
2020-09-16
No

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?

Discussion

  • Merijn Bosma

    Merijn Bosma - 2021-03-02

    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.

    Attached the patched file

     

    Last edit: Merijn Bosma 2021-03-02
  • Merijn Bosma

    Merijn Bosma - 2023-11-14

    Latests version of GX_OtaUtils.pas patched again

     
  • Thomas Mueller

    Thomas Mueller - 2023-11-14
    • status: open --> closed-fixed
    • assigned_to: Thomas Mueller
    • Group: -->
     
  • Thomas Mueller

    Thomas Mueller - 2023-11-14

    applied with some modifications to revision #4097

     

Log in to post a comment.