Merge branch 'main' into dev
This commit is contained in:
		
							
								
								
									
										7
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -14,7 +14,6 @@ | ||||
| build/ | ||||
|  | ||||
| #Cleanup unused build files | ||||
| *obj | ||||
| *obj | ||||
| *exp | ||||
| *lib | ||||
| *.obj | ||||
| *.exp | ||||
| *.lib | ||||
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,13 +1,13 @@ | ||||
| <img src="https://github.com/vaporvee/discord-sdk-godot/blob/main/project/assets/Banner_v1.png?raw=true"> | ||||
|  | ||||
| ### This is an early version! In future versions there will be lobbies, invites, linux builds etc. very soon! | ||||
| ### This is an early version! In future versions there will be invites, user info 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 | ||||
| git submodule update --init | ||||
| ``` | ||||
| # Addon Usage :rocket: | ||||
| 1. [Download the addon](https://github.com/vaporvee/discord-sdk-godot/releases/latest/download/ADDON-Discord-SDK-Godot.zip/) | ||||
| 2. Put the `discord-sdk-gd/` folder in a `addons/` folder in your Godot project | ||||
| 2. Put the `addons/` folder in your Godot project | ||||
| 3. Enable the addon in your Project Settings under "Plugins" and "DiscordSDK". (if it doesn't show up restart  your project and try again) | ||||
| 4. Restart your project | ||||
| 5. Create an Application under https://discord.com/developers/applications and get the Application ID | ||||
| @@ -38,12 +38,6 @@ func _ready(): | ||||
| ### [Try a built demo](https://github.com/vaporvee/discord-sdk-godot/releases/latest/download/Demo-Export.zip) | ||||
| :incoming_envelope: Still questions? write an [issue](https://github.com/vaporvee/discord-sdk-godot/issues)! I'll answer very fast :) | ||||
|  | ||||
| <br /> | ||||
|  | ||||
| ## Extra Info | ||||
| - The Discord SDK itself doesn't build under Linux for some reason (I don't have a Mac so i don't even know if it's builds under OSX) its not well documented but I try as hard as i can to get it working crossplatform but at the time its only working under Windows... (But feel free to make pull requests btw) | ||||
| - Its an early release some features aren't implemented only because i need a small amount of time not because it's not possible | ||||
|  | ||||
| <br /> | ||||
| <br /> | ||||
|  | ||||
|   | ||||
| @@ -8,11 +8,11 @@ env = SConscript("godot-cpp/SConstruct") | ||||
|  | ||||
| # Check our platform specifics | ||||
| if env['platform'] == "macos": | ||||
|     discord_library = 'discord_game_sdk.dylib' | ||||
|     discord_library = 'libdiscord_game_sdk.dylib' | ||||
|     libexportfolder = "/macos/" | ||||
|  | ||||
| elif env['platform'] in ('linuxbsd', 'linux'): | ||||
|     discord_library = 'discord_game_sdk.so' | ||||
|     discord_library = 'libdiscord_game_sdk.so' | ||||
|     libexportfolder = "/linux/" | ||||
|  | ||||
| elif env['platform'] == "windows": | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								project/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk.so
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								project/addons/discord-sdk-gd/bin/linux/libdiscord_game_sdk.so
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										4
									
								
								project/addons/discord-sdk-gd/bin/version.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								project/addons/discord-sdk-gd/bin/version.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| Version: 1.2 | ||||
| Windows: build-1 | ||||
| Linux: build-1 | ||||
| MacOS: build-1 | ||||
| @@ -4,26 +4,26 @@ entry_symbol = "discordsdkgd_library_init" | ||||
|  | ||||
| [libraries] | ||||
|  | ||||
| macos.debug = "bin/macos/discord_game_sdk_binding_debug.framework" | ||||
| macos.release = "bin/macos/discord_game_sdk_binding.framework" | ||||
| macos.debug = "bin/macos/libdiscord_game_sdk_binding_debug.dylib" | ||||
| macos.release = "bin/macos/libdiscord_game_sdk_binding.dylib" | ||||
| windows.debug.x86_64 = "bin/windows/discord_game_sdk_binding_debug.dll" | ||||
| windows.release.x86_64 = "bin/windows/discord_game_sdk_binding.dll" | ||||
| linux.debug.x86_64 = "bin/linux/discord_game_sdk_binding_debug.so" | ||||
| linux.release.x86_64 = "bin/linux/discord_game_sdk_binding.so" | ||||
| linux.debug.arm64 = "bin/linux/discord_game_sdk_binding_debug.so" | ||||
| linux.release.arm64 = "bin/linux/discord_game_sdk_binding.so" | ||||
| linux.debug.rv64 = "bin/linux/discord_game_sdk_binding_debug.so" | ||||
| linux.release.rv64 = "bin/linux/discord_game_sdk_binding.so" | ||||
| linux.debug.x86_64 = "bin/linux/libdiscord_game_sdk_binding_debug.so" | ||||
| linux.release.x86_64 = "bin/linux/libdiscord_game_sdk_binding.so" | ||||
| linux.debug.arm64 = "bin/linux/libdiscord_game_sdk_binding_debug.so" | ||||
| linux.release.arm64 = "bin/linux/libdiscord_game_sdk_binding.so" | ||||
| linux.debug.rv64 = "bin/linux/libdiscord_game_sdk_binding_debug.so" | ||||
| linux.release.rv64 = "bin/linux/libdiscord_game_sdk_binding.so" | ||||
|  | ||||
| [dependencies] | ||||
|  | ||||
| macos.debug = "bin/macos/discord_game_sdk.framework" | ||||
| macos.release = "bin/macos/discord_game_sdk.framework" | ||||
| macos.debug = "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.release.x86_64 = "bin/windows/discord_game_sdk.dll" | ||||
| linux.debug.x86_64 = "bin/linux/discord_game_sdk.so" | ||||
| linux.release.x86_64 = "bin/linux/discord_game_sdk.so" | ||||
| linux.debug.arm64 = "bin/linux/discord_game_sdk.so" | ||||
| linux.release.arm64 = "bin/linux/discord_game_sdk.so" | ||||
| linux.debug.rv64 = "bin/linux/ldiscord_game_sdk.so" | ||||
| linux.release.rv64 = "bin/linux/discord_game_sdk.so" | ||||
| linux.debug.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.release.arm64 = "bin/linux/libdiscord_game_sdk.so" | ||||
| linux.debug.rv64 = "bin/linux/libdiscord_game_sdk.so" | ||||
| linux.release.rv64 = "bin/linux/libdiscord_game_sdk.so" | ||||
							
								
								
									
										17
									
								
								project/addons/discord-sdk-gd/example.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								project/addons/discord-sdk-gd/example.gd
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| extends Node | ||||
|  | ||||
| func _ready(): | ||||
| 	Discord_Activity.app_id = 1099618430065324082 # Application ID | ||||
| 	print("Discord working: " + str(Discord_Activity.get_is_discord_working())) # A boolean if everything worked | ||||
| 	Discord_Activity.details = "A demo activity by vaporvee#1231" | ||||
| 	Discord_Activity.state = "Checkpoint 23/23" | ||||
| 	 | ||||
| 	Discord_Activity.large_image = "game" # Image key from "Art Assets" | ||||
| 	Discord_Activity.large_image_text = "Try it now!" | ||||
| 	Discord_Activity.small_image = "boss" # Image key from "Art Assets" | ||||
| 	Discord_Activity.small_image_text = "Fighting the end boss! D:" | ||||
| 	 | ||||
| 	Discord_Activity.start_timestamp = int(Time.get_unix_time_from_system()) # "02:41 elapsed" | ||||
| 	# Discord_Activity.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time | ||||
|  | ||||
| 	Discord_Activity.refresh() # Always refresh after changing the values! | ||||
| @@ -5,6 +5,6 @@ func _export_file(path, type, features): | ||||
| 	if features[2] == "windows": | ||||
| 		add_shared_object("res://addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll",[],"/") | ||||
| 	elif features[2] == "linux": | ||||
| 		add_shared_object("res://addons/discord-sdk-gd/bin/linux/discord_game_sdk.so",[],"/") | ||||
| 		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/discord_game_sdk.dylib",[],"/") | ||||
| 		add_shared_object("res://addons/discord-sdk-gd/bin/macos/libdiscord_game_sdk.dylib",[],"/") | ||||
|   | ||||
| @@ -3,5 +3,5 @@ | ||||
| name="DiscordSDK" | ||||
| description="Discord Game SDK support for GDScript in Godot" | ||||
| author="vaporvee" | ||||
| version="1.1" | ||||
| version="1.2" | ||||
| script="plugin.gd" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user