Windows Build/MinGW
From K-3D
Build Overview
- K-3D version: 0.7.
- Build environment: MinGW with CMake.
- Runtime environment: Native Win32.
- Pros
- Preferred method of delivering a Win32 build, since it uses a 100% FOSS toolchain.
- Native OpenGL performance.
- Stable.
- Cons
- Known Issues
- None.
- Requirements
- MinGW with MSYS
- CMake
- Boost 1.33 or later (built for MinGW)
- GTK / gtkmm 2.8, most recent versions (runtime + development)
Important Note
You will need the Boost libraries built with MinGW to complete this build. The libraries provided by boost.org will not work - they are built for MSVC. You must either download boost binaries from K-3D, or build them from source, as described in the following instructions.
Build Instructions
Install CMake 2.6
- Download and run http://www.cmake.org/files/v2.6/cmake-2.6.2-win32-x86.exe
- When prompted, choose to add CMake to your PATH, it will be extremely convenient to run the cmake/ctest executables from the command-line later on.
Install MSYS & MinGW
MSYS provides a shell window, bash shell, and utilities that you will need for your K-3D build. MinGW provides a Win32 port of the GNU gcc compiler that you will use to build K-3D.
- Download and run http://downloads.sourceforge.net/mingw/MSYS-1.0.11-2004.04.30-1.exe
- Use the default install directory c:\msys\1.0
- Download and run http://downloads.sourceforge.net/mingw/MinGW-5.1.1.exe
- Choosed Download and install files.
- Choose the Current MinGW package.
- Choose a minimal install, and enable g++ compiler. Do not install MinGW Make.
- Use c:\msys\1.0\mingw as the install path.
- Once the installer completes, add c:\msys\1.0\bin and c:\msys\1.0\mingw\bin' to your PATH environment variable.
Install Boost for MinGW
- Download the prepackaged Boost 1.34 MinGW binaries provided by K-3D.
- Expand the contents of the ZIP file into C:/.
- The Boost header files and libs will be located in C:\Boost. You must add C:\Boost\lib to your PATH.
- For reference, we provide instructions on how to Build MinGW Boost.
Install GTK & gtkmm
- Download and install the most up-to-date "Gtk+/Win32 Development Environment" (for example: "gtk-dev-2.10.11-win32-1.exe") from http://gladewin32.sourceforge.net - recommended install directory is c:\gtk.
- Download and install the most up-to-date gtkmm development installer (for example: "gtkmm-win32-devel-2.10.8-1.exe") from http://ftp.gnome.org/pub/gnome/binaries/win32/gtkmm/ - Note: make absolutely sure you install it in the same directory as GTK+, e.g: c:\gtk.
- Add the GTK+ binary directory c:\gtk\bin to your PATH.
- Set the PKG_CONFIG_PATH environment variable to point to the pkg-config configuration files installed by GTK/gtkmm, typically c:\gtk\lib\pkgconfig.
Download K-3D Sources
Obtain K-3D 0.7 or later, from either Subversion or K-3D Downloads. Place the sources in your c:\msys\1.0\home\<username>\k3d directory.
Initial Build Instructions
In a break from the past, K-3D now requires an out-of-source build. So assuming that you've downloaded the K-3D sources to c:\msys\1.0\home\<username>\k3d, you will need to create a separate directory where the binaries will be created:
$ cd $ mkdir k3d-build
|
|
|
|
|
|
|
Now, you may start the build. In your MSYS window:
$ make
Once the program is built, you can run it out of the build directory:
$ make run
To install everything to its final destination:
$ make install
Subsequent Builds
Whenever you update your source tree from Subversion you should re-run cmake to ensure that your build is completely up-to-date. To do this, cd into your build directory and re-run cmake:
$ cd k3d-build $ make edit_cache
From this point you can configure, deal with any new options that have been introduced in the source tree, and generate your new makefiles. cmake retains your old options, so you won't have to recreate any previous selections.