From 5f94a846162864e26807d0f003f81ca28f8ded78 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 25 Jul 2024 18:08:38 +0500 Subject: [PATCH] dev environment script - move username to a separate variable, use current user as default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Want to keep the script working for some users (me 👉👈) just by running it from the repo without any changes. --- src/blenderbim/scripts/installation/dev_environment.bat | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/scripts/installation/dev_environment.bat b/src/blenderbim/scripts/installation/dev_environment.bat index 668a8a9c5e..16c215933f 100644 --- a/src/blenderbim/scripts/installation/dev_environment.bat +++ b/src/blenderbim/scripts/installation/dev_environment.bat @@ -1,7 +1,7 @@ @echo off rem SETUP BLENDERBIM ADD-ON LIVE DEVELOPMENT ENVIRONMENT -rem Update BLENDER, BLENDER_VERSION, PYTHON_VERSION, BBIM_REPO in the script bellow. +rem Update BLENDER, BLENDER_VERSION, PYTHON_VERSION, BBIM_REPO, BLENDER_USER_NAME in the script bellow. rem Put the script at the root of your IfcOpenShell git repository rem This script needs to be run as administrator (to create symbolic links) rem Make sure you have followed these steps before proceeding :) @@ -11,8 +11,11 @@ pause SET BLENDER_VERSION=4.2 SET PYTHON_VERSION=3.11 SET BBIM_REPO=user_default +rem Can be useful e.g. if you're running script from administrator account +rem and need to setup dev environment for some other user. +SET BLENDER_USER_NAME=%USERNAME% -SET BLENDER=C:\Users\X\AppData\Roaming\Blender Foundation\Blender\%BLENDER_VERSION% +SET BLENDER=%HOMEDRIVE%\Users\%BLENDER_USER_NAME%\AppData\Roaming\Blender Foundation\Blender\%BLENDER_VERSION% SET BLENDER_LOCAL=%BLENDER%\extensions\.local\lib\python%PYTHON_VERSION%\site-packages SET BLENDERBIM=%BLENDER_LOCAL%\blenderbim SET BLENDER_EXT=%BLENDER%\extensions\%BBIM_REPO%\blenderbim