Browse Source

Merge branch 'meganuke' of github-msmith:TechEmpower/FrameworkBenchmarks into meganuke

msmith-techempower 10 years ago
parent
commit
baf226b07d
80 changed files with 695 additions and 736 deletions
  1. 1 1
      frameworks/PHP/php-codeigniter/bash_profile.sh
  2. 0 31
      frameworks/PHP/php-codeigniter/setup.py
  3. 10 0
      frameworks/PHP/php-codeigniter/setup.sh
  4. 1 1
      frameworks/PHP/php-fatfree/bash_profile.sh
  5. 0 42
      frameworks/PHP/php-fatfree/setup.py
  6. 12 0
      frameworks/PHP/php-fatfree/setup.sh
  7. 1 1
      frameworks/PHP/php-fuel/bash_profile.sh
  8. 0 31
      frameworks/PHP/php-fuel/setup.py
  9. 10 0
      frameworks/PHP/php-fuel/setup.sh
  10. 1 1
      frameworks/PHP/php-kohana/bash_profile.sh
  11. 0 31
      frameworks/PHP/php-kohana/setup.py
  12. 10 0
      frameworks/PHP/php-kohana/setup.sh
  13. 1 1
      frameworks/PHP/php-laravel/bash_profile.sh
  14. 0 31
      frameworks/PHP/php-laravel/setup.py
  15. 10 0
      frameworks/PHP/php-laravel/setup.sh
  16. 2 1
      frameworks/PHP/php-lithium/bash_profile.sh
  17. 0 31
      frameworks/PHP/php-lithium/setup.py
  18. 10 0
      frameworks/PHP/php-lithium/setup.sh
  19. 1 1
      frameworks/PHP/php-micromvc/bash_profile.sh
  20. 0 31
      frameworks/PHP/php-micromvc/setup.py
  21. 10 0
      frameworks/PHP/php-micromvc/setup.sh
  22. 1 1
      frameworks/PHP/php-phalcon-micro/bash_profile.sh
  23. 1 1
      frameworks/PHP/php-phalcon-micro/install.sh
  24. 0 23
      frameworks/PHP/php-phalcon-micro/setup.py
  25. 10 0
      frameworks/PHP/php-phalcon-micro/setup.sh
  26. 1 1
      frameworks/PHP/php-phalcon/bash_profile.sh
  27. 1 1
      frameworks/PHP/php-phalcon/install.sh
  28. 0 24
      frameworks/PHP/php-phalcon/setup.py
  29. 11 0
      frameworks/PHP/php-phalcon/setup.sh
  30. 1 1
      frameworks/PHP/php-phpixie/bash_profile.sh
  31. 1 1
      frameworks/PHP/php-phpixie/install.sh
  32. 0 24
      frameworks/PHP/php-phpixie/setup.py
  33. 13 0
      frameworks/PHP/php-phpixie/setup.sh
  34. 1 1
      frameworks/PHP/php-pimf/bash_profile.sh
  35. 0 31
      frameworks/PHP/php-pimf/setup.py
  36. 13 0
      frameworks/PHP/php-pimf/setup.sh
  37. 0 25
      frameworks/PHP/php-pimf/setup_raw.py
  38. 13 0
      frameworks/PHP/php-pimf/setup_raw.sh
  39. 1 1
      frameworks/PHP/php-senthot/bash_profile.sh
  40. 10 0
      frameworks/PHP/php-senthot/setup.sh
  41. 1 1
      frameworks/PHP/php-silex-orm/bash_profile.sh
  42. 0 32
      frameworks/PHP/php-silex-orm/setup.py
  43. 14 0
      frameworks/PHP/php-silex-orm/setup.sh
  44. 1 1
      frameworks/PHP/php-silex/bash_profile.sh
  45. 0 31
      frameworks/PHP/php-silex/setup.py
  46. 13 0
      frameworks/PHP/php-silex/setup.sh
  47. 0 25
      frameworks/PHP/php-silex/setup_raw.py
  48. 13 0
      frameworks/PHP/php-silex/setup_raw.sh
  49. 1 1
      frameworks/PHP/php-silica/bash_profile.sh
  50. 0 32
      frameworks/PHP/php-silica/setup.py
  51. 13 0
      frameworks/PHP/php-silica/setup.sh
  52. 1 1
      frameworks/PHP/php-slim/bash_profile.sh
  53. 0 31
      frameworks/PHP/php-slim/setup.py
  54. 10 0
      frameworks/PHP/php-slim/setup.sh
  55. 1 1
      frameworks/PHP/php-symfony2-stripped/bash_profile.sh
  56. 0 26
      frameworks/PHP/php-symfony2-stripped/setup.py
  57. 13 0
      frameworks/PHP/php-symfony2-stripped/setup.sh
  58. 1 1
      frameworks/PHP/php-symfony2/bash_profile.sh
  59. 0 26
      frameworks/PHP/php-symfony2/setup.py
  60. 13 0
      frameworks/PHP/php-symfony2/setup.sh
  61. 1 1
      frameworks/PHP/php-yaf/bash_profile.sh
  62. 0 24
      frameworks/PHP/php-yaf/setup.py
  63. 10 0
      frameworks/PHP/php-yaf/setup.sh
  64. 1 1
      frameworks/PHP/php-yii2/bash_profile.sh
  65. 0 31
      frameworks/PHP/php-yii2/setup.py
  66. 10 0
      frameworks/PHP/php-yii2/setup.sh
  67. 1 1
      frameworks/PHP/php-zend-framework/bash_profile.sh
  68. 0 24
      frameworks/PHP/php-zend-framework/setup.py
  69. 11 0
      frameworks/PHP/php-zend-framework/setup.sh
  70. 1 1
      frameworks/PHP/php-zend-framework1/bash_profile.sh
  71. 0 24
      frameworks/PHP/php-zend-framework1/setup.py
  72. 11 0
      frameworks/PHP/php-zend-framework1/setup.sh
  73. 1 1
      frameworks/PHP/phreeze/bash_profile.sh
  74. 0 37
      frameworks/PHP/phreeze/setup.py
  75. 12 0
      frameworks/PHP/phreeze/setup.sh
  76. 12 0
      toolset/setup/linux/frameworks/cphalcon.sh
  77. 2 3
      toolset/setup/linux/languages/composer.sh
  78. 20 0
      toolset/setup/linux/languages/cphalcon.sh
  79. 9 9
      toolset/setup/linux/languages/php.sh
  80. 340 0
      toolset/setup/windows/installer.ps1~

+ 1 - 1
frameworks/PHP/php-codeigniter/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx 

+ 0 - 31
frameworks/PHP/php-codeigniter/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import setup_util
-import os
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-codeigniter/application/config/database.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-codeigniter/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-codeigniter", "root " + args.troot)
-
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-codeigniter" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-codeigniter"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-codeigniter", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-codeigniter", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-codeigniter/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' application/config/database.php
+sed -i 's|root .*/FrameworkBenchmarks/php-codeigniter|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-fatfree/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 42
frameworks/PHP/php-fatfree/setup.py

@@ -1,42 +0,0 @@
-
-import subprocess
-import sys
-import setup_util
-import os
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-fatfree/index.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-fatfree/deploy/php", "\".*\/FrameworkBenchmarks/php-fatfree", "\"" + args.troot)
-  setup_util.replace_text("php-fatfree/deploy/php", "Directory .*\/FrameworkBenchmarks/php-fatfree", "Directory " + args.troot)
-  setup_util.replace_text("php-fatfree/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-fatfree", "root " + args.troot)
-  
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-fatfree"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    
-    #subprocess.check_call("sudo cp php-fatfree/deploy/php /etc/apache2/sites-available/", shell=True)
-    #subprocess.check_call("sudo a2ensite php", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-
-    subprocess.check_call("sudo chown -R www-data:www-data php-fatfree", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chmod -R 775 $TROOT/tmp/", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-fatfree", shell=True, stderr=errfile, stdout=logfile)
-
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 12 - 0
frameworks/PHP/php-fatfree/setup.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' index.php
+sed -i 's|.*/FrameworkBenchmarks/php-fatfree|'"${TROOT}"'|g' deploy/php
+sed -i 's|Directory .*/FrameworkBenchmarks/php-fatfree|Directory '"${TROOT}"'|g' deploy/php
+sed -i 's|root .*/FrameworkBenchmarks/php-fatfree|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-fuel/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 31
frameworks/PHP/php-fuel/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-fuel/fuel/app/config/production/db.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-fuel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-fuel", "root " + args.troot)
-
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-fuel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-fuel"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-fuel", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-fuel", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-fuel/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' fuel/app/config/production/db.php
+sed -i 's|root .*/FrameworkBenchmarks/php-fuel|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-kohana/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 31
frameworks/PHP/php-kohana/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import setup_util
-import os
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-kohana/application/config/database.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-kohana/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-kohana", "root " + args.troot)
-
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-kohana" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-kohana"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-kohana", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-kohana", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-kohana/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' application/config/database.php
+sed -i 's|root .*/FrameworkBenchmarks/php-kohana|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-laravel/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 31
frameworks/PHP/php-laravel/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-laravel/application/config/database.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-laravel/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-laravel", "root " + args.troot)
-
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-laravel" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-laravel\\public"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-laravel", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-laravel", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-laravel/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' application/config/database.php
+sed -i 's|root .*/FrameworkBenchmarks/php-laravel|root '"${TROOT}"'|g' deploy/nginx.conf 
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 2 - 1
frameworks/PHP/php-lithium/bash_profile.sh

@@ -4,4 +4,5 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx
+

+ 0 - 31
frameworks/PHP/php-lithium/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-lithium/app/config/bootstrap/connections.php", "192.168.100.102", ""+ args.database_host +"")
-  setup_util.replace_text("php-lithium/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-lithium", "root " + args.troot)
-
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-lithium" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-lithium"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-lithium", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-lithium", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-lithium/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|192.168.100.102|'"${DBHOST}"'|g' app/config/bootstrap/connections.php
+sed -i 's|root .*/FrameworkBenchmarks/php-lithium|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-micromvc/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 31
frameworks/PHP/php-micromvc/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-micromvc/Config/Config.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-micromvc/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-micromvc", "root " + args.troot)
-
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-micromvc" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-micromvc\Public"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-micromvc", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-micromvc", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-micromvc/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' Config/Config.php
+sed -i 's|root .*/FrameworkBenchmarks/php-micromvc|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-phalcon-micro/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 1 - 1
frameworks/PHP/php-phalcon-micro/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-fw_depends php nginx
+fw_depends php cphalcon nginx

+ 0 - 23
frameworks/PHP/php-phalcon-micro/setup.py

@@ -1,23 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-phalcon-micro/public/index.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-phalcon-micro/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-phalcon-micro", "root " + args.troot)
-
-  try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon-micro", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon-micro", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-phalcon-micro/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' public/index.php
+sed -i 's|root .*/FrameworkBenchmarks/php-phalcon-micro|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-phalcon/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 1 - 1
frameworks/PHP/php-phalcon/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-fw_depends php nginx
+fw_depends php cphalcon nginx

+ 0 - 24
frameworks/PHP/php-phalcon/setup.py

@@ -1,24 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-phalcon/app/config/config.php", "mongodb:\/\/localhost", "mongodb://" + args.database_host)
-  setup_util.replace_text("php-phalcon/app/config/config.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-phalcon/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-phalcon", "root " + args.troot)
-
-  try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-phalcon", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-phalcon", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 11 - 0
frameworks/PHP/php-phalcon/setup.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+sed -i 's|mongodb://localhost|mongodb://'"${DBHOST}"'|g' app/config/config.php
+sed -i 's|localhost|'"${DBHOST}"'|g' app/config/config.php
+sed -i 's|root .*/FrameworkBenchmarks/php-phalcon|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-phpixie/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 1 - 1
frameworks/PHP/php-phpixie/install.sh

@@ -1 +1 @@
-#!/bin/bash

fw_depends php composer nginx
+#!/bin/bash

fw_depends php composer nginx

+ 0 - 24
frameworks/PHP/php-phpixie/setup.py

@@ -1,24 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-phpixie/assets/config/db.php", "localhost", "" + args.database_host + "")
-  setup_util.replace_text("php-phpixie/deploy/php-phpixie", "\".*\/FrameworkBenchmarks/php-phpixie", "\"" + args.troot)
-  setup_util.replace_text("php-phpixie/deploy/php-phpixie", "Directory .*\/FrameworkBenchmarks/php-phpixie", "Directory " + args.troot)
-  setup_util.replace_text("php-phpixie/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-phpixie", "root " + args.troot)
-
-  try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-phpixie", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 13 - 0
frameworks/PHP/php-phpixie/setup.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' assets/config/db.php
+sed -i 's|".*/FrameworkBenchmarks/php-phpixie|"'"${TROOT}"'|g' deploy/php-phpixie
+sed -i 's|Directory .*/FrameworkBenchmarks/php-phpixie|Directory '"${TROOT}"'|g' deploy/php-phpixie
+sed -i 's|root .*/FrameworkBenchmarks/php-phpixie|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install --optimize-autoloader
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-pimf/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 31
frameworks/PHP/php-pimf/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-pimf/app/config.app.php", "127.0.0.1", "" + args.database_host + "")
-  setup_util.replace_text("php-pimf/deploy/php-pimf", "\".*\/FrameworkBenchmarks/php-pimf", "\"" + args.troot)
-  setup_util.replace_text("php-pimf/deploy/php-pimf", "Directory .*\/FrameworkBenchmarks/php-pimf", "Directory " + args.troot)
-  setup_util.replace_text("php-pimf/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-pimf", "root " + args.troot)
-
-  try:
-    #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
-    #subprocess.check_call("sudo a2ensite cake", shell=True)
-    #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-pimf")        
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True)
-    #subprocess.check_call("sudo a2dissite cake", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
-    #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 13 - 0
frameworks/PHP/php-pimf/setup.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+sed -i 's|127.0.0.1|'"${DBHOST}"'|g' app/config.app.php
+sed -i 's|".*/FrameworkBenchmarks/php-pimf|"'"${TROOT}"'|g' deploy/php-pimf
+sed -i 's|Directory .*/FrameworkBenchmarks/php-pimf|Directory '"${TROOT}"'|g' deploy/php-pimf
+sed -i 's|root .*/FrameworkBenchmarks/php-pimf|root '"${TROOT}"'|g' deploy/php-pimf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install --optimize-autoloader
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 0 - 25
frameworks/PHP/php-pimf/setup_raw.py

@@ -1,25 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-pimf/app/config.app.php", "127.0.0.1", "" + args.database_host + "")
-  setup_util.replace_text("php-pimf/deploy/php-pimf", "\".*\/FrameworkBenchmarks/php-pimf", "\"" + args.troot)
-  setup_util.replace_text("php-pimf/deploy/php-pimf", "Directory .*\/FrameworkBenchmarks/php-pimf", "Directory " + args.troot)
-  setup_util.replace_text("php-pimf/deploy/nginx_raw.conf", "root .*\/FrameworkBenchmarks/php-pimf", "root " + args.troot)
-
-  try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-pimf")
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx_raw.conf", shell=True)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 13 - 0
frameworks/PHP/php-pimf/setup_raw.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+sed -i 's|127.0.0.1|'"${DBHOST}"'|g' app/config.app.php
+sed -i 's|".*/FrameworkBenchmarks/php-pimf|"'"${TROOT}"'|g' deploy/php-pimf
+sed -i 's|Directory .*/FrameworkBenchmarks/php-pimf|Directory '"${TROOT}"'|g' deploy/php-pimf
+sed -i 's|root .*/FrameworkBenchmarks/php-pimf|root '"${TROOT}"'|g' deploy/php-pimf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx_raw.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install --optimize-autoloader
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx_raw.conf

+ 1 - 1
frameworks/PHP/php-senthot/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 10 - 0
frameworks/PHP/php-senthot/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i "s|'DB_HOST' => 'localhost'|'DB_HOST' => '\"${DBHOST}\"'|g" app/Conf/config.php
+sed -i 's|root .*/FrameworkBenchmarks/php-senthot|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-silex-orm/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 32
frameworks/PHP/php-silex-orm/setup.py

@@ -1,32 +0,0 @@
-
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-silex-orm/web/index.php", "192.168.100.102", "" + args.database_host + "")
-  setup_util.replace_text("php-silex-orm/deploy/php-silex-orm", "\".*\/FrameworkBenchmarks/php-silex-orm", "\"" + args.troot)
-  setup_util.replace_text("php-silex-orm/deploy/php-silex-orm", "Directory .*\/FrameworkBenchmarks/php-silex-orm", "Directory " + args.troot)
-  setup_util.replace_text("php-silex-orm/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-silex-orm", "root " + args.troot)
-
-  try:
-    #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
-    #subprocess.check_call("sudo a2ensite cake", shell=True)
-    #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install", shell=True, cwd="php-silex-orm", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    #subprocess.check_call("sudo a2dissite cake", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
-    #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 14 - 0
frameworks/PHP/php-silex-orm/setup.sh

@@ -0,0 +1,14 @@
+#!/bin/bash
+
+sed -i 's|192.168.100.102|'"${DBHOST}"'|g' web/index.php
+sed -i 's|".*/FrameworkBenchmarks/php-silex-orm|"'"${TROOT}"'|g' deploy/php-silex-orm
+sed -i 's|Directory .*/FrameworkBenchmarks/php-silex-orm|Directory '"${TROOT}"'|g' deploy/php-silex-orm
+sed -i 's|root .*/FrameworkBenchmarks/php-silex-orm|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-silex/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 31
frameworks/PHP/php-silex/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-silex/web/index.php", "192.168.100.102", "" + args.database_host + "")
-  setup_util.replace_text("php-silex/deploy/php-silex", "\".*\/FrameworkBenchmarks/php-silex", "\"" + args.troot)
-  setup_util.replace_text("php-silex/deploy/php-silex", "Directory .*\/FrameworkBenchmarks/php-silex", "Directory " + args.troot)
-  setup_util.replace_text("php-silex/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-silex", "root " + args.troot)
-
-  try:
-    #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
-    #subprocess.check_call("sudo a2ensite cake", shell=True)
-    #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-silex", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    #subprocess.check_call("sudo a2dissite cake", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
-    #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 13 - 0
frameworks/PHP/php-silex/setup.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+sed -i 's|192.168.100.102|'"${DBHOST}"'|g' web/index.php
+sed -i 's|".*\FrameworkBenchmarks/php-silex|"'"${TROOT}"'|g' deploy/php-silex
+sed -i 's|Directory .*/FrameworkBenchmarks/php-silex|Directory '"${TROOT}"'|g' deploy/php-silex
+sed -i 's|root .*/FrameworkBenchmarks/php-silex|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install --optimize-autoloader
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 0 - 25
frameworks/PHP/php-silex/setup_raw.py

