vendors.win.php 946 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is largely inspired by the one written for the Symfony framework.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * Get all dependencies needed for Phraseanet (Windows Version)
  12. *
  13. * Set the variables gitDir and phpDir with a trailing slash if it is not set in Windows' %PATH%
  14. * For example :
  15. * $phpDir="c:/php5310/"
  16. */
  17. call_user_func(function() {
  18. $phpDir = "";
  19. chdir(__DIR__);
  20. set_time_limit(0);
  21. $composer = __DIR__ . '/composer.phar';
  22. if ( ! file_exists($composer)) {
  23. file_put_contents($composer, file_get_contents('http://getcomposer.org/installer'), LOCK_EX);
  24. system($phpDir . 'php ' . $composer . ' install');
  25. }
  26. system($phpDir . 'php ' . $composer . ' self-update');
  27. system($phpDir . 'php ' . $composer . ' update');
  28. });