-
Notifications
You must be signed in to change notification settings - Fork 326
Setting up for Windows
On windows we use MSYS2 for compilation at the moment. A Visual Studio build will be nice to have eventually though.
The most popular choice here is to download Anaconda: http://continuum.io/downloads. The installer will take care of setting the PATH variable for you (or allow you to not do that, depending on your preference).
Go to http://msys2.github.io and choose the 64-bit installer. This will give you a version of bash to use, a terminal emulator, lots of cygwin-compiled unix utilities, and a package manager (pacman) that accesses a package repository that is kept pretty up to date. The package manager hosts both utilities that are compiled with mingw-w64 (that is native, like our code), and compiled with cygwin (unix code run on top of an emulation layer). This is a great place for your main development to take place.
NOTE: An issue with the msys2 shell is that it uses mintty as its terminal emulator, which does not correctly deal with console programs asking for user input, making them appear like they are hanging indefinitely. This means you cannot use the python command line from this terminal. A few solutions are as follows:
- Execute all your python stuff from cmd.exe (minimal setup, good if you won't be spending much time in your Windows environment)
- Download ConsoleZ (https://github.com/cbucher/console), which does handle interactive programs correctly, and can launch multiple shell environments in multiple tabs. It takes some customization and getting used to
- Use "python -i"
NOTE2: If you are well-versed in Windows, it is possible to compile GraphLab Create without MSYS2, but we require both mingw-w64's gcc AND bash (for our many build scripts), so this is HIGHLY recommended. Apologies if you prefer Windows command line environments. You could probably make it work if you are determined enough.
Go to http://msysgit.github.io and install git.
You should use git ONLY from the "Git Bash" program that appears after installing and selecting the "Checkout Windows-style, commit Unix-style line endings" option in the click-through installer. This means you'll need a separate shell for using git, and you'll generally only use it for that. It's annoying to juggle many shells, but this might be the simplest way.
You could also tell the git installer to allow the usage of git from the command line. This will allow you to use your preferred shell environment with git. For this to work you must use one of the aforementioned terminal options that works with console programs, as git clones will hang in the msys2 shell. If you go this route, do NOT add git's top-level directory to your path, but rather add the folder titled 'cmd' within that directory to your path. If you have the former you will possibly pick up git bash's many unix utilities over msys2's utilities, and Pandora's box is now open.
If you are confident that you will rarely be accessing repository files with built-in Windows tools, you could also select "Checkout Unix-style, commit Unix-style line endings"
Do this through the MSYS2 shell using "pacman -S "
- mingw-w64-x86_64-gcc
- mingw-w64-x86_64-libidn
- make
- patch
- automake
- autoconf
- mingw-w64-x86_64-libtool
- rsync
- doxygen
- tar
- mingw-w64-x86_64-libssh2
You'll probably also want gdb, but be aware that this will also install a cygwin-compiled python2. If you have your preferred python early in your path, this shouldn't affect you, but some tools will pick up those python libraries instead of the Windows-compiled ones.
Run all the git config commands in the big long answer here: http://stackoverflow.com/questions/5917249/git-symlinks-in-windows You might want to read the answer too. Because we use symlinks, life here is a little more complicated.
After you checkout code, you should run
git rm-symlinks
If you have edited checked-in symlinks and want those changes to be reflected correctly in the repository, before you checkin you should run
git checkout-symlinks
You need mt.exe in your msys2 path, which is found in the latest version of the Windows SDK (Just download the SDK and copy mt.exe to the msys2 bin directory).