-
-
Notifications
You must be signed in to change notification settings - Fork 787
Fixes: Bat script failed even when you right-click on it, and run as administrator. #6752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v0.8.0
Are you sure you want to change the base?
Conversation
updated from 320a4cf
@falken10vdl
|
@theoryshaw No dumb questios at all! I changed a little bit the script that was in the doc: http://docs-unstable.bonsaibim.org/guides/development/installation.html#live-development-environment I added that part to ignore the .so files so git will not attempt to track them. As part of the script there is copy command of some libraries: copy "%PACKAGE_PATH%\ifcopenshell*_wrapper*" "%CD%\src\ifcopenshell-python\ifcopenshell" |
I have just run as administrator the attached .bat file in a fresh bonsai installation: What error are you getting? |
I have taken a look to https://chatgpt.com/share/68349a2a-bec8-8013-9e18-1667d2cdda67 I see: This must be populated with the GITHUB path ending in \IfcOpenshell In my case for example: I added this (....\IfcOpenshell) as an aid to give the idea of how they shoudl look like, but I am not sure if I have created more confusion than anything... Regards, |
my path is When i right clicked on the bat file and run with admin privileges, I get the first image, after adding the following snippet, I get the 2nd image (that is, it worked)
|
I see that you have not set the REPO directory to D:\Dropbox\GitHub\IfcOpenShell in the .bat file. Anyhow I think your update to the script is a nice thing to have since it will cd to the directory where the bat file is, and if that one happens to be in the root of the REPO directory, it will work even if the REPO is no set. |
This batch script was not intended to be executed just by itself from the explorer (at least if it's not modified), it was intended to be executed from cmd from IfcOpenShell directory. There's also confusion between two batch scripts. In ChatGPT logs it seems you were using There is also a bug in I think we should reconcile the scripts first to prevent further confusion. Regarding the code change: :: Ensure script runs from its own directory
cd /d "%~dp0"
:: Use pushd/popd in case we need to return later
pushd . I think it's incorrect. E.g. if you create a script like so @echo off
cd /d "%~dp0"
pushd .
echo PWD: %CD%
popd
pause and run it, you'll end up in .bat directory, not in the original folder.
The working script would be something like: @echo off
pushd "%~dp0"
echo PWD: %CD%
popd
pause But it seems just having
I had an alternative idea for a while now, which would allow us not to think about this kind of system language details we don't normally care about, see #6754
@falken10vdl |
@Andrej730 Absolutely! If this is now already solved, better to remove the gitignore part on this .bat file and also in its linux sibling dev_environment.sh |
Fixes via AI sleuthing:
https://chatgpt.com/share/68349a2a-bec8-8013-9e18-1667d2cdda67
ping @falken10vdl, @Andrej730