Closed Mateusz-Grzelinski closed 3 months ago
Generally looks like a good feature.
I am happy with the result and I will merge the change on the weekend. Logic for finding blender in windows default paths can be further improved, but I will track this in different issue or PR.
surprise surprise, edge case (ubuntu 22.03, apt installed blender 3.0.1):
It is typical for linux installs to make hard links to install, like here:
> ls -li /bin/blender /usr/bin/blender
6819210 .rwxr-xr-x 86M root 14 lut 2022 /bin/blender
6819210 .rwxr-xr-x 86M root 14 lut 2022 /usr/bin/blender
What shows up as 2 separate instances.
➜ ipython
Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.26.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import sys,os
In [2]: os.path.islink("/bin/blender") Out[2]: False
In [3]: os.path.islink("/usr/bin/blender") Out[3]: False
In [5]: bin = os.stat("/bin/blender")
In [6]: usr = os.stat("/usr/bin/blender")
In [8]: usr.st_nlink Out[8]: 1
In [10]: usr.st_ino Out[10]: 6819210
In [11]: usr.st_ino == bin.st_ino Out[11]: True
TODO:
- [x] deduplicate linux blender hard links based on inode number
I am glad with the current implementation. I will test it once more on linux and merge on the weekend.
i am very unhappy with the new update, because before (I am Macbook user) i could choose the blender.app directly from dropdown (for each Blender version, after i started it once), now i have to search for the blender.app every time i wanna start Blender via VSCode. That's a huge worsening. Can't you rollback the old code for mac users, please?
This PR adds best effort approach to find existing blender installations:
Screeshot: The system installation blender was added to list by this feature.
TODOs:
C:\
vsc:\
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
contains onlyblender-launcher.exe
andC:\Program Files\WindowsApps
has no read rights.~/.bin
,/bin
,/opt
,/usr/bin
? Those should be already in path/bin/blender
andsearchBlenderInSystem
found/usr/bin/blender
/snap/bin/blender
. Snap started running without window top bar on my setup...Those open TODOs are now blockers, but would be nice to test.
Cons:
Snippets for searching blender in steam directories on windows: