Possible to change the PERL runtime folder?

Started by Mac2, March 14, 2020, 09:20:37 AM

Previous topic - Next topic

Mac2

I apologize if this was answered before - I could not find anything...

Is there a way to control the folder in which ExifTool.exe (on Windows) installs its PERL runtime environment?
Be default this is a folder starting with par- in the system (?) or user's TEMP folder.

While this worked just fine over the past years, security restrictions and anti-virus products make it sometimes impossible to execute code from the TEMP folder (or any folder not explicitly designated for executables).
I think to recall that there is a environment variable, but that may cause issues with other PERL software running...? Although on Windows that's probably not often the case.

Maybe a command line argument or something for exiftool.exe, something that I could allow the user to configure and then provide to exiftool.exe as needed.

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Mac2

I'm aware of this project (Oliver is an IMatch user) but that would add several other dependencies and I'm a bit wary of additional dependencies...

From your answer I take it that ExifTool.exe has no control over where the PERL 'wrapper' installs its runtime components?

Phil Harvey

You should be able to set the temporary directory that ExifTool uses...

The PAR_GLOBAL_TEMP environment variable should do this.  Read here for details.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

obetz

Quote from: Phil Harvey on March 15, 2020, 03:56:25 PM
You should be able to set the temporary directory that ExifTool uses...

The PAR_GLOBAL_TEMP environment variable should do this.  Read here for details.

PAR_GLOBAL_TEMP causes other problems and is "discouraged" according to the maintainer Roderich Schupp (par@perl.org mailing list 2019-05-08).

Quote from: Mac2 on March 15, 2020, 10:02:31 AM
I'm aware of this project (Oliver is an IMatch user) but that would add several other dependencies and I'm a bit wary of additional dependencies...

My package has less dependencies than the PAR version you are using now: It's just Phil's Perl stuff plus a well maintained Perl with a liberal license plus my tiny launcher. You don't even need the launcher if you don't like it.

If you are not convinced, spend some hours to understand how PAR/pp works and compare it's ugly tricks magic and complexity with the simplicity of my launcher (find source code attached).

My bottom line: Don't use PAR/pp unless you absolutely have to. See https://oliverbetz.de/pages/Artikel/Portable-Perl-Applications for details.

Or think it the other way around: What is the benefit of the PAR/pp version? I couldn't find more than the (somewhat "cosmetic") effect to seemingly get only one monolithic exe. But in the background the whole stuff is unpacked, anyway. Remember: PAR/pp executables are concealed installers.

But IMatch already comes with it's own installer, so why do you want to add PAR/pp?

After all, I made this ExifTool package to a good part especially for IMatch (and I use it with IMatch).

It is now available since mid 2019, downloaded a few thousand times per month without negative feedback.

It passes the ExifTool selftests and my own tests (checking for Windows command line and date issues).

IMO it can be considered stable and less prone to problems than PAR.

If you want to give it a try, send me a message or call me by phone.

Oliver