Difference between revisions of "Compiling LuxCore"

From LuxCoreRender Wiki
Jump to navigation Jump to search
Line 110: Line 110:
 
cmake -D EMBREE_SEARCH_PATH=`pwd`/../embree-2.17.1.x86_64.linux -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m .
 
cmake -D EMBREE_SEARCH_PATH=`pwd`/../embree-2.17.1.x86_64.linux -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m .
 
make -j 8
 
make -j 8
 
*WORK IN PROGRESS*
 
 
</pre>
 
</pre>
  

Revision as of 12:30, 28 January 2018

Windows

See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile

Linux

Static link environment

First Run

# Download Static compilation scripts
git clone https://github.com/LuxCoreRender/LinuxCompile.git
cd LinuxCompile

# Download LuxCore sources
git clone https://github.com/LuxCoreRender/LuxCore.git

# Start build script, pass the path to the LuxCore sources as first argument
# This will take a very long time on the first run because it needs to compile all dependencies
./build-64-sse2 LuxCore

To test LuxCoreUI, you can now start it:

cd LuxCore
./bin/luxcoreui ./scenes/luxball/luxball-hdr.cfg

Updating

To update to the latest sources, use standard git commands:

cd LuxCore
git pull
# Go back to LinuxCompile folder and compile
cd ..
./build-64-sse2 LuxCore 5

Recompiling

In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:

./build-64-sse2 LuxCore 5

In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:

cd LuxCore
make -j8

(-j<n> specifies number of threads for the compilation process)

The compiled binaries are in LuxCore/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore/lib/

Ubuntu 14.04 LTS (Dynamic linking)

# Install deps
sudo apt-get update
sudo apt-get install git cmake g++ flex bison libbz2-dev libopenimageio-dev libtiff5-dev libpng12-dev libgtk-3-dev libopenexr-dev libgl1-mesa-dev python3-dev python3-pip

# Compile Boost
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz
tar zxvf boost_1_56_0.tar.gz
cd boost_1_56_0
./bootstrap.sh --with-python=/usr/bin/python3
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin
cd ..
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH

# Install Embree
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz
tar zxvf embree-2.17.1.x86_64.linux.tar.gz
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH

# Install Pillow
sudo pip3 install pillow

# Compile LuxCore
git clone https://github.com/LuxCoreRender/LuxCore.git
cd LuxCore
cmake -D BOOST_SEARCH_PATH=`pwd`/../boost_1_56_0-bin -D EMBREE_SEARCH_PATH=`pwd`/../embree-2.17.1.x86_64.linux -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.4m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.4m -DPYTHON_INCLUDE_DIR2=/usr/include/python3.4m .
make -j 8

Ubuntu 16.04 LTS (Dynamic linking)

# Install deps
sudo apt-get update
sudo apt-get install git cmake g++ flex bison libbz2-dev libopenimageio-dev libtiff5-dev libpng12-dev libgtk-3-dev libopenexr-dev libgl1-mesa-dev python3-dev python3-pip libboost-all-dev

# Install Embree
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz
tar zxvf embree-2.17.1.x86_64.linux.tar.gz
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH

# Install Pillow
sudo pip3 install pillow

# Compile LuxCore
git clone https://github.com/LuxCoreRender/LuxCore.git
cd LuxCore
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu
cmake -D EMBREE_SEARCH_PATH=`pwd`/../embree-2.17.1.x86_64.linux -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m .
make -j 8

Contributing

If you want to contribute to LuxCore development or just submit a quick patch, the easiest way to start is to fork the repository on github.
You can then edit your fork, commit your changes and send us a pull request.
If you continue to contribute, we will eventually give you direct access to the repositories.