forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/v-sekai-godot/vsk-desync-4.4' i…
…nto groups-staging-4.4
- Loading branch information
Showing
176 changed files
with
18,939 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Godot 4+ specific ignores | ||
.godot/ | ||
|
||
# Godot-specific ignores | ||
.import/ | ||
export.cfg | ||
export_presets.cfg | ||
|
||
# Imported translations (automatically generated from CSV files) | ||
*.translation | ||
|
||
# Mono-specific ignores | ||
.mono/ | ||
data_*/ | ||
mono_crash.*.json | ||
|
||
libdesync_c_interface.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
; DO NOT EDIT (unless you know what you are doing) | ||
; | ||
; This subdirectory is a git "subrepo", and this file is maintained by the | ||
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme | ||
; | ||
[subrepo] | ||
remote = https://github.com/V-Sekai/godot-desync.git | ||
branch = main | ||
commit = 7f70d1f6c8a9f852c58783f8ddaeb3eb0840cfad | ||
parent = f053c300009608eafe5faf205697508e8b9dde1d | ||
method = merge | ||
cmdver = 0.4.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023-present K. S. Ernest (iFire) Lee & V-Sekai 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Godot Engine Open Telemetry & Desync (casync protocol) | ||
|
||
```gdscript | ||
extends Node3D | ||
var otel: OpenTelemetry = Opentelemetry.new() | ||
func _ready() -> void: | ||
var error = otel.init_tracer_provider("godot", "localhost:4317", Engine.get_version_info()) | ||
print(error) | ||
func _process(_delta) -> void: | ||
var parent_span_id = otel.start_span("test-_ready") | ||
var span_id = otel.start_span_with_parent("test-child", parent_span_id) | ||
otel.add_event(span_id, "test-event") | ||
otel.set_attributes(span_id, {"test-key": "test-value"}) | ||
otel.record_error(span_id, str(get_stack())) | ||
otel.end_span(span_id) | ||
otel.end_span(parent_span_id) | ||
func _exit_tree() -> void: | ||
otel.shutdown() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import subprocess | ||
import os | ||
from os.path import abspath, dirname | ||
|
||
Import("env") | ||
|
||
thirdparty_obj = [] | ||
|
||
current_dir = os.getcwd() | ||
desync_dir = os.path.join(current_dir, "thirdparty/desync/cmd/desync") | ||
os.chdir(desync_dir) | ||
suffix = ".a" | ||
env_desync = env.Clone() | ||
|
||
if env.msvc: | ||
env_desync.Append(CPPDEFINES=["_SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING"]) | ||
suffix = ".lib" | ||
runtime = "desync_c_interface" | ||
subprocess.run( | ||
[ | ||
"go", | ||
"build", | ||
"-o", | ||
f"../../../../lib{runtime}{suffix}", | ||
"-buildmode=c-archive", | ||
".", | ||
], | ||
check=True, | ||
) | ||
# https://github.com/ashtonmeuser/godot-wasm/blob/master/SCsub#L44C58-L48C1 | ||
os.chdir(current_dir) | ||
|
||
env["LIBRUNTIMESUFFIX"] = ".a" | ||
|
||
runtime_lib = env.File( | ||
"{prefix}{runtime}{suffix}".format( | ||
runtime=f"{runtime}", | ||
prefix=env["LIBPREFIX"], | ||
suffix=env.get("LIBRUNTIMESUFFIX", env["LIBSUFFIX"]), | ||
) | ||
) | ||
env.Append(LIBS=[runtime_lib]) | ||
if env["platform"] == "macos" or env["platform"] == "linuxbsd": | ||
env.Append(LIBS=["resolv"]) | ||
|
||
env_desync.add_source_files(env.modules_sources, "*.cpp") | ||
|
||
module_obj = [] | ||
env_desync.add_source_files(module_obj, "*.cpp") | ||
env_desync.modules_sources += module_obj | ||
|
||
env.Depends(module_obj, thirdparty_obj) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/**************************************************************************/ | ||
/* casync.cpp */ | ||
/**************************************************************************/ | ||
/* This file is part of: */ | ||
/* GODOT ENGINE */ | ||
/* https://godotengine.org */ | ||
/**************************************************************************/ | ||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ | ||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ | ||
/* */ | ||
/* 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. */ | ||
/**************************************************************************/ | ||
|
||
#include "casync.h" | ||
|
||
void Casync::_bind_methods() { | ||
ClassDB::bind_method(D_METHOD("untar", "store_url", "index_url", "output_dir_url", "cache_dir_url"), &Casync::untar); | ||
} | ||
|
||
Casync::Casync() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/**************************************************************************/ | ||
/* casync.h */ | ||
/**************************************************************************/ | ||
/* This file is part of: */ | ||
/* GODOT ENGINE */ | ||
/* https://godotengine.org */ | ||
/**************************************************************************/ | ||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ | ||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ | ||
/* */ | ||
/* 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. */ | ||
/**************************************************************************/ | ||
|
||
#ifndef CASYNC_H | ||
#define CASYNC_H | ||
|
||
#include "core/error/error_list.h" | ||
#include "core/object/ref_counted.h" | ||
#include "libdesync_c_interface.h" | ||
#include <stdio.h> | ||
|
||
class Casync : public RefCounted { | ||
GDCLASS(Casync, RefCounted); | ||
|
||
protected: | ||
static void _bind_methods(); | ||
|
||
public: | ||
Error untar(String p_store_url, String p_index_url, String p_output_dir_url, String p_cache_dir_url) { | ||
int result = DesyncUntar(p_store_url.utf8().ptrw(), | ||
p_index_url.utf8().ptrw(), | ||
p_output_dir_url.utf8().ptrw(), | ||
p_cache_dir_url.utf8().ptrw()); | ||
if (result != 0) { | ||
printf("Error: storeUrl, indexUrl, and outputDir are required\n"); | ||
return ERR_INVALID_PARAMETER; | ||
} | ||
return OK; | ||
} | ||
Casync(); | ||
}; | ||
|
||
#endif // CASYNC_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import os | ||
import subprocess | ||
|
||
|
||
def can_build(env, platform): | ||
try: | ||
subprocess.check_output(["go", "--version"], stderr=subprocess.STDOUT) | ||
except FileNotFoundError: | ||
print("Go not found. desync build skipped.") | ||
return False | ||
except subprocess.CalledProcessError: | ||
pass | ||
|
||
if platform == "web": | ||
return False | ||
if platform == "ios": | ||
return False | ||
if platform == "android": | ||
return False | ||
if platform == "windows": | ||
if os.name != "nt" and env["use_mingw"]: | ||
return False | ||
if not env["use_mingw"]: | ||
return False | ||
try: | ||
mingw_version = subprocess.check_output(["gcc", "--version"]) | ||
print("MinGW is installed: ", mingw_version) | ||
except Exception: | ||
print("MinGW is not installed or not found in PATH") | ||
return False | ||
return True | ||
|
||
if platform == "macos": | ||
if env.get("arch", "") == "x86_64": | ||
return False | ||
return True | ||
|
||
|
||
def get_doc_classes(): | ||
return [ | ||
"Casync", | ||
"OpenTelemetry", | ||
] | ||
|
||
|
||
def configure(env): | ||
try: | ||
go_version = subprocess.check_output(["go", "version"]) | ||
print("Golang is installed: ", go_version) | ||
except Exception: | ||
print("Golang is not installed or not found in PATH") | ||
return False | ||
return True | ||
|
||
|
||
def get_doc_path(): | ||
return "doc_classes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Normalize EOL for all files that Git considers text files. | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Godot 4+ specific ignores | ||
.godot/ | ||
vsekai_game_windows_x86_64/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://djhvloxmv0ek8" | ||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://icon.svg" | ||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
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/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2018-present. This file is part of V-Sekai https://v-sekai.org/. | ||
# SaracenOne & K. S. Ernest (Fire) Lee & Lyuma & MMMaellon & Contributors | ||
# run_split.gd | ||
# SPDX-License-Identifier: MIT | ||
extends Node | ||
|
||
var thread = Thread.new() | ||
|
||
func _ready(): | ||
var callable: Callable = Callable(self, "_async_run") | ||
callable = callable.bind(null) | ||
print(thread.start(callable)) | ||
|
||
func _async_run(_userdata): | ||
var desync = Desync.new() | ||
var result = desync.untar("https://v-sekai.github.io/casync-v-sekai-game/store", | ||
"https://github.com/V-Sekai/casync-v-sekai-game/raw/main/vsekai_game_windows_x86_64.caidx", | ||
"vsekai_game_windows_x86_64", | ||
String()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[gd_scene load_steps=2 format=3 uid="uid://cdw8d0qj60srw"] | ||
|
||
[ext_resource type="Script" path="res://node.gd" id="1_mbnro"] | ||
|
||
[node name="Node" type="Node"] | ||
script = ExtResource("1_mbnro") |
Oops, something went wrong.