4 Read this, it's important!
5 ===========================
7 If you are reading this, then you are looking at the *development* version of Cura. If you just want to use Cura, take a look at the following location: https://daid.github.com/Cura
12 Cura is developed in Python with a C++ engine. The part you are looking at right now is the Python GUI.
13 The C++ engine is responsible for generating the actual toolpath. For development of the engine check out https://github.com/Ultimaker/CuraEngine
\r
18 Before posting issues (either Bugs, Feature requests or Requests for information) please read our policies carefully. These will be regulary updated and can be found at https://github.com/daid/Cura/wiki/Issue-policies
24 Cura development comes with a script "package.sh", this script has been designed to run under *nix OSes (Linux, MacOS). For Windows the package.sh script can be run from bash using git.
25 The "package.sh" script generates a final release package. You should not need it during development, unless you are changing the release process. If you want to distribute your own version of Cura, then the package.sh script will allow you to do that.
27 Both MacOS and Linux require some extra instructions for development, as you need to prepare an environment. Look below at the proper section to see what is needed.
29 Debian and Ubuntu Linux
32 To build and install Cura, run the following commands:
35 git clone https://github.com/daid/Cura.git
37 sudo apt-get install python-opengl
38 sudo apt-get install python-numpy
39 sudo apt-get install python-serial
40 sudo apt-get install python-setuptools
44 sudo ./package.sh debian_amd64 # or debian_i386 for 32bit
46 sudo dpkg -i ./scripts/linux/cura*.deb
51 The following section describes how to prepare working environment for developing and packaing for Mac OS X.
52 The working environment consist of build of Python, build of wxPython and all required Python packages.
54 We assume you already have Apple hardware with [64bit processor](http://support.apple.com/kb/HT3696) and you are familiar with tools like [virtualenv](http://pypi.python.org/pypi/virtualenv), [virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/en/latest/) and [pip](http://www.pip-installer.org/en/latest/). Also ensure you have modern compiler installed.
58 You'll need **non-system**, **framework-based**, **universal** with **deployment target set to 10.6** build of Python 2.7
60 **non-system**: Output of
61 `python -c "import sys; print sys.prefix"`
62 should *not* start with *"/System/Library/Frameworks/Python.framework/"*.
64 **framework-based**: Output of
65 `python -c "import distutils.sysconfig as c; print(c.get_config_var('PYTHONFRAMEWORK'))"`
66 should be non-empty string. E.g. *Python*.
68 **universal**: Output of
69 ``lipo -info `which python` ``
70 should include both i386 and x86_64. E.g *"Architectures in the fat file: /usr/local/bin/python are: i386 x86_64"*.
72 **deployment target set to 10.6**: Output of
73 ``otool -l `which python` ``
74 should contain *"cmd LC_VERSION_MIN_MACOSX ... version 10.6"*.
76 The easiest way to install it is via [Homebrew](http://mxcl.github.com/homebrew/) using the formula from Cura's repo:
77 `brew install --build-bottle --fresh Cura/scripts/darwin/python.rb --universal`
78 Note if you already have Python installed via Homebrew, you have to uninstall it first.
80 You can also install [official build](http://www.python.org/ftp/python/2.7.3/python-2.7.3-macosx10.6.dmg).
83 ###Configure Virtualenv
84 Create new virtualenv. If you have [virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/en/latest/) installed:
87 wxPython cannot be installed via pip, we have to build it from source by specifing prefix to our virtualenv.
89 Assuming you have virtualenv at *~/.virtualenvs/Cura/* and [wxPython sources](http://sourceforge.net/projects/wxpython/files/wxPython/2.9.4.0/wxPython-src-2.9.4.0.tar.bz2) at *~/Downloads/wxPython-src-2.9.4.0/*:
91 1. `cd` into *~/Downloads/wxPython-src-2.9.4.0/* and configure the sources:
94 CFLAGS='-msse2 -mno-sse3 -mno-sse4' \
95 CXXFLAGS='-msse2 -mno-sse3 -mno-sse4' \
100 --enable-monolithic \
102 --enable-std_string \
105 --enable-universal_binary=i386,x86_64 \
107 --prefix=$HOME/.virtualenvs/Cura/ \
109 --with-libjpeg=builtin \
110 --with-libpng=builtin \
111 --with-libtiff=builtin \
112 --with-macosx-version-min=10.6 \
118 Note to speedup the process I recommend you to enable multicore build by adding the -j*cores* flag:
120 3. `cd` into *~/Downloads/wxPython-src-2.9.4.0/wxPython/*
121 4. Build wxPython (Note `python` is the python of your virtualenv):
123 python setup.py build_ext \
127 INSTALL_MULTIVERSION=0 \
129 WX_CONFIG=$HOME/.virtualenvs/Cura/bin/wx-config \
132 5. Install wxPython (Note `python` is the python of your virtualenv):
134 python setup.py install \
135 --prefix=$HOME/.virtualenvs/Cura \
139 INSTALL_MULTIVERSION=0 \
141 WX_CONFIG=$HOME/.virtualenvs/Cura/bin/wx-config \
144 6. Create file *~/.virtualenvs/Cura/bin/pythonw* with the following content:
147 ENV=`python -c "import sys; print sys.prefix"`
148 PYTHON=`python -c "import sys; print sys.real_prefix"`/bin/python
149 export PYTHONHOME=$ENV
152 At this point virtualenv is configured for wxPython development.
153 Remember to use `python` for pacakging and `pythonw` to run app for debugging.
156 ###Install Python Packages
157 Required python packages are specified in *requirements.txt* and *requirements_darwin.txt*
158 If you use virtualenv, installing requirements as easy as `pip install -r requirements_darwin.txt`
161 ###Package Cura into application
162 Ensure that virtualenv is activated, so `python` points to the python of your virtualenv (e.g. ~/.virtualenvs/Cura/bin/python).Use package.sh to build Cura:
163 `./package.sh darwin`
165 Note that application is only guaranteed to work on Mac OS X version used to build and higher, but may not support lower versions.
166 E.g. Cura built on 10.8 will work on 10.8 and 10.7, but not on 10.6. In other hand, Cura built on 10.6 will work on 10.6, 10.7 and 10.8.