Proposal for a robust and simple Windows version

Started by obetz, May 16, 2019, 07:23:36 AM

Previous topic - Next topic

StarGeek

Martin's point is that either way, it is not the single file that it used to be. It's still going to install the 500+ files that make up exiftool.

Even though the old version still installed all those files. It was just "hidden" in the %TEMP% directory.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Martin Z

#106
EDIT: Wow, I didn't realise until I pressed post quite how much I'd written! Sorry for the mammoth post, I did think about splitting it up as I was writing it, but didn't want to spam the thread with multiple replies.



Thanks all for the additional clarifications and info.

TLDR; Thanks everyone. I want to be clear that this was purely a personal preference and I don't mean any criticism against Oliver, Phil, StarGeek or anyone involved in the continued maintenance, improvement and packaging of ExifTool.

I'm conscious that what I meant to be a relatively small "can I get it in a different colour/flavour?" question, has turned into a bit of a bigger topic, so I just want to re-iterate that using the new, Oliver Betz's solution is fine. I also want to be clear that I am not criticising his change, as I applaud anyone who gives up their free time to try and make things better or help the community!

Really, this whole thing is just a matter of personal preference... I prefer portable apps, over ones that need to be installed, and within that I will choose the single, self-contained .exe version if possible.

Good example is: gallery-dl
  • The default install option is to use pip / python3. This will install the gallery-dl package for you, and makes it super easy to update, but it is installed in it's native state as a set of python files and numerous library folders
  • They also offer a single, exe version. Using this option means you have to manually manage updates, adding it to your %PATH%, etc -- however I just find it it 'nicer' or 'cleaner' somehow, so I use this.

It's nice that gallery-dl offer both, and ultimately that's all I intended to ask here -- as in, I totally respect the change, but is it possible to get the old-style, pre-compiled, single exe as an alternative?

Another example is XnConvert, that I use for bulk-image processing... They offer a Windows installer, and a Windows portable version. The portable version is a main, exe file along with a bunch of required, supporting files and folders. That's the only way they release the app, and that's fine.

Also, full disclosure - the folder where I have ExifTool has already grown anyway, as looks like...
D:\Cloud-sync\Portable Apps\Common
 └ ExifTool           <-- A folder I created to store various .argsfile and .fmt files
 └ .exiftool_config   <-- ExifTool config file
 └ ExifTool.exe       <-- What was the single, combined .exe / is now the ExifTool launcher
 └ Other_App1.exe
 └ Other_App2.exe
... so again adding a ExifTool_files folder is not the end of the world.

And lastly, while I would like to keep everything "small" (at least in terms of file counts), the ~200 portable apps  I use, currently comprise over 11,500 files in total - so realistically I was never able to maintain a 1 app <--> 1 file ratio, and adding another 500 for ExifTool is fine.

Picking up on a few individual points...



RE: Frank B

Quote from: FrankB on October 04, 2024, 07:28:42 PMMy post was meant to give you an idea how your auto-updater script could be modified. Have a look at the source code.

Ah OK, got you - thanks for sharing / offering your code as a reference, for me fixing my auto-updater script. Again, just to be clear this is minor. I was probably a little irked at the time as I spend 1-2 hours on it writing the script that would...
  • Run ExifTool -ver and parse the response
  • Get the latest version of ExifTool from the website
  • Compare if the web version was higher than the local version
  • If so, download the .zip file
  • Extract the contents of the .zip to a temp directory
  • Copy ExifTool(-k).exe and rename and copy this over the ExifTool.exe file in my portable apps folder
  • Delete the temp folder and the downloaded .zip file

However to fix it, I just need to add a step 6b that also deletes the ExifTool_files folder from my portable apps directory and copies the new one from the temp folder... This may generate an alert I've set up for "high volume deletions" due to the ~500 files in the ExifTool_files folder, but again I can write an exception rule or tweak the alert workflow.

If anything, any frustration was more at myself for it taking me longer than I thought to write the above and get it working, and then only end up using it about twice before it broke! 🙈🤣 -- But again, thanks for your help!

Quote from: FrankB on October 04, 2024, 07:28:42 PMThanks. Yes I know. A lot of these Antivirus products dont like InnoSetup, or other home-brew programs. The only things that seems to help is report it as a false-positive.

OK cool, just wanted to say in case you hadn't seen... Yeah, was going to say the same really - am not sure if VirusTotal has "I'm the owner of this file/url and want to report it as a false positive" feature. It may do, but I wasn't logged in at the time. But in any case, you're already aware / on it, so all good 👍🏼



RE: StarGeek

Quote from: StarGeek on October 04, 2024, 01:15:51 AMI'm on Windows

Ah OK, fair enough -- I remembered the filepaths in your code examples were generally in the 'Unix way' so figured you were a Linux-er... Well, welcome aboard the Windows train -- Do you also simultaneously love and loath Microsoft!?.. They're so awful, yet annoyingly essential! :-)

Quote from: StarGeek on October 04, 2024, 01:15:51 AMThis new way will actually solve some problems for me.

