bonsai/docs: drop duplicated dev_environment scripts

Scripts were outdated now, redirecting to general `dev_environment.py` instructions.
This commit is contained in:
Andrej730
2026-09-14 11:27:16 +05:00
parent 1bb36cc1d4
commit 62259da3af
8 changed files with 11 additions and 271 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

@@ -1,94 +0,0 @@
#!/bin/bash
# Please update REPO_PATH and BLENDER_PATH in the script below.
# Default BLENDER_PATH on Mac: "/Users/$USER/Library/Application Support/Blender/4.5"
# Default BLENDER_PATH on Linux: "$HOME/.config/blender/4.5"
# REPO_PATH="/path/to/where/your/git/repository/is/cloned/IfcOpenShell"
set -e
REPO_PATH="$HOME/bonsaiDevel/IfcOpenShell"
BLENDER_PATH="$HOME/.config/blender/4.5"
PACKAGE_PATH="${BLENDER_PATH}/extensions/.local/lib/python3.11/site-packages"
# 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"
# Changing to the Git repository directory
cd "${REPO_PATH}"
# Add files that need to be ignored in push to GiHub (.gitignore). Namely *.so files are very big and do not need to be pushed
FILE=".gitignore"
STRING="*.so"
# Check if the file exists and contains the string
if [ ! -f "$FILE" ] || ! grep -qxF "$STRING" "$FILE"; then
echo "$STRING" >> "$FILE"
echo "Added '$STRING' to $FILE"
else
echo "'$STRING' already exists in $FILE"
fi
# Print summary of PATHs
echo "Please review if the following is right:"
echo "PWD: ${PWD}"
echo "REPO PATH (...../IfcOpenshell): ${REPO_PATH}"
echo "BLENDER PATH: ${BLENDER_PATH}"
echo "PACKAGE PATH (...../etensions/.local/lib/python3.11/site-packages): ${PACKAGE_PATH}"
echo "BONSAI PATH (...../extensions/raw_githubusercontent_com/bonsai): ${BONSAI_PATH}"
read -p "Press any key to START or CTRL-C to stop ..."
# Copy over compiled IfcOpenShell files
for src_file in "${PACKAGE_PATH}/ifcopenshell/"*_wrapper*; do
dest_file="${PWD}/src/ifcopenshell-python/ifcopenshell/$(basename "$src_file")"
# Only copy if source and destination are not the same file
if [ "$(realpath "$src_file")" != "$(realpath "$dest_file")" ]; then
cp "$src_file" "$dest_file"
echo "Copied: $(basename "$src_file")"
else
echo "Skipped (same file): $(basename "$src_file")"
fi
done
# Remove extension and link to Git
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"
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"
# Manually download some third party dependencies
cd "${PACKAGE_PATH}/bonsai/bim/data/gantt"
wget -O jsgantt.js https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js
wget -O jsgantt.css https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css
[ -d "$PACKAGE_PATH/bonsai/bim/schema" ] || mkdir -p "$PACKAGE_PATH/bonsai/bim/schema"
cd "${PACKAGE_PATH}/bonsai/bim/schema"
wget -O Brick.ttl https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
@@ -395,45 +395,11 @@ Now let's find out how to interact with GitHub in order to make changes to the B
.. image:: images/cloned-repo.png .. image:: images/cloned-repo.png
:width: 1000 px :width: 1000 px
10. **Link the Bonsai addon to the local cloned repository**: We will now edit the following 10. **Link the Bonsai addon to the local cloned repository**: We will now run a script that
script that establishes links from the unstable-installation to the cloned repository so we establishes links from the unstable-installation to the cloned repository so we
can easily see the changes done in the cloned repository taken effect when we load blender can easily see the changes done in the cloned repository taken effect when we load blender
locally. locally. Follow the :ref:`guides/development/installation:Live development
environment` section to run ``dev_environment.py``.
.. container:: blockbutton
:download:`Download dev_environment.sh <linux/dev_environment.sh>`
Edit the file to match the paths in your system. In our case we will edit the following lines:
- REPO_PATH="$HOME/bonsaiDevel/IfcOpenShell"
- BLENDER_PATH="$HOME/.config/blender/4.2"
- PACKAGE_PATH="${BLENDER_PATH}/extensions/.local/lib/python3.11/site-packages"
- BONSAI_PATH="${BLENDER_PATH}/extensions/raw_githubusercontent_com/bonsai"
We execute the script in the terminal. Confirm the data and the script will create the necessary links.
.. code-block:: bash
./dev_environment.sh
.. image:: images/dev-environment-sh.png
:width: 1000 px
.. image:: images/dev-environment-sh-executed.png
:width: 1000 px
.. warning::
If you receive an error like this:
.. code-block:: bash
cp: cannot stat '/home/falken10vdl/.config/blender/4.2/extensions/.local/lib/python3.11/site-packages/ifcopenshell/*_wrapper*': No such file or directory
It means that you have not installed the Bonsai Blender extension. Please refer to tha
last part of point 2. above and follow the `Unstable installation <https://docs.bonsaibim.org/guides/development/installation.html#unstable-installation>`__.
11. **Adjust the VSCode Blender extension**: We will now make some adjustments to the VSCode Blender extension to ease the reload of the addon. 11. **Adjust the VSCode Blender extension**: We will now make some adjustments to the VSCode Blender extension to ease the reload of the addon.
Select the Extensions tool. Then :menuselection:`Blender Development` and then select :menuselection:`Settings`. Select the Extensions tool. Then :menuselection:`Blender Development` and then select :menuselection:`Settings`.
@@ -1,100 +0,0 @@
@echo off
setlocal enabledelayedexpansion
rem ADAPT setting REPO_PATH to use custom path for IfcOpenShell repository.
rem Otherwise by default it is assumed script is executed from IfcOpenShell directory.
SET REPO_PATH=%HOMEDRIVE%\Users\%USERNAME%\Documents\bonsaiDevel\IfcOpenShell
SET BLENDER_PATH=%HOMEDRIVE%\Users\%USERNAME%\AppData\Roaming\Blender Foundation\Blender\4.2
SET PACKAGE_PATH=%BLENDER_PATH%\extensions\.local\lib\python3.11\site-packages
SET BONSAI_PATH=%BLENDER_PATH%\extensions\raw_githubusercontent_com\bonsai
echo SETUP BONSAI ADD-ON LIVE DEVELOPMENT ENVIRONMENT
echo Update REPO_PATH, BLENDER_PATH, PACKAGE_PATH, BONSAI_PATH in the script above.
echo This script needs to be run as administrator (to create symbolic links)
echo Make sure you have followed these steps before proceeding :)
echo.
echo Currently set paths:
if not defined REPO_PATH (
echo REPO_PATH is not set, assuming we're already in IfcOpenShell directory.
set REPO_PATH=%cd%
)
rem Print summary of paths
echo.
echo Please review if the following is right:
echo PWD: %CD%
echo REPO PATH (.....\IfcOpenshell): %REPO_PATH%
echo BLENDER PATH: %BLENDER_PATH%
echo PACKAGE PATH (.....\extensions\.local\lib\python3.11\site-packages): %PACKAGE_PATH%
echo BONSAI PATH (.....\extensions\raw_githubusercontent_com\bonsai): %BONSAI_PATH%
echo.
rem Prompt user to continue
pause
echo Changing to the Git repository directory...
cd %REPO_PATH%
rem Add files that need to be ignored in push to GiHub (.gitignore)
set "FILE=.gitignore"
set "STRING=*.so"
rem Check if the file exists and contains the string
if not exist "%FILE%" (
echo %STRING% >> "%FILE%"
echo "%FILE%" does not exist
echo Added '%STRING%' to %FILE%
) else (
findstr /L "%STRING%" "%FILE%" >nul
if errorlevel 1 (
echo %STRING% >> "%FILE%"
echo %STRING% not found in %FILE%
echo Added %STRING% to %FILE%
) else (
echo '%STRING%' already exists in %FILE%
)
)
echo Copy over compiled IfcOpenShell files...
copy "%PACKAGE_PATH%\ifcopenshell\*_wrapper*" "%CD%\src\ifcopenshell-python\ifcopenshell\"
echo Remove extension and link to Git...
del "%BONSAI_PATH%\__init__.py"
rd /S /Q "%PACKAGE_PATH%\bonsai"
rd /S /Q "%PACKAGE_PATH%\ifcopenshell"
del "%PACKAGE_PATH%\ifccsv.py"
del "%PACKAGE_PATH%\ifcdiff.py"
del "%PACKAGE_PATH%\bsdd.py"
rd /S /Q "%PACKAGE_PATH%\bcf"
rd /S /Q "%PACKAGE_PATH%\ifc4d"
rd /S /Q "%PACKAGE_PATH%\ifc5d"
rd /S /Q "%PACKAGE_PATH%\ifccityjson"
rd /S /Q "%PACKAGE_PATH%\ifcclash"
rd /S /Q "%PACKAGE_PATH%\ifcpatch"
rd /S /Q "%PACKAGE_PATH%\ifctester"
rd /S /Q "%PACKAGE_PATH%\ifcfm"
mklink "%BONSAI_PATH%\__init__.py" "%CD%\src\bonsai\bonsai\__init__.py"
mklink /D "%PACKAGE_PATH%\bonsai" "%CD%\src\bonsai\bonsai"
mklink /D "%PACKAGE_PATH%\ifcopenshell" "%CD%\src\ifcopenshell-python\ifcopenshell"
mklink "%PACKAGE_PATH%\ifccsv.py" "%CD%\src\ifccsv\ifccsv.py"
mklink "%PACKAGE_PATH%\ifcdiff.py" "%CD%\src\ifcdiff\ifcdiff.py"
mklink "%PACKAGE_PATH%\bsdd.py" "%CD%\src\bsdd\bsdd.py"
mklink /D "%PACKAGE_PATH%\bcf" "%CD%\src\bcf\bcf"
mklink /D "%PACKAGE_PATH%\ifc4d" "%CD%\src\ifc4d\ifc4d"
mklink /D "%PACKAGE_PATH%\ifc5d" "%CD%\src\ifc5d\ifc5d"
mklink /D "%PACKAGE_PATH%\ifccityjson" "%CD%\src\ifccityjson\ifccityjson"
mklink /D "%PACKAGE_PATH%\ifcclash" "%CD%\src\ifcclash\ifcclash"
mklink /D "%PACKAGE_PATH%\ifcpatch" "%CD%\src\ifcpatch\ifcpatch"
mklink /D "%PACKAGE_PATH%\ifctester" "%CD%\src\ifctester\ifctester"
mklink /D "%PACKAGE_PATH%\ifcfm" "%CD%\src\ifcfm\ifcfm"
echo Manually downloading some third party dependencies...
curl https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js -o "%PACKAGE_PATH%\bonsai\bim\data\gantt\jsgantt.js"
curl https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css -o "%PACKAGE_PATH%\bonsai\bim\data\gantt\jsgantt.css"
IF NOT EXIST "%PACKAGE_PATH%\bonsai\bim\schema" mkdir "%PACKAGE_PATH%\bonsai\bim\schema"
curl -L https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl -o "%PACKAGE_PATH%\bonsai\bim\schema\Brick.ttl"
pause
@@ -338,44 +338,12 @@ Now let's find out how to interact with GitHub in order to make changes to the B
.. image:: images/cloned-repo.png .. image:: images/cloned-repo.png
:width: 1000 px :width: 1000 px
10. **Link the Bonsai addon to the local cloned repository**: We will now edit the following 10. **Link the Bonsai addon to the local cloned repository**: We will now run a script that
script that establishes links from the unstable-installation to the cloned repository so we establishes links from the unstable-installation to the cloned repository so we
can easily see the changes done in the cloned repository taken effect when we load blender can easily see the changes done in the cloned repository taken effect when we load blender
locally. locally. Follow the :ref:`guides/development/installation:Live development
environment` section to run ``dev_environment.py``. You need to run it as an
.. container:: blockbutton administrator, with Blender closed.
:download:`Download dev_environment.bat <windows/dev_environment.bat>`
Edit the file to match the paths in your system. In our case we will edit the following lines:
- SET REPO_PATH=%HOMEDRIVE%\\Users\\%USERNAME%\\Documents\\bonsaiDevel\\IfcOpenShell
- SET BLENDER_PATH=%HOMEDRIVE%\\Users\\%USERNAME%\\AppData\\Roaming\\Blender Foundation\\Blender\\4.2
- SET PACKAGE_PATH=%BLENDER_PATH%\\extensions\\.local\\lib\\python3.11\\site-packages
- SET BONSAI_PATH=%BLENDER_PATH%\\extensions\\raw_githubusercontent_com\\bonsai
You need to run it as an administrator.
.. image:: images/run-as-administrator.png
:width: 1000 px
Confirm the data and the script will create the necessary links.
.. image:: images/running-dev_environment-bat.png
:width: 1000 px
.. warning::
If you receive errors like this:
.. code-block:: bash
The system cannot find the path specified.
It means that you have not installed the Bonsai Blender extension. Please refer to tha
last part of point 2. above and follow the `Unstable installation <https://docs.bonsaibim.org/guides/development/installation.html#unstable-installation>`__.
11. **Adjust the VSCode Blender extension**: We will now make some adjustments to the VSCode Blender extension to ease the reload of the addon. 11. **Adjust the VSCode Blender extension**: We will now make some adjustments to the VSCode Blender extension to ease the reload of the addon.
Select the Extensions tool. Then :menuselection:`Blender Development` and then select :menuselection:`Settings`. Select the Extensions tool. Then :menuselection:`Blender Development` and then select :menuselection:`Settings`.