Difference between revisions of "Compiling LuxCore"

From LuxCoreRender Wiki
Jump to navigation Jump to search
(23 intermediate revisions by 2 users not shown)
Line 11: Line 11:


==== First Run ====
==== First Run ====
On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:


<pre>
<pre>
# Download Static compilation scripts
sudo apt install git
git clone https://github.com/LuxCoreRender/LinuxCompile.git
git clone https://github.com/LuxCoreRender/LinuxCompile.git
cd LinuxCompile
cd LinuxCompile
 
./first_run.sh
# Download LuxCore sources
git clone https://github.com/LuxCoreRender/LuxCore.git
 
# Start build script, pass the path to the LuxCore sources as first argument
# This will take a very long time on the first run because it needs to compile all dependencies
./build-64-sse2 LuxCore
</pre>
</pre>


Line 28: Line 24:


<pre>
<pre>
cd LuxCore
cd target-64-sse2/LuxCore-opencl/
./bin/luxcoreui ./scenes/luxball/luxball-hdr.cfg
./luxcoreui ./scenes/cornell/cornell.cfg
</pre>
</pre>


Line 37: Line 33:


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


Line 48: Line 44:
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:
In case you update the LuxCore repository (by using git pull), re-run the last stage (5) of the build script:
<pre>
<pre>
./build-64-sse2 LuxCore 5
./build-64-sse2 LuxCore-opencl 5
</pre>
</pre>


Line 54: Line 50:


<pre>
<pre>
cd LuxCore
cd LuxCore-opencl
make -j8
make -j8
</pre>
</pre>
(-j<n> specifies number of threads for the compilation process)
(-j<n> specifies number of threads for the compilation process)


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


=== Ubuntu 14.04 LTS (Dynamic linking) ===
=== Ubuntu 14.04 LTS (Dynamic linking) ===
Line 137: Line 133:
Install brew stuff and python3
Install brew stuff and python3


<pre>brew install pyenv cmake bison
<pre>brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc
eval "$(pyenv init -)”.
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
pyenv init
eval "$(pyenv init -)”
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4
pyenv global 3.7.4
pyenv global 3.7.4
Line 144: Line 143:
pip install pillow
pip install pillow
pip install pyside2</pre>
pip install pyside2</pre>
For CUDA builds on MacOS 10.13 only install cuda toolkit.
https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013


=== Compile Dependencies ===
=== Compile Dependencies ===
Line 152: Line 155:
cd MacOSCompileDeps
cd MacOSCompileDeps
./cut_deps_release</pre>
./cut_deps_release</pre>
 
This will leave you with a MacDistFiles.tar.gz .
This will leave you with a .tar of the Dependencies.


=== Compile LuxCore ===
=== Compile LuxCore ===
Line 160: Line 162:
cd LuxCore</pre>
cd LuxCore</pre>


Copy .tar to LuxCore root and unpack. Just double-click. or  
Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or  
<pre>tar xzf MacDistFiles.tar.gz</pre>
<pre>tar xzf MacDistFiles.tar.gz</pre>
change
<pre>SET(AZURE 1) # Set 0 when compiled locally and not on azure</pre>
to "0" in cmake/PlatformSpecific.cmake


Now do
Now do
 
==== cmake ====
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"
DEPS_SOURCE=`pwd`/macos
DEPS_SOURCE=`pwd`/macos
Line 177: Line 173:
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..
make</pre>
make</pre>
use
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build
and
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre>
for CUDA builds.( 10.13 HighSierra only )


now copy paste this to a text file ... like "pack_lux_osx.sh" and save it.
==== Xcode ====
 
<pre>export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"
<pre>#!/bin/bash
 
DEPS_SOURCE=`pwd`/macos
DEPS_SOURCE=`pwd`/macos
 
mkdir build
### packing opencl version
cd build
 
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..
mkdir release_OSX
 
###luxcoreui bundle
 
echo "Bundeling OpenCL Version"
 