@@ -1,25 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-silex/web/index_raw.php", "192.168.100.102", "" + args.database_host + "")
-  setup_util.replace_text("php-silex/deploy/php-silex", "\".*\/FrameworkBenchmarks/php-silex", "\"" + args.troot)
-  setup_util.replace_text("php-silex/deploy/php-silex", "Directory .*\/FrameworkBenchmarks/php-silex", "Directory " + args.troot)
-  setup_util.replace_text("php-silex/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-silex", "root " + args.troot)
-
-  try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-silex", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx_raw.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 13 - 0
frameworks/PHP/php-silex/setup_raw.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+sed -i 's|192.168.100.102|'"${DBHOST}"'|g' web/index_raw.php
+sed -i 's|".*\FrameworkBenchmarks/php-silex|"'"${TROOT}"'|g' deploy/php-silex
+sed -i 's|Directory .*/FrameworkBenchmarks/php-silex|Directory '"${TROOT}"'|g' deploy/php-silex
+sed -i 's|root .*/FrameworkBenchmarks/php-silex|root '"${TROOT}"'|g' deploy/nginx_raw.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx_raw.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install --optimize-autoloader
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx_raw.conf

+ 1 - 1
frameworks/PHP/php-silica/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 32
frameworks/PHP/php-silica/setup.py

@@ -1,32 +0,0 @@
-
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-silica/web/app.php", "192.168.100.102", "" + args.database_host + "")
-  setup_util.replace_text("php-silica/deploy/php-silica", "\".*\/FrameworkBenchmarks/php-silica", "\"" + args.troot)
-  setup_util.replace_text("php-silica/deploy/php-silica", "Directory .*\/FrameworkBenchmarks/php-silica", "Directory " + args.troot)
-  setup_util.replace_text("php-silica/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-silica", "root " + args.troot)
-
-  try:
-    #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
-    #subprocess.check_call("sudo a2ensite cake", shell=True)
-    #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("composer.phar install", shell=True, cwd="php-silica", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    #subprocess.check_call("sudo a2dissite cake", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
-    #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)    
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 13 - 0
frameworks/PHP/php-silica/setup.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+sed -i 's|192.168.100.102|'"${DBHOST}"'|g' web/app.php
+sed -i 's|"./FrameworkBenchmarks/php-silica|"'"${TROOT}"'|g' deploy/php-silica
+sed -i 's|Directory .*/FrameworkBenchmarks/php-silica|Directory '"${TROOT}"'|g' deploy/php-silica
+sed -i 's|root .*/FrameworkBenchmarks/php-silica|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-slim/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 31
frameworks/PHP/php-slim/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-slim/index.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-slim/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-slim", "root " + args.troot)
-
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-slim" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-slim"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-slim", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-slim", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-slim/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' index.php
+sed -i 's|root .*/FrameworkBenchmarks/php-slim| root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-symfony2-stripped/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 26
frameworks/PHP/php-symfony2-stripped/setup.py

