forked from jayharris/dotfiles-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeps.ps1
122 lines (100 loc) · 4.18 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
# 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 python --limit-output
choco install ruby --limit-output
#fonts
choco install sourcecodepro --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 Fiddler --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"
### 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
}