dotfiles/windows
2019-08-03 13:56:08 -04:00
..
bash_profile Big cleanup and more streamlined windows setup 2017-02-18 13:05:08 -05:00
bashrc Update vimrc 2019-03-27 20:23:13 -04:00
gitconfig.platform Update git config for Windows 2017-06-09 16:10:39 -04:00
hosts Update Windows host file 2018-12-22 16:36:32 -05:00
inputrc Add an inputrc to windows dir 2017-06-10 16:48:16 -04:00
readme.md Update readme.md 2019-08-03 13:56:08 -04:00
symbolic-link.sh Relocate script helpers to this repo 2019-07-03 17:08:59 -04:00

Windows Setup

  • Turn off hibernation

    • Open admin cmd prompt: powercfg.exe /hibernate off
  • Install Windows Defender

  • Enable clear text

  • Setup a symbol server:

    • Right-click My Computer -> Properties -> Advanced Tab -> Environment Variables
    • Add a new System Variable called _NT_SYMBOL_PATH
    • Set the value to SRV*c:\symbols*http://msdl.microsoft.com/download/symbols, replacing the first path to where you want the symbols to live.
  • Configure crash dump storage location for projects via the registry.

Enable security updates

If you don't have an antivirus program, or you do but it's not verified by Microsoft, then you will not receive security updates unless you set a key in the registry. Note that Windows Defender counts as a valid antivirus program.

Add the following registry key: Key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" Value="cadca5fe-87d3-4b96-b7fb-a231484277cc" Type="REG_DWORD” Data="0x00000000”

Disable Win 7 Fault Tolerant Heap

Might be in Win 10+ too?

Setup up Unix-like Shell

  • Install MSYS2 w/ MinGW-w64 to C:\msys64

    • Open C:\msys64\mingw64.exe
    • Run pacman -Syu, then restart the terminal and run pacman -Su.
    • Run pacman -S base-devel mingw-w64-x86_64-toolchain git bc
    • Use C:\Users\<user> as the terminal $HOME by editting C:\msys64\etc\nsswitch.conf and changing the db_home value to windows.
  • You may need to work around an issue with envsubst.exe - you'll know there's a bug if git displays not a valid identifier line 89: export: dashless or rebase complains about new_count.

  • Map caps to left-ctrl using https://sharpkeys.codeplex.com/

  • Use symlink command cmd //c 'mklink .name-of-dotfile drive:\path\to\file'.

  • Symlink ~/.private-files to the root directory containing dev/.

  • Symlink ~/.dev to ~/.private-files/path/to/dev.

  • Symlink ~/.dotfiles to ~/.dev/path/to/dotfiles.

  • Create ~/bin.

  • Symlink $HOME/bin/sym to $HOME/.dotfiles/windows/symbolic-link.sh. You can now use this to do symlinks.

  • Symlink files in the dotfiles windows folder.

  • Symlink appropriate files in the root dotfiles directory.

    • Ignore all zsh files.
    • Don't symlink .vim folder because Plugged will fail to install the plugins. Just make a copy.
  • Setup private dotfiles. Once done, you should now have ~/bin and ~/.dotfiles/bin in your path.

Configure Private dotfiles

  • The most important task is to setup the c-dev-x64 shortcut for launching a msys shell with appropriate dev environment.
    • Add this to your taskbar and use this for launching a shell.

Setting up dev tools

Setting up Visual Studio

  • Use the backed up VS2015 ISO.
  • Pick a custom install directory, e.g. /x/programs/Visual Studio 15
  • Make sure to not do a default install. You must select the C++ language support.
  • Edit visual studio options. Open Debugging -> Symbols and add the path to your cached symbols.

Setting up Vim

Compiling

  • If for some reason you want to compile Vim on Windows, do the following:
    • Git clone vim from Github
    • cd vim/src
    • make -f Make_ming.mak ARCH=x86-64 OPTIMIZE=MAXSPEED STATIC_STDCPLUS=yes FEATURES=HUGE PYTHON="C:/Python27" PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON3="C:/Python3" PYTHON3_VER=361 DYNAMIC_PYTHON=yes

Configuring

  1. Open Vim and run :PlugInstall to fetch all plugins.
  2. Create tmp folder for swap files. See set directory and set backupdir paths in vimrc.
  • First install Rusto. See Setting up Rust below.
  • Setup ripgrep:
    • Open an msvc x64 shell and run cargo install ripgrep.
    • Verify it works by running rg in a shell.

Setting up ctags

Setting up Cygwin

  • Can create symlinks to dotfiles using the git bash shell. The cygwin home directory is likely going to be C:\cygwin\home\<username>.
  • Build rlwrap

Setting up Rust

Setting up Go

Setting up Clojure

Setting up Xbox stuff

  • Install the xbox controller drivers
  • Turn off stats collection
    • cmd-r, msconfig.exe, startup tab, uncheck Microsoft Xbox 360 Accessories.

Turn off various startup processes

  • cmd-r -> msconfig.exe -> startup tab

Software

Firefox

  • If you see jaggy fonts then about about:config and check the value of gfx.font_rendering.cleartype_params.rendering_mode. Mine was -1 by default. Setting it to 5 removed the bad font rendering.