Commit: b36ff73461d36f4797b8d640a6262a480ac92dd3 Author: Anatol Belski <[email protected]> Tue, 17 Sep 2013 16:05:25 +0200 Parents: 612b2337cfacb4002e4958574379a87f6af00f45 Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=b36ff73461d36f4797b8d640a6262a480ac92dd3 Log: look for the deps recursive, not just for those of exts Changed paths: M client/include/PeclExt.php Diff: diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php index 8a9a00d..efe59e2 100644 --- a/client/include/PeclExt.php +++ b/client/include/PeclExt.php @@ -425,33 +425,9 @@ if (!function_exists('rmtools\combinations')) { return $this->buildConfigureLine($config); } - public function preparePackage() + public function prepareAllDepDlls($dll_file, $target) { - /* XXX check if there are any dep dll/pdb to put together */ - $sub = $this->build->thread_safe ? 'Release_TS' : 'Release'; - $base = $this->build->getObjDir() . DIRECTORY_SEPARATOR . $sub; - $target = TMP_DIR . DIRECTORY_SEPARATOR . $this->getPackageName(); - $files_to_zip = array(); - - $dll_name = 'php_' . $this->name . '.dll'; - $dll_file = $target . DIRECTORY_SEPARATOR . $dll_name; - if (!file_exists($base . DIRECTORY_SEPARATOR . $dll_name)) { - throw new \Exception("'$dll_name' doesn't exist after build, build failed"); - } - if (!copy($base . DIRECTORY_SEPARATOR . $dll_name, $dll_file)) { - throw new \Exception("Couldn't copy '$dll_name' into '$target'"); - } - $files_to_zip[] = $dll_file; - - $pdb_name = 'php_' . $this->name . '.pdb'; - $pdb_file = $target . DIRECTORY_SEPARATOR . $pdb_name; - if (!file_exists($base . DIRECTORY_SEPARATOR . $pdb_name)) { - throw new \Exception("'$pdb_name' doesn't exist after build"); - } - if (!copy($base . DIRECTORY_SEPARATOR . $pdb_name, $pdb_file)) { - throw new \Exception("Couldn't copy '$pdb_name' into '$target'"); - } - $files_to_zip[] = $pdb_file; + $ret = array(); /* Walk the deps if any, but look for them in the lib deps folders only. the deplister will for sure find something like kernel32.dll, @@ -476,7 +452,9 @@ if (!function_exists('rmtools\combinations')) { throw new \Exception("The dependency dll '$dll_name' " . "was found but couldn't be copied into '$target'"); } - $files_to_zip[] = $dll_file; + $ret[] = $dll_file; + /* some dep dll might have another dep :) */ + $ret = array_merge($this->prepareAllDepDlls($look_for, $target), $ret); } $look_for = $deps_path @@ -490,11 +468,43 @@ if (!function_exists('rmtools\combinations')) { throw new \Exception("The dependency pdb '$dll_name' " . "was found but couldn't be copied into '$target'"); } - $files_to_zip[] = $pdb_file; + $ret[] = $pdb_file; } } } + return $ret; + } + + public function preparePackage() + { + $sub = $this->build->thread_safe ? 'Release_TS' : 'Release'; + $base = $this->build->getObjDir() . DIRECTORY_SEPARATOR . $sub; + $target = TMP_DIR . DIRECTORY_SEPARATOR . $this->getPackageName(); + $files_to_zip = array(); + + $dll_name = 'php_' . $this->name . '.dll'; + $dll_file = $target . DIRECTORY_SEPARATOR . $dll_name; + if (!file_exists($base . DIRECTORY_SEPARATOR . $dll_name)) { + throw new \Exception("'$dll_name' doesn't exist after build, build failed"); + } + if (!copy($base . DIRECTORY_SEPARATOR . $dll_name, $dll_file)) { + throw new \Exception("Couldn't copy '$dll_name' into '$target'"); + } + $files_to_zip[] = $dll_file; + + $pdb_name = 'php_' . $this->name . '.pdb'; + $pdb_file = $target . DIRECTORY_SEPARATOR . $pdb_name; + if (!file_exists($base . DIRECTORY_SEPARATOR . $pdb_name)) { + throw new \Exception("'$pdb_name' doesn't exist after build"); + } + if (!copy($base . DIRECTORY_SEPARATOR . $pdb_name, $pdb_file)) { + throw new \Exception("Couldn't copy '$pdb_name' into '$target'"); + } + $files_to_zip[] = $pdb_file; + + /* get all the dep dlls recursive */ + $files_to_zip = array_merge($this->prepareAllDepDlls($dll_file, $target), $files_to_zip); /* pack */ $zip_file = TMP_DIR . DIRECTORY_SEPARATOR . $this->getPackageName() . '.zip'; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
