diff --git a/README.md b/README.md index bb26a638e7..683ee5b35d 100644 --- a/README.md +++ b/README.md @@ -31,17 +31,48 @@ __gtk__ expects __GTK+__, __GLib__ and __Cairo__ development files to be install ### Windows +Make sure you have the [GNU +ABI](https://www.rust-lang.org/downloads.html#win-foot) version of the rust +compiler installed. Since we need our own toolchain make sure to uncheck +"Linker and platform libraries" in the Rust setup. +![Screenshot](rust_setup.png) + +If you already installed Rust, check if your Rust installation has `gcc.exe` +and `ld.exe` in its `bin` directory. In that case remove those executables, +they will be provided by mingw instead. If you won't you'll probably get a +linking error `ld: cannot find -limm32`. + +For the toolchain one has two possibilities: + 1. Install msys2 with a mingw toolchain and the gtk3 package + 2. Install the mingw-w64 toolchain separately and then install a GTK+ SDK + +#### 1. msys2 toolchain + +This method is recommended according to the [GTK+ project] +(http://www.gtk.org/download/windows.php). You can follow [this guide] +(https://blogs.gnome.org/nacho/2014/08/01/how-to-build-your-gtk-application-on-windows/) +or follow this steps: + + - Install and update [msys2](https://msys2.github.io/) + - Install the mingw toolchain + ``` + $ pacman -S mingw-w64-x86_64-toolchain + ``` + - Install the gtk3 package + ``` + $ pacman -S mingw-w64-x86_64-gtk3 + ``` + +#### 2. separate mingw toolchain + Install [mingw-w64](http://mingw-w64.yaxm.org/) (select the win32 threading model) and download a __GTK+__ SDK: - * The GNOME project has [official distributions](http://win32builder.gnome.org/) of GTK+ 3.4 upto 3.10 + * The GNOME project hosts [distributions](http://win32builder.gnome.org/) of GTK+ 3.4 upto 3.10 * [GTK+ for Windows Runtime Environment Installer: 64-bit](https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer) supports GTK+ 3.14, its SDK downloads can currently be found [here](http://lvserver.ugent.be/gtk-win64/sdk/). Make sure both mingw's and the sdk's `bin` directories are in your `PATH` e.g. (assuming mingw is installed in `C:\mingw-w64` and the SDK unpacked into `C:\gtk`) ``` C:\> set PATH="C:\mingw-w64\bin;C:\gtk\bin;%PATH%" ``` -If your Rust installation has `gcc.exe` and `ld.exe` in its `bin` directory, you may -get a linking error `ld: cannot find -limm32`. In that case remove those executables, -they will be provided by mingw instead. ## Versions diff --git a/rust_setup.png b/rust_setup.png new file mode 100644 index 0000000000..2aa1c0880b Binary files /dev/null and b/rust_setup.png differ