kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
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.
87 lines
2.6 KiB
87 lines
2.6 KiB
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
if ! which apt > /dev/null 2>&1; then
|
|
echo "Needs debian/ubuntu system :-("
|
|
exit 1;
|
|
fi
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "Must be run as root user."
|
|
exit 1
|
|
fi
|
|
|
|
# Install BIM specifics
|
|
echo "-- Installing dependencies --"
|
|
apt-get update -qq && \
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
curl wget unzip git cmake gcc g++ libboost-all-dev libicu-dev \
|
|
libpcre3-dev libxml2-dev \
|
|
liboce-foundation-dev liboce-modeling-dev liboce-ocaf-dev liboce-visualization-dev liboce-ocaf-lite-dev
|
|
|
|
echo "-- (Re-)creating /usr/local/src/bim base folder --"
|
|
rm -rf /usr/local/src/bim || true
|
|
mkdir -p /usr/local/src/bim
|
|
cd /usr/local/src/bim
|
|
|
|
# OpenCOLLADA
|
|
echo "-- Downloading and building OpenCOLLADA --"
|
|
git clone https://github.com/KhronosGroup/OpenCOLLADA.git --depth 1
|
|
mkdir OpenCOLLADA/build
|
|
pushd OpenCOLLADA/build
|
|
cmake ..
|
|
make -j
|
|
make install
|
|
popd
|
|
|
|
# Install COLLADA2GLTF
|
|
echo "-- Downloading COLLADA2GLTF --"
|
|
wget --quiet https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.5/COLLADA2GLTF-v2.1.5-linux.zip
|
|
unzip -fq COLLADA2GLTF-v2.1.5-linux.zip -d /usr/lib/COLLADA2GLTF
|
|
ln -fs /usr/lib/COLLADA2GLTF/COLLADA2GLTF-bin /usr/local/bin/COLLADA2GLTF
|
|
rm -rf COLLADA2GLTF-v2.1.5-linux.zip
|
|
|
|
# IFCconvert
|
|
echo "-- Downloading and building IfcConvert --"
|
|
git clone https://github.com/IfcOpenShell/IfcOpenShell --depth 1
|
|
mkdir -p IfcOpenShell/build
|
|
pushd IfcOpenShell/build
|
|
|
|
cmake ../cmake -DOCC_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu/ \
|
|
-DBUILD_IFCPYTHON=0 \
|
|
-DOPENCOLLADA_INCLUDE_DIR=/usr/local/include/opencollada \
|
|
-DOPENCOLLADA_LIBRARY_DIR=/usr/local/lib/opencollada \
|
|
-DPCRE_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu/
|
|
|
|
make install
|
|
popd
|
|
|
|
echo "-- Downloading and building xeokit-metadata --"
|
|
|
|
wget --quiet https://github.com/bimspot/xeokit-metadata/files/3932144/xeokit-metadata-linux-x64.tar.gz
|
|
tar -zxvf xeokit-metadata-linux-x64.tar.gz
|
|
chmod +x xeokit-metadata-linux-x64/xeokit-metadata
|
|
cp -r xeokit-metadata-linux-x64/ /usr/lib/xeokit-metadata
|
|
ln -fs /usr/lib/xeokit-metadata/xeokit-metadata /usr/local/bin/xeokit-metadata
|
|
rm -rf xeokit-metadata-linux-x64.tar.gz
|
|
|
|
which IfcConvert
|
|
echo "✔ IfcConvert is in your path."
|
|
|
|
which COLLADA2GLTF
|
|
echo "✔ COLLADA2GLTF is in your path."
|
|
|
|
which xeokit-metadata
|
|
echo "✔ xeokit-metadata is in your path. (without .NET yet, see below)"
|
|
|
|
echo "DONE - BUT! You still need to:
|
|
|
|
1. Install the NPM dependency under your user account
|
|
|
|
npm install xeokit/xeokit-gltf-to-xkt -g
|
|
|
|
2. install your distribution's version of .NET core:
|
|
|
|
Select distribution and follow steps at
|
|
https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/runtime-2.2.0"
|
|
|