-
Notifications
You must be signed in to change notification settings - Fork 75
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
Unable to execute Blender: Start on OSX #5
Comments
Yeah, the code back then was much uglier than now because I just started learning typescript. Should be better now. :) Thanks for the provided fix. Is it not possible to select the actual binary when you are asked to select the executable? Will blender always be packaged like that or is this path different for different people? Can command line arguments be passed to "open" that are forwarded to the application? I'm not sure how well that works in the task system of vs code. Would be nice if you could try that. I guess if it works, using "open" is the preferable solution because it makes less assumptions about the system. |
Or we could check if the selected file ends with Looks like this path is always the same: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1 |
in Finder you can right click and do "Show package contents", but that is not available in the open-dialog from vscode atleast. AFAIK blender is always packaged in a .app when released to OSX, and the path is always blender.app/Contents/MacOS/blender not sure how it is launched when compiling/debugging the blender sourcecode itself though, I havent dived that far into blender :) since osx 10.6 you can pass arguments to the 'open' command using --args but I don´t think that is used very widely. I recently helped solve a bug with machin3tools (for 2.8) regarding osx compatibility (he got the path wrong when reading keymaps inside his plugin) he used this code to solve the issue:
yeah your comment from 44secs ago seems like a good solution |
https://wiki.blender.org/wiki/Building_Blender/Mac The last screenshot there indicates that Blender is packaged in the same way when Blender is build from source code. |
Can you check if the provided fix works, please? |
Works like a charm! btw, do you really need the ms-vscode.cpptools as an extension dependency? |
Thanks. No, I don't really need it right now... Added it before I was sure which features I will support for now. |
nah, well, since its a dependency you have to install it in order to activate the blender-vscode plugin |
True, I'll probably add this dependency back soon anyway, so not sure if I should remove it now. |
Unable to open on OSX
added this to resolve the issue in blender_executable.ts
on OSX blender is packaged in a .app folder-structure which the file-selector on osx recognises as an application. but when starting from commandline, the actual binary should be executed from the folder Contents/MacOS/ inside the blender.app (folder).
Another solution would be to use the 'open' command on osx.
heh, I started a forked a while back with some tweaks to the overall layout of the vscode plugin, but now I see you´ve implemented a similar solution in the new update :)
The text was updated successfully, but these errors were encountered: