vendors.win.php 976 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. {
  19. $phpDir = "";
  20. chdir(__DIR__);
  21. set_time_limit(0);
  22. $composer = __DIR__ . '/composer.phar';
  23. if ( ! file_exists($composer))
  24. {
  25. file_put_contents($composer, file_get_contents('http://getcomposer.org/installer'), LOCK_EX);
  26. system($phpDir . 'php ' . $composer . ' install');
  27. }
  28. system($phpDir . 'php ' . $composer . ' self-update');
  29. system($phpDir . 'php ' . $composer . ' update');
  30. });