diff --git a/.gitmodules b/.gitmodules index b88c220c8b..560afdd746 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "lib/vendor/exiftool"] - path = lib/vendor/exiftool - url = git://github.com/alchemy-fr/exiftool.git [submodule "lib/vendor/recaptcha"] path = lib/vendor/recaptcha url = git://github.com/alchemy-fr/recaptcha.git diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php b/lib/Alchemy/Phrasea/Controller/Prod/Tools.php index 6dba5746e9..101013bfc4 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Tools.php @@ -40,7 +40,7 @@ class Tools implements ControllerProviderInterface $selection = $helper->get_elements(); - $binary = $app['Core']->getRegistry()->get('GV_exiftool'); + $binary = __DIR__ . '/../../../../../vendor/phpexiftool/exiftool/exiftool'; $metadatas = false; $record = null; diff --git a/lib/Alchemy/Phrasea/Controller/Setup/Installer.php b/lib/Alchemy/Phrasea/Controller/Setup/Installer.php index b1895287b5..35ac50ded7 100644 --- a/lib/Alchemy/Phrasea/Controller/Setup/Installer.php +++ b/lib/Alchemy/Phrasea/Controller/Setup/Installer.php @@ -228,7 +228,6 @@ class Installer implements ControllerProviderInterface $registry->set('GV_cli', $request->get('binary_php'), \registry::TYPE_STRING); $registry->set('GV_imagick', $request->get('binary_convert'), \registry::TYPE_STRING); $registry->set('GV_pathcomposite', $request->get('binary_composite'), \registry::TYPE_STRING); - $registry->set('GV_exiftool', $request->get('binary_exiftool'), \registry::TYPE_STRING); $registry->set('GV_swf_extract', $request->get('binary_swfextract'), \registry::TYPE_STRING); $registry->set('GV_pdf2swf', $request->get('binary_pdf2swf'), \registry::TYPE_STRING); $registry->set('GV_swf_render', $request->get('binary_swfrender'), \registry::TYPE_STRING); diff --git a/lib/classes/API/V1/adapter.class.php b/lib/classes/API/V1/adapter.class.php index e37997faf3..ea9c2b5ba6 100644 --- a/lib/classes/API/V1/adapter.class.php +++ b/lib/classes/API/V1/adapter.class.php @@ -448,7 +448,6 @@ class API_V1_adapter extends API_V1_Abstract 'phpCli' => $registry->get('GV_cli'), 'phpIni' => $registry->get('GV_PHP_INI'), 'imagick' => $registry->get('GV_imagick'), - 'exiftool' => $registry->get('GV_exiftool'), 'swfExtract' => $registry->get('GV_swf_extract'), 'pdf2swf' => $registry->get('GV_pdf2swf'), 'swfRender' => $registry->get('GV_swf_render'), diff --git a/lib/classes/exiftool.class.php b/lib/classes/exiftool.class.php index 740402e2e8..ca0d0013ca 100644 --- a/lib/classes/exiftool.class.php +++ b/lib/classes/exiftool.class.php @@ -11,10 +11,12 @@ class exiftool $ret = array(); if (in_array($system, array('DARWIN', 'LINUX'))) { - $cmd = $registry->get('GV_exiftool') . ' ' . escapeshellarg($filename) . ''; + $cmd = __DIR__ . '/../../vendor/phpexiftool/exiftool/exiftool ' + . escapeshellarg($filename) ; } else { if (chdir($registry->get('GV_RootPath') . 'tmp/')) { - $cmd = 'start /B /LOW ' . $registry->get('GV_exiftool') . ' ' . escapeshellarg($filename) . ''; + $cmd = 'start /B /LOW ' . __DIR__ . '/../../vendor/phpexiftool/exiftool/exiftool.exe ' + . escapeshellarg($filename) . ''; } } if ($cmd) { @@ -73,10 +75,12 @@ class exiftool if (in_array($system, array('DARWIN', 'LINUX'))) { - $cmd = $registry->get('GV_exiftool') . $options . escapeshellarg($file->getPathname()) . ''; + $cmd = __DIR__ . '/../../vendor/phpexiftool/exiftool/exiftool ' + . $options . escapeshellarg($file->getPathname()) . ''; } else { if (chdir($registry->get('GV_RootPath') . 'tmp/')) { - $cmd = 'start /B /LOW ' . $registry->get('GV_exiftool') . $options . escapeshellarg($file->getPathname()) . ''; + $cmd = 'start /B /LOW ' . __DIR__ . '/../../vendor/phpexiftool/exiftool/exiftool.exe' + . ' ' . $options . escapeshellarg($file->getPathname()) . ''; } } diff --git a/lib/classes/patch/320aa.class.php b/lib/classes/patch/320aa.class.php index 3615224602..ad550027de 100644 --- a/lib/classes/patch/320aa.class.php +++ b/lib/classes/patch/320aa.class.php @@ -79,10 +79,6 @@ class patch_320aa implements patchInterface $val = $val === true ? '1' : $val; $val = $val === false ? '0' : $val; - if ($datas['name'] == 'GV_exiftool' && strpos($val, 'lib/exiftool/exiftool') !== false) { - $val = str_replace('lib/exiftool/exiftool', 'lib/vendor/exiftool/exiftool', $val); - } - switch ($datas['type']) { case registry::TYPE_ENUM_MULTI: case registry::TYPE_INTEGER: diff --git a/lib/classes/setup.class.php b/lib/classes/setup.class.php index cc99c020a1..745e7eabb0 100644 --- a/lib/classes/setup.class.php +++ b/lib/classes/setup.class.php @@ -201,7 +201,6 @@ class setup 'MP4Box' => $registry->get('GV_mp4box'), 'xpdf (pdf2text)' => $registry->get('GV_pdftotext'), 'ImageMagick (composite)' => $registry->get('GV_pathcomposite'), - 'Exiftool' => $registry->get('GV_exiftool'), 'FFmpeg' => $registry->get('GV_ffmpeg'), 'MPlayer' => $registry->get('GV_mplayer') ); diff --git a/lib/classes/system/file.class.php b/lib/classes/system/file.class.php index e895c71038..4c1e87f93e 100644 --- a/lib/classes/system/file.class.php +++ b/lib/classes/system/file.class.php @@ -735,12 +735,23 @@ class system_file extends \SplFileInfo $registry = registry::get_instance(); if (in_array($system, array('DARWIN', 'LINUX'))) { - $cmd = $registry->get('GV_exiftool') . ' -m -overwrite_original -XMP-exif:ImageUniqueID=\'' . $this->uuid . '\' -IPTC:UniqueDocumentID=\'' . $this->uuid . '\' ' . escapeshellarg($this->getPathname()) . ''; - } else { // WINDOWS + + $cmd = __DIR__ . '/../../../vendor/phpexiftool/exiftool/exiftool' + . ' -m -overwrite_original ' + . ' -XMP-exif:ImageUniqueID=\'' . $this->uuid . '\'' + . ' -IPTC:UniqueDocumentID=\'' . $this->uuid . '\'' + . ' ' . escapeshellarg($this->getPathname()); + } else { if (chdir($registry->get('GV_RootPath') . 'tmp/')) { - $cmd = 'start /B /LOW ' . $registry->get('GV_exiftool') . ' -m -overwrite_original -XMP-exif:ImageUniqueID=\'' . $this->uuid . '\' -IPTC:UniqueDocumentID=\'' . $this->uuid . '\' ' . escapeshellarg($this->getPathname()) . ''; + + $cmd = 'start /B /LOW ' . __DIR__ . '/../../../vendor/phpexiftool/exiftool/exiftool.exe' + . ' -m -overwrite_original' + . ' -XMP-exif:ImageUniqueID=\'' . $this->uuid . '\'' + . ' -IPTC:UniqueDocumentID=\'' . $this->uuid . '\'' + . ' ' . escapeshellarg($this->getPathname()); } } + if ($cmd) { $s = @shell_exec($cmd); } diff --git a/lib/classes/task/period/upgradetov31.class.php b/lib/classes/task/period/upgradetov31.class.php index 2699190811..430ba3c48b 100644 --- a/lib/classes/task/period/upgradetov31.class.php +++ b/lib/classes/task/period/upgradetov31.class.php @@ -45,10 +45,11 @@ class task_period_upgradetov31 extends task_abstract // task can't be stopped here $appbox = appbox::get_instance(\bootstrap::getCore()); $conn = $appbox->get_connection(); - $registry = $appbox->get_registry(); $running = true; - if ( ! is_executable($registry->get('GV_exiftool'))) { + $binary = __DIR__ . '/../../../../vendor/phpexiftool/exiftool/exiftool'; + + if ( ! is_executable($binary)) { printf("Exiftool is not executable, script can not process\n"); return 'stopped'; diff --git a/lib/classes/task/period/writemeta.class.php b/lib/classes/task/period/writemeta.class.php index 201f03b7b4..b134968fc8 100644 --- a/lib/classes/task/period/writemeta.class.php +++ b/lib/classes/task/period/writemeta.class.php @@ -330,9 +330,15 @@ class task_period_writemeta extends task_databoxAbstract foreach ($tsub as $name => $file) { $cmd = ''; + if ($this->system == 'WINDOWS') + { $cmd = 'start /B /LOW '; - $cmd .= ( $registry->get('GV_exiftool') . ' -m -overwrite_original '); + } + + $cmd .= __DIR__ . '/../../../../vendor/phpexiftool/exiftool/exiftool' + . ' -m -overwrite_original '; + if ($name != 'document' || $this->clear_doc) $cmd .= ' -all:all= '; diff --git a/lib/conf.d/_GV_template.inc b/lib/conf.d/_GV_template.inc index 67f8a7baac..5315755290 100644 --- a/lib/conf.d/_GV_template.inc +++ b/lib/conf.d/_GV_template.inc @@ -435,13 +435,6 @@ $GV = array( 'comment' => _('reglages:: chemin de l\'executable composite'), 'required' => true ), - array( - 'type' => 'string', - 'name' => 'GV_exiftool', - 'default' => '', - 'comment' => _('reglages:: chemin de l\'executable exiftools'), - 'required' => true - ), array( 'type' => 'string', 'name' => 'GV_swf_extract',