cp -R macos/mac_bundle/LuxCore.app release_OSX
cp build/Release/luxcoreui release_OSX/LuxCore.app/Contents/MacOS
 
cd release_OSX
 
mkdir -p LuxCore.app/Contents/Resources/libs/
 
#libomp
 
cp -f $DEPS_SOURCE/lib/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib
chmod +w LuxCore.app/Contents/Resources/libs/libomp.dylib
install_name_tool -id @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/Resources/libs/libomp.dylib
 
#libembree
 
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib
chmod +w LuxCore.app/Contents/Resources/libs/libembree3.3.dylib
install_name_tool -id @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libembree3.3.dylib
 
#libOpenImageDenoise
 
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib
install_name_tool -id @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libOpenImageDenoise.1.0.0.dylib
 
#libtbb
 
cp -f $DEPS_SOURCE/lib/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib
chmod +w LuxCore.app/Contents/Resources/libs/libtbb.dylib
install_name_tool -id @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/Resources/libs/libtbb.dylib
 
#libtiff
 
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib
chmod +w LuxCore.app/Contents/Resources/libs/libtiff.5.dylib
install_name_tool -id @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libtiff.5.dylib
 
#libOpenImageIO
 
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib
chmod +w LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib
install_name_tool -id @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/Resources/libs/libOpenImageIO.1.8.dylib
 
#libtbbmalloc
 
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib
chmod +w LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib
install_name_tool -id @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/Resources/libs/libtbbmalloc.dylib
 
#luxcoreui
 
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib LuxCore.app/Contents/MacOS/luxcoreui
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib LuxCore.app/Contents/MacOS/luxcoreui
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib LuxCore.app/Contents/MacOS/luxcoreui
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib LuxCore.app/Contents/MacOS/luxcoreui
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib LuxCore.app/Contents/MacOS/luxcoreui
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib LuxCore.app/Contents/MacOS/luxcoreui
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib LuxCore.app/Contents/MacOS/luxcoreui
 
echo "LuxCoreUi installed"
 
###luxcoreconsole
 
cp ../build/Release/luxcoreconsole LuxCore.app/Contents/MacOS
 
#luxcoreconsole
 
install_name_tool -change @rpath/libomp.dylib @executable_path/../Resources/libs/libomp.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole
install_name_tool -change @rpath/libembree3.3.dylib @executable_path/../Resources/libs/libembree3.3.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole
install_name_tool -change @rpath/libtbb.dylib @executable_path/../Resources/libs/libtbb.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @executable_path/../Resources/libs/libOpenImageIO.1.8.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/../Resources/libs/libtbbmalloc.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole
install_name_tool -change @rpath/libtiff.5.dylib @executable_path/../Resources/libs/libtiff.5.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/../Resources/libs/libOpenImageDenoise.1.0.0.dylib ./LuxCore.app/Contents/MacOS/luxcoreconsole
 
echo "LuxCoreConsole installed"
 
### pyluxcore.so
 
mkdir pyluxcore
 
cp ../build/lib/Release/pyluxcore.so pyluxcore
cp ../build/lib/pyluxcoretools.zip pyluxcore
 
cd pyluxcore
 
#libomp
 
cp -f $DEPS_SOURCE/lib/libomp.dylib ./libomp.dylib
chmod +w ./libomp.dylib
install_name_tool -id @loader_path/libomp.dylib ./libomp.dylib
 
#libembree
 
cp -f $DEPS_SOURCE/lib/libembree3.3.dylib ./libembree3.3.dylib
chmod +w ./libembree3.3.dylib
install_name_tool -id @loader_path/libembree3.3.dylib ./libembree3.3.dylib
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libembree3.3.dylib
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libembree3.3.dylib
 
#libtbb
 
cp -f $DEPS_SOURCE/lib/libtbb.dylib ./libtbb.dylib
chmod +w ./libtbb.dylib
install_name_tool -id @loader_path/libtbb.dylib ./libtbb.dylib
 
