chiark / gitweb /
Allow for odd shaped platforms and generalize the UM2 clip code into no-go zones.
[cura.git] / README.md
index 35f4587888b45f170536ebb7bd9a8af834cf2f76..28b5e7b50d0ac7a4d292d8dbd8924ad05e5086dc 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,21 +1,44 @@
 Cura
 ====
 
-If you are reading this, then you are looking at the *development* version of Cura. If you just want to use Cura look at the following location: https://github.com/daid/Cura/wiki
+Read this, it's important!
+===========================
+
+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
 
 Development
 ===========
 
-Cura is developed in Python. Getting Cura up and running for development is not very difficult. If you copy the python and pypy from a release into your Cura development checkout then you can use Cura right away, just like you would with a release.
-For development with git, check the help on github. Pull requests is the fastest way to get changes into Cura.
-
+Cura is developed in Python with a C++ engine. The part you are looking at right now is the Python GUI.
+The C++ engine is responsible for generating the actual toolpath. For development of the engine check out https://github.com/Ultimaker/CuraEngine
 
 Packaging
 ---------
 
-Cura development comes with a script "package.sh", this script has been designed to run under unix like OSes (Linux, MacOS). Running it from sygwin is not a priority.
+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.
 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.
 
+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.
+
+Debian and Ubuntu Linux
+--------
+
+To build and install Cura, run the following commands:
+
+```bash
+git clone https://github.com/daid/Cura.git
+
+sudo apt-get install python-opengl
+sudo apt-get install python-numpy
+sudo apt-get install python-serial
+sudo apt-get install python-setuptools
+
+cd Cura
+
+sudo ./package.sh debian
+
+sudo dpkg -i ./scripts/linux/Cura*.deb
+```
 
 Mac OS X
 --------
