Embedding Perl and Exiftool in a C application

Started by Joride, November 21, 2021, 05:28:38 AM

Previous topic - Next topic

Joride

Hi all, I tried finding a thread on this topic, but could not find one. If there is, feel free to redirect me there.

Building a macOS app using exiftool requires embedding the exiftool and spawning a separate process to interact with it. Apple's frameworks help out here: NSTask make this quite convenient.
No such thing on iOS/ipadOS however. To be able to use exiftool on iOS, embedding the Perl interpreter as a static library is required. Why use exiftool at all, and not Apple's frameworks to work with exifdata? Apple's frameworks allow for reading most exifdata from most files, but can not write exifdata into raw files (Canon/CR2, Nikon/NEF). Writing updated tags directly into the files is what I am aiming for.

I am having trouble compiling Perl into a static library. I've tried many things, scoured the web for info and hints, learned about the configire/make/autotools system, but alas, I keep running into errors that I can't solve. I understand I am not very specific here, so I am not expecting a magic bullet solution.

I know this forum is for exiftool specific questions, , but then I saw this thread: https://exiftool.org/forum/index.php?topic=5211.0 and so I was hoping that maybe I can be pointed to some crucial information (on either Perl or the Perl-specifics of the configure script), that will give me an other lead to figuring out how to compile Perl into a static lib. Once I can get that to work, I can try and figure out how to do build the lib for the right architecture and target system, I' taking it once step at the time.

Phil Harvey

I have an old iPod Touch that is running Perl.  I don't recall where I found it, but it is a full Perl interpreter and not a static library.  It runs ExifTool quite happily.

Googling for this, I see at least one version of Perl available for iOS now, but it wasn't free like mine was.

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

Joride

Thank you for responding so quickly!
Would this be on a jailbroken device? I don't have a jailbroken device (and am not planning to), so getting Perl running on iOS outside of an app sandbox is not going to be possible unfortunately.

Phil Harvey

Yes it is jailbroken, but I guess I'm naive enough to think that you should be able to run Perl on a non-jailbroken device too.  I didn't realize it was that restrictive.

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