Also bundle perl script
parent
d251cd809e
commit
9e0398ba8f
|
@ -10,4 +10,11 @@ wget "https://github.com/pulsejet/exiftool-bin/releases/download/$exifver/exifto
|
|||
wget "https://github.com/pulsejet/exiftool-bin/releases/download/$exifver/exiftool-aarch64-musl"
|
||||
wget "https://github.com/pulsejet/exiftool-bin/releases/download/$exifver/exiftool-aarch64-glibc"
|
||||
chmod 755 *
|
||||
|
||||
wget "https://github.com/exiftool/exiftool/archive/refs/tags/$exifver.zip"
|
||||
unzip "$exifver.zip"
|
||||
mv "exiftool-$exifver" exiftool
|
||||
rm -rf *.zip exiftool/t exiftool/html
|
||||
chmod 755 exiftool/exiftool
|
||||
|
||||
cd ..
|
||||
|
|
|
@ -149,8 +149,8 @@ class Index extends Command
|
|||
{
|
||||
// Refuse to run without exiftool
|
||||
if (!$this->testExif()) {
|
||||
error_log('FATAL: exiftool could not be found or test failed');
|
||||
error_log('Please install exiftool (at least v12) and make sure it is in the PATH');
|
||||
error_log('FATAL: exiftool could not be executed or test failed');
|
||||
error_log('Make sure you have perl 5 installed in PATH');
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
15
lib/Exif.php
15
lib/Exif.php
|
@ -399,7 +399,9 @@ class Exif
|
|||
$noLocal = $config->getSystemValue($configKey.'_no_local', false);
|
||||
|
||||
// We know already where it is
|
||||
if (!empty($configPath)) return $configPath;
|
||||
if (!empty($configPath) && \file_exists($configPath)) {
|
||||
return $configPath;
|
||||
}
|
||||
|
||||
// Detect architecture
|
||||
$arch = null;
|
||||
|
@ -426,9 +428,6 @@ class Exif
|
|||
|
||||
// check if file exists
|
||||
if (file_exists($path)) {
|
||||
// make executable
|
||||
chmod($path, 0755);
|
||||
|
||||
// check if the version prints correctly
|
||||
$ver = self::EXIFTOOL_VER;
|
||||
$vero = shell_exec("$path -ver");
|
||||
|
@ -446,6 +445,14 @@ class Exif
|
|||
}
|
||||
}
|
||||
|
||||
// Fallback to perl script
|
||||
$path = dirname(__FILE__) . "/../exiftool-bin/exiftool/exiftool";
|
||||
if (file_exists($path)) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
error_log("Exiftool not found: $path");
|
||||
|
||||
// Fallback to system binary
|
||||
return 'exiftool';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue