forked from jayharris/dotfiles-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deps.ps1
137 lines (114 loc) · 5.1 KB
/
deps.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Check to see if we are currently running "as Administrator"
if (!(Verify-Elevated)) {
$newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
$newProcess.Arguments = $myInvocation.MyCommand.Definition;
$newProcess.Verb = "runas";
[System.Diagnostics.Process]::Start($newProcess);
exit
}
### Update Help for Modules
Write-Host "Updating Help..." -ForegroundColor "Yellow"
Update-Help -Force
### Package Providers
Write-Host "Installing Package Providers..." -ForegroundColor "Yellow"
Get-PackageProvider NuGet -Force | Out-Null
# Chocolatey Provider is not ready yet. Use normal Chocolatey
#Get-PackageProvider Chocolatey -Force
#Set-PackageSource -Name chocolatey -Trusted
### Install PowerShell Modules
Write-Host "Installing PowerShell Modules..." -ForegroundColor "Yellow"
Install-Module Posh-Git -Scope CurrentUser -Force
Install-Module PSWindowsUpdate -Scope CurrentUser -Force
### Chocolatey
Write-Host "Installing Desktop Utilities..." -ForegroundColor "Yellow"
if ((which cinst) -eq $null) {
iex (new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')
Refresh-Environment
choco feature enable -n=allowGlobalConfirmation
}
# system and cli
choco install curl --limit-output
choco install nuget.commandline --limit-output
choco install webpi --limit-output
choco install git.install --limit-output -params '"/GitAndUnixToolsOnPath /NoShellIntegration"'
choco install nvm.portable --limit-output
choco install ruby --limit-output
# browsers
choco install GoogleChrome --limit-output; <# pin; evergreen #> choco pin add --name GoogleChrome --limit-output
choco install GoogleChrome.Canary --limit-output; <# pin; evergreen #> choco pin add --name GoogleChrome.Canary --limit-output
choco install Firefox --limit-output; <# pin; evergreen #> choco pin add --name Firefox --limit-output
choco install Opera --limit-output; <# pin; evergreen #> choco pin add --name Opera --limit-output
# dev tools and frameworks
choco install atom --limit-output; <# pin; evergreen #> choco pin add --name Atom --limit-output
choco install Fiddler4 --limit-output
choco install vim --limit-output
choco install winmerge --limit-output
Refresh-Environment
nvm on
$nodeLtsVersion = choco search nodejs-lts --limit-output | ConvertFrom-String -TemplateContent "{Name:package-name}\|{Version:1.11.1}" | Select -ExpandProperty "Version"
nvm install $nodeLtsVersion
nvm use $nodeLtsVersion
Remove-Variable nodeLtsVersion
gem pristine --all --env-shebang
### Windows Features
Write-Host "Installing Windows Features..." -ForegroundColor "Yellow"
# IIS Base Configuration
Enable-WindowsOptionalFeature -Online -All -FeatureName `
"IIS-BasicAuthentication", `
"IIS-DefaultDocument", `
"IIS-DirectoryBrowsing", `
"IIS-HttpCompressionDynamic", `
"IIS-HttpCompressionStatic", `
"IIS-HttpErrors", `
"IIS-HttpLogging", `
"IIS-ISAPIExtensions", `
"IIS-ISAPIFilter", `
"IIS-ManagementConsole", `
"IIS-RequestFiltering", `
"IIS-StaticContent", `
"IIS-WebSockets", `
"IIS-WindowsAuthentication" `
-NoRestart | Out-Null
# ASP.NET Base Configuration
Enable-WindowsOptionalFeature -Online -All -FeatureName `
"NetFx3", `
"NetFx4-AdvSrvs", `
"NetFx4Extended-ASPNET45", `
"IIS-NetFxExtensibility", `
"IIS-NetFxExtensibility45", `
"IIS-ASPNET", `
"IIS-ASPNET45" `
-NoRestart | Out-Null
# Web Platform Installer for remaining Windows features
webpicmd /Install /AcceptEula /Products:"UrlRewrite2"
#webpicmd /Install /AcceptEula /Products:"NETFramework452"
webpicmd /Install /AcceptEula /Products:"Python279"
### Node Packages
Write-Host "Installing Node Packages..." -ForegroundColor "Yellow"
if (which npm) {
npm update npm
npm install -g gulp
npm install -g mocha
npm install -g node-inspector
npm install -g yo
}
### Janus for vim
Write-Host "Installing Janus..." -ForegroundColor "Yellow"
if ((which curl) -and (which vim) -and (which rake) -and (which bash)) {
curl.exe -L https://bit.ly/janus-bootstrap | bash
}
### Visual Studio Plugins
if (which Install-VSExtension) {
### Visual Studio 2015
# VsVim
# Install-VSExtension https://visualstudiogallery.msdn.microsoft.com/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329/file/6390/57/VsVim.vsix
# Productivity Power Tools 2015
# Install-VSExtension https://visualstudiogallery.msdn.microsoft.com/34ebc6a2-2777-421d-8914-e29c1dfa7f5d/file/169971/1/ProPowerTools.vsix
### Visual Studio 2013
# VsVim
# Install-VSExtension https://visualstudiogallery.msdn.microsoft.com/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329/file/6390/57/VsVim.vsix
# Productivity Power Tools 2013
# Install-VSExtension https://visualstudiogallery.msdn.microsoft.com/dbcb8670-889e-4a54-a226-a48a15e4cace/file/117115/4/ProPowerTools.vsix
# Web Essentials 2013
# Install-VSExtension https://visualstudiogallery.msdn.microsoft.com/56633663-6799-41d7-9df7-0f2a504ca361/file/105627/47/WebEssentials2013.vsix
}