https://wiki.luxcorerender.org/api.php?action=feedcontributions&user=U3dreal&feedformat=atom
LuxCoreRender Wiki - User contributions [en]
2024-03-29T01:13:50Z
User contributions
MediaWiki 1.37.6
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1800
Compiling LuxCore
2021-09-14T00:32:41Z
<p>U3dreal: /* macOS 11+ */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== macOS 11+ ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc slib bzip2 jpeg<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
#####before BigSur####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
<br />
#####For BigSur#####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.7.4 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)<br />
<br />
patch needed<br />
###################<br />
<br />
pyenv global 3.7.4<br />
pip install --upgrade pip<br />
#####normal####<br />
pip install numpy<br />
#####BigSur####<br />
Download wheel from here https://files.pythonhosted.org/packages/46/09/1bae812d4afa67e365d3d1dbdc0e9071ba7678611f52b49353d6104ae8ff/numpy-1.19.4-cp37-cp37m-macosx_10_9_x86_64.whl<br />
rename to numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
pip install numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
####################<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
edit scripts/macos/codesign.sh to match your certificate ( something like A1CD139B9FD66DE9D474D420C1899EA96A622B9A )<br />
<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1763
Compiling LuxCore
2020-12-17T01:12:41Z
<p>U3dreal: /* Make bundle */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc slib bzip2 jpeg<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
#####before BigSur####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
<br />
#####For BigSur#####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.7.4 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)<br />
<br />
patch needed<br />
###################<br />
<br />
pyenv global 3.7.4<br />
pip install --upgrade pip<br />
#####normal####<br />
pip install numpy<br />
#####BigSur####<br />
Download wheel from here https://files.pythonhosted.org/packages/46/09/1bae812d4afa67e365d3d1dbdc0e9071ba7678611f52b49353d6104ae8ff/numpy-1.19.4-cp37-cp37m-macosx_10_9_x86_64.whl<br />
rename to numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
pip install numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
####################<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
edit scripts/macos/codesign.sh to match your certificate ( something like A1CD139B9FD66DE9D474D420C1899EA96A622B9A )<br />
<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1762
Compiling LuxCore
2020-12-17T00:09:40Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc slib bzip2 jpeg<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
#####before BigSur####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
<br />
#####For BigSur#####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.7.4 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)<br />
<br />
patch needed<br />
###################<br />
<br />
pyenv global 3.7.4<br />
pip install --upgrade pip<br />
#####normal####<br />
pip install numpy<br />
#####BigSur####<br />
Download wheel from here https://files.pythonhosted.org/packages/46/09/1bae812d4afa67e365d3d1dbdc0e9071ba7678611f52b49353d6104ae8ff/numpy-1.19.4-cp37-cp37m-macosx_10_9_x86_64.whl<br />
rename to numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
pip install numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
####################<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1761
Compiling LuxCore
2020-12-17T00:09:01Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc slib bzip2 jpeg<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
#####before BigSur####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
<br />
#####For BigSur#####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.7.4 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)<br />
<br />
patch needed<br />
###################<br />
<br />
pyenv global 3.7.4<br />
pip install --upgrade pip<br />
#####normal####<br />
pip install numpy<br />
#####BigSur####<br />
Download wheel from here https://files.pythonhosted.org/packages/46/09/1bae812d4afa67e365d3d1dbdc0e9071ba7678611f52b49353d6104ae8ff/numpy-1.19.4-cp37-cp37m-macosx_10_9_x86_64.whl<br />
rename to numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
and install with <br />
pip install numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
####################<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1760
Compiling LuxCore
2020-12-17T00:08:35Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc slib bzip2 jpeg<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
#####before BigSur####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
<br />
#####For BigSur#####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.7.4 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)<br />
###################<br />
<br />
pyenv global 3.7.4<br />
pip install --upgrade pip<br />
#####normal####<br />
pip install numpy<br />
#####BigSur####<br />
Download wheel from here https://files.pythonhosted.org/packages/46/09/1bae812d4afa67e365d3d1dbdc0e9071ba7678611f52b49353d6104ae8ff/numpy-1.19.4-cp37-cp37m-macosx_10_9_x86_64.whl<br />
rename to numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
and install with <br />
pip install numpy-1.19.4-cp37-cp37m-macosx_11_0_x86_64.whl<br />
<br />
####################<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1759
Compiling LuxCore
2020-12-16T22:22:39Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc slib bzip2 jpeg<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
#####before BigSur####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
#####For BigSur#####<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.7.4 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)<br />
###################<br />
pyenv global 3.7.4<br />
pip install --upgrade pip<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1758
Compiling LuxCore
2020-12-16T22:19:15Z
<p>U3dreal: /* Xcode */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1757
Compiling LuxCore
2020-12-16T22:18:55Z
<p>U3dreal: /* cmake */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1675
Compiling LuxCore
2020-05-12T11:44:14Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1674
Compiling LuxCore
2020-05-12T11:43:57Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013<br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1673
Compiling LuxCore
2020-05-12T11:42:52Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<pre>https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1672
Compiling LuxCore
2020-05-12T11:41:51Z
<p>U3dreal: /* Compile Dependencies */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1671
Compiling LuxCore
2020-05-12T11:41:32Z
<p>U3dreal: /* Compile Dependencies */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
For CUDA builds on MacOS 10.13 only install cuda toolkit.<br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1670
Compiling LuxCore
2020-05-12T11:40:30Z
<p>U3dreal: /* Xcode */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1669
Compiling LuxCore
2020-05-12T11:40:07Z
<p>U3dreal: /* cmake */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1668
Compiling LuxCore
2020-05-12T11:39:37Z
<p>U3dreal: /* cmake */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
use <br />
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build<br />
and<br />
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre><br />
for CUDA builds.( 10.13 HighSierra only )<br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1667
Compiling LuxCore
2020-05-12T11:35:10Z
<p>U3dreal: /* Make bundle */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
or for XCode build<br />
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1666
Compiling LuxCore
2020-05-12T11:33:55Z
<p>U3dreal: /* Make bundle */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
from LuxCore root.<br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1665
Compiling LuxCore
2020-05-12T11:33:24Z
<p>U3dreal: /* Make bundle */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
run <br />
<pre>./scripts/macos/pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1664
Compiling LuxCore
2020-05-12T11:31:12Z
<p>U3dreal: /* Compile LuxCore */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1647
Compiling LuxCore
2020-04-13T15:52:49Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1636
Compiling LuxCore
2020-03-29T14:52:39Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1635
Compiling LuxCore
2020-03-29T14:10:47Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1634
Compiling LuxCore
2020-03-29T13:51:10Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar libtool autoconf<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
pyenv init<br />
eval "$(pyenv init -)”<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1633
Compiling LuxCore
2020-03-29T02:09:23Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar libtool autoconf<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
eval "$(pyenv init -)”.<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1632
Compiling LuxCore
2020-03-29T01:00:27Z
<p>U3dreal: /* Install build environment */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:<br />
<br />
<pre><br />
sudo apt install git<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
./first_run.sh<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd target-64-sse2/LuxCore-opencl/<br />
./luxcoreui ./scenes/cornell/cornell.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore-opencl 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore-opencl<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore-opencl/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore-opencl/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison gnu-sed gnu-tar libtool<br />
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"<br />
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"<br />
eval "$(pyenv init -)”.<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1616
Compiling LuxCore
2020-03-22T17:33:49Z
<p>U3dreal: /* Compile LuxCore */</p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
<pre><br />
# Download Static compilation scripts<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
<br />
# Download LuxCore sources<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
<br />
# Start build script, pass the path to the LuxCore sources as first argument<br />
# This will take a very long time on the first run because it needs to compile all dependencies<br />
./build-64-sse2 LuxCore<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd LuxCore<br />
./bin/luxcoreui ./scenes/luxball/luxball-hdr.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison<br />
eval "$(pyenv init -)”.<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
==== cmake ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
==== Xcode ====<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
</pre><br />
<br />
Open Xcode project and compile.<br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1615
Compiling LuxCore
2020-03-22T10:23:22Z
<p>U3dreal: </p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
<pre><br />
# Download Static compilation scripts<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
<br />
# Download LuxCore sources<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
<br />
# Start build script, pass the path to the LuxCore sources as first argument<br />
# This will take a very long time on the first run because it needs to compile all dependencies<br />
./build-64-sse2 LuxCore<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd LuxCore<br />
./bin/luxcoreui ./scenes/luxball/luxball-hdr.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison<br />
eval "$(pyenv init -)”.<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a MacDistFiles.tar.gz .<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
=== Make bundle ===<br />
<br />
now create a text file in LuxCore root dir ... like "pack_lux_osx.sh". paste this to the text file and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal
https://wiki.luxcorerender.org/index.php?title=Compiling_LuxCore&diff=1614
Compiling LuxCore
2020-03-22T10:17:14Z
<p>U3dreal: </p>
<hr />
<div>== Windows ==<br />
<br />
See the Readme file here: https://github.com/LuxCoreRender/WindowsCompile<br />
<br />
== Linux == <br />
<br />
=== Static link environment ===<br />
<br />
A static link environment is used to create binaries for releases. <br />
Most libraries that LuxCore depends on are embedded into the LuxCore executables.<br />
<br />
==== First Run ====<br />
<br />
<pre><br />
# Download Static compilation scripts<br />
git clone https://github.com/LuxCoreRender/LinuxCompile.git<br />
cd LinuxCompile<br />
<br />
# Download LuxCore sources<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
<br />
# Start build script, pass the path to the LuxCore sources as first argument<br />
# This will take a very long time on the first run because it needs to compile all dependencies<br />
./build-64-sse2 LuxCore<br />
</pre><br />
<br />
To test LuxCoreUI, you can now start it:<br />
<br />
<pre><br />
cd LuxCore<br />
./bin/luxcoreui ./scenes/luxball/luxball-hdr.cfg<br />
</pre><br />
<br />
==== Updating ====<br />
<br />
To update to the latest sources, use standard git commands:<br />
<br />
<pre><br />
cd LuxCore<br />
git pull<br />
# Go back to LinuxCompile folder and compile<br />
cd ..<br />
./build-64-sse2 LuxCore 5<br />
</pre><br />
<br />
==== Recompiling ====<br />
<br />
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:<br />
<pre><br />
./build-64-sse2 LuxCore 5<br />
</pre><br />
<br />
In case you edit any source files and want to recompile quickly, go to the LuxCore sources directory and run make:<br />
<br />
<pre><br />
cd LuxCore<br />
make -j8<br />
</pre><br />
(-j<n> specifies number of threads for the compilation process)<br />
<br />
The compiled binaries are in LuxCore/bin/, the compiled libraries (e.g. pyluxcore.so) are in LuxCore/lib/<br />
<br />
=== Ubuntu 14.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Compile Boost<br />
wget https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.gz<br />
tar zxvf boost_1_56_0.tar.gz<br />
cd boost_1_56_0<br />
./bootstrap.sh --with-python=/usr/bin/python3<br />
./b2 -j 8 install --prefix=`pwd`/../boost_1_56_0-bin<br />
cd ..<br />
export LD_LIBRARY_PATH=`pwd`/boost_1_56_0-bin/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
=== Ubuntu 16.04 LTS (Dynamic linking) ===<br />
<br />
Dynamic link builds are only used for developing/debugging, not for release builds.<br />
<br />
<pre><br />
# Install deps<br />
sudo apt-get update<br />
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<br />
<br />
# Install Embree<br />
wget https://github.com/embree/embree/releases/download/v2.17.1/embree-2.17.1.x86_64.linux.tar.gz<br />
tar zxvf embree-2.17.1.x86_64.linux.tar.gz<br />
export LD_LIBRARY_PATH=`pwd`/embree-2.17.1.x86_64.linux/lib:$LD_LIBRARY_PATH<br />
<br />
# Install Pillow<br />
sudo pip3 install pillow<br />
<br />
# To have Python v3.x in pyluxcore.so<br />
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so<br />
<br />
# Compile LuxCore<br />
git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore<br />
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu<br />
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 .<br />
make -j 8<br />
</pre><br />
<br />
'''NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.'''<br />
<br />
== MacOs 10.13 + ==<br />
<br />
=== Install build environment ===<br />
<br />
Install latest Xcode and Command Line Tools for your OS version.<br />
<br />
Install Homebrew<br />
<br />
<pre>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre><br />
<br />
Install brew stuff and python3<br />
<br />
<pre>brew install pyenv cmake bison<br />
eval "$(pyenv init -)”.<br />
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4<br />
pyenv global 3.7.4<br />
pip install numpy<br />
pip install pillow<br />
pip install pyside2</pre><br />
<br />
=== Compile Dependencies ===<br />
<br />
<pre>pyenv shell 3.7.4<br />
<br />
git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git<br />
cd MacOSCompileDeps<br />
./cut_deps_release</pre><br />
<br />
This will leave you with a .tar of the Dependencies.<br />
<br />
=== Compile LuxCore ===<br />
<br />
<pre>git clone https://github.com/LuxCoreRender/LuxCore.git<br />
cd LuxCore</pre><br />
<br />
Copy .tar to LuxCore root and unpack. Just double-click. or <br />
<pre>tar xzf MacDistFiles.tar.gz</pre><br />
<br />
change<br />
<br />
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre><br />
<br />
to "0" in cmake/PlatformSpecific.cmake<br />
<br />
Now do<br />
<br />
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"<br />
DEPS_SOURCE=`pwd`/macos<br />
mkdir build<br />
cd build<br />
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..<br />
make</pre><br />
<br />
now copy paste this to a text file ... like "pack_lux_osx.sh" and save it. <br />
<br />
<pre>#!/bin/bash<br />
<br />
DEPS_SOURCE=`pwd`/macos<br />
<br />
### packing opencl version<br />
<br />
mkdir release_OSX<br />
<br />
###luxcoreui bundle<br />
<br />
echo "Bundeling OpenCL Version"<br />
<br />
cp -R macos/mac_bundle/LuxCore.app release_OSX<br />
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS<br />
<br />
cd release_OSX<br />
<br />
mkdir -p LuxCore.app/Contents/Resources/libs/<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib<br />
<br />
#libembree<br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib<br />
<br />
#luxcoreui<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui<br />
<br />
echo "LuxCoreUi installed"<br />
<br />
###luxcoreconsole<br />
<br />
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS<br />
<br />
#luxcoreconsole<br />
<br />
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole<br />
<br />
echo "LuxCoreConsole installed"<br />
<br />
### pyluxcore.so<br />
<br />
mkdir pyluxcore<br />
<br />
cp ../build/lib/Release/pyluxcore.so pyluxcore<br />
cp ../build/lib/pyluxcoretools.zip pyluxcore<br />
<br />
cd pyluxcore<br />
<br />
#libomp<br />
<br />
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib<br />
chmod +w ./libomp.dylib<br />
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib<br />
<br />
#libembree <br />
<br />
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib<br />
chmod +w ./libembree3.3.dylib<br />
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib<br />
<br />
#libtbb<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib<br />
chmod +w ./libtbb.dylib<br />
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib<br />
<br />
#libtiff<br />
<br />
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib<br />
chmod +w ./libtiff.5.dylib<br />
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib<br />
<br />
#libOpenImageIO<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
chmod +w ./libOpenImageIO.1.8.dylib<br />
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib<br />
<br />
#libtbbmalloc<br />
<br />
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
chmod +w ./libtbbmalloc.dylib<br />
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib<br />
<br />
#libOpenImageDenoise<br />
<br />
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
chmod +w ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib<br />
<br />
#pyluxcore.so<br />
<br />
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so<br />
<br />
echo "PyLuxCore installed"<br />
<br />
### denoise<br />
<br />
#denoise<br />
cp ../../macos/bin/denoise .<br />
chmod +w ./denoise<br />
install_name_tool -id @executable_path/denoise ./denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise<br />
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise<br />
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise<br />
<br />
echo "Denoise installed"<br />
<br />
cd ../..<br />
<br />
# Set up correct names for release version and SDK<br />
if [[ -z "$VERSION_STRING" ]] ; then<br />
VERSION_STRING=latest<br />
fi<br />
<br />
### creating opencl DMG<br />
<br />
echo "Creating OpenCL Version DMG ..."<br />
<br />
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/<br />
<br />
echo "Done !"<br />
<br />
</pre><br />
<br />
Do <pre>chmod +x pack_lux_osx.sh</pre> and run it<br />
<br />
<pre>./pack_lux_osx.sh</pre><br />
<br />
This should end up with a distributable .dmg.<br />
<br />
Have fun and good luck.<br />
<br />
<br />
== Contributing == <br />
<br />
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.<br><br />
You can then edit your fork, commit your changes and [https://help.github.com/articles/creating-a-pull-request-from-a-fork/ send us a pull request].<br><br />
If you continue to contribute, we will eventually give you direct access to the repositories.</div>
U3dreal