|
try { |
|
|
|
$Boxstarter.RebootOk=$true |
|
$Boxstarter.AutoLogin=$true |
|
$Boxstarter.NoPassword=$false # Is this a machine with no login password? |
|
|
|
Install-WindowsUpdate -acceptEula -getUpdatesFromMS |
|
|
|
# Allow running PowerShell scripts |
|
Update-ExecutionPolicy Unrestricted |
|
|
|
New-Item -Force -ItemType directory -Path "C:\Python34on27" |
|
New-Item -Force -ItemType directory -Path "C:\Python34" |
|
|
|
if (Test-PendingReboot) { Invoke-Reboot } |
|
|
|
## Install chocolatey packages |
|
choco install boxstarter |
|
choco install boxstarter.chocolatey |
|
choco install boxstarter.azure |
|
|
|
if (Test-PendingReboot) { Invoke-Reboot } |
|
|
|
choco install cmder |
|
choco install git-credential-winstore |
|
choco install git |
|
choco install nodejs.install |
|
|
|
choco install python2 -version 2.7.8 |
|
choco install python |
|
choco install easy.install |
|
choco install pip |
|
|
|
choco install ruby -version 1.8.7.37402 -my |
|
choco install ruby -version 1.9.3.55100 -my |
|
choco install ruby -version 2.1.3.0 -my |
|
|
|
choco install paint.net |
|
|
|
if (Test-PendingReboot) { Invoke-Reboot } |
|
|
|
choco install ruby.devkit |
|
choco install atom |
|
choco install filezilla |
|
choco install filezilla.commandline |
|
choco install winmerge |
|
choco install webpicommandline |
|
choco install zoomit |
|
choco install OptiPNG |
|
choco install vim |
|
choco install pngout |
|
choco install Cygwin |
|
|
|
if (Test-PendingReboot) { Invoke-Reboot } |
|
|
|
choco install cyg-get |
|
choco install putty |
|
choco install Wget |
|
choco install sqlite |
|
choco install sqlite.shell |
|
|
|
pip install --upgrade setuptools |
|
easy_install -U setuptools |
|
|
|
if (Test-PendingReboot) { Invoke-Reboot } |
|
|
|
## Install Cygwin packages |
|
cyg-get curl,openssh,util-linux,wget |
|
|
|
Set-Variable -Name DropboxFolder -Value "E:\Cloud\Dropbox\" |
|
|
|
# Others |
|
easy_install glue |
|
pip install pywin |
|
|
|
[Environment]::SetEnvironmentVariable("HOME", $Env:UserProfile, "User") |
|
[Environment]::SetEnvironmentVariable("CMDER_ROOT", "C:\tools\cmder", "User") |
|
|
|
# Create Symbolic Links |
|
Remove-Item -Path "$env:USERPROFILE\_vimrc" -Force |
|
New-Symlink -LiteralPath "$env:USERPROFILE\_vimrc" -TargetPath "$DropboxFolder\Arquivos de Instala��o\_vimrc" |
|
Remove-Item -Path "$env:USERPROFILE\.gitconfig" -Force |
|
New-Symlink -LiteralPath "$env:USERPROFILE\.gitconfig" -TargetPath "$DropboxFolder\Arquivos de Instala��o\.gitconfig" |
|
|
|
## PowerShell |
|
Remove-Item -Path "$env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" -Force |
|
New-Symlink -LiteralPath "$env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" -TargetPath "$DropboxFolder\Arquivos de Instala��o\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" |
|
Remove-Item -Path "$env:USERPROFILE\Documents\WindowsPowerShell\Modules" -Force -Recurse |
|
New-Symlink -LiteralPath "$env:USERPROFILE\Documents\WindowsPowerShell\Modules" -TargetPath "$DropboxFolder\Arquivos de Instala��o\WindowsPowerShell\Modules" |
|
|
|
## Cmder |
|
Remove-Item -Path "$env:CMDER_ROOT\config" -Force -Recurse |
|
New-Symlink -LiteralPath "$env:CMDER_ROOT\config" -TargetPath "$DropboxFolder\Arquivos de Instala��o\Cmder\config" |
|
Remove-Item -Path "$env:CMDER_ROOT\vendor" -Force -Recurse |
|
New-Symlink -LiteralPath "$env:CMDER_ROOT\vendor" -TargetPath "$DropboxFolder\Arquivos de Instala��o\Cmder\vendor" |
|
|
|
## Cygwin |
|
Remove-Item -Path "$env:USERPROFILE\.bash_profile" -Force |
|
New-Symlink -LiteralPath "$env:USERPROFILE\.bash_profile" -TargetPath "$DropboxFolder\Arquivos de Instala��o\.bash_profile" |
|
|
|
Install-ChocolateyPinnedTaskBarItem "$env:CMDER_ROOT\Cmder.exe" |
|
|
|
if (Test-PendingReboot) { Invoke-Reboot } |
|
|
|
# Powershell Modules |
|
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex #PS get |
|
iex (wget "https://raw.githubusercontent.com/raeffs/git-extras-windows/master/install.ps1").Content #Git Extras for Windows |
|
Install-Module PSReadLine |
|
Install-Module go |
|
Install-Module posh-git |
|
Install-Module posh-npm |
|
Install-Module PsConfig |
|
|
|
# Ruby gems |
|
gem install pik |
|
gem install sass |
|
|
|
# Packages config |
|
pik_install C:\bin |
|
pik add "$env:ChocolateyInstall\lib\ruby.portable.1.8.7.37401\tools\ruby\ruby-1.8.7-p374-i386-mingw32\bin" |
|
|
|
# Node packages |
|
npm install -g coffee-script |
|
npm install -g grunt-cli |
|
npm install -g bower |
|
npm install -g gulp |
|
npm install -g gh |
|
|
|
## Linter |
|
npm install -g jshint |
|
npm install -g coffeelint |
|
npm install -g csslint |
|
### TODO: see docs for install xml linter |
|
#### http://flowingmotion.jojordan.org/2011/10/08/3-steps-to-download-xmllint/ |
|
|
|
npm install -g cordova |
|
npm install -g ionic |
|
|
|
## TODO: Install |
|
|
|
Get-ChocolateyWebFile -url "http://github.com/nunit/nunitv2/releases/download/2.6.4/NUnit-2.6.4.msi" -fileFullPath "$env:USERPROFILE\Downloads\NUnit-2.6.4.msi" |
|
Get-ChocolateyWebFile -url "https://s3.amazonaws.com/github-cloud/releases/1396895/42e798a8-8a2e-11e4-9b1a-5e046b584edf.msi?response-content-disposition=attachment%3B%20filename%3Dopencover.4.5.3522.msi&response-content-type=application/octet-stream&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1428188678&Signature=DK9O71BI5NRgpGqMUyP8mY6%2BWBk%3D" -fileFullPath "$env:USERPROFILE\Downloads\opencover.4.5.3522.msi" |
|
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\tools\cygwin\bin;C:\bin;$env:LOCALAPPDATA\Apps\OpenCover;$DropboxFolder\Arquivos de Instala��o\AppPath\libxml;", "User") |
|
|
|
Write-ChocolateySuccess 'Dev-Boxstarter' |
|
} catch { |
|
Write-ChocolateyFailure 'Dev-Boxstarter' $($_.Exception.Message) |
|
throw |
|
} |