Skip to content
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

Using it on OSX #2

Open
WarrenFaith opened this issue Sep 4, 2023 · 16 comments
Open

Using it on OSX #2

WarrenFaith opened this issue Sep 4, 2023 · 16 comments

Comments

@WarrenFaith
Copy link

Hey,

I wanted to try it in a fresh project, so I used the internal AsserLib to get this one but it fails to load.
This is the error output:

Can't open dynamic library: /Users/.../workspace/git/.../addons/PerfBullets/bin/spawner.macos.template_debug.framework. Error: dlopen(/Applications/Godot.app/Contents/MacOS/../Frameworks/spawner.macos.template_debug.framework, 0x0002): tried: '/Applications/Godot.app/Contents/MacOS/../Frameworks/spawner.macos.template_debug.framework' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Godot.app/Contents/MacOS/../Frameworks/spawner.macos.template_debug.framework' (no such file), '/Applications/Godot.app/Contents/MacOS/../Frameworks/spawner.macos.template_debug.framework' (no such file).
core/extension/gdextension.cpp:455 - GDExtension dynamic library not found: /Users/.../workspace/git/.../addons/PerfBullets/bin/spawner.macos.template_debug.framework
Failed loading resource: res://addons/PerfBullets/bin/spawner.gdextension. Make sure resources have been imported by opening the project in the editor at least once.

I see that there are files missing but I am not sure what to do to fix this. I also read in the readme that this is prebuilt for Windows but I haven't seen a guide to built it for OSX.

Any help appreciated!

@Moonzel
Copy link
Owner

Moonzel commented Sep 9, 2023

Thanks for leaving the error logs. I have only prebuilt Windows in the plugin so far, as that is the only platform I have available to test with my hardware. If you look towards the bottom of the README, I have put directions on how to edit/build the plugin, and at least the general idea should apply to OSX. If they do not, please comment here, I'd be glad to help more.

@Moonzel
Copy link
Owner

Moonzel commented Oct 12, 2023

If there are any further problems, please let me know.

@Moonzel Moonzel closed this as completed Oct 12, 2023
@blabtonic
Copy link

Same error happens on Linux as well

@Dan-Mizu
Copy link

Yes it seems this addon only seems to work with Windows at the moment. I work on my Godot projects on different platforms and due to this I can't work on projects utilizing this addon on MacOS.

It is a shame because I LOVE this addon so far as the dev experience has been great, and I lack the skills needed to build this on MacOS- and the knowledge to understand why certain gdextension addons fail to run on different platforms. If anyone else figures it out or creates a successful build I would love to know!

@Moonzel Moonzel reopened this Feb 27, 2024
@Moonzel
Copy link
Owner

Moonzel commented Feb 27, 2024

I am sorry to see that this is still occurring. The way gdextension is set up should allow this to work seamlessly on MacOS and Linux. Has anyone on Mac or Linux tried building the project through command line? Since all I have is a Windows PC, it makes it extremely difficult for me to debug other OSs.

@PedroG98
Copy link

Hello, I managed to run the plugin on Linux. Note that I'm not sure which of the following steps are necessary:

  • Download scons and godot-cpp
  • Place the godot-cpp folder inside addons/PerfBullets (as instructed in the instructions to edit the plugin)
  • Compile godot-cpp for linux by running scons on addons/PerfBullets/godot-cpp (Don't know if this step was necessary)
  • Compile PerfBullets for linux by running scons on addons/PerfBullets
  • The file libspawner.linux.template_debug.x86_64.so will be generated in addons/PerfBullets/bin
  • The file addons/PerfBullets/spawner.gdextension needs to be changed, because it only accepts sharedlibs with the name spawner.platform. Open it and write libspawner instead of spawner for your platform of choice (in this case line 14)
  • Open godot and the library should work

It's a bit confusing, but I hope it helps.

@Moonzel
Copy link
Owner

Moonzel commented Mar 18, 2024

This is great progress! Thank you for writing this out. I see how this would be an issue, as I was not aware that the name changed per OS. I will attempt to update the spawner.gdextension file with the new name, but I need somebody on MacOS to try these steps to get the name on MacOS. @Dan-Mizu, would you be willing to try?

@Ughuuu
Copy link

Ughuuu commented Apr 7, 2024

I mean, I can add a PR and add automated actions to this. I recently merged the build and sign actions into godot-cpp-template https://github.com/godotengine/godot-cpp-template?tab=readme-ov-file#usage---actions

@Moonzel
Copy link
Owner

Moonzel commented Apr 16, 2024

If you think that would fix it, go right ahead! I do not know as much about this aspect of GDExtension.

@Ughuuu
Copy link

Ughuuu commented Apr 16, 2024

Do you have a apple developer account though? As after those steps(in the action I linked), you will still need to sign it.

@Moonzel
Copy link
Owner

Moonzel commented Apr 17, 2024

I was not aware I needed that, I do not have it. Is there any other way you can think of to debug this?

@Ughuuu
Copy link

Ughuuu commented Apr 17, 2024

If you dont sign it it will work on mac(and other platforms) but on mac it will give error and you have to click bypass security.
Ill create a branch for you to review this week.

@Ughuuu
Copy link

Ughuuu commented Apr 18, 2024

Also, for this i would suggest you do it different. First, you move your code to /src folder.
Then you clone as subrepo godot-cpp. In either godot-cpp or thirdparty/godot-cpp folder.
I can start on a pr with this to show the changes, if you believe they might be good(changing locations).
Also, the build output i would put as bin/addons...
And such in github a actions you just export that.

@Ughuuu
Copy link

Ughuuu commented Apr 18, 2024

Also what I propose is basically actions that would build for all platforms after every commit, eg. similar to this: https://github.com/appsinacup/godot-rapier-2d/actions

@Moonzel
Copy link
Owner

Moonzel commented Apr 18, 2024

I will be honest with you, I am not very familiar with Github and its actions. Please make a PR for your ideas, as they seem to make sense, just make sure to update the paths on any of the GDExtension files that need a path (this has caused problems in the past).

@Ughuuu
Copy link

Ughuuu commented Apr 18, 2024

On it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants