2024-08-20 22:18:51 -04:00
|
|
|
# Please update REPO_PATH and BLENDER_PATH in the script below.
|
2024-12-25 15:20:54 +05:00
|
|
|
# Default BLENDER_PATH on Mac: "/Users/$USER/Library/Application Support/Blender/4.3"
|
|
|
|
|
# Default BLENDER_PATH on Linux: "$HOME/.config/blender/4.3"
|
2024-08-02 15:56:40 +10:00
|
|
|
# REPO_PATH="/path/to/where/your/git/repository/is/cloned/IfcOpenShell"
|
2024-12-24 17:55:44 +05:00
|
|
|
set -e
|
2024-08-20 22:18:51 -04:00
|
|
|
REPO_PATH=""
|
|
|
|
|
BLENDER_PATH=""
|
2024-08-02 15:56:40 +10:00
|
|
|
PACKAGE_PATH="${BLENDER_PATH}/extensions/.local/lib/python3.11/site-packages"
|
2024-09-25 11:26:43 +10:00
|
|
|
# If you are installing offline, use this instead:
|
|
|
|
|
# BONSAI_PATH="${BLENDER_PATH}/extensions/user_default/bonsai"
|
|
|
|
|
BONSAI_PATH="${BLENDER_PATH}/extensions/raw_githubusercontent_com/bonsai"
|
2024-08-02 15:56:40 +10:00
|
|
|
|
|
|
|
|
# Changing to the Git repository directory
|
2024-09-25 11:26:43 +10:00
|
|
|
cd "${REPO_PATH}"
|
2024-07-22 12:46:49 +05:00
|
|
|
|
|
|
|
|
# Copy over compiled IfcOpenShell files
|
2024-12-24 12:44:28 +05:00
|
|
|
cp "${PACKAGE_PATH}/ifcopenshell/"*_wrapper* "${PWD}/src/ifcopenshell-python/ifcopenshell/"
|
2024-08-02 15:56:40 +10:00
|
|
|
|
|
|
|
|
# Remove extension and link to Git
|
2024-09-25 11:26:43 +10:00
|
|
|
rm "${BONSAI_PATH}/__init__.py"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/bonsai"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifcopenshell"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifccsv.py"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifcdiff.py"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/bsdd.py"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/bcf"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifc4d"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifc5d"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifccityjson"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifcclash"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifcpatch"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifctester"
|
|
|
|
|
rm -r "${PACKAGE_PATH}/ifcfm"
|
2024-08-02 15:56:40 +10:00
|
|
|
|
2024-09-25 11:26:43 +10:00
|
|
|
ln -s "${PWD}/src/bonsai/bonsai/__init__.py" "${BONSAI_PATH}/__init__.py"
|
|
|
|
|
ln -s "${PWD}/src/bonsai/bonsai" "${PACKAGE_PATH}/bonsai"
|
|
|
|
|
ln -s "${PWD}/src/ifcopenshell-python/ifcopenshell" "${PACKAGE_PATH}/ifcopenshell"
|
|
|
|
|
ln -s "${PWD}/src/ifccsv/ifccsv.py" "${PACKAGE_PATH}/ifccsv.py"
|
|
|
|
|
ln -s "${PWD}/src/ifcdiff/ifcdiff.py" "${PACKAGE_PATH}/ifcdiff.py"
|
|
|
|
|
ln -s "${PWD}/src/bsdd/bsdd.py" "${PACKAGE_PATH}/bsdd.py"
|
|
|
|
|
ln -s "${PWD}/src/bcf/bcf" "${PACKAGE_PATH}/bcf"
|
|
|
|
|
ln -s "${PWD}/src/ifc4d/ifc4d" "${PACKAGE_PATH}/ifc4d"
|
|
|
|
|
ln -s "${PWD}/src/ifc5d/ifc5d" "${PACKAGE_PATH}/ifc5d"
|
|
|
|
|
ln -s "${PWD}/src/ifccityjson/ifccityjson" "${PACKAGE_PATH}/ifccityjson"
|
|
|
|
|
ln -s "${PWD}/src/ifcclash/ifcclash" "${PACKAGE_PATH}/ifcclash"
|
|
|
|
|
ln -s "${PWD}/src/ifcpatch/ifcpatch" "${PACKAGE_PATH}/ifcpatch"
|
|
|
|
|
ln -s "${PWD}/src/ifctester/ifctester" "${PACKAGE_PATH}/ifctester"
|
|
|
|
|
ln -s "${PWD}/src/ifcfm/ifcfm" "${PACKAGE_PATH}/ifcfm"
|
2024-07-22 12:46:49 +05:00
|
|
|
|
|
|
|
|
# Manually download some third party dependencies
|
2024-09-25 11:26:43 +10:00
|
|
|
cd "${PACKAGE_PATH}/bonsai/bim/data/gantt"
|
2024-07-22 12:46:49 +05:00
|
|
|
wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js
|
|
|
|
|
wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css
|
2025-02-10 10:50:25 +11:00
|
|
|
cd "${PACKAGE_PATH}/bonsai/bim/data/brick"
|
2024-07-22 12:46:49 +05:00
|
|
|
wget https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
|