diff --git a/SConstruct b/SConstruct index e60856b..7cf973d 100644 --- a/SConstruct +++ b/SConstruct @@ -43,7 +43,7 @@ elif env['platform'] == "windows": # make sure our binding library is properly includes env.Append(LIBPATH=[discord_lib_path]) -env.Append(CPPPATH=['src\discord-game-sdk-cpp']) +env.Append(CPPPATH=['src/discord-game-sdk-cpp']) env.Append(LIBS=[ discord_library.replace(".dll", "") ]) @@ -52,8 +52,8 @@ env.Append(LIBS=[ env.Append(CPPPATH=['src/']) sources = Glob('src/*.cpp') -library = env.SharedLibrary(target=env['target_path'] + env['target_name'] + env["suffix"] + env["SHLIBSUFFIX"], source=sources) -env.Depends(library, Command("project/addons/discord-rpc-gd/bin" + discord_library, discord_lib_path + "/" + discord_library, Copy("$TARGET", "$SOURCE"))) +library = env.SharedLibrary(target="project/addons/discord-rpc-gd/bin/libgd-discordrpc" + env["suffix"] + env["SHLIBSUFFIX"], source=sources) +#env.Depends(library, Command("project/addons/discord-rpc-gd/bin/" + discord_library, discord_lib_path + "/" + discord_library, Copy("$TARGET", "$SOURCE"))) Default(library) diff --git a/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.dll b/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.dll new file mode 100644 index 0000000..faa736f Binary files /dev/null and b/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.dll differ diff --git a/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.exp b/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.exp new file mode 100644 index 0000000..ff55646 Binary files /dev/null and b/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.exp differ diff --git a/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.lib b/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.lib new file mode 100644 index 0000000..ee7f576 Binary files /dev/null and b/project/addons/discord-rpc-gd/bin/libgd-discordrpc.windows.template_debug.x86_64.lib differ diff --git a/project/addons/discord-rpc-gd/bindiscord_game_sdk.dll b/project/addons/discord-rpc-gd/bindiscord_game_sdk.dll deleted file mode 100644 index be946ea..0000000 Binary files a/project/addons/discord-rpc-gd/bindiscord_game_sdk.dll and /dev/null differ diff --git a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.dll b/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.dll deleted file mode 100644 index f065d06..0000000 Binary files a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.dll and /dev/null differ diff --git a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.exp b/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.exp deleted file mode 100644 index e410a84..0000000 Binary files a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.exp and /dev/null differ diff --git a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.lib b/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.lib deleted file mode 100644 index dfaf504..0000000 Binary files a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_debug.x86_64.lib and /dev/null differ diff --git a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.dll b/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.dll deleted file mode 100644 index 05f61fb..0000000 Binary files a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.dll and /dev/null differ diff --git a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.exp b/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.exp deleted file mode 100644 index 9c1c79a..0000000 Binary files a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.exp and /dev/null differ diff --git a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.lib b/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.lib deleted file mode 100644 index 3a0915c..0000000 Binary files a/project/addons/discord-rpc-gd/bindiscord_game_sdk.windows.template_release.x86_64.lib and /dev/null differ diff --git a/project/addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension b/project/addons/discord-rpc-gd/discord-rpc-gd.gdextension similarity index 100% rename from project/addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension rename to project/addons/discord-rpc-gd/discord-rpc-gd.gdextension diff --git a/src/discord-game-sdk-cpp/achievement_manager.cpp b/src/achievement_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/achievement_manager.cpp rename to src/achievement_manager.cpp diff --git a/src/discord-game-sdk-cpp/achievement_manager.h b/src/achievement_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/achievement_manager.h rename to src/achievement_manager.h diff --git a/src/achievement_manager.windows.template_debug.x86_64.obj b/src/achievement_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..839d226 Binary files /dev/null and b/src/achievement_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/activity_manager.cpp b/src/activity_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/activity_manager.cpp rename to src/activity_manager.cpp diff --git a/src/discord-game-sdk-cpp/activity_manager.h b/src/activity_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/activity_manager.h rename to src/activity_manager.h diff --git a/src/activity_manager.windows.template_debug.x86_64.obj b/src/activity_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..1bf25d8 Binary files /dev/null and b/src/activity_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/application_manager.cpp b/src/application_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/application_manager.cpp rename to src/application_manager.cpp diff --git a/src/discord-game-sdk-cpp/application_manager.h b/src/application_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/application_manager.h rename to src/application_manager.h diff --git a/src/application_manager.windows.template_debug.x86_64.obj b/src/application_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..c1bc8e7 Binary files /dev/null and b/src/application_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/core.cpp b/src/core.cpp similarity index 100% rename from src/discord-game-sdk-cpp/core.cpp rename to src/core.cpp diff --git a/src/discord-game-sdk-cpp/core.h b/src/core.h similarity index 100% rename from src/discord-game-sdk-cpp/core.h rename to src/core.h diff --git a/src/core.windows.template_debug.x86_64.obj b/src/core.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..d096eb5 Binary files /dev/null and b/src/core.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/discord.h b/src/discord.h similarity index 100% rename from src/discord-game-sdk-cpp/discord.h rename to src/discord.h diff --git a/src/discord-game-sdk-cpp/event.h b/src/event.h similarity index 100% rename from src/discord-game-sdk-cpp/event.h rename to src/event.h diff --git a/src/discord-game-sdk-cpp/ffi.h b/src/ffi.h similarity index 100% rename from src/discord-game-sdk-cpp/ffi.h rename to src/ffi.h diff --git a/src/discord-game-sdk-cpp/image_manager.cpp b/src/image_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/image_manager.cpp rename to src/image_manager.cpp diff --git a/src/discord-game-sdk-cpp/image_manager.h b/src/image_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/image_manager.h rename to src/image_manager.h diff --git a/src/image_manager.windows.template_debug.x86_64.obj b/src/image_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..29c02a7 Binary files /dev/null and b/src/image_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/lobby_manager.cpp b/src/lobby_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/lobby_manager.cpp rename to src/lobby_manager.cpp diff --git a/src/discord-game-sdk-cpp/lobby_manager.h b/src/lobby_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/lobby_manager.h rename to src/lobby_manager.h diff --git a/src/lobby_manager.windows.template_debug.x86_64.obj b/src/lobby_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..07bdcdb Binary files /dev/null and b/src/lobby_manager.windows.template_debug.x86_64.obj differ diff --git a/src/main.cpp b/src/main.cpp index 165efe1..6949115 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,11 +1,11 @@ #include "main.h" #include #include -#include "./discord-game-sdk-cpp/discord.h" +#include "discord.h" using namespace godot; -// discord::Core *core{}; +discord::Core *core{}; void DiscordRPC::_bind_methods() { @@ -24,16 +24,16 @@ DiscordRPC::~DiscordRPC() void DiscordRPC::_ready() { - /*auto result = discord::Core::Create(461618159171141643, DiscordCreateFlags_Default, &core); + auto result = discord::Core::Create(461618159171141643, DiscordCreateFlags_Default, &core); discord::Activity activity{}; activity.SetState("Testing"); activity.SetDetails("Fruit Loops"); core->ActivityManager().UpdateActivity(activity, [](discord::Result result) { - });*/ + }); } void DiscordRPC::_process(float delta) { - //::core->RunCallbacks(); + ::core->RunCallbacks(); } \ No newline at end of file diff --git a/src/main.h b/src/main.h index ef22c02..ebf548c 100644 --- a/src/main.h +++ b/src/main.h @@ -2,11 +2,10 @@ #define DISCORDRPC_H #include -#include "./discord-game-sdk-cpp/discord.h" +#include "discord.h" namespace godot { - class DiscordRPC : public Node { GDCLASS(DiscordRPC, Node) diff --git a/src/main.windows.template_debug.x86_64.obj b/src/main.windows.template_debug.x86_64.obj index d4277cd..93e1645 100644 Binary files a/src/main.windows.template_debug.x86_64.obj and b/src/main.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/network_manager.cpp b/src/network_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/network_manager.cpp rename to src/network_manager.cpp diff --git a/src/discord-game-sdk-cpp/network_manager.h b/src/network_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/network_manager.h rename to src/network_manager.h diff --git a/src/network_manager.windows.template_debug.x86_64.obj b/src/network_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..520321a Binary files /dev/null and b/src/network_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/overlay_manager.cpp b/src/overlay_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/overlay_manager.cpp rename to src/overlay_manager.cpp diff --git a/src/discord-game-sdk-cpp/overlay_manager.h b/src/overlay_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/overlay_manager.h rename to src/overlay_manager.h diff --git a/src/overlay_manager.windows.template_debug.x86_64.obj b/src/overlay_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..8fb1f69 Binary files /dev/null and b/src/overlay_manager.windows.template_debug.x86_64.obj differ diff --git a/src/register_types.windows.template_debug.x86_64.obj b/src/register_types.windows.template_debug.x86_64.obj index 11354d2..59c6ac9 100644 Binary files a/src/register_types.windows.template_debug.x86_64.obj and b/src/register_types.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/relationship_manager.cpp b/src/relationship_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/relationship_manager.cpp rename to src/relationship_manager.cpp diff --git a/src/discord-game-sdk-cpp/relationship_manager.h b/src/relationship_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/relationship_manager.h rename to src/relationship_manager.h diff --git a/src/relationship_manager.windows.template_debug.x86_64.obj b/src/relationship_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..1e3ad50 Binary files /dev/null and b/src/relationship_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/storage_manager.cpp b/src/storage_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/storage_manager.cpp rename to src/storage_manager.cpp diff --git a/src/discord-game-sdk-cpp/storage_manager.h b/src/storage_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/storage_manager.h rename to src/storage_manager.h diff --git a/src/storage_manager.windows.template_debug.x86_64.obj b/src/storage_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..0507f7e Binary files /dev/null and b/src/storage_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/store_manager.cpp b/src/store_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/store_manager.cpp rename to src/store_manager.cpp diff --git a/src/discord-game-sdk-cpp/store_manager.h b/src/store_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/store_manager.h rename to src/store_manager.h diff --git a/src/store_manager.windows.template_debug.x86_64.obj b/src/store_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..b0e42b1 Binary files /dev/null and b/src/store_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/types.cpp b/src/types.cpp similarity index 100% rename from src/discord-game-sdk-cpp/types.cpp rename to src/types.cpp diff --git a/src/discord-game-sdk-cpp/types.h b/src/types.h similarity index 100% rename from src/discord-game-sdk-cpp/types.h rename to src/types.h diff --git a/src/types.windows.template_debug.x86_64.obj b/src/types.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..fd6d51c Binary files /dev/null and b/src/types.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/user_manager.cpp b/src/user_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/user_manager.cpp rename to src/user_manager.cpp diff --git a/src/discord-game-sdk-cpp/user_manager.h b/src/user_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/user_manager.h rename to src/user_manager.h diff --git a/src/user_manager.windows.template_debug.x86_64.obj b/src/user_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..befd2aa Binary files /dev/null and b/src/user_manager.windows.template_debug.x86_64.obj differ diff --git a/src/discord-game-sdk-cpp/voice_manager.cpp b/src/voice_manager.cpp similarity index 100% rename from src/discord-game-sdk-cpp/voice_manager.cpp rename to src/voice_manager.cpp diff --git a/src/discord-game-sdk-cpp/voice_manager.h b/src/voice_manager.h similarity index 100% rename from src/discord-game-sdk-cpp/voice_manager.h rename to src/voice_manager.h diff --git a/src/voice_manager.windows.template_debug.x86_64.obj b/src/voice_manager.windows.template_debug.x86_64.obj new file mode 100644 index 0000000..5d88ed5 Binary files /dev/null and b/src/voice_manager.windows.template_debug.x86_64.obj differ