Created
July 10, 2014 18:32
-
-
Save vladimir-kotikov/2ccb21705c2e4444b689 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wc = New-Object System.Net.WebClient | |
$destination = $("C:\Users\"+[Environment]::UserName+"\Downloads\node-v0.10.29-x86.msi") | |
$source = "http://nodejs.org/dist/v0.10.29/node-v0.10.29-x86.msi" | |
Write-Host "Downloading nodejs ..." | |
$wc.DownloadFile($source, $destination) | |
Write-Host "Installing nodejs ..." | |
msiexec /qn /norestart /l* $("C:\Users\"+[Environment]::UserName+"\Downloads\nodejs.log") /i $destination ALLUSERS=1 | |
#Git section | |
$destination = $("C:\Users\"+[Environment]::UserName+"\Downloads\Git-1.9.4-preview20140611.exe") | |
$source = "https://github.com/msysgit/msysgit/releases/download/Git-1.9.4-preview20140611/Git-1.9.4-preview20140611.exe" | |
Write-Host "Downloading Git ..." | |
$wc.DownloadFile($source, $destination) | |
$argList="/NORESTART /SILENT" | |
Write-Host "Installing Git ..." | |
Start-Process -FilePath $destination -ArgumentList $argList -Wait | |
Write-Host "Updating PATH ..." | |
$oldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path | |
$newPath=$oldPath+";C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin" | |
#Next line will fail w/o Administrator privileges | |
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH –Value $newPath | |
#CouchDB section | |
$destination = $("C:\Users\"+[Environment]::UserName+"\Downloads\setup-couchdb-1.6.0_R16B02.exe") | |
$source = "http://apache-mirror.rbc.ru/pub/apache/couchdb/binary/win/1.6.0/setup-couchdb-1.6.0_R16B02.exe" | |
Write-Host "Downloading CouchDB ..." | |
$wc.DownloadFile($source, $destination) | |
$argList="/NORESTART /SILENT" | |
Write-Host "Installing CouchDB ..." | |
Start-Process -FilePath $destination -ArgumentList $argList -Wait | |
Write-Host "Updating CouchDB config" | |
$file = "C:\Program Files (x86)\Apache Software Foundation\CouchDB\etc\couchdb\local.ini" | |
$content = Get-Content $file | |
if ( $content -match ";bind_address = 127.0.0.1" ) { | |
$content -replace ";bind_address = 127.0.0.1" , "bind_address = 0.0.0.0" | Set-Content $file | |
} else { | |
Write-Host "CouchDB config is already up-to date or has invalid structure" | |
} | |
#Python section | |
$destination = $("C:\Users\"+[Environment]::UserName+"\Downloads\python-2.7.8.msi") | |
$pythonDir = "C:\Python27\" | |
$source = "https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi" | |
Write-Host "Downloading Python ..." | |
$wc.DownloadFile($source, $destination) | |
Write-Host "Installing Python ..." | |
msiexec /qn /norestart /l* $("C:\Users\"+[Environment]::UserName+"\Downloads\python.log") /i $destination TARGETDIR=$pythonDir ALLUSERS=1 | |
Write-Host "Updating PATH ..." | |
$oldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path | |
$newPath=$oldPath+";C:\Python27\;C:\Python27\Scripts\" | |
#Next line will fail w/o Administrator privileges | |
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH –Value $newPath | |
[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User") | |
#Setup Tools section | |
Write-Host "Installing Setup Tools ..." | |
(Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - | |
#Buildbot prepare and install section | |
Write-Host "Installing buildbot and dependencies ..." | |
easy_install buildbot buildbot-slave | |
Write-Host "" | |
#Grunt-cli install section | |
Write-Host "Installing Grunt-cli and dependencies ..." | |
npm install -g grunt-cli | |
Write-Host "" | |
Write-Host "Press any key to continue ..." | |
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment