diff --git a/addons/godotsteam/androidarm64/libgodotsteam.android.template_debug.arm64.so b/addons/godotsteam/androidarm64/libgodotsteam.android.template_debug.arm64.so new file mode 100644 index 0000000..cb7c0c2 Binary files /dev/null and b/addons/godotsteam/androidarm64/libgodotsteam.android.template_debug.arm64.so differ diff --git a/addons/godotsteam/androidarm64/libgodotsteam.android.template_release.arm64.so b/addons/godotsteam/androidarm64/libgodotsteam.android.template_release.arm64.so new file mode 100644 index 0000000..cfee84d Binary files /dev/null and b/addons/godotsteam/androidarm64/libgodotsteam.android.template_release.arm64.so differ diff --git a/addons/godotsteam/androidarm64/libsteam_api.so b/addons/godotsteam/androidarm64/libsteam_api.so new file mode 100644 index 0000000..054d188 Binary files /dev/null and b/addons/godotsteam/androidarm64/libsteam_api.so differ diff --git a/addons/godotsteam/editor/steamworks_panel.gd b/addons/godotsteam/editor/steamworks_panel.gd new file mode 100644 index 0000000..a43b78b --- /dev/null +++ b/addons/godotsteam/editor/steamworks_panel.gd @@ -0,0 +1,8 @@ +@tool +extends Control + +@onready var container_frame: VBoxContainer = %ContainerFrame + + +func add_companion_dock(companion_dock: Control) -> void: + container_frame.add_child(companion_dock) diff --git a/addons/godotsteam/editor/steamworks_panel.gd.uid b/addons/godotsteam/editor/steamworks_panel.gd.uid new file mode 100644 index 0000000..fa8bce3 --- /dev/null +++ b/addons/godotsteam/editor/steamworks_panel.gd.uid @@ -0,0 +1 @@ +uid://1oo0gvamoxgp diff --git a/addons/godotsteam/editor/steamworks_panel.tscn b/addons/godotsteam/editor/steamworks_panel.tscn new file mode 100644 index 0000000..fdaf9c1 --- /dev/null +++ b/addons/godotsteam/editor/steamworks_panel.tscn @@ -0,0 +1,125 @@ +[gd_scene load_steps=6 format=3 uid="uid://cyniebd6yahu5"] + +[ext_resource type="Script" uid="uid://1oo0gvamoxgp" path="res://addons/godotsteam/editor/steamworks_panel.gd" id="1_qn6cd"] +[ext_resource type="Script" uid="uid://b4nvgu7h84u53" path="res://addons/godotsteam/editor/updates/updates.gd" id="2_qn6cd"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qn6cd"] +content_margin_top = 2.0 +content_margin_bottom = 2.0 +bg_color = Color(0.0980392, 0.0980392, 0.0980392, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qf1vo"] +content_margin_top = 2.0 +content_margin_bottom = 2.0 +bg_color = Color(0.337255, 0.619608, 1, 1) + +[sub_resource type="Theme" id="Theme_sqmbs"] +ProgressBar/styles/background = SubResource("StyleBoxFlat_qn6cd") +ProgressBar/styles/fill = SubResource("StyleBoxFlat_qf1vo") + +[node name="Steamworks" type="Control"] +process_mode = 3 +custom_minimum_size = Vector2(0, 150) +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_qn6cd") +metadata/_edit_lock_ = true + +[node name="Scroller" type="ScrollContainer" parent="."] +custom_minimum_size = Vector2(0, 150) +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +metadata/_edit_lock_ = true + +[node name="DockFrame" type="TabContainer" parent="Scroller"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +current_tab = 0 +metadata/_edit_lock_ = true + +[node name="Updates" type="MarginContainer" parent="Scroller/DockFrame"] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_bottom = 10 +script = ExtResource("2_qn6cd") +metadata/_tab_index = 0 +metadata/_edit_lock_ = true + +[node name="ContainerFrame" type="VBoxContainer" parent="Scroller/DockFrame/Updates"] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 10 +metadata/_edit_lock_ = true + +[node name="HFrame" type="HBoxContainer" parent="Scroller/DockFrame/Updates/ContainerFrame"] +layout_mode = 2 +theme_override_constants/separation = 25 +metadata/_edit_lock_ = true + +[node name="Type" type="Label" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame"] +custom_minimum_size = Vector2(125, 25) +layout_mode = 2 +text = "GodotSteam" +metadata/_edit_lock_ = true + +[node name="InstalledLabel" type="Label" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame"] +unique_name_in_owner = true +layout_mode = 2 +text = "Installed version 4.18" +metadata/_edit_lock_ = true + +[node name="UpdateLabel" type="Label" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame"] +unique_name_in_owner = true +layout_mode = 2 +metadata/_edit_lock_ = true + +[node name="Updating" type="HBoxContainer" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame"] +layout_mode = 2 +size_flags_horizontal = 10 +theme_override_constants/separation = 25 +metadata/_edit_lock_ = true + +[node name="Downloading" type="ProgressBar" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame/Updating"] +unique_name_in_owner = true +visible = false +custom_minimum_size = Vector2(200, 30) +layout_mode = 2 +theme = SubResource("Theme_sqmbs") +step = 1.0 +rounded = true +metadata/_edit_lock_ = true + +[node name="InstallButton" type="Button" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame/Updating"] +unique_name_in_owner = true +visible = false +layout_mode = 2 +text = "Install" +metadata/_edit_lock_ = true + +[node name="UpdateButton" type="Button" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame/Updating"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 8 +disabled = true +text = "Up-to-date" +metadata/_edit_lock_ = true + +[node name="CancelButton" type="Button" parent="Scroller/DockFrame/Updates/ContainerFrame/HFrame/Updating"] +unique_name_in_owner = true +visible = false +layout_mode = 2 +text = "Cancel" +metadata/_edit_lock_ = true diff --git a/addons/godotsteam/editor/ui/steam.svg b/addons/godotsteam/editor/ui/steam.svg new file mode 100644 index 0000000..f3daeb9 --- /dev/null +++ b/addons/godotsteam/editor/ui/steam.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/godotsteam/editor/ui/steam.svg.import b/addons/godotsteam/editor/ui/steam.svg.import new file mode 100644 index 0000000..5a52b8c --- /dev/null +++ b/addons/godotsteam/editor/ui/steam.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dhn3vkdxvetbn" +path="res://.godot/imported/steam.svg-1c1b1c87b286630e8735047e7af015ac.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/godotsteam/editor/ui/steam.svg" +dest_files=["res://.godot/imported/steam.svg-1c1b1c87b286630e8735047e7af015ac.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/godotsteam/editor/updates/updates.gd b/addons/godotsteam/editor/updates/updates.gd new file mode 100644 index 0000000..c115c31 --- /dev/null +++ b/addons/godotsteam/editor/updates/updates.gd @@ -0,0 +1,186 @@ +@tool +extends MarginContainer +### +# Super-huge thanks to Nathan Hoad and Marcus Skov for ideas and inspiration on how to create a +# plug-in updater. +### + +const TEMP_FILE = "user://update.zip" +const VERSION_URL: StringName = "https://godotengine.org/asset-library/api/asset/2445" + +var download_location: String = "" +var downloading_update: bool = false +# This will act as both our version checker and update downloader +var http_request: HTTPRequest = null +var is_actively_downloading: bool = false +var new_version: String = "" + +@onready var cancel_button: Button = %CancelButton +@onready var downloading: ProgressBar = %Downloading +@onready var install_button: Button = %InstallButton +@onready var installed_label: Label = %InstalledLabel +@onready var update_label: Label = %UpdateLabel +@onready var update_button: Button = %UpdateButton + + +func _ready() -> void: + connect_signals() + set_defaults() + check_for_updates() + + +func _process(delta: float) -> void: + if is_actively_downloading: + downloading.value = http_request.get_downloaded_bytes() * 100 / http_request.get_body_size() + + +#region Setup +func set_defaults() -> void: + downloading.value = 0 + installed_label.text = "Installed version %s" % Steam.get_godotsteam_version() + update_button.text = "Up-to-date" + update_button.disabled = true + update_label.text = "" + updating_visibility(false, false, false, true) +#endregion + + +#region Signals +func connect_signals() -> void: + cancel_button.pressed.connect(_on_cancel_pressed) + install_button.pressed.connect(_on_install_pressed) + update_button.pressed.connect(_on_update_pressed) +#endregion + + +#region Checking for updates +func check_for_updates() -> void: + if not ProjectSettings.get_setting("steam/updates/godotsteam/check_for_updates"): + return + + http_request = HTTPRequest.new() + add_child(http_request) + http_request.request_completed.connect(_on_http_request_completed) + if http_request.request(VERSION_URL) != OK: + printerr("Failed to request GodotSteam plug-in remote current version") + + +func _on_http_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void: + http_request.request_completed.disconnect(_on_http_request_completed) + http_request.queue_free() + + if result != HTTPRequest.RESULT_SUCCESS: + return + var response = JSON.parse_string(body.get_string_from_utf8()) + if response == null: + return + + download_location = response.download_url + new_version = response.version_string + + if convert_version(new_version) > convert_version(Steam.get_godotsteam_version()): + print("New GodotSteam version %s available" % new_version) + update_label.text = "New version %s" % new_version + update_button.text = "Download" + update_button.disabled = false +#endregion + + +#region Updating versions +func _on_cancel_pressed() -> void: + updating_visibility(false, false, false, true) + + if is_actively_downloading: + http_request.cancel_request() + http_request.queue_free() + is_actively_downloading = false + update_label.text = "Canceling %s plug-in update download" % new_version + else: + DirAccess.remove_absolute(TEMP_FILE) + update_label.text = "Canceling %s plug-in update and deleting temporary files" % new_version + + update_button.text = "Download" + update_button.disabled = false + update_label.text = "New version %s" % new_version + + +func _on_install_pressed() -> void: + print("Removing older GodotSteam %s plug-in" % Steam.get_godotsteam_version()) + OS.move_to_trash(ProjectSettings.globalize_path("res://addons/godotsteam")) + + update_button.text = "Unpacking" + print("Unpacking new %s plug-in" % new_version) + var zip_reader: ZIPReader = ZIPReader.new() + zip_reader.open(TEMP_FILE) + var files: PackedStringArray = zip_reader.get_files() + + var base_path := files[1] + # Remove archive folder + files.remove_at(0) + # Remove assets folder + files.remove_at(0) + + for path in files: + var new_file_path: String = path.replace(base_path, "") + if path.ends_with("/"): + DirAccess.make_dir_recursive_absolute("res://addons/%s" % new_file_path) + else: + var file: FileAccess = FileAccess.open("res://addons/%s" % new_file_path, FileAccess.WRITE) + file.store_buffer(zip_reader.read_file(path)) + + zip_reader.close() + restart_post_update() + + +func _on_update_pressed() -> void: + is_actively_downloading = true + update_label.text = "Downloading %s plug-in update, please wait" % new_version + updating_visibility(true, true, false, false) + + http_request = HTTPRequest.new() + add_child(http_request) + http_request.request_completed.connect(_on_download_request_completed) + if http_request.request(download_location) != OK: + printerr("Failed to request %s plug-in update download" % new_version) + is_actively_downloading = false + update_button.text = "Failed" + update_button.disabled = false + return + + +func _on_download_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void: + http_request.request_completed.disconnect(_on_download_request_completed) + http_request.queue_free() + is_actively_downloading = false + updating_visibility(true, false, true, false) + + if result != HTTPRequest.RESULT_SUCCESS: + printerr("Failed to download new GodotSteam version %s" % result) + update_button.disabled = false + return + + update_label.text = "Update downloaded, ready to install %s" % new_version + var zip_file: FileAccess = FileAccess.open(TEMP_FILE, FileAccess.WRITE) + zip_file.store_buffer(body) + zip_file.close() + + +func restart_post_update() -> void: + update_button.text = "Restarting" + update_label.text = "Updated to version %s, restarting the editor" % new_version + DirAccess.remove_absolute(TEMP_FILE) + EditorInterface.restart_editor(true) +#endregion + + +#region Helpers +func convert_version(version_string: String) -> int: + return int(version_string.replace(".", "").rpad(4, "0")) + + +func updating_visibility(cancel: bool, download: bool, install: bool, update: bool) -> void: + cancel_button.visible = cancel + downloading.visible = download + install_button.visible = install + update_button.visible = update +#endregion diff --git a/addons/godotsteam/editor/updates/updates.gd.uid b/addons/godotsteam/editor/updates/updates.gd.uid new file mode 100644 index 0000000..75d0d30 --- /dev/null +++ b/addons/godotsteam/editor/updates/updates.gd.uid @@ -0,0 +1 @@ +uid://b4nvgu7h84u53 diff --git a/addons/godotsteam/godotsteam.gdextension b/addons/godotsteam/godotsteam.gdextension new file mode 100644 index 0000000..fa6b535 --- /dev/null +++ b/addons/godotsteam/godotsteam.gdextension @@ -0,0 +1,28 @@ +[configuration] +entry_symbol = "godotsteam_init" +compatibility_minimum = "4.4" + +[libraries] +android.debug.arm64 = "res://addons/godotsteam/androidarm64/libgodotsteam.android.template_debug.arm64.so" +android.release.arm64 = "res://addons/godotsteam/androidarm64/libgodotsteam.android.template_release.arm64.so" +linux.debug.arm64 = "res://addons/godotsteam/linuxarm64/libgodotsteam.linux.template_debug.arm64.so" +linux.debug.x86_64 = "res://addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so" +linux.debug.x86_32 = "res://addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so" +linux.release.arm64 = "res://addons/godotsteam/linuxarm64/libgodotsteam.linux.template_release.arm64.so" +linux.release.x86_64 = "res://addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so" +linux.release.x86_32 = "res://addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so" +macos.debug = "res://addons/godotsteam/osx/libgodotsteam.macos.template_debug.universal.dylib" +macos.release = "res://addons/godotsteam/osx/libgodotsteam.macos.template_release.universal.dylib" +windows.debug.x86_64 = "res://addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll" +windows.debug.x86_32 = "res://addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll" +windows.release.x86_64 = "res://addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll" +windows.release.x86_32 = "res://addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll" + +[dependencies] +android.arm64 = { "res://addons/godotsteam/androidarm64/libsteam_api.so": "" } +linux.arm64 = { "res://addons/godotsteam/linuxarm64/libsteam_api.so": "" } +linux.x86_64 = { "res://addons/godotsteam/linux64/libsteam_api.so": "" } +linux.x86_32 = { "res://addons/godotsteam/linux32/libsteam_api.so": "" } +macos.universal = { "res://addons/godotsteam/osx/libsteam_api.dylib": "" } +windows.x86_64 = { "res://addons/godotsteam/win64/steam_api64.dll": "" } +windows.x86_32 = { "res://addons/godotsteam/win32/steam_api.dll": "" } diff --git a/addons/godotsteam/godotsteam.gdextension.uid b/addons/godotsteam/godotsteam.gdextension.uid new file mode 100644 index 0000000..8c6adc0 --- /dev/null +++ b/addons/godotsteam/godotsteam.gdextension.uid @@ -0,0 +1 @@ +uid://cwvhfmqyx6qcs diff --git a/addons/godotsteam/godotsteam_plugin.gd b/addons/godotsteam/godotsteam_plugin.gd new file mode 100644 index 0000000..cc8ff1b --- /dev/null +++ b/addons/godotsteam/godotsteam_plugin.gd @@ -0,0 +1,86 @@ +@tool +class_name GodotSteamPlugin +extends EditorPlugin + +const EDITOR_PANEL = preload("uid://cyniebd6yahu5") + +static var dock_frame + +var link_changelog: String = "[url=https://godotsteam.com/changelog/gdextension/]changelog[/url]" +var link_website: String = "[url=https://godotsteam.com]website[/url]" +var steamworks_dock: Control + + +## Used specifically to add/remove additional dock content +static func get_dock_frame() -> Control: + return dock_frame + + +func _enable_plugin() -> void: + print("GodotSteam GDExtension updater functionality enabled") + + +func _disable_plugin() -> void: + print("GodotSteam GDEXtension updater functionality disabled") + + +func _enter_tree() -> void: + print_rich("GodotSteam v%s | %s | %s" % [Steam.get_godotsteam_version(), link_website, link_changelog]) + add_project_settings() + add_steamworks_dock() + + +func _exit_tree() -> void: + remove_steamworks_dock() + + +func _make_visible(visible) -> void: + if steamworks_dock: + steamworks_dock.set_visible(visible) + + +#region Add and remove things +func add_project_settings() -> void: + # Used for the Updater looking for redist files and SteamCMD + if not ProjectSettings.has_setting("steam/updates/godotsteam/check_for_updates"): + ProjectSettings.set_setting("steam/updates/godotsteam/check_for_updates", true) + ProjectSettings.add_property_info({ + "name": "steam/updates/godotsteam/check_for_updates", + "type": TYPE_BOOL + }) + ProjectSettings.set_initial_value("steam/updates/godotsteam/check_for_updates", true) + ProjectSettings.set_as_basic("steam/updates/godotsteam/check_for_updates", true) + # Which channel of updates to pull from + # Sponsors repo should require the user to have access to that repository already + # In theory, they can connect via SSH? + if not ProjectSettings.has_setting("steam/updates/godotsteam/update_channel"): + ProjectSettings.set_setting("steam/updates/godotsteam/update_channel", 0) + ProjectSettings.add_property_info({ + "name": "steam/updates/godotsteam/update_channel", + "type": TYPE_INT, + "hint": PROPERTY_HINT_ENUM, + "hint_string": "Community, Sponsors" + }) + ProjectSettings.set_initial_value("steam/updates/godotsteam/update_channel", 0) + ProjectSettings.set_as_basic("steam/updates/godotsteam/update_channel", true) + + +func add_steamworks_dock() -> void: + steamworks_dock = EDITOR_PANEL.instantiate() + # This will be used when 4.4.x is deprecated + #add_control_to_dock(DockSlot.DOCK_SLOT_BOTTOM, steamworks_dock) + # This is deprecated as of 4.6; when it is removed then 4.4.x will be deprecated for GodotSteam + add_control_to_bottom_panel(steamworks_dock, "Steamworks") + dock_frame = steamworks_dock + + +func remove_steamworks_dock() -> void: + # This will be used when 4.4.x is deprecated + #remove_control_from_docks(steamworks_dock) + # This is deprecated as of 4.6; when it is removed then 4.4.x will be deprecated for GodotSteam + remove_control_from_bottom_panel(steamworks_dock) + # This may be causing crashes for some people and is unnecessary with the call above + # steamworks_dock.queue_free() + steamworks_dock = null + dock_frame = null +#endregion \ No newline at end of file diff --git a/addons/godotsteam/godotsteam_plugin.gd.uid b/addons/godotsteam/godotsteam_plugin.gd.uid new file mode 100644 index 0000000..e46d46d --- /dev/null +++ b/addons/godotsteam/godotsteam_plugin.gd.uid @@ -0,0 +1 @@ +uid://btts11rgropcp diff --git a/addons/godotsteam/license.md b/addons/godotsteam/license.md new file mode 100644 index 0000000..16337c1 --- /dev/null +++ b/addons/godotsteam/license.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2015-Current | GP Garcia, Chris Ridenour, and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so b/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so new file mode 100644 index 0000000..707da87 Binary files /dev/null and b/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so differ diff --git a/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so b/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so new file mode 100644 index 0000000..b1f608d Binary files /dev/null and b/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so differ diff --git a/addons/godotsteam/linux32/libsteam_api.so b/addons/godotsteam/linux32/libsteam_api.so new file mode 100644 index 0000000..4c6fb34 Binary files /dev/null and b/addons/godotsteam/linux32/libsteam_api.so differ diff --git a/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so b/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so new file mode 100644 index 0000000..774165a Binary files /dev/null and b/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so differ diff --git a/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so b/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so new file mode 100644 index 0000000..ef489c6 Binary files /dev/null and b/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so differ diff --git a/addons/godotsteam/linux64/libsteam_api.so b/addons/godotsteam/linux64/libsteam_api.so new file mode 100644 index 0000000..ee27212 Binary files /dev/null and b/addons/godotsteam/linux64/libsteam_api.so differ diff --git a/addons/godotsteam/linuxarm64/libgodotsteam.linux.template_debug.arm64.so b/addons/godotsteam/linuxarm64/libgodotsteam.linux.template_debug.arm64.so new file mode 100644 index 0000000..29484af Binary files /dev/null and b/addons/godotsteam/linuxarm64/libgodotsteam.linux.template_debug.arm64.so differ diff --git a/addons/godotsteam/linuxarm64/libgodotsteam.linux.template_release.arm64.so b/addons/godotsteam/linuxarm64/libgodotsteam.linux.template_release.arm64.so new file mode 100644 index 0000000..a94748c Binary files /dev/null and b/addons/godotsteam/linuxarm64/libgodotsteam.linux.template_release.arm64.so differ diff --git a/addons/godotsteam/linuxarm64/libsteam_api.so b/addons/godotsteam/linuxarm64/libsteam_api.so new file mode 100644 index 0000000..fa8cca6 Binary files /dev/null and b/addons/godotsteam/linuxarm64/libsteam_api.so differ diff --git a/addons/godotsteam/osx/libgodotsteam.macos.template_debug.universal.dylib b/addons/godotsteam/osx/libgodotsteam.macos.template_debug.universal.dylib new file mode 100644 index 0000000..b204ff9 Binary files /dev/null and b/addons/godotsteam/osx/libgodotsteam.macos.template_debug.universal.dylib differ diff --git a/addons/godotsteam/osx/libgodotsteam.macos.template_release.universal.dylib b/addons/godotsteam/osx/libgodotsteam.macos.template_release.universal.dylib new file mode 100644 index 0000000..25b0a22 Binary files /dev/null and b/addons/godotsteam/osx/libgodotsteam.macos.template_release.universal.dylib differ diff --git a/addons/godotsteam/osx/libsteam_api.dylib b/addons/godotsteam/osx/libsteam_api.dylib new file mode 100644 index 0000000..4168fc0 Binary files /dev/null and b/addons/godotsteam/osx/libsteam_api.dylib differ diff --git a/addons/godotsteam/plugin.cfg b/addons/godotsteam/plugin.cfg new file mode 100644 index 0000000..15cdd7d --- /dev/null +++ b/addons/godotsteam/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="GodotSteam GDExtension Updater" +description="An updater for GodotSteam GDExtension. This is not required to use Steamworks functionality, just updating the plug-in." +author="Gramps Garcia, GodotSteam" +version="4.22.1" +script="godotsteam_plugin.gd" diff --git a/addons/godotsteam/readme.md b/addons/godotsteam/readme.md new file mode 100644 index 0000000..daba2d7 --- /dev/null +++ b/addons/godotsteam/readme.md @@ -0,0 +1,95 @@ +# GodotSteam for Godot Engine 4.x | Community Edition +An ecosystem of tools for [Godot Engine](https://godotengine.org) and [Valve's Steam](https://store.steampowered.com). For the Windows, Linux, and Mac platforms. + + +Additional Flavors +--- +Standard Module | Standard Plug-ins | Server Module | Server Plug-ins | Tools | Examples +--- | --- | --- | --- | --- | --- +[Godot 2.x](https://codeberg.org/godotsteam/godotsteam/src/branch/godot2) | [GDNative](https://codeberg.org/godotsteam/godotsteam/src/branch/gdnative) | [Server 3.x](https://codeberg.org/godotsteam/godotsteam-server/src/branch/godot3) | [GDNative](https://codeberg.org/godotsteam/godotsteam-server/src/branch/gdnative) | [GodotSteamKit](https://godotsteam.com/projects/godotsteamkit) | [Skillet](https://codeberg.org/godotsteam/skillet) +[Godot 3.x](https://codeberg.org/godotsteam/godotsteam/src/branch/godot3) | [GDExtension](https://codeberg.org/godotsteam/godotsteam/src/branch/gdextension) | [Server 4.x](https://codeberg.org/godotsteam/godotsteam-server/src/branch/godot4) | [GDExtension](https://codeberg.org/godotsteam/godotsteam-server/src/branch/gdextension) | --- | [Skillet UGC Editor](https://codeberg.org/godotsteam/skillet/src/branch/ugc_editor) +[Godot 4.x](https://codeberg.org/godotsteam/godotsteam/src/branch/godot4) | --- | --- | --- | --- | --- +[MultiplayerPeer](https://codeberg.org/godotsteam/multiplayerpeer)| --- | --- | --- | --- | --- + + +Documentation +--- +[Documentation is available here](https://godotsteam.com). You can also check out the Search Help section inside Godot Engine. [To start, try checking out our tutorial on initializing Steam.](https://godotsteam.com/tutorials/initializing/) There are additional tutorials, with more in the works. You can also [check out additional Godot and Steam related videos, text, additional tools, plug-ins, etc. here.](https://godotsteam.com/resources/external/) + +Feel free to chat with us about GodotSteam or ask for assistance on the [Stoat server](https://stt.gg/9DxQ3Dcd) or [IRC on Libera Chat](irc://irc.libera.chat/#godotsteam). + + +Donate +--- +Pull-requests are the best way to help the project out but you can also donate through [Github Sponsors](https://github.com/sponsors/Gramps) or [LiberaPay](https://liberapay.com/godotsteam/donate)! [You can read more about donor perks here.](https://godotsteam.com/contribute/donations/) [You can also view all our awesome donors here.](https://godotsteam.com/contribute/donors/) + + +Current Build +--- +You can [download pre-compiled versions of this repo here](https://codeberg.org/godotsteam/godotsteam/releases). + +**Version 4.22.1 Changes** + +- Added: link to GodotSteam site in in-editor docs, ***thanks to RTalaro*** +- Fixed: missing ! in singleton check in MultiplayerPeer close function + + +[You can read more change-logs here](https://godotsteam.com/changelog/godot4/). + + +Compatibility +--- +While rare, sometimes Steamworks SDK updates will break compatibility with older GodotSteam versions. Any compatibility breaks are noted below. Newer API files (dll, so, dylib) _should_ still work for older versions. + +Steamworks SDK Version | GodotSteam Version +---|--- +1.65 | 4.21 or newer +1.63 to 1.64 | 4.17 to 4.20.1 +1.62 | 4.14 to 4.16.2 +1.61 | 4.12 to 4.13 +1.60 | 4.6 to 4.11 +1.59 | 4.6 to 4.8 +1.58a or older | 4.5.4 or older + +Versions of GodotSteam that have compatibility breaks introduced. + +GodotSteam Version | Broken Compatibility +---|--- +4.8 | Networking identity system removed, replaced with Steam IDs +4.9 | sendMessages returns an Array +4.11 | setLeaderboardDetailsMax removed +4.13 | getItemDefinitionProperty return a dictionary, html_needs_paint key 'bgra' changed to 'rbga' +4.14 | Removed first argument for stat request in steamInit and steamInitEx, steamInit returns intended bool value +4.16 | Variety of small break points, refer to [4.16 changelog for details](https://godotsteam.com/changelog/godot4/#version-416) +4.17 | Windows projects using Steam SDK 1.63 are meant to work with Proton 11 or Experimental on Linux / Steam Deck. +4.19 | Lots of changes to Voice functions, refer to [4.19 changelog for details](https://godotsteam.com/changelog/godot4/#version-419) +4.20 | Godot 4.7 changed callable_method_pointer.h to callable_mp.h which will break backwards compatibility +4.21 | ControllerPad enum changed to SteamControllerPad enum, SendMessages added new parameter + + +Known Issues +--- +- Steam Overlay ***may not*** work when running your game from Godot but the exported project should work perfectly fine in the Steam client. [Read more.](https://godotsteam.com/issues/common_issues/#steam-overlay) +- If using the Steam version of Godot on Windows, you may need to manually update Godot's steam_api64.dll or steam_api.dll with GodotSteam's version as it is sometimes outdated and may cause the plug-in to fail to load. [Read more.](https://godotsteam.com/issues/windows_issues/#failure-to-load-steam-version) + + +Quick How-To +--- +For complete instructions on how to build the Godot 4.x version of GodotSteam from scratch as either a custom editor or GDExtension, both apply to this branch: + +- [Custom editor (module)](https://godotsteam.com/howto/modules) +- [GDExtension](https://godotsteam.com/howto/gdextension) + +It will have the most up-to-date information. + +Alternatively, you can skip compiling it and [download the precompiled versions in our Releases section](https://codeberg.org/godotsteam/godotsteam/releases), [the Godot Asset Library](https://godotengine.org/asset-library/asset/2445), or [the Godot Asset Store](https://store.godotengine.org/asset/godotsteam/godotsteam-gdextension/). + + +No LLM Policy / No "AI" Policy +--- +No LLMs are allowed to be used for issues, patches, or pull-requests. They will be closed or rejected and the submitter may be blocked from future submissions. + + +License +--- +MIT license diff --git a/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll b/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll new file mode 100644 index 0000000..2e98fae Binary files /dev/null and b/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll differ diff --git a/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll b/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll new file mode 100644 index 0000000..5766db0 Binary files /dev/null and b/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll differ diff --git a/addons/godotsteam/win32/steam_api.dll b/addons/godotsteam/win32/steam_api.dll new file mode 100644 index 0000000..71b5959 Binary files /dev/null and b/addons/godotsteam/win32/steam_api.dll differ diff --git a/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll b/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll new file mode 100644 index 0000000..1a2b8a5 Binary files /dev/null and b/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll differ diff --git a/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll b/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll new file mode 100644 index 0000000..01f3feb Binary files /dev/null and b/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll differ diff --git a/addons/godotsteam/win64/steam_api64.dll b/addons/godotsteam/win64/steam_api64.dll new file mode 100644 index 0000000..c90a4e7 Binary files /dev/null and b/addons/godotsteam/win64/steam_api64.dll differ diff --git a/addons/godotsteam/win64/~libgodotsteam.windows.template_debug.x86_64.dll b/addons/godotsteam/win64/~libgodotsteam.windows.template_debug.x86_64.dll new file mode 100644 index 0000000..1a2b8a5 Binary files /dev/null and b/addons/godotsteam/win64/~libgodotsteam.windows.template_debug.x86_64.dll differ