Remove exiftool gitmodule dependency

This commit is contained in:
Romain Neutron
2012-05-04 01:26:21 +02:00
parent 7fb78bf281
commit fcd3e42737
11 changed files with 33 additions and 28 deletions

3
.gitmodules vendored
View File

@@ -1,6 +1,3 @@
[submodule "lib/vendor/exiftool"]
path = lib/vendor/exiftool
url = git://github.com/alchemy-fr/exiftool.git
[submodule "lib/vendor/recaptcha"] [submodule "lib/vendor/recaptcha"]
path = lib/vendor/recaptcha path = lib/vendor/recaptcha
url = git://github.com/alchemy-fr/recaptcha.git url = git://github.com/alchemy-fr/recaptcha.git

View File

@@ -40,7 +40,7 @@ class Tools implements ControllerProviderInterface
$selection = $helper->get_elements(); $selection = $helper->get_elements();
$binary = $app['Core']->getRegistry()->get('GV_exiftool'); $binary = __DIR__ . '/../../../../../vendor/phpexiftool/exiftool/exiftool';
$metadatas = false; $metadatas = false;
$record = null; $record = null;

View File

@@ -228,7 +228,6 @@ class Installer implements ControllerProviderInterface
$registry->set('GV_cli', $request->get('binary_php'), \registry::TYPE_STRING); $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_imagick', $request->get('binary_convert'), \registry::TYPE_STRING);
$registry->set('GV_pathcomposite', $request->get('binary_composite'), \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_swf_extract', $request->get('binary_swfextract'), \registry::TYPE_STRING);
$registry->set('GV_pdf2swf', $request->get('binary_pdf2swf'), \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); $registry->set('GV_swf_render', $request->get('binary_swfrender'), \registry::TYPE_STRING);

View File

@@ -448,7 +448,6 @@ class API_V1_adapter extends API_V1_Abstract
'phpCli' => $registry->get('GV_cli'), 'phpCli' => $registry->get('GV_cli'),
'phpIni' => $registry->get('GV_PHP_INI'), 'phpIni' => $registry->get('GV_PHP_INI'),
'imagick' => $registry->get('GV_imagick'), 'imagick' => $registry->get('GV_imagick'),
'exiftool' => $registry->get('GV_exiftool'),
'swfExtract' => $registry->get('GV_swf_extract'), 'swfExtract' => $registry->get('GV_swf_extract'),
'pdf2swf' => $registry->get('GV_pdf2swf'), 'pdf2swf' => $registry->get('GV_pdf2swf'),
'swfRender' => $registry->get('GV_swf_render'), 'swfRender' => $registry->get('GV_swf_render'),

View File

@@ -11,10 +11,12 @@ class exiftool
$ret = array(); $ret = array();
if (in_array($system, array('DARWIN', 'LINUX'))) { if (in_array($system, array('DARWIN', 'LINUX'))) {
$cmd = $registry->get('GV_exiftool') . ' ' . escapeshellarg($filename) . ''; $cmd = __DIR__ . '/../../vendor/phpexiftool/exiftool/exiftool '
. escapeshellarg($filename) ;
} else { } else {
if (chdir($registry->get('GV_RootPath') . 'tmp/')) { 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) { if ($cmd) {
@@ -73,10 +75,12 @@ class exiftool
if (in_array($system, array('DARWIN', 'LINUX'))) { 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 { } else {
if (chdir($registry->get('GV_RootPath') . 'tmp/')) { 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()) . '';
} }
} }

View File

@@ -79,10 +79,6 @@ class patch_320aa implements patchInterface
$val = $val === true ? '1' : $val; $val = $val === true ? '1' : $val;
$val = $val === false ? '0' : $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']) { switch ($datas['type']) {
case registry::TYPE_ENUM_MULTI: case registry::TYPE_ENUM_MULTI:
case registry::TYPE_INTEGER: case registry::TYPE_INTEGER:

View File

@@ -201,7 +201,6 @@ class setup
'MP4Box' => $registry->get('GV_mp4box'), 'MP4Box' => $registry->get('GV_mp4box'),
'xpdf (pdf2text)' => $registry->get('GV_pdftotext'), 'xpdf (pdf2text)' => $registry->get('GV_pdftotext'),
'ImageMagick (composite)' => $registry->get('GV_pathcomposite'), 'ImageMagick (composite)' => $registry->get('GV_pathcomposite'),
'Exiftool' => $registry->get('GV_exiftool'),
'FFmpeg' => $registry->get('GV_ffmpeg'), 'FFmpeg' => $registry->get('GV_ffmpeg'),
'MPlayer' => $registry->get('GV_mplayer') 'MPlayer' => $registry->get('GV_mplayer')
); );

View File

@@ -735,12 +735,23 @@ class system_file extends \SplFileInfo
$registry = registry::get_instance(); $registry = registry::get_instance();
if (in_array($system, array('DARWIN', 'LINUX'))) { 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/')) { 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) { if ($cmd) {
$s = @shell_exec($cmd); $s = @shell_exec($cmd);
} }

View File

@@ -45,10 +45,11 @@ class task_period_upgradetov31 extends task_abstract
// task can't be stopped here // task can't be stopped here
$appbox = appbox::get_instance(\bootstrap::getCore()); $appbox = appbox::get_instance(\bootstrap::getCore());
$conn = $appbox->get_connection(); $conn = $appbox->get_connection();
$registry = $appbox->get_registry();
$running = true; $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"); printf("Exiftool is not executable, script can not process\n");
return 'stopped'; return 'stopped';

View File

@@ -330,9 +330,15 @@ class task_period_writemeta extends task_databoxAbstract
foreach ($tsub as $name => $file) { foreach ($tsub as $name => $file) {
$cmd = ''; $cmd = '';
if ($this->system == 'WINDOWS') if ($this->system == 'WINDOWS')
{
$cmd = 'start /B /LOW '; $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) if ($name != 'document' || $this->clear_doc)
$cmd .= ' -all:all= '; $cmd .= ' -all:all= ';

View File

@@ -435,13 +435,6 @@ $GV = array(
'comment' => _('reglages:: chemin de l\'executable composite'), 'comment' => _('reglages:: chemin de l\'executable composite'),
'required' => true 'required' => true
), ),
array(
'type' => 'string',
'name' => 'GV_exiftool',
'default' => '',
'comment' => _('reglages:: chemin de l\'executable exiftools'),
'required' => true
),
array( array(
'type' => 'string', 'type' => 'string',
'name' => 'GV_swf_extract', 'name' => 'GV_swf_extract',