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

[Issue/Bug]: MacOS SDK Problem #49

Closed
3 tasks done
P5ina opened this issue Dec 20, 2023 · 16 comments · Fixed by #53
Closed
3 tasks done

[Issue/Bug]: MacOS SDK Problem #49

P5ina opened this issue Dec 20, 2023 · 16 comments · Fixed by #53
Assignees
Labels
building Everything about building the plugin important

Comments

@P5ina
Copy link

P5ina commented Dec 20, 2023

What happened?

I imported and configured your plugin on Windows and everything works fine. Then I switched to Mac and built your plugin from source and then the error appeared. I restarted Godot many times, but it didn't help. I tried to sign the dylib with codesign, but that didn't help either.

Version

1.0.1

Godot Version

4.2.1.stable

Exact steps to reproduce this error

  1. Clone discord-sdk-godot
  2. Install python 3.11
  3. Install scons
  4. Run python3.11 setup.py
  5. Run scons
  6. Run scons target=template_release
  7. Run python3.11 release.py
  8. Export unzipped archive to project
  9. Enable plugin in settings
  10. Restart Godot two times

GDScript

extends Node

func _ready():
	DiscordSDK.app_id = 0 # Application ID (Placeholder for security purpose)
	DiscordSDK.details = tr("DISCORD_MAIN_MENU_DETAILS")
	
	DiscordSDK.large_image = "game_icon" # Image key from "Art Assets"
	DiscordSDK.large_image_text = "Polix Star"
	DiscordSDK.small_image = "menu_icon" # Image key from "Art Assets"
	DiscordSDK.small_image_text = tr("DISCORD_MAIN_MENU_ICON")

	DiscordSDK.start_timestamp = int(Time.get_unix_time_from_system()) # "02:46 elapsed"
	# DiscordSDK.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time / "01:00:00 remaining"

	DiscordSDK.refresh() # Always refresh after changing the values!

Godot output

Godot Engine v4.2.1.stable.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
  modules/gltf/register_types.cpp:63 - Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
--- Debug adapter server started ---
--- GDScript language server started on port 6005 ---
  gdscript://-9223370559033645678.gd:4 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:7 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:40 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:50 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:53 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:56 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:59 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:63 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:65 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  gdscript://-9223370559033645678.gd:68 - Parse Error: Identifier "DiscordSDK" not declared in the current scope.
  Can't open dynamic library: /Users/p5ina/godot_projects/PolixStar/addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib. Error: dlopen(/Users/p5ina/godot_projects/PolixStar/addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib, 0x0002): symbol not found in flat namespace '_DiscordCreate'.
  core/extension/gdextension.cpp:719 - GDExtension dynamic library not found: /Users/p5ina/godot_projects/PolixStar/addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib
  Failed loading resource: res://addons/discord-sdk-gd/bin/discord-rpc-gd.gdextension. Make sure resources have been imported by opening the project in the editor at least once.

Additional information

No response

Checks

@P5ina P5ina added the bug Something isn't working label Dec 20, 2023
@vaporvee
Copy link
Owner

you didn't sign the binding. also i did wrote it down in the docs https://github.com/vaporvee/discord-sdk-godot/wiki/Building#macos-support

@vaporvee vaporvee added documentation Improvements or additions to documentation wontfix This will not be worked on and removed bug Something isn't working labels Dec 20, 2023
@P5ina
Copy link
Author

P5ina commented Dec 20, 2023

No, I tried signing the bindings with codesign, but still nothing changed. (I didn't write about this in the reproduction steps because it didn't change anything). Maybe I'm doing this wrong?

@P5ina
Copy link
Author

P5ina commented Dec 20, 2023

I'm doing it this way
CleanShot 2023-12-20 at 14 40 08@2x

@vaporvee
Copy link
Owner

i never did it because i hadn't had the money for this. so sadly i can't help you with this...

@vaporvee
Copy link
Owner

and did you look if the file names are matching with the ones in the .gdextension file?

@vaporvee vaporvee reopened this Dec 20, 2023
@EddieDover
Copy link
Contributor

i never did it because i hadn't had the money for this. so sadly i can't help you with this...

Reach out to me via DMs. I'll help take care of this.

@vaporvee vaporvee added building Everything about building the plugin can't reproduce and removed documentation Improvements or additions to documentation wontfix This will not be worked on labels Dec 20, 2023
@vaporvee
Copy link
Owner

i never did it because i hadn't had the money for this. so sadly i can't help you with this...

Reach out to me via DMs. I'll help take care of this.

Do you have discord? I didn't find where github Dms are

@EddieDover
Copy link
Contributor

I sent you a message on Ko-Fi. I'll give you my discord there too

@EddieDover
Copy link
Contributor

EddieDover commented Dec 20, 2023

@P5ina Would you please reach out to me on Discord so we can work through this issue together? I'd like to get the repo here in a place where we can have Mac builds be part of the normal production pipeline.

@P5ina
Copy link
Author

P5ina commented Dec 20, 2023

@EddieDover Hello, your link is expired, I can't join

@P5ina
Copy link
Author

P5ina commented Dec 20, 2023

and did you look if the file names are matching with the ones in the .gdextension file?

Yep, all file names are correct

@EddieDover
Copy link
Contributor

@EddieDover Hello, your link is expired, I can't join
https://discord.gg/D69PnMNUF8

Sorry about that

@vaporvee
Copy link
Owner

whoops i may have clicked on it

@EddieDover
Copy link
Contributor

whoops i may have clicked on it

You did. It's fine :D

@vaporvee
Copy link
Owner

current state: we get it compiled on intel under circumstances (and when its signed) but m1 is still not working

@vaporvee vaporvee linked a pull request Feb 25, 2024 that will close this issue
@vaporvee
Copy link
Owner

will be working on macos in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Everything about building the plugin important
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants