Tuesday, June 23, 2015

HowTo: Set up Win 10 as a Unix-like Dev Workstation

I recently installed a brand new Win 10 preview and set up my Unix-like dev environment on it.

This post basically ties together some of the other posts I've made in the past.  I'll keep this updated as I add steps when I install stuff again in the future.

When you're done with this, you'll have a MinTTY window (like xterm) that looks and acts cool.  Here is mine:




Setup Procedure:

  1. Install MinGW-W64+MSYS
  2. Reboot (May or may not be needed; I couldn't get MsysGit to install without rebooting, but I have Win 10 Preview which is probably buggy).
  3. Install PuTTY/Pageant on Win 10
    1. Configure MinGW-W64+MSYS to use PuTTY Plink/Pageant
  4. Install MsysGit for source control
  5. Install SourceTree
  6. DISABLE anti-virus from running in your source code directories, otherwise when you change branches, it's slower than molasses as your AV is scanning every one of your 1000s of "changed" files every time you switch.
    1. My AV has a way to add directory exceptions, if yours doesn't, you should upgrade
  7. Set up home directory dotfiles
    1. See this Github repo which contains my files.  I recommend you copy these to your homedir and then make whatever changes you want.

Make Git play nicely with Unix/Mac


We MUST ensure that Git does NOT try to auto-convert line endings.

Auto-fuck-up-line-endings has all kinds of horrible side effects, and it is totally unnecessary as long as you use modern text editors that don't care what the line endings of a file are.  (JetBrains has awesome IDEs, pay for a good one and call it a day).

In a MinTTY window run these commands:

git config --global core.autocrlf false
git config --global core.ignorecase false

The second command, core.ignorecase = false, means that if we rename a file from "foo" to "FOO", we will commit that name change to Git.  Usually Windows ignores that since its file system is case-insensitive, but that is the exception rather than the rule, as far as OSes go.

PHP Development Setup


  1. Install PHP
    1. Install PHP YAML extension
  2. Install PhpStorm
    1. I installed it to D:\Apps\PhpStorm
    2. Customize PhpStorm default settings

Python Development Setup


  1. Install Python 2.7.x
    1. Install to C:\dev\python
    2. MANUALLY add to SYSTEM path, if the Installer didn't do it:
      1. C:\dev\python
      2. C:\dev\python\Scripts
    3. Install PyYAML
    4. Install Jinja2
    5. Install setuptools
  2. [optional] Install PyCharm GUI
    1. I installed it to D:\Apps\PyCharm

Google Cloud Setup


  1. Install Google Cloud SDK via Windows Installer
    1. Install to C:\dev\gcloud
    2. Start the SDK shell
      1. Run: gcloud auth login

Edits


12-May-2016 - Install PuTTY before msysGit

10-May-2016 - Updated Python install instructions.

06-May-2016 - Added post specific to SourceTree.  Added pertinent homedir dotfiles to a public Github repo so you can copy them.

1 comment:

  1. very informative post. I will use the suggestions discussing here for optimizing my new blog site.This post will be very helpful for the begaineer SEO worker who are new in this field.
    Keep posting this type of helpful post.
    With best wishes.JetBrains WebStorm 2016

    ReplyDelete