From 596ffb093be8687d6e73f35e37338c63f9c05dbc Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 2 Aug 2024 11:50:54 +0500 Subject: [PATCH] dev environment script - keep it possible to run the script without any changes by default it assumes it's executed from ifcopenshell repo directory --- .../scripts/installation/dev_environment.bat | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/blenderbim/scripts/installation/dev_environment.bat b/src/blenderbim/scripts/installation/dev_environment.bat index 32393cbc50..1b584072f0 100644 --- a/src/blenderbim/scripts/installation/dev_environment.bat +++ b/src/blenderbim/scripts/installation/dev_environment.bat @@ -1,17 +1,32 @@ @echo off -echo SETUP BLENDERBIM ADD-ON LIVE DEVELOPMENT ENVIRONMENT -echo Update REPO_PATH, BLENDER_PATH, PACKAGE_PATH, BLENDERBIM_PATH in the script below. -echo This script needs to be run as administrator (to create symbolic links) -echo Make sure you have followed these steps before proceeding :) +setlocal -pause -SET REPO_PATH=%HOMEDRIVE%\Users\%USERNAME%\Where\Your\Git\Repository\Is\Cloned\IfcOpenShell +rem Uncomment setting REPO_PATH to use custom path for IfcOpenShell repository. +rem Otherwise by default it is assumed script is executed from IfcOpenShell directory. +rem SET REPO_PATH=%HOMEDRIVE%\Users\%USERNAME%\Where\Your\Git\Repository\Is\Cloned\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 BLENDERBIM_PATH=%BLENDER_PATH%\extensions\user_default\blenderbim + +echo SETUP BLENDERBIM ADD-ON LIVE DEVELOPMENT ENVIRONMENT +echo Update REPO_PATH, BLENDER_PATH, PACKAGE_PATH, BLENDERBIM_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% +) +echo REPO_PATH=%REPO_PATH% +echo BLENDER_PATH=%BLENDER_PATH% +echo PACKAGE_PATH=%PACKAGE_PATH% +echo BLENDERBIM_PATH=%BLENDERBIM_PATH% +pause + echo Changing to the Git repository directory... cd %REPO_PATH%