diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/dist/html/editor.html | 53 | ||||
-rw-r--r-- | misc/dist/linux/org.godotengine.Godot.desktop | 6 | ||||
-rw-r--r-- | misc/dist/shell/_godot.zsh-completion | 6 | ||||
-rw-r--r-- | misc/dist/shell/godot.bash-completion | 4 | ||||
-rw-r--r-- | misc/dist/shell/godot.fish | 6 | ||||
-rwxr-xr-x | misc/hooks/pre-commit-clang-format | 2 | ||||
-rwxr-xr-x | misc/hooks/pre-commit-make-rst | 2 | ||||
-rwxr-xr-x | misc/scripts/black_format.sh | 4 | ||||
-rwxr-xr-x | misc/scripts/check_ci_log.py | 2 | ||||
-rwxr-xr-x | misc/scripts/clang_format.sh | 10 | ||||
-rwxr-xr-x | misc/scripts/clang_tidy.sh | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | misc/scripts/codespell.sh | 4 | ||||
-rwxr-xr-x | misc/scripts/file_format.sh | 5 |
13 files changed, 82 insertions, 26 deletions
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html index 8d436038c1..7c44dd45a1 100644 --- a/misc/dist/html/editor.html +++ b/misc/dist/html/editor.html @@ -68,6 +68,11 @@ height: 100%; overflow: auto; background-color: hsla(0, 0%, 0%, 0.5); + text-align: left; + } + + .welcome-modal-title { + text-align: center; } .welcome-modal-content { @@ -238,7 +243,7 @@ onclick="if (event.target === this) closeWelcomeModal(false)" > <div class="welcome-modal-content"> - <h2 id="welcome-modal-title">Important - Please read before continuing</h2> + <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read before continuing</h2> <div id="welcome-modal-description"> <p> The Godot Web Editor has some limitations compared to the native version. @@ -254,9 +259,38 @@ >Web editor documentation</a> for usage instructions and limitations. </p> </div> - <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem"> - OK, don't show again - </button> + <div id="welcome-modal-description-no-cross-origin-isolation" style="display: none"> + <p> + The web server does not support cross-origin isolation, + which is required for the Godot Web Editor to function. + </p> + <p> + <strong>Reasons for cross-origin isolation being disabled:</strong> + <ul> + <li id="welcome-modal-reason-not-secure"> + This page is not served from a secure context (HTTPS <i>or</i> localhost). + </li> + <li> + This page may not be served with cross-origin isolation headers + (check with the developer tools' Network tab). + </li> + </ul> + </p> + <p> + If you are self-hosting the web editor, + refer to + <a + href="https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#threads" + target="_blank" + rel="noopener" + >Exporting for the Web - Threads</a> for more information. + </p> + </div> + <div style="text-align: center"> + <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem"> + OK, don't show again + </button> + </div> </div> </div> <div id="tabs-buttons"> @@ -360,7 +394,16 @@ }); } - if (localStorage.getItem("welcomeModalDismissed") !== 'true') { + if (!crossOriginIsolated) { + // Display error dialog as threading support is required for the editor. + setButtonEnabled('startButton', false); + document.getElementById("welcome-modal-description").style.display = "none"; + document.getElementById("welcome-modal-description-no-cross-origin-isolation").style.display = "block"; + document.getElementById("welcome-modal-dismiss").style.display = "none"; + document.getElementById("welcome-modal-reason-not-secure").style.display = window.isSecureContext ? "none" : "list-item"; + } + + if (!crossOriginIsolated || localStorage.getItem("welcomeModalDismissed") !== 'true') { document.getElementById("welcome-modal").style.display = "block"; document.getElementById("welcome-modal-dismiss").focus(); } diff --git a/misc/dist/linux/org.godotengine.Godot.desktop b/misc/dist/linux/org.godotengine.Godot.desktop index 4d23c96545..db0c80e4f1 100644 --- a/misc/dist/linux/org.godotengine.Godot.desktop +++ b/misc/dist/linux/org.godotengine.Godot.desktop @@ -1,7 +1,13 @@ [Desktop Entry] Name=Godot Engine GenericName=Libre game engine +GenericName[el]=Ελεύθερη μηχανή παιχνιδιού +GenericName[fr]=Moteur de jeu libre +GenericName[zh_CN]=自由的游戏引擎 Comment=Multi-platform 2D and 3D game engine with a feature-rich editor +Comment[el]=2D και 3D μηχανή παιχνιδιού πολλαπλών πλατφορμών με επεξεργαστή πλούσιο σε χαρακτηριστικά +Comment[fr]=Moteur de jeu 2D et 3D multiplateforme avec un éditeur riche en fonctionnalités +Comment[zh_CN]=多平台 2D 和 3D 游戏引擎,带有功能丰富的编辑器 Exec=godot %f Icon=godot Terminal=false diff --git a/misc/dist/shell/_godot.zsh-completion b/misc/dist/shell/_godot.zsh-completion index aaa5fe0a06..b17bb6e66b 100644 --- a/misc/dist/shell/_godot.zsh-completion +++ b/misc/dist/shell/_godot.zsh-completion @@ -61,8 +61,8 @@ _arguments \ '(-b --breakpoints)'{-b,--breakpoints}'[specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)]:breakpoint list' \ '--profiling[enable profiling in the script debugger]' \ '--gpu-profile[show a GPU profile of the tasks that took the most time during frame rendering]' \ - '--vk-layers[enable Vulkan validation layers for debugging]' \ - '--gpu-abort[abort on GPU errors (usually validation layer errors)]' \ + '--gpu-validation[enable graphics API validation layers for debugging]' \ + '--gpu-abort[abort on graphics API usage errors (usually validation layer errors)]' \ '--remote-debug[enable remote debugging]:remote debugger address' \ '--debug-collisions[show collision shapes when running the scene]' \ '--debug-navigation[show navigation polygons when running the scene]' \ @@ -78,6 +78,8 @@ _arguments \ '--export[export the project using the given preset and matching release template]:export preset name then path' \ '--export-debug[same as --export, but using the debug template]:export preset name then path' \ '--export-pack[same as --export, but only export the game pack for the given preset]:export preset name then path' \ + '--convert-3to4[converts project from Godot 3.x to Godot 4.x]' \ + '--validate-conversion-3to4[shows what elements will be renamed when converting project from Godot 3.x to Godot 4.x]' \ '--doctool[dump the engine API reference to the given path in XML format, merging if existing files are found]:path to base Godot build directory (optional):_dirs' \ '--no-docbase[disallow dumping the base types (used with --doctool)]' \ '--build-solutions[build the scripting solutions (e.g. for C# projects)]' \ diff --git a/misc/dist/shell/godot.bash-completion b/misc/dist/shell/godot.bash-completion index 7927d26171..1ab687e1fc 100644 --- a/misc/dist/shell/godot.bash-completion +++ b/misc/dist/shell/godot.bash-completion @@ -64,7 +64,7 @@ _complete_godot_options() { --breakpoints --profiling --gpu-profile ---vk-layers +--gpu-validation --gpu-abort --remote-debug --debug-collisions @@ -81,6 +81,8 @@ _complete_godot_options() { --export --export-debug --export-pack +--convert-3to4 +--validate-conversion-3to4 --doctool --no-docbase --build-solutions diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish index c05aa74017..d58066c135 100644 --- a/misc/dist/shell/godot.fish +++ b/misc/dist/shell/godot.fish @@ -74,8 +74,8 @@ complete -c godot -s d -l debug -d "Debug (local stdout debugger)" complete -c godot -s b -l breakpoints -d "Specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)" -x complete -c godot -l profiling -d "Enable profiling in the script debugger" complete -c godot -l gpu-profile -d "Show a GPU profile of the tasks that took the most time during frame rendering" -complete -c godot -l vk-layers -d "Enable Vulkan validation layers for debugging" -complete -c godot -l gpu-abort -d "Abort on GPU errors (usually validation layer errors)" +complete -c godot -l gpu-validation -d "Enable graphics API validation layers for debugging" +complete -c godot -l gpu-abort -d "Abort on graphics API usage errors (usually validation layer errors)" complete -c godot -l remote-debug -d "Enable remote debugging" complete -c godot -l debug-collisions -d "Show collision shapes when running the scene" complete -c godot -l debug-navigation -d "Show navigation polygons when running the scene" @@ -93,6 +93,8 @@ complete -c godot -l check-only -d "Only parse for errors and quit (use with --s complete -c godot -l export -d "Export the project using the given preset and matching release template" -x complete -c godot -l export-debug -d "Same as --export, but using the debug template" -x complete -c godot -l export-pack -d "Same as --export, but only export the game pack for the given preset" -x +complete -c godot -l convert-3to4 -d "Converts project from Godot 3.x to Godot 4.x" +complete -c godot -l validate-conversion-3to4 -d "Shows what elements will be renamed when converting project from Godot 3.x to Godot 4.x" complete -c godot -l doctool -d "Dump the engine API reference to the given path in XML format, merging if existing files are found" -r complete -c godot -l no-docbase -d "Disallow dumping the base types (used with --doctool)" complete -c godot -l build-solutions -d "Build the scripting solutions (e.g. for C# projects)" diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format index 2ee3f569d5..e8e62e6470 100755 --- a/misc/hooks/pre-commit-clang-format +++ b/misc/hooks/pre-commit-clang-format @@ -77,7 +77,7 @@ fi # To get consistent formatting, we recommend contributors to use the same # clang-format version as CI. RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="12" -RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="13" +RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="14" if [ ! -x "$CLANG_FORMAT" ] ; then message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX." diff --git a/misc/hooks/pre-commit-make-rst b/misc/hooks/pre-commit-make-rst index 38b397c494..7d115f1d13 100755 --- a/misc/hooks/pre-commit-make-rst +++ b/misc/hooks/pre-commit-make-rst @@ -9,4 +9,4 @@ if [[ "$py_ver" != "3" ]]; then PYTHON+=3 fi -$PYTHON doc/tools/make_rst.py doc/classes modules --dry-run +$PYTHON doc/tools/make_rst.py doc/classes modules --dry-run --color diff --git a/misc/scripts/black_format.sh b/misc/scripts/black_format.sh index 99343f1c5a..f6fac58e50 100755 --- a/misc/scripts/black_format.sh +++ b/misc/scripts/black_format.sh @@ -11,13 +11,13 @@ black -l 120 $PY_FILES diff=$(git diff --color) -# If no patch has been generated all is OK, clean up, and exit. +# If no diff has been generated all is OK, clean up, and exit. if [ -z "$diff" ] ; then printf "Files in this commit comply with the black style rules.\n" exit 0 fi -# A patch has been created, notify the user, clean up, and exit. +# A diff has been created, notify the user, clean up, and exit. printf "\n*** The following differences were found between the code " printf "and the formatting rules:\n\n" echo "$diff" diff --git a/misc/scripts/check_ci_log.py b/misc/scripts/check_ci_log.py index 2c75b83bd7..1e5a12eeb4 100755 --- a/misc/scripts/check_ci_log.py +++ b/misc/scripts/check_ci_log.py @@ -25,6 +25,8 @@ if ( file_contents.find("Program crashed with signal") != -1 or file_contents.find("Dumping the backtrace") != -1 or file_contents.find("Segmentation fault (core dumped)") != -1 + or file_contents.find("Aborted (core dumped)") != -1 + or file_contents.find("terminate called without an active exception") != -1 ): print("FATAL ERROR: Godot has been crashed.") sys.exit(52) diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh index 5ab9c1bbb9..2b7179f5be 100755 --- a/misc/scripts/clang_format.sh +++ b/misc/scripts/clang_format.sh @@ -17,12 +17,12 @@ while read -r f; do continue elif [[ "$f" == *"glsl" ]]; then continue - elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/input/InputManager"* ]]; then - continue elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView"* ]]; then continue elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper"* ]]; then continue + elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix"* ]]; then + continue fi python misc/scripts/copyright_headers.py "$f" @@ -30,13 +30,13 @@ done diff=$(git diff --color) -# If no patch has been generated all is OK, clean up, and exit. +# If no diff has been generated all is OK, clean up, and exit. if [ -z "$diff" ] ; then - printf "Files in this commit comply with the clang-tidy style rules.\n" + printf "Files in this commit comply with the clang-format style rules.\n" exit 0 fi -# A patch has been created, notify the user, clean up, and exit. +# A diff has been created, notify the user, clean up, and exit. printf "\n*** The following changes have been made to comply with the formatting rules:\n\n" echo "$diff" printf "\n*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n" diff --git a/misc/scripts/clang_tidy.sh b/misc/scripts/clang_tidy.sh index e49f6ac9f4..63c1b10042 100755 --- a/misc/scripts/clang_tidy.sh +++ b/misc/scripts/clang_tidy.sh @@ -18,13 +18,13 @@ done diff=$(git diff --color) -# If no patch has been generated all is OK, clean up, and exit. +# If no diff has been generated all is OK, clean up, and exit. if [ -z "$diff" ] ; then printf "Files in this commit comply with the clang-tidy style rules.\n" exit 0 fi -# A patch has been created, notify the user, clean up, and exit. +# A diff has been created, notify the user, clean up, and exit. printf "\n*** The following changes have been made to comply with the formatting rules:\n\n" echo "$diff" printf "\n*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n" diff --git a/misc/scripts/codespell.sh b/misc/scripts/codespell.sh index 7c5f824b5e..f99c5d22b2 100644..100755 --- a/misc/scripts/codespell.sh +++ b/misc/scripts/codespell.sh @@ -1,5 +1,5 @@ #!/bin/sh -SKIP_LIST="./thirdparty,*.gen.*,*.po,*.pot,package-lock.json,./core/string/locales.h,./DONORS.md,./misc/scripts/codespell.sh" -IGNORE_LIST="ba,childs,complies,curvelinear,expct,fave,findn,gird,inout,lod,nd,numer,ois,ro,statics,te,varn" +SKIP_LIST="./thirdparty,*.gen.*,*.po,*.pot,package-lock.json,./core/string/locales.h,./DONORS.md,./misc/dist/linux/org.godotengine.Godot.desktop,./misc/scripts/codespell.sh" +IGNORE_LIST="ba,childs,complies,curvelinear,expct,fave,findn,gird,inout,lod,nd,numer,ois,ro,statics,te,varius,varn" codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh index 0c7235817d..c767d3f8a0 100755 --- a/misc/scripts/file_format.sh +++ b/misc/scripts/file_format.sh @@ -49,14 +49,13 @@ done diff=$(git diff --color) -# If no patch has been generated all is OK, clean up, and exit. +# If no diff has been generated all is OK, clean up, and exit. if [ -z "$diff" ] ; then printf "Files in this commit comply with the formatting rules.\n" - rm -f patch.patch exit 0 fi -# A patch has been created, notify the user, clean up, and exit. +# A diff has been created, notify the user, clean up, and exit. printf "\n*** The following differences were found between the code " printf "and the formatting rules:\n\n" echo "$diff" |