#libtiff
 
cp -f $DEPS_SOURCE/lib/libtiff.5.dylib ./libtiff.5.dylib
chmod +w ./libtiff.5.dylib
install_name_tool -id @loader_path/libtiff.5.dylib ./libtiff.5.dylib
 
#libOpenImageIO
 
cp -f $DEPS_SOURCE/lib/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib
chmod +w ./libOpenImageIO.1.8.dylib
install_name_tool -id @loader_path/libOpenImageIO.1.8.dylib ./libOpenImageIO.1.8.dylib
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib ./libOpenImageIO.1.8.dylib
 
#libtbbmalloc
 
cp -f $DEPS_SOURCE/lib/libtbbmalloc.dylib ./libtbbmalloc.dylib
chmod +w ./libtbbmalloc.dylib
install_name_tool -id @loader_path/libtbbmalloc.dylib ./libtbbmalloc.dylib
 
#libOpenImageDenoise
 
cp -f $DEPS_SOURCE/lib/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib
chmod +w ./libOpenImageDenoise.1.0.0.dylib
install_name_tool -id @loader_path/libOpenImageDenoise.1.0.0.dylib ./libOpenImageDenoise.1.0.0.dylib
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib ./libOpenImageDenoise.1.0.0.dylib
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib ./libOpenImageDenoise.1.0.0.dylib
 
#pyluxcore.so
 
install_name_tool -change @rpath/libomp.dylib @loader_path/libomp.dylib pyluxcore.so
install_name_tool -change @rpath/libembree3.3.dylib @loader_path/libembree3.3.dylib pyluxcore.so
install_name_tool -change @rpath/libtbb.dylib @loader_path/libtbb.dylib pyluxcore.so
install_name_tool -change @rpath/libtiff.5.dylib @loader_path/libtiff.5.dylib pyluxcore.so
install_name_tool -change @rpath/libOpenImageIO.1.8.dylib @loader_path/libOpenImageIO.1.8.dylib pyluxcore.so
install_name_tool -change @rpath/libtbbmalloc.dylib @loader_path/libtbbmalloc.dylib pyluxcore.so
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @loader_path/libOpenImagedenoise.1.0.0.dylib pyluxcore.so
 
echo "PyLuxCore installed"
 
### denoise
 
#denoise
cp ../../macos/bin/denoise .
chmod +w ./denoise
install_name_tool -id @executable_path/denoise ./denoise
install_name_tool -change @rpath/libOpenImageDenoise.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise
install_name_tool -change @rpath/libOpenImageDenoise.1.0.0.dylib @executable_path/libOpenImageDenoise.1.0.0.dylib denoise
install_name_tool -change @rpath/libtbb.dylib @executable_path/libtbb.dylib denoise
install_name_tool -change @rpath/libtbbmalloc.dylib @executable_path/libtbbmalloc.dylib denoise
 
echo "Denoise installed"
 
cd ../..
 
# Set up correct names for release version and SDK
if [[ -z "$VERSION_STRING" ]] ; then
    VERSION_STRING=latest
fi
 
### creating opencl DMG
 
echo "Creating OpenCL Version DMG ..."
 
hdiutil create luxcorerender-$VERSION_STRING-mac64$SDK_BUILD.dmg -volname "LuxCoreRender-$VERSION_STRING" -fs HFS+ -srcfolder release_OSX/
 
echo "Done !"
 
</pre>
</pre>
use
<pre>-DLUXRAYS_DISABLE_OPENCL=1</pre> for non OpenCL build
and
<pre>-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1</pre>
for CUDA builds.( 10.13 HighSierra only )


Do <pre>chmod +x pack_lux_osx.sh</pre> and run it
Open Xcode project and compile.