Well again, that's also worth acknowledging. As in, from my perspective, this change only seems to have been in the last few months - however I was a bit thrown when I first clicked through to this thread, as saw it was started 5 years ago, and so clearly this has been a longer-term headache, albeit I assume most users like myself were probably oblivious to.

Also, linking back to my gallery-dl example. I know for a fact that some users will 100% prefer having the native python files and may even want to change these, or add / hook in their own scripts, etc (which sounds similar to what you've been trying to do with ExifTool / Perl and again, I totally respect that and am happy if this change solves that problem for you! 👍🏼

Quote from: StarGeek on October 04, 2024, 01:15:51 AMSpecific tools or ones that could be consider basic to Linux?

A little bit of both... I'd occasionally get irked / jealous when I'd see a solution to a problem I had on stackoverflow, but then see the script uses things like grep, head, tail, etc and be like: "oh, ok, I guess I need to keep looking for a solution that will work on Windows" (but see below for more info on that). Or sometimes it was like the challenge Phil had, where I would see some cool project on github, but they had only released it as a set of .sh(?) files and be like "oh this is perfect, but is there a version that will work on Windows?"

Quote from: StarGeek on October 04, 2024, 01:15:51 AMI have MSys2 [...] While I haven't figured out WSL myself, if you can figure out the Windows Subsystem for Linux (WSL), you can use any Linux command line program.

Ah interesting, I haven't come across MSys2, but I have tried Cygwin if that's similar?

Ironically, I remember the Cygwin installer having a warning at the beginning say NOT to select all modules, as if you do this will install thousands (maybe even tens of thousands) of mini library files!.. That said, I can't remember using it after installing it, which suggests maybe it didn't work as well / seamlessly as I thought?

WSL is... hmm, an interesting topic...

I remember being genuinely surprised at how simple and straight forward the install was (basically just tick the box in Windows features and that's it).

I ran WSL and the prompt showed I was in my $home directory (which makes sense for Linux user) but was expecting to be in a Windows one. so I created a test file via WSL and then searched for it in Windows to see what the corresponding location was... Except, I didn't realise that this seemingly simple query would lead me down a multi-day headache where I needed to try and get my head around WSL1, WSL2, WSL's virtual filesystem, etc.

I think WSL could / would be a nice straight forward thing, but I spent so much time trying to get out of the gate, that it basically killed my appetite for using it sadly... I probably should give it another try and some point to be fair.

If you're interested in WSL, I ended up asking (and then ultimately answering!) this question on StackOverflow if it helps / you want to find out more.

StarGeek

Quote from: Martin Z on October 05, 2024, 06:36:33 AMThanks everyone. I want to be clear that this was purely a personal preference and I don't mean any criticism against Oliver, Phil, StarGeek or anyone involved in the continued maintenance, improvement and packaging of ExifTool.

I thoroughly understand. And I know that there are going to be some growing pains with this new setup.

QuoteThe portable version is a main, exe file along with a bunch of required, supporting files and folders. That's the only way they release the app, and that's fine.

You can think of the new setup in this way. You just need the exe and the exiftool_files directory. Sure, there are a lot of files in the directory, but you can just move the directory as a whole. I had to double-check what the Windows command would be and it is simply
move exiftool_files C:\NewDirectory
which might give me the incentive to fix my own auto download script.

QuoteAlso, full disclosure - the folder where I have ExifTool has already grown anyway, as looks like

You do not want to see the utter mess that is my exiftool folder :D

Quote
Quote from: StarGeek on October 04, 2024, 01:15:51 AMI'm on Windows
Ah OK, fair enough -- I remembered the filepaths in your code examples were generally in the 'Unix way' so figured you were a Linux-er

My command examples usually use /path/to/files/. So much so that at one point, ChatGPT answered any exiftool question using that example. But any actual example output, the stuff in the [code] box, is always Windows.

QuoteDo you also simultaneously love and loath Microsoft!?.. They're so awful, yet annoyingly essential! :-)

I miss my Amiga

QuoteI'd occasionally get irked / jealous when I'd see a solution to a problem I had on stackoverflow, but then see the script uses things like grep, head, tail, etc and be like: "oh, ok, I guess I need to keep looking for a solution that will work on Windows"

If that's all that is needed, then MSys2 installs those exact programs for Windows.

QuoteI would see some cool project on github, but they had only released it as a set of .sh(?) files and be like "oh this is perfect, but is there a version that will work on Windows?"

Yeah, that's always a problem, and I've had to deal with it before.

QuoteAh interesting, I haven't come across MSys2, but I have tried Cygwin if that's similar?

No, these are native Windows ports. You use them exactly as you would any other command line program.

I gave up on Cygwin long ago because I use the command line with file paths copied to/from the clipboard a lot and always had to deal with inconsistencies about when Cygwin would require it's version of a path (/cygdrive/y/!temp/x/y) or would allow use of standard Windows paths (Y:\!temp\x\y).

QuoteIf you're interested in WSL, I ended up asking (and then ultimately answering!) this question on StackOverflow if it helps / you want to find out more.

So far, I haven't had the need to deal with it directly. But some day I might find a .sh bash script that is the only thing that would work, and that's when I will actually try to figure it out.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).