diff --git a/README.md b/README.md index 3cce573..9969796 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ - + -# discord-rpc-godot ### This is version 1.0! In future versions there will be lobbies, invites, linux builds etc. very soon! Don't forget to run the following command **if you clone this project** or the godot-cpp folder will be empty ```sh @@ -11,7 +10,7 @@ git submodule update --init 2. Enable the addon in your Project Settings under "Plugins" and "DiscordSDK". (if it doesn't show up reopen the project) 3. Create an Application under https://discord.com/developers/applications and get the Application ID 4. (optional) Set images under "Rich Presence" and "Art Assets" and remember the keys -5. Exporting: You need to copy the `discord_game_sdk.dll` or on linux `discord_game_sdk.so` from `res://addons/discord-rpc-gd/bin/PLATFORM/discord_game_sdk.[dll/.so]` to your exported project in the same directory as `discord_game_sdk_binding_debug.[dll/.so]` +5. Exporting: You need to copy the `discord_game_sdk.dll` or on linux `discord_game_sdk.so` from `res://addons/discord-sdk-gd/bin/PLATFORM/discord_game_sdk.[dll/.so]` to your exported project in the same directory as `discord_game_sdk_binding_debug.[dll/.so]` ```gdscript extends Node diff --git a/SConstruct b/SConstruct index d2864eb..c2c4a3e 100644 --- a/SConstruct +++ b/SConstruct @@ -33,8 +33,10 @@ env.Append(LIBS=[discord_library.replace(".dll", "")]) env.Append(CPPPATH=['src/']) sources += Glob('src/*.cpp') -#The finished exports -library = env.SharedLibrary(target="project/addons/discord-rpc-gd/bin/" + libexportfolder + "discord_game_sdk_binding" + debugsuffix, source=sources) -env.Depends(library, Command("project/addons/discord-rpc-gd/bin/" + libexportfolder + discord_library, "lib/discord-game-sdk/" + discord_library, Copy("$TARGET", "$SOURCE"))) +# The finished exports +library = env.SharedLibrary(target="project/addons/discord-sdk-gd/bin/" + + libexportfolder + "discord_game_sdk_binding" + debugsuffix, source=sources) +env.Depends(library, Command("project/addons/discord-sdk-gd/bin/" + libexportfolder + + discord_library, "lib/discord-game-sdk/" + discord_library, Copy("$TARGET", "$SOURCE"))) -Default(library) \ No newline at end of file +Default(library) diff --git a/project/addons/discord-rpc-gd/bin/.gdignore b/project/addons/discord-sdk-gd/bin/.gdignore similarity index 100% rename from project/addons/discord-rpc-gd/bin/.gdignore rename to project/addons/discord-sdk-gd/bin/.gdignore diff --git a/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk.dll b/project/addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll similarity index 100% rename from project/addons/discord-rpc-gd/bin/windows/discord_game_sdk.dll rename to project/addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll diff --git a/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding.dll b/project/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding.dll similarity index 99% rename from project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding.dll rename to project/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding.dll index 9bc2bf4..5de2e93 100644 Binary files a/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding.dll and b/project/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding.dll differ diff --git a/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll b/project/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding_debug.dll similarity index 83% rename from project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll rename to project/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding_debug.dll index 6e72728..84a2a9c 100644 Binary files a/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll and b/project/addons/discord-sdk-gd/bin/windows/discord_game_sdk_binding_debug.dll differ diff --git a/project/addons/discord-rpc-gd/discord-rpc-gd.gdextension b/project/addons/discord-sdk-gd/discord-rpc-gd.gdextension similarity index 96% rename from project/addons/discord-rpc-gd/discord-rpc-gd.gdextension rename to project/addons/discord-sdk-gd/discord-rpc-gd.gdextension index a7433a6..87a2e00 100644 --- a/project/addons/discord-rpc-gd/discord-rpc-gd.gdextension +++ b/project/addons/discord-sdk-gd/discord-rpc-gd.gdextension @@ -1,6 +1,6 @@ [configuration] -entry_symbol = "discordrpcgd_library_init" +entry_symbol = "discordsdkgd_library_init" [libraries] diff --git a/project/addons/discord-rpc-gd/discord_coreupdater.gd b/project/addons/discord-sdk-gd/discord_coreupdater.gd similarity index 100% rename from project/addons/discord-rpc-gd/discord_coreupdater.gd rename to project/addons/discord-sdk-gd/discord_coreupdater.gd diff --git a/project/addons/discord-rpc-gd/plugin.cfg b/project/addons/discord-sdk-gd/plugin.cfg similarity index 82% rename from project/addons/discord-rpc-gd/plugin.cfg rename to project/addons/discord-sdk-gd/plugin.cfg index 59773e5..cf5f7aa 100644 --- a/project/addons/discord-rpc-gd/plugin.cfg +++ b/project/addons/discord-sdk-gd/plugin.cfg @@ -1,7 +1,7 @@ [plugin] -name="DiscordRPC" +name="DiscordSDK" description="Takes the activity manager part from the discord-game-sdk and adds GDscript functionality." author="vaporvee" -version="0.1" +version="1.0" script="plugin.gd" diff --git a/project/addons/discord-rpc-gd/plugin.gd b/project/addons/discord-sdk-gd/plugin.gd similarity index 83% rename from project/addons/discord-rpc-gd/plugin.gd rename to project/addons/discord-sdk-gd/plugin.gd index 7741951..779ff73 100644 --- a/project/addons/discord-rpc-gd/plugin.gd +++ b/project/addons/discord-sdk-gd/plugin.gd @@ -2,7 +2,7 @@ extends EditorPlugin func _enter_tree(): - add_autoload_singleton("discord_coreupdater", "res://addons/discord-rpc-gd/discord_coreupdater.gd") + add_autoload_singleton("discord_coreupdater", "res://addons/discord-sdk-gd/discord_coreupdater.gd") func disable_plugin(): diff --git a/project/project.godot b/project/project.godot index ff7015c..1751636 100644 --- a/project/project.godot +++ b/project/project.godot @@ -10,7 +10,7 @@ config_version=5 [application] -config/name="GDExtension DiscordRPC Test Project" +config/name="GDExtension DiscordSDK Test Project" run/main_scene="res://main.tscn" config/features=PackedStringArray("4.0") boot_splash/bg_color=Color(0.25098, 0.305882, 0.929412, 1) @@ -20,7 +20,7 @@ config/icon="res://assets/Logo_V2.png" [autoload] -discord_coreupdater="*res://addons/discord-rpc-gd/discord_coreupdater.gd" +discord_coreupdater="*res://addons/discord-sdk-gd/discord_coreupdater.gd" [dotnet] @@ -28,7 +28,7 @@ project/assembly_name="GDExtension Test Project" [editor_plugins] -enabled=PackedStringArray("res://addons/discord-rpc-gd/plugin.cfg") +enabled=PackedStringArray("res://addons/discord-sdk-gd/plugin.cfg") [native_extensions] diff --git a/src/register_types.cpp b/src/register_types.cpp index 020f653..3b3e37c 100644 --- a/src/register_types.cpp +++ b/src/register_types.cpp @@ -33,7 +33,7 @@ void gdextension_terminate(ModuleInitializationLevel p_level) extern "C" { - GDExtensionBool GDE_EXPORT discordrpcgd_library_init(const GDExtensionInterface *p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) + GDExtensionBool GDE_EXPORT discordsdkgd_library_init(const GDExtensionInterface *p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) { godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization); diff --git a/src/register_types.h b/src/register_types.h index 61012a7..ca12a98 100644 --- a/src/register_types.h +++ b/src/register_types.h @@ -1,7 +1,7 @@ #ifndef REGISTER_TYPES_H #define REGISTER_TYPES_H -void initialize_discordrpc_module(); -void uninitialize_discordrpc_module(); +void initialize_discordsdk_module(); +void uninitialize_discordsdk_module(); #endif // REGISTER_TYPES_H \ No newline at end of file