<pre>./pack_lux_osx.sh</pre>
=== Make bundle ===
run
<pre>./scripts/macos/pack_lux_osx.sh</pre>
or for XCode build
<pre>./scripts/macos/pack_lux_osx_xcode.sh</pre>
from LuxCore root.


This should end up with a distributable .dmg.
This should end up with a distributable .dmg.


Have fun and good luck.
Have fun and good luck.


== Contributing ==  
== Contributing ==  

Revision as of 11:44, 12 May 2020

Windows

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

Linux

Static link environment

A static link environment is used to create binaries for releases. Most libraries that LuxCore depends on are embedded into the LuxCore executables.

First Run

On a recent Ubuntu (e.g. 19.10), you can compile LuxCore with the following commands:

sudo apt install git
git clone https://github.com/LuxCoreRender/LinuxCompile.git
cd LinuxCompile
./first_run.sh

To test LuxCoreUI, you can now start it:

cd target-64-sse2/LuxCore-opencl/
./luxcoreui ./scenes/cornell/cornell.cfg

Updating

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

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

Recompiling

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

./build-64-sse2 LuxCore-opencl 5

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

cd LuxCore-opencl
make -j8

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

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

Ubuntu 14.04 LTS (Dynamic linking)

Dynamic link builds are only used for developing/debugging, not for release builds.

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

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

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

# Install Pillow
sudo pip3 install pillow

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

Ubuntu 16.04 LTS (Dynamic linking)

Dynamic link builds are only used for developing/debugging, not for release builds.

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

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

# Install Pillow
sudo pip3 install pillow

# To have Python v3.x in pyluxcore.so
sudo rm /usr/lib/x86_64-linux-gnu/libboost_python.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python.so

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

NOTE: Default Boost version in Ubuntu 16.04LTS is v1.58. Any serialization related feature will not work with standard version v1.56.

MacOs 10.13 +

Install build environment

Install latest Xcode and Command Line Tools for your OS version.

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install brew stuff and python3

brew install pyenv cmake bison gnu-sed gnu-tar xz libtool autoconf automake ispc
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
pyenv init
eval "$(pyenv init -)”
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.7.4
pyenv global 3.7.4
pip install numpy
pip install pillow
pip install pyside2

For CUDA builds on MacOS 10.13 only install cuda toolkit.

https://developer.nvidia.com/cuda-10.1-download-archive-base?target_os=MacOSX&target_arch=x86_64&target_version=1013

Compile Dependencies

pyenv shell 3.7.4

git clone https://github.com/LuxCoreRender/MacOSCompileDeps.git
cd MacOSCompileDeps
./cut_deps_release

This will leave you with a MacDistFiles.tar.gz .

Compile LuxCore

git clone https://github.com/LuxCoreRender/LuxCore.git
cd LuxCore

Copy MacDistFiles.tar.gz to LuxCore root and unpack. Just double-click. or

tar xzf MacDistFiles.tar.gz

Now do

cmake

export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"
DEPS_SOURCE=`pwd`/macos
mkdir build
cd  build
cmake -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..
make

use

-DLUXRAYS_DISABLE_OPENCL=1

for non OpenCL build

and

-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1

for CUDA builds.( 10.13 HighSierra only )

Xcode

export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"
DEPS_SOURCE=`pwd`/macos
mkdir build
cd  build
cmake -G Xcode -DOSX_DEPENDENCY_ROOT=$DEPS_SOURCE -DCMAKE_BUILD_TYPE=Release ..

use

-DLUXRAYS_DISABLE_OPENCL=1

for non OpenCL build

and

-DLUXRAYS_ENABLE_OPENCL=1 -DLUXRAYS_ENABLE_CUDA=1

for CUDA builds.( 10.13 HighSierra only )

Open Xcode project and compile.

Make bundle

run

./scripts/macos/pack_lux_osx.sh

or for XCode build

./scripts/macos/pack_lux_osx_xcode.sh

from LuxCore root.

This should end up with a distributable .dmg.

Have fun and good luck.

Contributing

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