2017-02-18 18:05:08 +00:00
|
|
|
# Windows Setup
|
2016-12-12 05:03:56 +00:00
|
|
|
|
2017-09-12 15:26:17 +00:00
|
|
|
* Turn off hibernation
|
2018-10-05 22:48:22 +00:00
|
|
|
* Open admin cmd prompt: `powercfg.exe /hibernate off`
|
2017-09-12 15:26:17 +00:00
|
|
|
|
2018-03-15 18:37:01 +00:00
|
|
|
* Install Windows Defender
|
|
|
|
|
2019-04-02 15:57:58 +00:00
|
|
|
* Enable clear text
|
|
|
|
|
2019-05-13 19:49:58 +00:00
|
|
|
* 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.
|
|
|
|
|
2019-05-24 17:24:38 +00:00
|
|
|
* Configure crash dump storage location for projects via the registry.
|
|
|
|
|
2018-03-15 18:37:01 +00:00
|
|
|
## 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”
|
|
|
|
|
2019-05-13 19:49:58 +00:00
|
|
|
## Disable Win 7 Fault Tolerant Heap
|
|
|
|
*Might be in Win 10+ too?*
|
|
|
|
* I don't see why you want to spend large amounts of CPU time to hide application instability.
|
|
|
|
* https://docs.microsoft.com/en-us/windows/desktop/Win7AppQual/fault-tolerant-heap
|
|
|
|
* Disable on system via regedit: set the REG_DWORD value **HKLM\\Software\\Microsoft\\FTH\\Enabled** to **0**.
|
|
|
|
|
2019-06-06 16:40:36 +00:00
|
|
|
## Setup up Unix-like Shell
|
2017-06-09 20:10:25 +00:00
|
|
|
* Install [MSYS2 w/ MinGW-w64](http://www.msys2.org/) to `C:\msys64`
|
|
|
|
* Open `C:\msys64\mingw64.exe`
|
2019-08-03 06:12:51 +00:00
|
|
|
* Run `pacman -Syu`, then restart the terminal and run `pacman -Su`.
|
2017-08-26 01:45:44 +00:00
|
|
|
* Run `pacman -S base-devel mingw-w64-x86_64-toolchain git bc`
|
2017-06-09 20:10:25 +00:00
|
|
|
* Use `C:\Users\<user>` as the terminal $HOME by editting `C:\msys64\etc\nsswitch.conf` and
|
|
|
|
changing the `db_home` value to `windows`.
|
2017-06-09 23:29:40 +00:00
|
|
|
* You may need to work around an issue with envsubst.exe - you'll know there's a bug if git
|
2019-06-06 16:40:36 +00:00
|
|
|
displays `not a valid identifier line 89: export: dashless` or rebase complains about `new_count`.
|
2017-06-09 23:29:40 +00:00
|
|
|
* To patch, cd into `/mingw64/bin` and run `mv envsubst.exe envsubst.exe_backup`. Now run `pacman -S gettext`
|
|
|
|
and verify that `which envsubst` reports back `/usr/bin/envsubst`.
|
|
|
|
* Bug report is at https://github.com/Alexpux/MSYS2-packages/issues/735
|
2017-04-27 22:40:15 +00:00
|
|
|
* Map caps to left-ctrl using https://sharpkeys.codeplex.com/
|
2018-10-06 00:25:32 +00:00
|
|
|
|
2019-08-03 16:47:07 +00:00
|
|
|
* Use symlink command `cmd //c 'mklink .name-of-dotfile drive:\path\to\file'`.
|
2018-10-06 00:25:32 +00:00
|
|
|
* 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.
|
2017-01-14 03:35:09 +00:00
|
|
|
|
2019-06-06 16:40:36 +00:00
|
|
|
## Setting up dev tools
|
2017-08-25 04:55:11 +00:00
|
|
|
|
|
|
|
* Download the Windows 2003 Resource Kit in order to get tools like `list.exe` (command line hex
|
|
|
|
editor)
|
|
|
|
* URL: https://www.microsoft.com/en-us/download/details.aspx?id=17657
|
|
|
|
* Installer will display a compatibility warning. Ignore it.
|
|
|
|
* Full list of tools can be found here
|
|
|
|
https://www.technlg.net/windows/download-windows-resource-kit-tools/
|
|
|
|
|
2019-06-06 16:40:36 +00:00
|
|
|
## Setting up Visual Studio
|
2018-10-06 00:25:32 +00:00
|
|
|
|
|
|
|
* Use the backed up VS2015 ISO.
|
2019-08-03 16:47:07 +00:00
|
|
|
* Pick a custom install directory, e.g. `/x/programs/Visual Studio 15`
|
2018-10-06 00:25:32 +00:00
|
|
|
* Make sure to not do a default install. You must select the C++ language support.
|
2019-05-13 19:49:58 +00:00
|
|
|
* Edit visual studio options. Open Debugging -> Symbols and add the path to your cached symbols.
|
2017-04-21 17:35:26 +00:00
|
|
|
|
2019-03-28 19:27:59 +00:00
|
|
|
## Setting up Vim
|
|
|
|
|
|
|
|
### Compiling
|
2017-04-21 17:35:26 +00:00
|
|
|
|
2017-06-09 20:10:25 +00:00
|
|
|
* 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`
|
2017-01-14 03:35:09 +00:00
|
|
|
|
2019-03-28 19:27:59 +00:00
|
|
|
### Configuring
|
2017-04-27 22:40:15 +00:00
|
|
|
|
2019-08-03 16:47:07 +00:00
|
|
|
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`.
|
2017-06-09 20:10:25 +00:00
|
|
|
|
2019-06-06 16:40:36 +00:00
|
|
|
### Setting up Custom Search
|
|
|
|
|
2019-03-28 00:12:43 +00:00
|
|
|
* 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.
|
2017-06-09 20:10:25 +00:00
|
|
|
|
2019-06-06 16:40:36 +00:00
|
|
|
### Setting up ctags
|
|
|
|
|
2019-03-28 19:27:59 +00:00
|
|
|
* Install the latest Universal ctags build: https://github.com/universal-ctags/ctags-win32/releases
|
|
|
|
* Place it in `~/bin`.
|
|
|
|
|
2017-06-09 20:10:25 +00:00
|
|
|
## 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](https://github.com/hanslub42/rlwrap)
|
|
|
|
|
2019-03-28 00:12:43 +00:00
|
|
|
## Setting up Rust
|
|
|
|
|
|
|
|
* Install `rustup`: https://win.rustup.rs/
|
|
|
|
|
|
|
|
## Setting up Go
|
|
|
|
|
|
|
|
* Installer: https://golang.org/doc/install
|
2017-06-09 20:10:25 +00:00
|
|
|
|
|
|
|
## Setting up Clojure
|
|
|
|
|
|
|
|
* Install Lein: https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.bat
|
|
|
|
|
2019-06-06 16:40:36 +00:00
|
|
|
## Setting up Xbox stuff
|
2017-11-15 16:30:09 +00:00
|
|
|
|
|
|
|
* 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
|
2019-03-28 19:27:59 +00:00
|
|
|
* cmd-r -> msconfig.exe -> startup tab
|
2017-06-09 20:10:25 +00:00
|
|
|
|
2019-04-02 15:57:58 +00:00
|
|
|
## Software
|
|
|
|
|
2019-08-03 16:47:07 +00:00
|
|
|
* Place into ~/bin
|
|
|
|
* cloc.exe
|
|
|
|
* ctime.exe
|
|
|
|
* youtube-dl.exe
|
|
|
|
|
2019-04-02 15:57:58 +00:00
|
|
|
* Install Desktop Restore (http://www.midiox.com/index.htm?http://midiox.com/desktoprestore.htm)
|
2019-04-27 15:43:06 +00:00
|
|
|
* Install Android platform tools to get adb.exe:
|
|
|
|
* Download Android commandline tools https://developer.android.com/studio/#downloads
|
|
|
|
* Unzip to some location.
|
|
|
|
* Inside the sdk dir, run `$ tools/bin/sdkmanager.bat platform-tools`.
|
|
|
|
* You can now add the platform-tools dir to your path if you want, or just symlink `adb` to `~/bin`.
|
2019-04-02 15:57:58 +00:00
|
|
|
|
2019-06-06 16:40:36 +00:00
|
|
|
### Firefox
|
2019-04-02 15:57:58 +00:00
|
|
|
* 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.
|
2019-04-27 15:43:06 +00:00
|
|
|
|