You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
4.1 KiB
129 lines
4.1 KiB
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ ! $2 ]] ; then
|
|
echo " * Unable to install"
|
|
exit 1
|
|
fi
|
|
|
|
TARGET=$1
|
|
LUX_TAG=$2
|
|
DIST=$3
|
|
|
|
# Check if I have to build the stand alone version or the SDK version
|
|
if echo $LUX_TAG | grep -iq 'sdk' ; then
|
|
echo
|
|
echo " * 安装SDK版本在 $TARGET/$LUX_TAG"
|
|
|
|
rm -rf $TARGET/$LUX_TAG
|
|
mkdir $TARGET/$LUX_TAG
|
|
|
|
mkdir $TARGET/$LUX_TAG/bin
|
|
cp $LUX_TAG/bin/luxcoreui $LUX_TAG/bin/luxcoreconsole $LUX_TAG/bin/luxcoredemo \
|
|
$LUX_TAG/bin/luxcorescenedemo $TARGET/$LUX_TAG/bin
|
|
|
|
mkdir $TARGET/$LUX_TAG/lib
|
|
cp $LUX_TAG/lib/*.so $TARGET/$LUX_TAG/lib
|
|
cp $TARGET/lib/libOpenImageDenoise.so.1 $TARGET/lib/libembree3.so.3 $TARGET/lib/libtbb.so.12 $TARGET/lib/libtbb.so.2 $TARGET/$LUX_TAG/lib
|
|
cp -a $TARGET/lib/libnvrtc* $TARGET/$LUX_TAG
|
|
|
|
cp $LUX_TAG/README.md $TARGET/$LUX_TAG
|
|
cp $LUX_TAG/COPYING.txt $TARGET/$LUX_TAG
|
|
cp $LUX_TAG/AUTHORS.txt $TARGET/$LUX_TAG
|
|
cp $LUX_TAG/sdk/CMakeLists.txt $TARGET/$LUX_TAG
|
|
|
|
mkdir $TARGET/$LUX_TAG/cmake
|
|
|
|
mkdir $TARGET/$LUX_TAG/include
|
|
mkdir $TARGET/$LUX_TAG/include/luxrays
|
|
mkdir $TARGET/$LUX_TAG/include/luxrays/utils
|
|
cp -r $LUX_TAG/include/luxrays/utils/cyhair $TARGET/$LUX_TAG/include/luxrays/utils
|
|
cp $LUX_TAG/include/luxrays/utils/exportdefs.h $TARGET/$LUX_TAG/include/luxrays/utils
|
|
cp $LUX_TAG/include/luxrays/utils/properties.h $TARGET/$LUX_TAG/include/luxrays/utils
|
|
cp $LUX_TAG/include/luxrays/utils/utils.h $TARGET/$LUX_TAG/include/luxrays/utils
|
|
|
|
mkdir $TARGET/$LUX_TAG/include/luxcore
|
|
cp $LUX_TAG/generated/include/luxcore/cfg.h $TARGET/$LUX_TAG/include/luxcore
|
|
cp $LUX_TAG/include/luxcore/luxcore.h $TARGET/$LUX_TAG/include/luxcore
|
|
|
|
cp -r $LUX_TAG/samples $TARGET/$LUX_TAG
|
|
cp -r $LUX_TAG/scenes $TARGET/$LUX_TAG
|
|
|
|
cd $TARGET
|
|
tar -cvjf ${LUX_TAG}.tar.bz2 $LUX_TAG
|
|
cd ..
|
|
|
|
echo
|
|
else
|
|
echo
|
|
echo " * 安装独立版本在 $TARGET/$LUX_TAG"
|
|
|
|
rm -rf $TARGET/$LUX_TAG
|
|
mkdir $TARGET/$LUX_TAG
|
|
|
|
# Build PyInstaller
|
|
#
|
|
# PyInstaller is pretty much broken on Linux: https://github.com/LuxCoreRender/LuxCore/issues/80
|
|
# cd $LUX_TAG
|
|
# pyinstaller samples/pyluxcoretool/pyluxcoretool.linux.spec
|
|
# cd -
|
|
#
|
|
# cp $LUX_TAG/bin/luxcoreui $LUX_TAG/dist/pyluxcoretool $TARGET/$LUX_TAG
|
|
# Workaround to PyInstaller, just run "python3 pyluxcoretools.zip"
|
|
cp $LUX_TAG/lib/pyluxcoretools.zip $TARGET/$LUX_TAG
|
|
|
|
cp $LUX_TAG/bin/luxcoreui $TARGET/$LUX_TAG
|
|
cp $LUX_TAG/lib/*.so $TARGET/$LUX_TAG
|
|
cp $TARGET/lib/libOpenImageDenoise.so.1 $TARGET/lib/libembree3.so.3 $TARGET/lib/libtbb.so.12 $TARGET/lib/libtbb.so.2 $TARGET/$LUX_TAG
|
|
cp -a $TARGET/lib/libnvrtc* $TARGET/$LUX_TAG
|
|
|
|
cp $LUX_TAG/README.md $TARGET/$LUX_TAG
|
|
cp $LUX_TAG/COPYING.txt $TARGET/$LUX_TAG
|
|
cp $LUX_TAG/AUTHORS.txt $TARGET/$LUX_TAG
|
|
mkdir -p $TARGET/$LUX_TAG/scenes/cornell
|
|
cp $LUX_TAG/scenes/cornell/cornell.cfg $TARGET/$LUX_TAG/scenes/cornell
|
|
cp $LUX_TAG/scenes/cornell/cornell.scn $TARGET/$LUX_TAG/scenes/cornell
|
|
cp $LUX_TAG/scenes/cornell/Khaki.ply $TARGET/$LUX_TAG/scenes/cornell
|
|
cp $LUX_TAG/scenes/cornell/HalveRed.ply $TARGET/$LUX_TAG/scenes/cornell
|
|
cp $LUX_TAG/scenes/cornell/DarkGreen.ply $TARGET/$LUX_TAG/scenes/cornell
|
|
cp $LUX_TAG/scenes/cornell/Grey.ply $TARGET/$LUX_TAG/scenes/cornell
|
|
|
|
cd $TARGET
|
|
tar -cvjf ${LUX_TAG}.tar.bz2 $LUX_TAG
|
|
cd ..
|
|
|
|
echo
|
|
fi
|
|
|
|
# Check if I have to pack LuxMark too
|
|
if [[ -d "LuxMark" ]] ; then
|
|
echo
|
|
echo " * 安装LuxMark在 $TARGET/luxmark"
|
|
|
|
rm -rf $TARGET/luxmark
|
|
mkdir $TARGET/luxmark
|
|
mkdir $TARGET/luxmark/lib
|
|
|
|
cp $LUX_TAG/bin/luxcoreui $TARGET/luxmark
|
|
cp $TARGET/lib/libOpenImageDenoise.so.1 $TARGET/lib/libembree3.so.3 $TARGET/lib/libtbb.so.12 $TARGET/lib/libtbb.so.2 $TARGET/luxmark/lib
|
|
#cp $TARGET/qt5-v5.12.2/lib/libQt5Widgets.so $TARGET/luxmark/libQt5Widgets.so.5
|
|
#cp $TARGET/qt5-v5.12.2/lib/libQt5Network.so $TARGET/luxmark/libQt5Network.so.5
|
|
#cp $TARGET/qt5-v5.12.2/lib/libQt5Gui.so $TARGET/luxmark/libQt5Gui.so.5
|
|
#cp $TARGET/qt5-v5.12.2/lib/libQt5Core.so $TARGET/luxmark/libQt5Core.so.5
|
|
|
|
cp LuxMark/README.md $TARGET/luxmark
|
|
cp LuxMark/COPYING.txt $TARGET/luxmark
|
|
cp LuxMark/AUTHORS.txt $TARGET/luxmark
|
|
cp LuxMark/bin/luxmark $TARGET/luxmark/luxmark.bin
|
|
cp ${SHELLROOT}/installLib/luxmark.start $TARGET/luxmark/luxmark
|
|
|
|
tar zxf $DIST/scenes.tgz -C $TARGET/luxmark
|
|
|
|
cd $TARGET
|
|
tar cvjf luxmark.tar.bz2 luxmark
|
|
cd ..
|
|
|
|
echo
|
|
fi
|
|
|