daveewart / colordiff

Primary development for colordiff
http://www.colordiff.org/
GNU General Public License v2.0
177 stars 37 forks source link

config: C:\ProgramData as /etc equiv. on Windows #56

Closed rkitover closed 2 years ago

rkitover commented 2 years ago

On Windows, C:\ProgramData, set in the ALLUSERSPROFILE environment variable functions similarly to the /etc directory on UNIX in modern Windows versions.

Check for the first existing directory in the list '/etc', $ENV{ALLUSERSPROFILE}, in that order, and use it as $etcdir.

Followup on 6e4c670 (Support config file on Windows., 2022-02-08).

Signed-off-by: Rafael Kitover rkitover@gmail.com

rkitover commented 2 years ago

@daveewart

Hi again, this a minor followup on my previous PR, I only recently learned about this, but this will help me make a Chocolatey package.

Yes, I still haven't made it, I apologize.

But I have a plan now, and will hopefully do it soon.

I was unsure about how to do this, depend on StrawberryPerl || ActivePerl? Both packages are less than ideal and may not be desirable by the user.

So I decided to use PAR::Packer to make an .exe of colordiff, perhaps with a bundled copy of diff, or depending on diffutils which is a decent package.

daveewart commented 2 years ago

Hi @rkitover - merged. Good luck with the package creation!