fane_j wrote:
etresoft wrote:
The environment.plist file is never required.
BBEdit and others require it. Hence, your statement is incorrect.
Just because they did use it doesn't mean they should have used it.
Moreover, if Apple provides this facility, and explains how it should be used, I don't understand why a developer shouldn't use it.
Apple provides many facilities, one of which is the DYLD_INSERT_LIBRARIES, that are only for development or testing. There are many ways to do the same thing, some of those ways are just bad. They may be easy and it may be correct to use them in development until you get time to do it properly. You shouldn't deliver using those hacks. If BBedit did that, that's just wrong.
There are other, much better ways to accomplish the same thing.
Such as?
Don't use environment variables. They are designed for command-line environments. If you still want to use them, you can set them from the software itself using values from resource files. If you need to make any of those modifiable by the end user, provide a set of preferences for setting that. Again, environment.plist is the wrong answer.
An Aqua user interface application should never rely on environment variables.
And if it needs, or it is used, to run shell scripts, Perl, Phython, etc, what should it rely on?
Shell scripts are different. There are numerous ways to set environment variables in shell scripts. That is what they were designed for. environment.plist injects environment variables into the GUI user interface. It's just a hack, that's all.
It is poor practice to ship code using that file.
You are certainly entitled to your opinion. I see no reason or argument why anyone should agree with it.
That's fine. Whether you believe me or not, there are a number of ways to construct software on MacOS X that are big red flags that the authors of that software are doing it wrong or were doing it wrong the last time they checked it in 2004. I don't have BBEdit but I do have TextWranger. I have no .MacOSX/environment.plist file. I have a great number of highly unusual system modifications. If you have something so unusual that I don't have, you don't want it.