From 22a5034c7d71e15aaee1f0df276d60847281c5c6 Mon Sep 17 00:00:00 2001 From: v-susanh Date: Mon, 21 Aug 2017 15:46:39 -0700 Subject: [PATCH] updated scripts to take pre-compiled driver binaries (#504) * updated scripts to take pre-compiled driver binaries --- test/Performance/README.md | 39 ++-- test/Performance/compile_php.bat | 3 - test/Performance/setup_env_unix.sh | 242 +++++++++++++++---------- test/Performance/setup_env_windows.ps1 | 110 ++++------- 4 files changed, 197 insertions(+), 197 deletions(-) delete mode 100644 test/Performance/compile_php.bat diff --git a/test/Performance/README.md b/test/Performance/README.md index deb0e34b..d58b49e7 100644 --- a/test/Performance/README.md +++ b/test/Performance/README.md @@ -1,26 +1,30 @@ ## Setup Environment on a clean machine -### Windows -Install Visual Studio 2015 before running the following commands. Make sure C++ tools are enabled. -Run `cmd` as administrator. +The PHP zip file can be downloaded from . + +The SQLSRV and PDO_SQLSRV driver binaries can be downloaded from . + +### Windows +Install Visual Studio 2015 redistributable before running the following commands. +Run `Windows PowerShell` as administrator. - powershell Set-ExecutionPolicy Unrestricted - .\setup_env_windows.ps1 + .\setup_env_windows.ps1 ### Ubuntu 16 - sudo env "PATH=$PATH" bash setup_env_unix.sh Ubuntu16 + sudo env "PATH=$PATH" bash setup_env_unix.sh Ubuntu16 ### RedHat 7 - sudo env "PATH=$PATH" bash setup_env_unix.sh RedHat7 -### Sierra + sudo env "PATH=$PATH" bash setup_env_unix.sh RedHat7 +### MacOS 10.12 Sierra `brew` cannot be run with `sudo` on Sierra. Either enable passwordless `sudo` on the machine or enter the password when prompted. - bash setup_env_unix.sh Sierra + bash setup_env_unix.sh Sierra ## Run benchmarks PHPBench is used to run the benchmarks. Visit http://phpbench.readthedocs.io/en/latest/introduction.html to have an idea how the tool works. -### 1. Modify lib/connect.php with the test database credentials -### 2. Execute run-perf_tests.py. +##### 1. Modify lib/connect.php with the test database credentials +##### 2. Execute run-perf_tests.py + ### Windows py.exe run-perf_tests.py -platform -iterations -iterations-large -result-server -result-db -result-uid -result-pwd -iterations -iterations-large -result-server -result-db -result-uid -result-pwd -`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016 WindowsServer2012 Ubuntu16 RedHat7 Sierra +`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016, WindowsServer2012, Ubuntu16, RedHat7, Sierra. `-iterations` - The number of iterations for regular tests. `-iterations-large` - The number of iterations for the tests that fetch large data. Usually set to 1. -`-result-server` - The server of result database. It is assumed that, the result database already setup before running the tests. -`-result-db` - Database name. With the current result database setup files, this should be set to `TestResults` -`-result-uid` - Result database username -`-result-pwd` Result database password - - - +`-result-server` - The server containing the result database. It is assumed that the result database s already setup before running the tests. +`-result-db` - Database name. With the current result database setup files, this should be set to `TestResults`. +`-result-uid` - Result database username. +`-result-pwd` - Result database password. diff --git a/test/Performance/compile_php.bat b/test/Performance/compile_php.bat deleted file mode 100644 index e08b0f3a..00000000 --- a/test/Performance/compile_php.bat +++ /dev/null @@ -1,3 +0,0 @@ -set options=%2 -set options=%options:"=% -C:\php-sdk\bin\phpsdk_setvars.bat && "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %1 && .\buildconf --force && .\configure %options% && nmake && nmake install \ No newline at end of file diff --git a/test/Performance/setup_env_unix.sh b/test/Performance/setup_env_unix.sh index e8a139dc..a2f51cb0 100644 --- a/test/Performance/setup_env_unix.sh +++ b/test/Performance/setup_env_unix.sh @@ -1,140 +1,190 @@ #!/bin/bash + set -e + if [[ ("$1" = "Ubuntu16" || "$1" = "RedHat7" || "$1" = "Sierra") ]]; then PLATFORM=$1 else - echo "First argument must be one of Ubuntu16, RedHat7, Sierra. Exiting..." + echo "1st argument must be one of Ubuntu16, RedHat7, Sierra. Exiting..." exit 1 fi + if [[ "$2" != 7.*.* ]]; then - echo "Second argument must be PHP version in format of 7.x.x.Exiting..." + echo "2nd argument must be PHP version in format of 7.x.y. Exiting..." exit else PHP_VERSION=$2 fi + if [[ ("$3" != "nts" && "$3" != "ts") ]]; then - echo "Thrid argument must be either nts or ts. Exiting..." + echo "3rd argument must be either nts or ts. Exiting..." exit 1 else PHP_THREAD=$3 fi -if [[ (! -d "$4") || (! -d $4/sqlsrv) || (! -d $4/pdo_sqlsrv) || (! -d $4/shared) ]]; then - echo "Fourth argument must be path to source folder.Path not found.Exiting..." + +if [[ (! -f "$4") || (! -f "$5") ]]; then + echo "5th and 6th argument must be paths to sqlsrv and pdo drivers. Exiting..." exit 1 else - DRIVER_SOURCE_PATH=$4 + SQLSRV_DRIVER=$4 + PDO_DRIVER=$5 fi -rm -rf env_setup.log -touch env_setup.log + if [ $PLATFORM = "Ubuntu16" ]; then - echo "Update..." - yes | sudo dpkg --configure -a >> env_setup.log 2>&1 - yes | sudo apt-get update >> env_setup.log 2>&1 - echo "Installing git, zip, curl, libxml, autoconf, openssl, python3, pip3..." - yes | sudo apt-get install git zip curl autoconf libxml2-dev libssl-dev pkg-config python3 python3-pip >> env_setup.log 2>&1 - echo "OK" - echo "Installing MSODBCSQL..." + printf "Update..." + yes | sudo dpkg --configure -a > env_setup.log + yes | sudo apt-get update >> env_setup.log + printf "done\n" + + printf "Installing git, zip, curl, libxml, autoconf, openssl, python3, pip3..." + yes | sudo apt-get install git zip curl autoconf libxml2-dev libssl-dev pkg-config python3 python3-pip >> env_setup.log + printf "done\n" + + printf "Installing MSODBCSQL..." curl -s https://packages.microsoft.com/keys/microsoft.asc | apt-key add - curl -s https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list - yes | sudo apt-get update >> env_setup.log 2>&1 - yes | sudo ACCEPT_EULA=Y apt-get install msodbcsql >> env_setup.log 2>&1 - yes | sudo apt-get install -qq unixodbc-dev >> env_setup.log 2>&1 - echo "Installing pyodbc" - pip3 install --upgrade pip >> env_setup.log 2>&1 - pip3 install pyodbc >> env_setup.log 2>&1 - echo "OK" + yes | sudo apt-get update >> env_setup.log + yes | sudo ACCEPT_EULA=Y apt-get install msodbcsql >> env_setup.log + yes | sudo apt-get install -qq unixodbc-dev >> env_setup.log + printf "done\n" + + printf "Installing pyodbc" + pip3 install --upgrade pip >> env_setup.log + pip3 install pyodbc >> env_setup.log + printf "done\n" + elif [ $PLATFORM = "RedHat7" ]; then - echo "Update..." - yes | sudo yum update >> env_setup.log 2>&1 - echo "OK" - echo "Enabling EPEL repo..." + printf "Update..." + yes | sudo yum update >> env_setup.log + printf "done\n" + + printf "Enabling EPEL repo..." +# pipe non-error to log file (wget and yum install reports error when there's nothing to do) wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 || true - echo "OK" - echo "Installing python34-setuptools..." - yes | sudo yum install python34-setuptools -y >> env_setup.log 2>&1 - echo "OK" - echo "Installing gcc, git, zip libxml, openssl, EPEL, python3, pip3..." - yes | sudo yum install -y gcc-c++ libxml2-devel git zip openssl-devel python34 python34-devel python34-pip >> env_setup.log 2>&1 - echo "OK" - echo "Installing MSODBCSQL..." + printf "done\n" + + printf "Installing python34-setuptools..." + yes | sudo yum install python34-setuptools -y >> env_setup.log + printf "done\n" + + printf "Installing gcc, git, zip libxml, openssl, EPEL, python3, pip3..." + yes | sudo yum install -y gcc-c++ libxml2-devel git zip openssl-devel python34 python34-devel python34-pip >> env_setup.log + printf "done\n" + + printf "Installing MSODBCSQL..." curl -s https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo - (yes | sudo ACCEPT_EULA=Y yum install -y msodbcsql >> env_setup.log 2>&1) - (yes | sudo yum install -y unixODBC-devel autoconf >> env_setup.log 2>&1) - echo "OK" - echo "Installing pyodbc" - pip3 install --upgrade pip >> env_setup.log 2>&1 - pip3 install pyodbc >> env_setup.log 2>&1 - echo "OK" + (yes | sudo ACCEPT_EULA=Y yum install -y msodbcsql >> env_setup.log) + (yes | sudo yum install -y unixODBC-devel autoconf >> env_setup.log) + printf "done\n" + + printf "Installing pyodbc" + pip3 install --upgrade pip >> env_setup.log + pip3 install pyodbc >> env_setup.log + printf "done\n" + elif [ $PLATFORM = "Sierra" ]; then - echo "Installing homebrew..." - yes | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" >> env_setup.log 2>&1 - echo "OK" - echo "Installing wget..." - brew install wget >> env_setup.log 2>&1 - echo "OK" - echo "Installing svn..." - brew install svn >> env_setup.log 2>&1 - echo "OK" - echo "Installing openssl..." - brew install pkg-config >> env_setup.log 2>&1 - brew install openssl >> env_setup.log 2>&1 - echo "OK" - echo "Installing python3..." - brew install python3 >> env_setup.log 2>&1 - echo "OK" - echo "Installing MSODBCSQL..." - brew tap microsoft/msodbcsql https://github.com/Microsoft/homebrew-msodbcsql >> env_setup.log 2>&1 - brew update >> env_setup.log 2>&1 - yes | ACCEPT_EULA=Y brew install msodbcsql >> env_setup.log 2>&1 - echo "OK" - yes | brew install autoconf >> env_setup.log 2>&1 - echo "Installing pyodbc..." - pip3 install pyodbc >> env_setup.log 2>&1 - echo "OK" + printf "Installing homebrew..." + yes | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" >> env_setup.log + printf "done\n" + + printf "Installing wget..." + brew install wget >> env_setup.log + printf "done\n" + + printf "Installing svn..." + brew install svn >> env_setup.log + printf "done\n" + + printf "Installing openssl..." + brew install pkg-config >> env_setup.log + brew install openssl >> env_setup.log + printf "done\n" + + printf "Installing python3..." + brew install python3 >> env_setup.log + printf "done\n" + + printf "Installing MSODBCSQL..." + brew tap microsoft/msodbcsql https://github.com/Microsoft/homebrew-msodbcsql >> env_setup.log + brew update >> env_setup.log + yes | ACCEPT_EULA=Y brew install --no-sandbox msodbcsql >> env_setup.log + printf "done\n" + + yes | brew install autoconf >> env_setup.log + printf "Installing pyodbc..." + pip3 install pyodbc >> env_setup.log + printf "done\n" fi -echo "Downloading PHP-$PHP_VERSION source tarball..." + +printf "Downloading PHP-$PHP_VERSION source tarball..." +# pipe non-error to log file wget http://ca1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz >> env_setup.log 2>&1 -echo "OK" -echo "Extracting PHP source tarball..." +printf "done\n" + +printf "Extracting PHP source tarball..." rm -rf php-$PHP_VERSION tar -xf php-$PHP_VERSION.tar.gz -echo "OK" -cd php-$PHP_VERSION -mkdir ext/sqlsrv ext/pdo_sqlsrv -cp -r $DRIVER_SOURCE_PATH/sqlsrv/* $DRIVER_SOURCE_PATH/shared ext/sqlsrv -cp -r $DRIVER_SOURCE_PATH/pdo_sqlsrv/* $DRIVER_SOURCE_PATH/shared ext/pdo_sqlsrv +printf "done\n" + +phpDir=php-$PHP_VERSION +cd $phpDir + +printf "Configuring PHP..." ./buildconf --force >> ../env_setup.log 2>&1 -CONFIG_OPTIONS="--enable-cli --enable-cgi --enable-pdo --enable-sqlsrv=shared --with-pdo_sqlsrv=shared --with-odbcver=0x0380 --with-zlib --enable-mbstring --prefix=/usr/local" +CONFIG_OPTIONS="--enable-cli --enable-cgi --with-zlib --enable-mbstring --prefix=/usr/local" [ "${PHP_THREAD}" == "ts" ] && CONFIG_OPTIONS=${CONFIG_OPTIONS}" --enable-maintainer-zts" if [ $PLATFORM = "Sierra" ]; then CONFIG_OPTIONS=$CONFIG_OPTIONS" --with-openssl=/usr/local/opt/openssl/" else CONFIG_OPTIONS=$CONFIG_OPTIONS" --with-openssl" fi -echo "Configuring PHP..." +#pipe non-error to log file (./configure $CONFIG_OPTIONS >> ../env_setup.log 2>&1) -echo "OK" -echo "Compiling PHP and the drivers..." -make >> ../env_setup.log 2>&1 -echo "OK" -sudo make install >> ../env_setup.log 2>&1 +printf "done\n" + +printf "Compiling and installing PHP..." +make >> ../env_setup.log +sudo make install >> ../env_setup.log +printf "done\n" + +# check PHP version +/usr/local/bin/php -v + +printf "Setting up drivers..." +phpExtDir=`/usr/local/bin/php-config --extension-dir` cp php.ini-production php.ini -echo "extension=sqlsrv.so" >> php.ini -echo "extension=pdo_sqlsrv.so" >> php.ini +driverName=$(basename $SQLSRV_DRIVER) +echo "extension=$driverName" >> php.ini +sudo cp -r $SQLSRV_DRIVER $phpExtDir/$driverName +sudo chmod a+r $SQLSRV_DRIVER $phpExtDir/$driverName + +driverName=$(basename $PDO_DRIVER) +echo "extension=$driverName" >> php.ini +sudo cp -r $PDO_DRIVER $phpExtDir/$driverName +sudo chmod a+r $SQLSRV_DRIVER $phpExtDir/$driverName + sudo cp php.ini /usr/local/lib +printf "done\n" + +# check drivers +/usr/local/bin/php --ri sqlsrv +/usr/local/bin/php --ri pdo_sqlsrv + +printf "Installing Composer..." cd .. -php -v -php --ri sqlsrv -php --ri pdo_sqlsrv -echo "Installing Composer..." +# pipe non-error to log file wget https://getcomposer.org/installer -O composer-setup.php >> env_setup.log 2>&1 -php composer-setup.php >> env_setup.log 2>&1 -echo "OK" -echo "Installing PHPBench..." -php composer.phar install >> env_setup.log 2>&1 -echo "OK" -echo "Cleaning up..." -rm -rf php-$PHP_VERSION* compser-setup.php -echo "OK" -echo "Setup completed!" \ No newline at end of file +/usr/local/bin/php composer-setup.php >> env_setup.log +printf "done\n" + +printf "Installing PHPBench...\n" +/usr/local/bin/php composer.phar install >> env_setup.log +printf "done\n" + +printf "Cleaning up..." +rm -rf $phpDir compser-setup.php +printf "done\n" + +echo "Setup completed!" diff --git a/test/Performance/setup_env_windows.ps1 b/test/Performance/setup_env_windows.ps1 index c4a580e5..a6b83633 100644 --- a/test/Performance/setup_env_windows.ps1 +++ b/test/Performance/setup_env_windows.ps1 @@ -1,28 +1,13 @@ Param( [Parameter(Mandatory=$True,Position=1)] - [string]$PHP_VERSION, - [Parameter(Mandatory=$True,Position=2)] - [string]$PHP_THREAD, + [string]$PHP_ZIP, + [Parameter(Mandatory=$True,Position=2)] + [string]$SQLSRV_DRIVER, [Parameter(Mandatory=$True,Position=3)] - [string]$DRIVER_SOURCE_PATH, -[Parameter(Mandatory=$True,Position=4)] - [string]$ARCH + [string]$PDO_DRIVER ) -IF($ARCH -ne "x64" -And $ARCH -ne "x86"){ - Write-Host "ARCH must either x64 or x86" - Break -} - -IF($PHP_THREAD -ne "nts" -And $PHP_THREAD -ne "ts"){ - Write-Host "PHP_THREAD must either nts or ts" - Break -} - -IF($PHP_VERSION -NotMatch "7.[0-1].[0-9]"){ - Write-Host "PHP_VERSION must be in format of 7.x.x" - Break -} +$ErrorActionPreference = "Stop" $startingDir=$pwd.Path $tempFolder=Join-Path $startingDir "temp" @@ -30,17 +15,12 @@ $tempFolder=Join-Path $startingDir "temp" Remove-Item temp -Recurse -Force -ErrorAction Ignore New-Item -ItemType directory -Path temp -(New-Object System.Net.WebClient).DownloadFile("http://windows.php.net/downloads/releases/sha1sum.txt","$tempFolder\sha1sum.txt") -$PHP70_LATEST_VERSION=type $tempFolder\sha1sum.txt | where { $_ -match "php-(7.0\.\d+)-src" } | foreach { $matches[1] } -$PHP71_LATEST_VERSION=type $tempFolder\sha1sum.txt | where { $_ -match "php-(7.1\.\d+)-src" } | foreach { $matches[1] } - -$PHP_VERSION_MINOR=$PHP_VERSION.split(".")[1] - Write-Host "Installing chocolatey..." iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) Write-Host "Installing Git..." choco install -y git -Set-Alias git 'C:\Program Files\Git\cmd\git.exe' + +$gitDir = 'C:\Program Files\Git\cmd\git.exe' Write-Host "Installing Python3..." choco install -y python3 RefreshEnv @@ -54,65 +34,37 @@ msiexec /quiet /passive /qn /i $tempFolder\msodbcsql.msi IACCEPTMSODBCSQLLICENSE Write-Host "Installing 7-Zip..." choco install -y 7zip.install -Write-Host "Downloading PHP-SDK..." -(New-Object System.Net.WebClient).DownloadFile('http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110915.zip', "$tempFolder\binary_tools.zip") -Write-Host "Downloading PHP-$PHP_VERSION source..." -IF($PHP_VERSION -eq $PHP70_LATEST_VERSION -Or $PHP_VERSION -eq $PHP71_LATEST_VERSION){ -(New-Object System.Net.WebClient).DownloadFile("http://windows.php.net/downloads/releases/php-$PHP_VERSION-src.zip", "$tempFolder\php-$PHP_VERSION-src.zip") -} -ELSE{ -(New-Object System.Net.WebClient).DownloadFile("http://windows.php.net/downloads/releases/archives/php-$PHP_VERSION-src.zip", "$tempFolder\php-$PHP_VERSION-src.zip") -} +Write-Host "Installing PHP..." +$phpDir="C:\php" -Write-Host "Downloading Dependencies..." -(New-Object System.Net.WebClient).DownloadFile("http://windows.php.net/downloads/php-sdk/deps-7.$PHP_VERSION_MINOR-vc14-$ARCH.7z", "$tempFolder\deps-7.$PHP_VERSION_MINOR-vc14-$ARCH.7z") +# remove existing PHP and setup new one +Remove-Item $phpDir -Recurse -ErrorAction Ignore +New-Item -ItemType directory -Path $phpDir +Expand-Archive $PHP_ZIP -DestinationPath $phpDir +Copy-Item $SQLSRV_DRIVER $phpDir\ext +Copy-Item $PDO_DRIVER $phpDir\ext -Add-Type -AssemblyName System.IO.Compression.FileSystem -Remove-Item C:\php-sdk -Recurse -Force -ErrorAction Ignore -New-Item -ItemType directory -Path C:\php-sdk -[System.IO.Compression.ZipFile]::ExtractToDirectory("$tempFolder\binary_tools.zip", "C:\php-sdk") -cd C:\php-sdk\ -bin\phpsdk_buildtree.bat phpdev -New-Item -ItemType directory -Path .\phpdev\vc14 -Copy-Item .\phpdev\vc9\* phpdev\vc14\ -recurse -[System.IO.Compression.ZipFile]::ExtractToDirectory("$tempFolder\php-$PHP_VERSION-src.zip", "C:\php-sdk\phpdev\vc14\$ARCH\") -7z.exe x $tempFolder\deps-7.$PHP_VERSION_MINOR-vc14-$ARCH.7z -oC:\php-sdk\phpdev\vc14\$ARCH\ +# setup driver +Copy-Item $phpDir\php.ini-production $phpDir\php.ini +Add-Content $phpDir\php.ini "extension=$phpDir\ext\php_openssl.dll" +Add-Content $phpDir\php.ini "extension=$phpDir\ext\php_mbstring.dll" -bin\phpsdk_setvars.bat - -cd C:\php-sdk\phpdev\vc14\$ARCH\php-$PHP_VERSION-src - -New-Item -ItemType directory -Path .\ext\sqlsrv -New-Item -ItemType directory -Path .\ext\pdo_sqlsrv -Copy-Item $DRIVER_SOURCE_PATH\sqlsrv\* .\ext\sqlsrv\ -recurse -Copy-Item $DRIVER_SOURCE_PATH\shared\ .\ext\sqlsrv\ -recurse -Copy-Item $DRIVER_SOURCE_PATH\pdo_sqlsrv\* .\ext\pdo_sqlsrv\ -recurse -Copy-Item $DRIVER_SOURCE_PATH\shared\ .\ext\pdo_sqlsrv\ -recurse - - -$CONFIG_OPTIONS="--enable-cli --enable-cgi --enable-sqlsrv=shared --enable-pdo=shared --with-pdo-sqlsrv=shared --with-odbcver=0x0380 --enable-mbstring --with-openssl" -if ($PHP_THREAD -ceq "nts") { - $CONFIG_OPTIONS=$CONFIG_OPTIONS + " --disable-zts" -} -& $startingDir\compile_php.bat $ARCH $CONFIG_OPTIONS - - - - -Copy-Item php.ini-production php.ini -Add-Content php.ini "extension=C:\php\ext\php_sqlsrv.dll" -Add-Content php.ini "extension=C:\php\ext\php_pdo_sqlsrv.dll" -Add-Content php.ini "extension=C:\php\ext\php_openssl.dll" -Move-Item php.ini C:\Windows -force -Copy-Item C:\php-sdk\phpdev\vc14\$ARCH\deps\bin\ssleay32.dll C:\Windows -force -Copy-Item C:\php-sdk\phpdev\vc14\$ARCH\deps\bin\libeay32.dll C:\Windows -force +$driverName=Split-Path $SQLSRV_DRIVER -leaf +Add-Content $phpDir\php.ini "extension=$phpDir\ext\$driverName" +$driverName=Split-Path $PDO_DRIVER -leaf +Add-Content $phpDir\php.ini "extension=$phpDir\ext\$driverName" +Move-Item $phpDir\php.ini C:\Windows -force +Copy-Item $phpDir\ssleay32.dll C:\Windows -force +Copy-Item $phpDir\libeay32.dll C:\Windows -force cd $startingDir -[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\php\", [System.EnvironmentVariableTarget]::Machine) -$env:Path += ";C:\php\" +[Environment]::SetEnvironmentVariable("Path", $env:Path + ";" + $phpDir + ";" + $gitDir, [System.EnvironmentVariableTarget]::Machine) +$env:Path = $env:Path + ";" + $phpDir + ";" + $gitDir RefreshEnv + +# setup composer wget https://getcomposer.org/installer -O composer-setup.php php composer-setup.php php composer.phar install Remove-Item temp -Recurse -Force -ErrorAction Ignore -Write-Host "Setup completed!" \ No newline at end of file +Write-Host "Setup completed!"