Last active
July 4, 2016 19:03
-
-
Save taliaga/8de999e6a11cd2c4dee5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
################################################################################ | |
# This file installs EDEN from the scratch on Windows. | |
# It assumes you have followed instructions from https://eden.esss.com.br/confluence/x/VYCS | |
# | |
# More info about Boxstarter can be found at: | |
# - https://www.simple-talk.com/dotnet/.net-framework/automate-the-complete-windows-environment-setup-and-configuration/ | |
# | |
# Some script examples can be seen at: | |
# - https://gist.github.com/lebsral/40e977f9036f820bc78e | |
# | |
# Some useful links for powershell: | |
# - http://ss64.com/ps/ | |
# - http://cecs.wright.edu/~pmateti/Courses/233/Labs/Scripting/bashVsPowerShellTable.html | |
# - http://windowsitpro.com/powershell/batch-powershell-syntax-differences | |
# | |
# Possible improvements for this script: | |
# - Use regex to check vs version matches 16.00.40219.01 | |
################################################################################ | |
Disable-UAC | |
choco feature enable -n allowGlobalConfirmation | |
echo "################################################################################" | |
echo "# Installing Windows SDK..." | |
cinst windows-sdk-7.1 | |
cinst vcexpress2010 | |
cinst vs2010.1 -version 10.0.40219 | |
copy "\\ironman\dev\repository\visualstudio2010express\2. VC-Compiler-KB2519277.exe" D:\VC-Compiler-KB2519277.exe | |
Start-Process "D:\VC-Compiler-KB2519277.exe" -ArgumentList "/passive" -Wait | |
Remove-Item D:\VC-Compiler-KB2519277.exe | |
# TODO: Execute and check versions are _exactly_ "16.00.40219.01" | |
Start-Process "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe" -Wait | |
cmd /C "call `"C:\Program Files (x86)\Microsoft Visual Studio 10.0\vc\bin\vcvars32.bat`"" | |
cmd /C "call `"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe`"" | |
cinst vcredist2012 vcredist2013 | |
copy "\\ironman\dev\Externals\VisualStudioDebugRuntime\vc80_debug_runtime.msi" D:\vc80_debug_runtime.msi | |
Start-Process "D:\vc80_debug_runtime.msi" -ArgumentList "/passive" -Wait | |
Remove-Item D:\vc80_debug_runtime.msi | |
echo "################################################################################" | |
echo "# Installing Utils..." | |
cinst notepadplusplus | |
cinst javaruntime | |
# Note that we install Miniconda in a separate location (choose a drive with plenty of space) | |
# because the environments and packages are downloaded to a directory inside miniconda | |
cinst miniconda -version 3.9.1 -ia "/S /InstallationType=AllUsers /D=D:\Miniconda" -overrideArguments | |
cinst git.install --params="/GitAndUnixToolsOnPath" | |
cinst cmdermini.portable -version 1.2-beta -pre | |
# Update PATH to have recently installed git and conda | |
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") | |
echo "################################################################################" | |
echo "# Configuring Git..." | |
echo "git can be found at..." | |
cmd /c where git | |
git config --system --add core.autocrlf false | |
git config --system --add http.postbuffer 524288000 | |
git config --system --add push.default current | |
# Improve git-status performance | |
git config --system --add core.preloadindex true | |
git config --system --add core.fscache true | |
# Configure mu | |
git config --global --add mu-repo.remote-base-url ssh://[email protected]:7999/ESSS | |
echo "################################################################################" | |
echo "# Configuring Conda..." | |
echo "conda can be found at..." | |
cmd /c where conda | |
# NOTE: Python must be pinned on conda root environment | |
$cir = conda info --root | |
echo "python ==2.7.9 " | out-file -encoding ASCII $cir\conda-meta\pinned | |
# Note that in the .condarc the esss channel MUST go before the mirror. The following order is because 'add' appends on top | |
$condarc = "$($cir)\.condarc" | |
If (Test-Path $condarc){ | |
Remove-Item $condarc | |
} | |
conda config --system --add channels https://esss:[email protected]/conda-channel/mirror | |
conda config --system --add channels https://esss:[email protected]/conda-channel/esss | |
conda config --system --force --remove channels defaults | |
conda config --system --set show_channel_urls True | |
conda config --system --set always_yes True | |
conda config --system --set use_pip False | |
conda config --system --add disallow anaconda | |
conda config --system --set allow_softlinks False | |
conda config --system --add create_default_packages python | |
conda config --system --add create_default_packages pip | |
# Update conda, but note that it should not use the default channels. | |
conda update --all | |
# Required for parsing the projects environment configuration files... | |
conda install jinja2 mu_repo gnuwin32 | |
echo "conda info..." | |
conda info | |
Enable-UAC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment