Unify standard and Windows version

Started by obetz, June 21, 2019, 11:28:07 AM

Previous topic - Next topic

Phil Harvey

Ooops.  You're right.  I missed that one. 

- 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

no problem, I can fix this myself, and test everything with my changed loader (next week, I'm loaded with work this weekend).

BTW: Do you want me to incorporate a nicer icon in the loader exe? The current "PPL" icon is more a general one.

Oliver

Phil Harvey

Hi Oliver,

Using a nicer icon would be good, but I don't have anything that I can provide.

- 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

what about the one from Sourceforge:

I don't really know anything about it. Maybe a multi-resolution version is "state of the art".

Oliver

Phil Harvey

I wasn't thinking that would make a suitable application icon, but go ahead if you want.

I have made a number of the "PH" icons for the web site, and could make "ET" icons like this in any size you want:

android-chrome-192x192.png      

apple-touch-icon-167x167-precomposed.png

apple-touch-icon-precomposed.png

android-chrome-512x512.png      

apple-touch-icon-167x167.png      

apple-touch-icon.png

apple-touch-icon-114x114-precomposed.png

apple-touch-icon-180x180-precomposed.png

favicon-32x32.png

apple-touch-icon-114x114.png      

apple-touch-icon-180x180.png      

favicon-48x48.png

apple-touch-icon-120x120-precomposed.png

apple-touch-icon-57x57-precomposed.png

favicon.ico

apple-touch-icon-120x120.png      

apple-touch-icon-57x57.png      

favicon.png

apple-touch-icon-144x144-precomposed.png

apple-touch-icon-72x72-precomposed.png

mstile-150x150.png

apple-touch-icon-144x144.png      

apple-touch-icon-72x72.png      

apple-touch-icon-152x152-precomposed.png

apple-touch-icon-76x76-precomposed.png

apple-touch-icon-152x152.png      

apple-touch-icon-76x76.png


- 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

Like my "PPL" icon, these seem to be black on transparent => hard to view on dark background. As I said, I'm rather clueless in this respect.

Windows seems to use 16, 32, 48 and 256px wide icons for applications.
https://stackoverflow.com/questions/3236115/which-icon-sizes-should-my-windows-applications-icon-include
https://docs.microsoft.com/en-us/windows/win32/uxguide/vis-icons

Some people do a lot of work with the icons. I don't even have the skill to design well.

It was just an idea...

Phil Harvey

OK, how about this for an icon?:



- 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

nice!

Scaling down to 16x16 doesn't work very well, so this version might need some fine tuning.

Phil Harvey

Here's a 16x16 version



- 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

Hi Phil,

two patches were needed to make it work:

1. The already mentioned one near line line 338:
if ($Image::ExifTool::exePath =~ /\(([^\\\/]+)\)(.exe|.pl)?$/i) {

2. Line 24 to use $0 again (instead of $exeDir) to add /lib to @INC:
unshift @INC, ($0 =~ /(.*)[\\\/]/) ? "$1/lib" : './lib';


With these patches, I positively tested 11.91:

1. Embed arguments in the exe filename

  • $^X is used with my launcher
  • In the "plain perl" environment, parameters are extracted from the Perl script name. I don't know whether this is intended, but I think it doesn't hurt.

2. lib search path
Line 24 uses always $0 to add /lib to @INC.

Although adding this directory is not needed in my environment (because the Perl libs and ExifTool libs are already combined in one tree), it doesn't hurt. It just adds a redundant entry with different path delimiters as you can see with -ver -v2.

3. argfile search path
Uses $^X when called by my launcher, else $0, as intended.

4. config file search path (ExifTool.pm)
Uses $^X when called by my launcher, else $0, as intended.

I also embedded the new icons in my launcher:

https://oliverbetz.de/cms/files/Artikel/ExifTool-for-Windows/exiftool-11.91.zip

Oliver

Phil Harvey

Hi Oliver,

OK, great.  Thanks.

I'll make these changes for the next version.

- 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

For 11.92, I didn't get a notification from Sourceforge, so my update is slightly delayed:

exiftool_windows 11.92 can now be used unmodified with my launcher, thanks for your changes!

I'm patching it nevertheless to add some diag output with exiftool -ver -v9

In addition, I added IO::String to the libs to enable processing of piped and zipped files like docx.

Should IO::String be listed by "-ver -v"?

Oliver

Phil Harvey

It's been more than a year since this change, but someone finally discovered that the -xpath patch broke the behaviour if exiftool is linked from another location.  The problem was that this line in exiftool which added the lib directory to the include path

    unshift @INC, "$exeDir/lib";

was changed to

    unshift @INC, ($0 =~ /(.*)[\\\/]/) ? "$1/lib" : './lib';

I'm assuming that your installation needs the include directory to be relative to $0, while the config file should be relative to $^X.

Unfortunately both files should be relative to the link target if the app is run via a link on Mac/Linux.  I don't know about running via a link in Windows, but I patch 12.35 to fix this for Mac/Linux.  Keep an eye out for this release and check to be sure it performs properly for you.

- 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

Hi Phil,

Quote from: Phil Harvey on November 03, 2021, 09:00:44 AM
I'm assuming that your installation needs the include directory to be relative to $0, while the config file should be relative to $^X.

we need to observe that the PAR environment differs in this respect.

Quote from: Phil Harvey on November 03, 2021, 09:00:44 AM
Unfortunately both files should be relative to the link target if the app is run via a link on Mac/Linux.  I don't know about running via a link in Windows, but I patch 12.35 to fix this for Mac/Linux.  Keep an eye out for this release and check to be sure it performs properly for you.

I'll do so but it will take a while since I have other urgent work.

Windows supports Symlinks, but almost nobody uses them not least because creating them requires elevated permissions (or "developer mode"). Most people use the gui links or the  search path.

So there are really a lot of permutations, and one question is how thoroughly we need to test them.

And I'm not completely sure which directories should be searched for which files.

Phil Harvey

It is only the application directory that is the problem here.  The other search directories shouldn't be affected.  The standard exiftool version should look in the directory of the application (link target) for both the libraries and the config file.

- 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 ($).