@@ -28,13 +51,13 @@ We assume you already have Apple hardware with [64bit processor](http://support.
 ###Install Python
 You'll need **non-system**, **framework-based**, **universal** with **deployment target set to 10.6** build of Python 2.7
 
-**non-system**: Python is not bundeled with distribution of Mac OS X. Output of  
+**non-system**: Output of  
 `python -c "import sys; print sys.prefix"`  
-Output should *not* start with *"/System/Library/Frameworks/Python.framework/"*.
+should *not* start with *"/System/Library/Frameworks/Python.framework/"*.
 
 **framework-based**: Output of  
 `python -c "import distutils.sysconfig as c; print(c.get_config_var('PYTHONFRAMEWORK'))"`  
-should be non-empty string.
+should be non-empty string. E.g. *Python*.
 
 **universal**: Output of  
 ``lipo -info `which python` ``  
@@ -44,10 +67,12 @@ should include both i386 and x86_64. E.g *"Architectures in the fat file: /usr/l
 ``otool -l `which python` ``  
 should contain *"cmd LC_VERSION_MIN_MACOSX ... version 10.6"*.
 
-The easiest way to install it is via [Homebrew](http://mxcl.github.com/homebrew/):  
-`brew install --fresh https://github.com/downloads/GreatFruitOmsk/Cura/python.rb --universal`  
+The easiest way to install it is via [Homebrew](http://mxcl.github.com/homebrew/) using the formula from Cura's repo:  
+`brew install --build-bottle --fresh Cura/scripts/darwin/python.rb --universal`  
 Note if you already have Python installed via Homebrew, you have to uninstall it first.
 
+You can also install [official build](http://www.python.org/ftp/python/2.7.3/python-2.7.3-macosx10.6.dmg).
+
 
 ###Configure Virtualenv
 Create new virtualenv. If you have [virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/en/latest/) installed:  
@@ -59,26 +84,29 @@ Assuming you have virtualenv at *~/.virtualenvs/Cura/* and [wxPython sources](ht
 
 1. `cd` into *~/Downloads/wxPython-src-2.9.4.0/* and configure the sources:
 
-        ./configure --enable-universal_binary=i386,x86_64 \
-        --prefix=$HOME/.virtualenvs/Cura/ \
+        ./configure \
+        CFLAGS='-msse2 -mno-sse3 -mno-sse4' \
+        CXXFLAGS='-msse2 -mno-sse3 -mno-sse4' \
+        --disable-debug \
+        --enable-clipboard \
+        --enable-display \
+        --enable-dnd \
+        --enable-monolithic \
         --enable-optimise \
+        --enable-std_string \
+        --enable-svg \
+        --enable-unicode \
+        --enable-universal_binary=i386,x86_64 \
+        --enable-webkit \
+        --prefix=$HOME/.virtualenvs/Cura/ \
+        --with-expat \
         --with-libjpeg=builtin \
         --with-libpng=builtin \
         --with-libtiff=builtin \
-        --with-zlib=builtin \
-        --enable-monolithic \
         --with-macosx-version-min=10.6 \
-        --disable-debug \
-        --enable-unicode \
-        --enable-std_string \
-        --enable-display \
         --with-opengl \
         --with-osx_cocoa \
-        --enable-dnd \
-        --enable-clipboard \
-        --enable-webkit \
-        --enable-svg \
-        --with-expat
+        --with-zlib=builtin
 
 2. `make install`  
     Note to speedup the process I recommend you to enable multicore build by adding the -j*cores* flag:  
@@ -87,25 +115,25 @@ Assuming you have virtualenv at *~/.virtualenvs/Cura/* and [wxPython sources](ht
 4. Build wxPython (Note `python` is the python of your virtualenv):
 
         python setup.py build_ext \
-        WXPORT=osx_cocoa \
-        WX_CONFIG=$HOME/.virtualenvs/Cura/bin/wx-config \
-        UNICODE=1 \
-        INSTALL_MULTIVERSION=0 \
-        BUILD_GLCANVAS=1 \
         BUILD_GIZMOS=1 \
-        BUILD_STC=1
+        BUILD_GLCANVAS=1 \
+        BUILD_STC=1 \
+        INSTALL_MULTIVERSION=0 \
+        UNICODE=1 \
+        WX_CONFIG=$HOME/.virtualenvs/Cura/bin/wx-config \
+        WXPORT=osx_cocoa
 
 5. Install wxPython (Note `python` is the python of your virtualenv):
 
         python setup.py install \
-        --prefix=$HOME/.virtualenvs/Cura/ \
-        WXPORT=osx_cocoa \
-        WX_CONFIG=$HOME/.virtualenvs/Cura/bin/wx-config \
-        UNICODE=1 \
-        INSTALL_MULTIVERSION=0 \
-        BUILD_GLCANVAS=1 \
+        --prefix=$HOME/.virtualenvs/Cura \
         BUILD_GIZMOS=1 \
-        BUILD_STC=1
+        BUILD_GLCANVAS=1 \
+        BUILD_STC=1 \
+        INSTALL_MULTIVERSION=0 \
+        UNICODE=1 \
+        WX_CONFIG=$HOME/.virtualenvs/Cura/bin/wx-config \
+        WXPORT=osx_cocoa
 
 6. Create file *~/.virtualenvs/Cura/bin/pythonw* with the following content:
 
@@ -123,47 +151,11 @@ Remember to use `python` for pacakging and `pythonw` to run app for debugging.
 Required python packages are specified in *requirements.txt* and *requirements_darwin.txt*  
 If you use virtualenv, installing requirements as easy as `pip install -r requirements_darwin.txt`
 
-At time of writing PyObjC 2.5 is not available via pip, so you have to install it manually (Note `python` is the python of your virtualenv):
-
-1. Download [PyObjC 2.5](https://bitbucket.org/ronaldoussoren/pyobjc/get/pyobjc-2.5.zip)
-2. Extract the archive and `cd` into the directory
-3. `python install.py`  
-    If build fails, try to use clang: `CC=/usr/bin/clang python install.py`
-
-
-###Package Cure into application
-Ensure that `package.sh` build target (see the very top of the file) is:
-
-    #BUILD_TARGET=${1:-all}
-    #BUILD_TARGET=win32
-    #BUILD_TARGET=linux
-    BUILD_TARGET=darwin
-
-Also ensure that virtualenv is activated, so `python` points to the python of your virtualenv (e.g. ~/.virtualenvs/Cura/bin/python).
-
-
-###Tests
-Cura was built (and each build was tested) on the following platforms:
 
-- 10.6.8
-- 10.7.3
-- 10.8.2
-- 10.8.3 (Jan 8 Seed)
+###Package Cura into application
+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:  
+`./package.sh darwin`
 
-With following tools, libs and python pacakges:
+Note that application is only guaranteed to work on Mac OS X version used to build and higher, but may not support lower versions.
+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.
 
-- Python 2.7.3 (installed via [Homebrew](http://mxcl.github.com/homebrew/) by using custom [formula](https://github.com/downloads/GreatFruitOmsk/Cura/python.rb) with *--universal* option)
-- [wxPython 2.9.4.0](http://sourceforge.net/projects/wxpython/files/wxPython/2.9.4.0/wxPython-src-2.9.4.0.tar.bz2)
-- virtualenvwrapper 3.6
-- vritualenv 1.8.4
-- llvm-gcc 4.2 (/usr/bin/cc == /usr/bin/llvm-gcc-4.2)
-- clang 2.1, 3.0 (PyObjC 2.5 failed to build with llvm-gcc)
-- [PyObjC 2.5](https://bitbucket.org/ronaldoussoren/pyobjc/get/pyobjc-2.5.zip)
-- PyOpenGL 3.0.2
-- altgraph 0.10.1
-- macholib 1.5
-- modulegraph 0.10.2
-- numpy 1.6.2
-- py2app 0.7.2
-- pyserial 2.6
-- wsgiref 0.1.2