@@ -1,26 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-symfony2/app/config/parameters.yml", "database_host: .*", "database_host: " + args.database_host)
-  setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-symfony2", "root " + args.troot)
-
-  try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
-    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
-    subprocess.check_call("php app/console cache:warmup --env=prod --no-debug", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 13 - 0
frameworks/PHP/php-symfony2-stripped/setup.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+sed -i 's|database_host: .*|database_host: '"${DBHOST}"'|g' app/config/parameters.yml
+sed -i 's|root .*/FrameworkBenchmarks/php-symfony2-stripped| root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install --optimize-autoloader
+php app/console cache:clear --env=prod --no-debug
+php app/console cache:warmup --env=prod --no-debug
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-symfony2/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 26
frameworks/PHP/php-symfony2/setup.py

@@ -1,26 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-symfony2/app/config/parameters.yml", "database_host: .*", "database_host: " + args.database_host)
-  setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-symfony2", "root " + args.troot)
-
-  try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
-    subprocess.check_call("php app/console cache:clear --env=prod --no-debug", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
-    subprocess.check_call("php app/console cache:warmup --env=prod --no-debug", shell=True, cwd="php-symfony2", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R www-data:www-data php-symfony2", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-symfony2", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 13 - 0
frameworks/PHP/php-symfony2/setup.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+sed -i 's|database_host: .*|database_host: '"${DBHOST}"'|g' app/config/parameters.yml
+sed -i 's|root .*/FrameworkBenchmarks/php-symfony2| root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install --optimize-autoloader
+php app/console cache:clear --env=prod --no-debug
+php app/console cache:warmup --env=prod --no-debug
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-yaf/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 24
frameworks/PHP/php-yaf/setup.py

@@ -1,24 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-yaf/app/conf/application.ini", "host=localhost", "host="+ args.database_host +"")
-  setup_util.replace_text("php-yaf/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-yaf", "root " + args.troot)
-
-  try:
-    subprocess.check_call("sudo chown -R www-data:www-data php-yaf", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-yaf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-yaf/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|host=localhost|host='"${DBHOST}"'|g' app/conf/application.ini
+sed -i 's|root .*/FrameworkBenchmarks/php-yaf|root '"${TROOT}"'|g' deploy/nginx.conf 
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-yii2/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 31
frameworks/PHP/php-yii2/setup.py

@@ -1,31 +0,0 @@
-import subprocess
-import sys
-import os
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-yii2/app/index.php", "localhost", ""+ args.database_host +"")
-  setup_util.replace_text("php-yii2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-yii2", "root " + args.troot)
-
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-yii2" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-yii2\\app"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.check_call("sudo chown -R www-data:www-data php-yii2", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-yii2", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 10 - 0
frameworks/PHP/php-yii2/setup.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's|localhost|'"${DBHOST}"'|g' app/index.php
+sed -i 's|root .*/FrameworkBenchmarks/php-yii2|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/php-zend-framework/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 24
frameworks/PHP/php-zend-framework/setup.py

@@ -1,24 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-zend-framework/config/autoload/benchmarks.local.php", "host=localhost", "host=" + args.database_host)
-  setup_util.replace_text("php-zend-framework/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-zend-framework", "root " + args.troot)
-
-  try:
-    subprocess.check_call("composer.phar install --optimize-autoloader", shell=True, cwd="php-zend-framework", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R www-data:www-data php-zend-framework", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-zend-framework", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 11 - 0
frameworks/PHP/php-zend-framework/setup.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+sed -i 's|host=localhost|host='"${DBHOST}"'|g' config/autoload/benchmarks.local.php
+sed -i 'root .*/FrameworkBenchmarks/php-zend-framework|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install --optimize-autoloader
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf 

+ 1 - 1
frameworks/PHP/php-zend-framework1/bash_profile.sh

@@ -6,4 +6,4 @@ export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
 export COMPOSER_HOME=${IROOT}/php-composer
 
-export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 24
frameworks/PHP/php-zend-framework1/setup.py

@@ -1,24 +0,0 @@
-import subprocess
-import sys
-import setup_util
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("php-zend-framework1/application/configs/application.ini", "host = \"localhost\"", "host = \"" + args.database_host + "\"")
-  setup_util.replace_text("php-zend-framework1/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/php-zend-framework1", "root " + args.troot)
-
-  try:
-    subprocess.check_call("composer.phar install", shell=True, cwd="php-zend-framework1", stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R www-data:www-data php-zend-framework1", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER php-zend-framework1", shell=True, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 11 - 0
frameworks/PHP/php-zend-framework1/setup.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+sed -i 's|host = "localhost"|host = "'"${DBHOST}"'"|g' application/configs/application.ini
+sed -i 's|root .*/FrameworkBenchmarks/php-zend-framework1|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$COMPOSER_HOME:$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+composer.phar install
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 1 - 1
frameworks/PHP/phreeze/bash_profile.sh

@@ -4,4 +4,4 @@ export PHP_HOME=${IROOT}/php-5.5.17
 
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+export NGINX_HOME=${IROOT}/nginx

+ 0 - 37
frameworks/PHP/phreeze/setup.py

@@ -1,37 +0,0 @@
-import subprocess
-import sys
-import setup_util
-import os
-
-def start(args, logfile, errfile):
-  setup_util.replace_text("phreeze/index.php", "localhost:3306", "" + args.database_host + ":3306")
-  setup_util.replace_text("phreeze/deploy/phreeze", "\".*\/FrameworkBenchmarks/phreeze", "\"" + args.troot)
-  setup_util.replace_text("phreeze/deploy/phreeze", "Directory .*\/FrameworkBenchmarks/phreeze", "Directory " + args.troot)
-  setup_util.replace_text("phreeze/deploy/nginx.conf", "root .*\/FrameworkBenchmarks/phreeze", "root " + args.troot)
-  
-  try:
-    if os.name == 'nt':
-      subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\phreeze" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\phreeze"', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    #subprocess.check_call("sudo cp php/deploy/phreeze /etc/apache2/sites-available/", shell=True)
-    #subprocess.check_call("sudo a2ensite php", shell=True)
-    #subprocess.check_call("sudo chown -R www-data:www-data php", shell=True)
-    #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
-    subprocess.check_call("sudo $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/deploy/nginx.conf", shell=True, stderr=errfile, stdout=logfile)
-    
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
-def stop(logfile, errfile):
-  try:
-    if os.name == 'nt':
-      subprocess.call('appcmd delete site PHP', shell=True, stderr=errfile, stdout=logfile)
-      return 0
-    subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True, stderr=errfile, stdout=logfile)
-    subprocess.call("sudo kill -QUIT $( cat $TROOT/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
-    
-    return 0
-  except subprocess.CalledProcessError:
-    return 1

+ 12 - 0
frameworks/PHP/phreeze/setup.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+
+sed -i 's|localhost:3306|'"${DBHOST}"':3306|g' index.php
+sed -i 's|.*/FrameworkBenchmarks/phreeze|"'"${TROOT}"'|g' deploy/phreeze
+sed -i 's|Directory .*/FrameworkBenchmarks/phreeze|Directory '"${TROOT}"'|g' deploy/phreeze
+sed -i 's|root .*/FrameworkBenchmarks/phreeze|root '"${TROOT}"'|g' deploy/nginx.conf
+sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
+
+export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
+
+$PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
+$NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 12 - 0
toolset/setup/linux/frameworks/cphalcon.sh

@@ -0,0 +1,12 @@
+# phalcon.so
+#   The configure seems broken, does not respect prefix. If you 
+#   update the value of PATH then it finds the prefix from `which php`
+export PATH=$IROOT/php-5.5.17/bin:$IROOT/php-5.5.17/sbin:$PATH
+git clone git://github.com/phalcon/cphalcon.git
+cd cphalcon
+git checkout phalcon-v1.3.2
+cd build/64bits 
+$IROOT/php-5.5.17/bin/phpize
+./configure --prefix=$IROOT/php-5.5.17 --enable-phalcon
+make
+make install

+ 2 - 3
toolset/setup/linux/languages/composer.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-RETCODE=$(fw_exists php-composer.installed)
+RETCODE=$(fw_exists ${IROOT}/php-composer.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 fw_depends php
@@ -12,5 +12,4 @@ mkdir -p php-composer
 PHP_HOME=${IROOT}/php-5.5.17
 ${PHP_HOME}/bin/php composer-installer.php --install-dir=$IROOT/php-composer
 
-touch php-composer.installed
-
+touch ${IROOT}/php-composer.installed

+ 20 - 0
toolset/setup/linux/languages/cphalcon.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# phalcon.so
+#   The configure seems broken, does not respect prefix. If you 
+#   update the value of PATH then it finds the prefix from `which php`
+
+RETCODE=$(fw_exists ${IROOT}/cphalcon.installed)
+[ ! "$RETCODE" == 0 ] || { return 0; }
+
+export PATH=$IROOT/php-5.5.17/bin:$IROOT/php-5.5.17/sbin:$PATH
+git clone git://github.com/phalcon/cphalcon.git
+cd cphalcon
+git checkout phalcon-v1.3.2
+cd build/64bits 
+$IROOT/php-5.5.17/bin/phpize
+./configure --prefix=$IROOT/php-5.5.17 --enable-phalcon
+make
+make install
+
+touch ${IROOT}/cphalcon.installed

+ 9 - 9
toolset/setup/linux/languages/php.sh

@@ -45,15 +45,15 @@ printf "\n" | $IROOT/php-5.5.17/bin/pecl install -f yaf
 # phalcon.so
 #   The configure seems broken, does not respect prefix. If you 
 #   update the value of PATH then it finds the prefix from `which php`
-export PATH=$IROOT/php-5.5.17/bin:$IROOT/php-5.5.17/sbin:$PATH
-git clone git://github.com/phalcon/cphalcon.git
-cd cphalcon
-git checkout phalcon-v1.3.2
-cd build/64bits 
-$IROOT/php-5.5.17/bin/phpize
-./configure --prefix=$IROOT/php-5.5.17 --enable-phalcon
-make
-make install
+#export PATH=$IROOT/php-5.5.17/bin:$IROOT/php-5.5.17/sbin:$PATH
+#git clone git://github.com/phalcon/cphalcon.git
+#cd cphalcon
+#git checkout phalcon-v1.3.2
+#cd build/64bits 
+#$IROOT/php-5.5.17/bin/phpize
+#./configure --prefix=$IROOT/php-5.5.17 --enable-phalcon
+#make
+#make install
 
 # Clean up a bit
 rm -rf $IROOT/php

+ 340 - 0
toolset/setup/windows/installer.ps1~

@@ -0,0 +1,340 @@
+#
+# Versions of software (will need to be updated from time to time)
+#
+
+$node_installer_file      = "node-v0.10.13-x64.msi"
+$node_installer_path      = "v0.10.13/x64/$node_installer_file"
+$python_installer_file    = "python-2.7.5.amd64.msi"
+$python_installer_path    = "2.7.5/$python_installer_file"
+$python_version           = "27"
+$wincache_installer_file  = "wincache-1.3.4-5.4-nts-vc9-x86.exe"
+$wincache_installer_path  = "wincache-1.3.4/$wincache_installer_file"
+$go_installer_file        = "go1.2.windows-amd64.msi"
+$jre_installer_file       = "jre-7u25-windows-x64.exe"
+$jdk_installer_file       = "jdk-7u45-windows-x64.exe"
+$jdk_master_hash          = "943527ed9111cbb746d4ab2bb2c31cd6" 
+# http://www.oracle.com/technetwork/java/javase/downloads/java-se-binaries-checksum-1956892.html
+$resin_version            = "resin-4.0.36"
+$resin_installer_file     = "$resin_version.zip"
+$ant_version              = "apache-ant-1.9.2"
+$ant_installer_file       = "$ant_version-bin.zip"
+$maven_version            = "apache-maven-3.0.5"
+$maven_installer_file     = "$maven_version-bin.zip"
+$maven_installer_path     = "maven-3/3.0.5/binaries/$maven_installer_file"
+$scala_version            = "2.10.2"
+$play_version             = "2.2.0"
+$play_installer_file      = "play-$play_version.zip"
+$mercurial_installer_file = "mercurial-2.6.1-x64.msi"
+$cygwin_installer_file    = "setup-x86_64.exe"
+
+
+$basedir = "C:\FrameworkBenchmarks"
+$workdir = "$basedir\installs"
+New-Item -Path $workdir -Type directory -Force | Out-Null
+
+function GetMd5FileHash($fileName) {
+    [Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null
+    $md5 = [System.Security.Cryptography.MD5]::Create()
+
+    $file = [System.IO.File]::OpenRead($fileName)
+    $hash = $md5.ComputeHash($file)
+    $file.Dispose()
+
+    $sb = New-Object System.Text.StringBuilder
+    $hash | % { [Void]$sb.Append($_.ToString("x2")) }
+    $sb.ToString()
+}
+
+#
+# Chocolatey package manager
+#
+Write-Host "Installing Chocolatey package manager"
+Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
+
+#
+# ASP.NET
+#
+Write-Host "Installing IIS, .NET and ASP.NET..."
+
+# Enable Windows Update to get rid of the yellow warnings
+# But this is not strictly neccessary
+$Updates = (New-Object -ComObject "Microsoft.Update.AutoUpdate").Settings
+$Updates.NotificationLevel = 2 # Notify before download
+$Updates.Save()
+$Updates.Refresh()
+
+Install-WindowsFeature Web-Server
+Install-WindowsFeature Web-Mgmt-Console
+Install-WindowsFeature NET-Framework-45-ASPNET
+Install-WindowsFeature Web-Asp-Net45
+
+$env:Path += ";C:\Windows\system32\inetsrv"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+# Optimize performance
+appcmd set config -section:httpProtocol /allowKeepAlive:true | Out-Null
+appcmd set config -section:httpLogging /dontLog:True | Out-Null
+# Enable detailed error pages
+#appcmd set config -section:system.webServer/httpErrors -errorMode:Detailed | Out-Null
+# Increase queue length for DefaultAppPool to avoid HTTP 503 errors coming from HTTP.SYS
+appcmd set apppool DefaultAppPool /queueLength:65535
+# Increase appConcurrentRequestLimit to avoid HTTP 503.2 errors from IIS http://support.microsoft.com/kb/943891
+appcmd set config -section:system.webServer/serverRuntime /appConcurrentRequestLimit:65535
+
+# URL Rewrite
+$rewrite_url = "http://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi"
+$rewrite_local = "$workdir\rewrite_2.0_rtw_x64.msi"
+(New-Object System.Net.WebClient).DownloadFile($rewrite_url, $rewrite_local)
+Start-Process "msiexec" "/i $rewrite_local /passive" -Wait
+
+#
+# Tools for building .NET projects on the server
+#
+Write-Host "`nInstalling .NET build tools...`n"
+
+# .NET Framework 4.5 SDK
+$sdktools_url = "http://download.microsoft.com/download/F/1/3/F1300C9C-A120-4341-90DF-8A52509B23AC/standalonesdk/sdksetup.exe"
+$sdktools_local = "$workdir\sdksetup.exe"
+(New-Object System.Net.WebClient).DownloadFile($sdktools_url, $sdktools_local)
+Start-Process "$workdir\sdksetup.exe" "/features OptionId.NetFxSoftwareDevelopmentKit /q /layout $workdir\sdksetup" -Wait
+Start-Process "msiexec" "/i $workdir\sdksetup\Redistributable\4.5.50710\sdk_tools4.msi VSEXTUI=1" -Wait
+
+# Web Deploy 3.0
+$webdeploy_url = "http://download.microsoft.com/download/1/B/3/1B3F8377-CFE1-4B40-8402-AE1FC6A0A8C3/WebDeploy_amd64_en-US.msi"
+$webdeploy_local = "$workdir\WebDeploy_amd64_en-US.msi"
+(New-Object System.Net.WebClient).DownloadFile($webdeploy_url, $webdeploy_local)
+Start-Process "msiexec" "/i $webdeploy_local /passive" -Wait
+
+#
+# node.js
+#
+Write-Host "Installing node.js...`n"
+$node_installer_url = "http://nodejs.org/dist/$node_installer_path"
+$node_installer_local = "$workdir\$node_installer_file"
+(New-Object System.Net.WebClient).DownloadFile($node_installer_url, $node_installer_local)
+
+Start-Process $node_installer_local '/passive' -Wait
+$env:Path += ";C:\Program Files\nodejs"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+#
+# Python
+#
+Write-Host "Installing Python...`n"
+$python_installer_url = "http://www.python.org/ftp/python/$python_installer_path"
+$python_installer_local = "$workdir\$python_installer_file"
+(New-Object System.Net.WebClient).DownloadFile($python_installer_url, $python_installer_local)
+
+Start-Process $python_installer_local '/passive' -Wait
+$env:Path += ";C:\Python$python_version"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+#
+# PHP
+#
+Write-Host "Installing PHP..."
+
+# Locate current PHP 5.4 release
+Write-Host "Looking for current PHP 5.4 release"
+$php_download_page_url = 'http://windows.php.net/download/'
+$php_download_page_file = [IO.Path]::GetTempFileName()
+Write-Host "Downloading from $php_download_page_url into $php_download_page_file"
+Try {
+    (New-Object System.Net.WebClient).DownloadFile($php_download_page_url, $php_download_page_file)
+} Catch {
+    Write-Host "ERROR: Could not download from $php_download_page_url."
+    Write-Host $_.Exception.Message
+    Exit 1
+}
+$file = (cat $php_download_page_file) -join ""
+if ($file -match '(?s)h4 id="php-5.4-nts-VC9-x86".*?href="/downloads/releases/(.*?)">Zip</a>') {
+    $php_installer_file = $matches[1]
+    $php_installer_url = "http://windows.php.net/downloads/releases/$php_installer_file"
+    Write-Host "Current PHP 5.4 release found at $php_installer_url"
+}
+else {
+    Write-Host "ERROR: Current PHP release was not found. Aborting."
+    Exit 1
+}
+
+# Download PHP
+$php_installer_local = "$workdir\$php_installer_file"
+Try {
+    (New-Object System.Net.WebClient).DownloadFile($php_installer_url, $php_installer_local)
+} Catch {
+    Write-Host "ERROR: Could not download from $php_installer_url. "
+    Write-Host $_.Exception.Message
+    Exit 1
+}
+
+# Install PHP
+$php = "C:\PHP"
+[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
+[System.IO.Compression.ZipFile]::ExtractToDirectory($php_installer_local, $php) | Out-Null
+$env:Path += ";" + $php; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+# php.ini
+$phpini = "$php\php.ini"
+Copy-Item "$php\php.ini-production" $phpini
+(Get-Content $phpini) -Replace ";date.timezone =", "date.timezone = UTC" | Set-Content $phpini
+(Get-Content $phpini) -Replace "short_open_tag = Off", "short_open_tag = On" | Set-Content $phpini
+(Get-Content $phpini) -Replace "display_errors = Off", "display_errors = Off" | Set-Content $phpini
+(Get-Content $phpini) -Replace "log_errors = On", "log_errors = Off" | Set-Content $phpini
+(Get-Content $phpini) -Replace "output_buffering = 4096", "output_buffering = Off" | Set-Content $phpini
+(Get-Content $phpini) -Replace ";cgi.force_redirect = 1", "cgi.force_redirect = 0" | Set-Content $phpini
+(Get-Content $phpini) -Replace ";fastcgi.impersonate = 1", "fastcgi.impersonate = 0" | Set-Content $phpini
+(Get-Content $phpini) -Replace ";fastcgi.logging = 0", "fastcgi.logging = 0" | Set-Content $phpini
+(Get-Content $phpini) -Replace '; extension_dir = "./"', "extension_dir = `"$php\ext`"" | Set-Content $phpini
+(Get-Content $phpini) -Replace ";extension=", "extension=" | Set-Content $phpini
+(Get-Content $phpini) -Replace "extension=php_(interbase|oci8|oci8_11g|firebird|oci|pspell|sybase_ct|zip|pdo_firebird|pdo_oci|snmp).dll.*", "" | Set-Content $phpini
+
+# IIS with PHP via FastCGI
+Install-WindowsFeature Web-CGI | Out-Null
+appcmd set config -section:system.webServer/fastCgi /+"[fullPath='C:\PHP\php-cgi.exe', arguments='', maxInstances='0', instanceMaxRequests='10000', queueLength='1000', rapidFailsPerMinute='10', idleTimeout='300', activityTimeout='30', requestTimeout='90', protocol='NamedPipe', flushNamedPipe='False']" /commit:apphost | Out-Null
+appcmd set config -section:system.webServer/fastCgi /+"[fullPath='C:\PHP\php-cgi.exe'].environmentVariables.[name='PHPRC', value='C:\PHP\php.ini']" /commit:apphost | Out-Null
+appcmd set config -section:system.webServer/handlers /+"[name='PHP FastCGI', path='*.php', modules='FastCgiModule', verb='*', scriptProcessor='C:\PHP\php-cgi.exe', resourceType='File', requireAccess='Script']" /commit:apphost | Out-Null
+
+# phpinfo() test file
+Set-Content "c:\inetpub\wwwroot\phpinfo.php" "<?php phpinfo(); ?>"
+
+# wincache
+$wincache_url = "http://heanet.dl.sourceforge.net/project/wincache/$wincache_installer_path"
+$wincache_local = "$workdir\$wincache_installer_file"
+(New-Object System.Net.WebClient).DownloadFile($wincache_url, $wincache_local)
+Start-Process $wincache_local "/q /T:$php\ext" -Wait
+Move-Item "$php\ext\wincache*" "c:\inetpub\wwwroot"
+Set-ItemProperty "c:\inetpub\wwwroot\wincache.php" -name IsReadOnly -value $false
+(Get-Content "c:\inetpub\wwwroot\wincache.php") -Replace "'USE_AUTHENTICATION', 1", "'USE_AUTHENTICATION', 0" | Set-Content "c:\inetpub\wwwroot\wincache.php"
+Add-Content $phpini "`n`n[PHP]`n"
+Add-Content $phpini "extension=php_wincache.dll"
+
+# composer
+$composer_url = "https://getcomposer.org/Composer-Setup.exe"
+$composer_local = "$workdir\Composer-Setup.exe"
+(New-Object System.Net.WebClient).DownloadFile($composer_url, $composer_local)
+Start-Process $composer_local "/silent" -Wait
+$env:Path += ";C:\ProgramData\Composer\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+Write-Host ""
+
+#
+# Go
+#
+Write-Host "Installing Go...`n"
+$go_url = "http://go.googlecode.com/files/$go_installer_file"
+$go_local = "$workdir\$go_installer_file"
+(New-Object System.Net.WebClient).DownloadFile($go_url, $go_local)
+Start-Process $go_local "/passive" -Wait
+$env:Path += ";C:\Go\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+#
+# Java
+#
+Write-Host "Installing Java...`n"
+
+# jre
+#Write-Host "Installing JRE...`n"
+#$jre_url = "http://img.cs.montana.edu/windows/$jre_installer_file"
+#$jre_local = "$workdir\$jre_installer_file"
+#$jre_dir = "C:\Java\jre"
+#(New-Object System.Net.WebClient).DownloadFile($jre_url, $jre_local)
+#Start-Process $jre_local "/s INSTALLDIR=$jre_dir" -Wait
+#$env:Path += ";$jre_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+#$env:JAVA_HOME = $jre_dir; [Environment]::SetEnvironmentVariable("JAVA_HOME", $jre_dir, [System.EnvironmentVariableTarget]::Machine)
+
+# jdk
+Write-Host "Installing JDK...`n"
+$jdk_url = "http://ghaffarian.net/downloads/Java/JDK/$jdk_installer_file"
+$jdk_local = "$workdir\$jdk_installer_file"
+$jdk_dir = "C:\Java\jdk"
+(New-Object System.Net.WebClient).DownloadFile($jdk_url, $jdk_local)
+
+$jdk_local_hash = GetMd5FileHash($jdk_local)
+if ($jdk_master_hash -ne $jdk_local_hash)
+{
+    Write-Host $jdk_master_hash
+    Write-Host $jdk_local_hash
+    Write-Host "JDK file checksum mismatch. Aborting!"
+    Exit 1
+}
+
+Start-Process $jdk_local "/s INSTALLDIR=$jdk_dir" -Wait
+$env:Path += ";$jdk_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+$env:JAVA_HOME = $jdk_dir; [Environment]::SetEnvironmentVariable("JAVA_HOME", $jdk_dir, [System.EnvironmentVariableTarget]::Machine)
+
+# resin
+Write-Host "Installing Resin...`n"
+$resin_url = "http://www.caucho.com/download/$resin_installer_file"
+$resin_local = "$workdir\$resin_installer_file"
+$resin_dir = "C:\Java\resin"
+(New-Object System.Net.WebClient).DownloadFile($resin_url, $resin_local)
+[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
+[System.IO.Compression.ZipFile]::ExtractToDirectory($resin_local, $workdir) | Out-Null
+Move-Item "$workdir\$resin_version" $resin_dir
+Copy-Item "$basedir\config\resin.properties" "$resin_dir\conf\resin.properties"
+[Environment]::SetEnvironmentVariable("RESIN_HOME", $resin_dir, [System.EnvironmentVariableTarget]::Machine)
+#$env:Path += ";$resin_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+# ant
+#Write-Host "Installing Ant...`n"
+#$ant_url = "http://apache.mirrors.hoobly.com//ant/binaries/$ant_installer_file"
+#$ant_local = "$workdir\$ant_installer_file"
+#$ant_dir = "C:\Java\ant"
+#(New-Object System.Net.WebClient).DownloadFile($ant_url, $ant_local)
+#[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
+#[System.IO.Compression.ZipFile]::ExtractToDirectory($ant_local, $workdir) | Out-Null
+#Move-Item "$workdir\$ant_version" $ant_dir
+#$env:Path += ";$ant_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+# maven
+Write-Host "Installing Maven...`n"
+$maven_url = "http://mirror.cc.columbia.edu/pub/software/apache/maven/$maven_installer_path"
+$maven_local = "$workdir\$maven_installer_file"
+$maven_dir = "C:\Java\maven"
+(New-Object System.Net.WebClient).DownloadFile($maven_url, $maven_local)
+[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
+[System.IO.Compression.ZipFile]::ExtractToDirectory($maven_local, $workdir) | Out-Null
+Move-Item "$workdir\$maven_version" $maven_dir
+$env:Path += ";$maven_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+# scala
+cinst scala -version $scala_version
+
+# play
+$play_url = "http://downloads.typesafe.com/play/$play_version/$play_installer_file"
+$play_local = "$workdir\$play_installer_file"
+$play_dir = "C:\Java\play"
+(New-Object System.Net.WebClient).DownloadFile($play_url, $play_local)
+[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
+[System.IO.Compression.ZipFile]::ExtractToDirectory($play_local, $workdir) | Out-Null
+Move-Item "$workdir\play-$play_version" $play_dir
+$env:Path += ";$play_dir"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+#
+# Firewall
+#
+Write-Host "Configuring firewall...`n"
+New-NetFirewallRule -DisplayName "HTTP 8080" -Action Allow -Direction Inbound -LocalPort 8080 -Protocol TCP | Out-Null
+
+#
+# Mercurial
+#
+Write-Host "Installing Mercurial...`n"
+$hg_installer_url = "https://bitbucket.org/tortoisehg/files/downloads/$mercurial_installer_file"
+$hg_installer_local = "$workdir\$mercurial_installer_file"
+(New-Object System.Net.WebClient).DownloadFile($hg_installer_url, $hg_installer_local)
+
+Start-Process $hg_installer_local '/passive' -Wait
+$env:Path += ";C:\Program Files\Mercurial"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+#
+# Cygwin (including sftp)
+#
+Write-Host "Installing Cygwin...`n"
+$cygwin_installer_url = "http://cygwin.com/$cygwin_installer_file"
+$cygwin_installer_dir = $workdir + "\cygwin-installer"
+New-Item -Path $cygwin_installer_dir -Type directory -Force | Out-Null
+$cygwin_installer_local = "$cygwin_installer_dir\$cygwin_installer_file"
+(New-Object System.Net.WebClient).DownloadFile($cygwin_installer_url, $cygwin_installer_local)
+
+$cygwin_install_dir = "C:\Cygwin"
+Start-Process $cygwin_installer_local "-q -n -l $cygwin_installer_dir -s http://mirrors.kernel.org/sourceware/cygwin/ -R $cygwin_install_dir -P openssh" -WorkingDirectory "$cygwin_installer_dir" -Wait -RedirectStandardOutput $cygwin_installer_dir\install.log
+$env:Path += ";$cygwin_install_dir;$cygwin_install_dir\bin"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
+
+cd $basedir