9 Commits
2.1 ... 2.3

Author SHA1 Message Date
Yannik
548349d9f8 bumped version 2023-06-30 22:54:43 +02:00
Yannik
68c8a42826 removed obsolete export plugin 2023-06-30 22:54:13 +02:00
Yannik
3e944683a4 Merge pull request #31 from vaartis/patch-1
Change gdextension dependencies so they're actually used, patch the SDK
2023-06-30 22:22:33 +02:00
Ekaterina Vaartis
6f288564cf Patch the SDK in setup.py so it actually builds 2023-06-30 20:51:04 +03:00
vaartis
aa39fb80e0 Change gdextension dependencies so they're actually used
This part isn't very well documented, but they changed the format of that file at some point and now it needs to be like this to pull the dependencies into the built project. Assuming this is what the export plugin does, that can probably be removed.
2023-06-30 19:35:35 +03:00
Yannik
980080492e bumped version and cleaned up project 2023-05-23 23:30:27 +02:00
Yannik
b3ebd2c737 Merge pull request #29 from Bioblaze/patch-1 2023-05-23 21:57:38 +02:00
Yannik
f9134f30f7 Update export.gd 2023-05-23 21:56:07 +02:00
Bioblaze Payne
da42d6a228 Update export.gd to support extend environments
After having a conversation with Yannik, had more environment variables in my array then most so made this lil change to make it work. Works flawlessly.
2023-05-23 11:48:50 -07:00
13 changed files with 23 additions and 44 deletions

View File

@@ -23,6 +23,8 @@ body:
label: Version label: Version
description: What version of our software are you running? description: What version of our software are you running?
options: options:
- 2.3
- 2.2
- 2.1 - 2.1
- 2.0 - 2.0
- 1.5 - 1.5

View File

@@ -17,13 +17,13 @@ linux.release.rv64 = "bin/linux/libdiscord_game_sdk_binding.so"
[dependencies] [dependencies]
macos.debug = "bin/macos/libdiscord_game_sdk.dylib" macos.debug = { "bin/macos/libdiscord_game_sdk.dylib": "" }
macos.release = "bin/macos/libdiscord_game_sdk.dylib" macos.release = { "bin/macos/libdiscord_game_sdk.dylib": "" }
windows.debug.x86_64 = "bin/windows/discord_game_sdk.dll" windows.debug.x86_64 = { "bin/windows/discord_game_sdk.dll": "" }
windows.release.x86_64 = "bin/windows/discord_game_sdk.dll" windows.release.x86_64 = { "bin/windows/discord_game_sdk.dll": "" }
linux.debug.x86_64 = "bin/linux/libdiscord_game_sdk.so" linux.debug.x86_64 = { "bin/linux/libdiscord_game_sdk.so": "" }
linux.release.x86_64 = "bin/linux/libdiscord_game_sdk.so" linux.release.x86_64 = { "bin/linux/libdiscord_game_sdk.so": "" }
linux.debug.arm64 = "bin/linux/libdiscord_game_sdk.so" linux.debug.arm64 = { "bin/linux/libdiscord_game_sdk.so": "" }
linux.release.arm64 = "bin/linux/libdiscord_game_sdk.so" linux.release.arm64 = { "bin/linux/libdiscord_game_sdk.so": "" }
linux.debug.rv64 = "bin/linux/libdiscord_game_sdk.so" linux.debug.rv64 = { "bin/linux/libdiscord_game_sdk.so": "" }
linux.release.rv64 = "bin/linux/libdiscord_game_sdk.so" linux.release.rv64 = { "bin/linux/libdiscord_game_sdk.so": "" }

View File

@@ -1,17 +0,0 @@
@tool
extends EditorExportPlugin
func _export_file(_path, _type, features) -> void:
if features[2] == "windows":
if features[4] == "x86_64":
add_shared_object("res://addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll",[],"/")
elif features[4] == "x86":
add_shared_object("res://addons/discord-sdk-gd/bin/windows/discord_game_sdk_x86.dll",[],"/")
elif features[2] == "linux":
add_shared_object("res://addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk.so",[],"/")
elif features[2] == "macos":
add_shared_object("res://addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk.dylib",[],"/")
add_shared_object("res://addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk_aarch64.dylib",[],"/")
func _get_name():
pass

View File

@@ -3,5 +3,5 @@
name="DiscordSDK" name="DiscordSDK"
description="Discord Game SDK support for GDScript in Godot" description="Discord Game SDK support for GDScript in Godot"
author="vaporvee" author="vaporvee"
version="2.1" version="2.3"
script="plugin.gd" script="plugin.gd"

View File

@@ -6,14 +6,9 @@ const DiscordSDKDebug_icon = preload("res://addons/discord-sdk-gd/nodes/assets/D
var loaded_DiscordSDKDebug = DiscordSDKDebug.new() var loaded_DiscordSDKDebug = DiscordSDKDebug.new()
const ExportPlugin = preload("res://addons/discord-sdk-gd/export.gd")
var loaded_exportplugin = ExportPlugin.new()
func _enter_tree() -> void: func _enter_tree() -> void:
add_custom_type("DiscordSDKDebug","Node",DiscordSDKDebug,DiscordSDKDebug_icon) add_custom_type("DiscordSDKDebug","Node",DiscordSDKDebug,DiscordSDKDebug_icon)
add_autoload_singleton("DiscordSDKLoader", "res://addons/discord-sdk-gd/nodes/core_updater.gd") add_autoload_singleton("DiscordSDKLoader", "res://addons/discord-sdk-gd/nodes/core_updater.gd")
add_export_plugin(loaded_exportplugin)
func _enable_plugin() -> void: func _enable_plugin() -> void:
print("DiscordSDK Addon got enabled (PLEASE RESTART THE EDITOR)") print("DiscordSDK Addon got enabled (PLEASE RESTART THE EDITOR)")

View File

@@ -8,7 +8,7 @@ custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="../../demo/discord_sdk_demo.exe" export_path="../../exportestt/discord_sdk_demo.exe"
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
encrypt_pck=false encrypt_pck=false
@@ -35,8 +35,8 @@ codesign/timestamp_server_url=""
codesign/digest_algorithm=1 codesign/digest_algorithm=1
codesign/description="" codesign/description=""
codesign/custom_options=PackedStringArray() codesign/custom_options=PackedStringArray()
application/modify_resources=false application/modify_resources=true
application/icon="" application/icon="res://assets/Logo_V2.png"
application/console_wrapper_icon="" application/console_wrapper_icon=""
application/icon_interpolation=4 application/icon_interpolation=4
application/file_version="" application/file_version=""

View File

@@ -8,14 +8,10 @@
config_version=5 config_version=5
[DiscordSDK]
EditorPresence/enabled=false
[application] [application]
config/name="GDExtension DiscordSDK Test Project" config/name="GDExtension DiscordSDK Test Project"
run/main_scene="res://testscene.tscn" run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.0") config/features=PackedStringArray("4.0")
boot_splash/bg_color=Color(0.25098, 0.305882, 0.929412, 1) boot_splash/bg_color=Color(0.25098, 0.305882, 0.929412, 1)
boot_splash/image="res://assets/Banner_v1.png" boot_splash/image="res://assets/Banner_v1.png"

View File

@@ -1,3 +0,0 @@
[gd_scene format=3 uid="uid://e8jj6dtekt1c"]
[node name="testscene" type="Node2D"]

View File

@@ -6,6 +6,12 @@ import os
with zipfile.ZipFile("src/lib/discord_game_sdk.zip", "r") as zip_ref: with zipfile.ZipFile("src/lib/discord_game_sdk.zip", "r") as zip_ref:
zip_ref.extractall("src/lib/discord_game_sdk/") zip_ref.extractall("src/lib/discord_game_sdk/")
# Patch the SDK to actually build, since it's missing an include
with open("src/lib/discord_game_sdk/cpp/types.h", "r+") as f:
s = f.read();
f.seek(0);
f.write("#include <cstdint>\n" + s)
copy_tree("src/lib/discord_game_sdk/lib/", "src/lib/discord_game_sdk/bin/") copy_tree("src/lib/discord_game_sdk/lib/", "src/lib/discord_game_sdk/bin/")
os.rename( os.rename(
"src/lib/discord_game_sdk/bin/aarch64/discord_game_sdk.dylib", "src/lib/discord_game_sdk/bin/aarch64/discord_game_sdk.dylib",