diff options
Diffstat (limited to 'misc')
111 files changed, 667 insertions, 644 deletions
diff --git a/misc/dist/document_icons/shader.svg b/misc/dist/document_icons/shader.svg new file mode 100644 index 0000000000..30515cde3d --- /dev/null +++ b/misc/dist/document_icons/shader.svg @@ -0,0 +1 @@ +<svg height="1024" width="1024" xmlns="http://www.w3.org/2000/svg"><path d="M812.681 293.783c-23.575-32.543-141.93-39.865-197.505-34.983 2.17-68.048 31.457-117.656-37.966-177.026M161.89 49.151H464c77.128-2.02 126.554 37.835 178.444 84.881l123.665 109.83c63.819 56.94 89.13 110.625 96 188.174v542.886H161.89z" fill="#eff1f5" stroke="#9f9fa1" stroke-linecap="round" stroke-linejoin="round" stroke-width="19.603"/><text style="font-weight:800;font-size:16px;font-family:Montserrat;letter-spacing:0;word-spacing:0;fill:#333f67" x="249.582" y="878.644"><tspan font-size="112" x="249.582" y="878.644">SHADER</tspan></text><path d="M640.44 348.066c-10.54 0-21.102 4.097-29.145 12.276l-35.64 36.254-47.725 48.529h-.004l-47.676 48.53-33.98 34.546 13.744 13.98h89.002l47.675-48.529 47.723-48.527h.006l25.12-25.543c6.375-6.486 10.147-14.571 11.468-22.986h-.002c2.01-12.81-1.762-26.38-11.469-36.254-8.042-8.18-18.558-12.276-29.098-12.276zM460.013 542.184l44.502 45.257 44.5-45.257h-89.002zm-46.848 13.834c-9.932.124-18.509 4.228-24.668 11.236-5.21 5.927-8.55 14.024-9.668 23.459-.254 2.153-.52 4.295-.52 6.588 0 33.842-55.28 6.971-28.53 41.94h117.626c6.64-15.57 5.836-33.447-2.13-48.528h-.003c-2.48-4.695-5.392-9.213-9.289-13.176-13.348-13.578-26.713-20.143-38.48-21.326h-.002a38.536 38.536 0 0 0-4.336-.193zm-63.387 83.224c4.467 5.84 10.605 12.952 20.33 22.844 21.446 21.814 64.428 16.264 85.875-5.547 5.035-5.12 8.751-11.034 11.422-17.297H349.78z" style="fill:#478cbf;fill-opacity:1"/></svg> diff --git a/misc/dist/document_icons/shader_extra_small.svg b/misc/dist/document_icons/shader_extra_small.svg new file mode 100644 index 0000000000..b9c9cd4811 --- /dev/null +++ b/misc/dist/document_icons/shader_extra_small.svg @@ -0,0 +1 @@ +<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M12.698 4.59c-.368-.508-2.218-.623-3.086-.546.034-1.064.492-1.839-.593-2.766m-6.49-.51H7.25c1.205-.032 1.977.591 2.788 1.326L11.97 3.81c.998.89 1.393 1.729 1.5 2.94v8.483H2.53z" fill="#eff1f5" stroke="#9f9fa1" stroke-linecap="round" stroke-linejoin="round"/><path d="M10.77 5.465a.88.88 0 0 0-.627.264l-.77.78-1.03 1.048-1.027 1.047-.734.744.299.3h1.918l1.027-1.044 1.03-1.047.54-.551a.902.902 0 0 0 .249-.496.91.91 0 0 0-.249-.781.877.877 0 0 0-.626-.264zM8.799 9.648 6.88 9.65l.959.975.959-.977zm-2.975.301a.715.715 0 0 0-.486.24.922.922 0 0 0-.21.506h.003c-.006.046-.014.093-.014.143 0 .73-1.19.15-.613.904.096.126.227.28.437.492.462.47 1.39.351 1.852-.119a1.21 1.21 0 0 0 .246-.373 1.22 1.22 0 0 0-.047-1.047 1.19 1.19 0 0 0-.199-.283c-.288-.293-.576-.436-.83-.46a.715.715 0 0 0-.139-.003z" style="fill:#478cbf;fill-opacity:1"/></svg> diff --git a/misc/dist/document_icons/shader_small.svg b/misc/dist/document_icons/shader_small.svg new file mode 100644 index 0000000000..e20bca9fdf --- /dev/null +++ b/misc/dist/document_icons/shader_small.svg @@ -0,0 +1 @@ +<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><path d="M25.396 9.18c-.736-1.016-4.435-1.245-6.172-1.093.068-2.126.983-3.676-1.186-5.532M5.059 1.536H14.5c2.41-.063 3.955 1.182 5.576 2.652l3.865 3.433c1.994 1.779 2.785 3.457 3 5.88v16.965H5.059z" fill="#eff1f5" stroke="#9f9fa1" stroke-linecap="round" stroke-linejoin="round"/><path d="M21.295 11.242c-.434 0-.871.17-1.201.506l-1.471 1.494-1.965 2h-.002l-1.963 2-1.4 1.426.566.574 1.834 1.867 1.834-1.867 1.963-2 1.967-2 1.037-1.05a1.73 1.73 0 0 0 .473-.95 1.74 1.74 0 0 0-.475-1.494 1.676 1.676 0 0 0-1.197-.506zm-9.453 8.572a1.367 1.367 0 0 0-.932.463c-.215.244-.35.577-.396.965-.01.09-.024.179-.024.274 0 1.395-2.277.285-1.174 1.726.184.241.436.536.836.944.884.899 2.657.668 3.541-.23.207-.21.36-.455.47-.714a2.33 2.33 0 0 0-.089-2 2.273 2.273 0 0 0-.383-.543c-.55-.56-1.099-.829-1.584-.877a1.367 1.367 0 0 0-.265-.008z" style="fill:#478cbf;fill-opacity:1"/></svg> diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html index 4785f54973..8d436038c1 100644 --- a/misc/dist/html/editor.html +++ b/misc/dist/html/editor.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> +<html xmlns="https://www.w3.org/1999/xhtml" lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /> @@ -9,12 +9,12 @@ <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="application-name" content="Godot" /> <meta name="apple-mobile-web-app-title" content="Godot" /> - <meta name="theme-color" content="#478cbf" /> - <meta name="msapplication-navbutton-color" content="#478cbf" /> + <meta name="theme-color" content="#202531" /> + <meta name="msapplication-navbutton-color" content="#202531" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="msapplication-starturl" content="/latest" /> <meta property="og:site_name" content="Godot Engine Web Editor" /> - <meta property="og:url" name="twitter:url" content="https://editor.godotengine.org/releases/latest/" /> + <meta property="og:url" name="twitter:url" content="https://editor.godotengine.org/releases/latest/" /> <meta property="og:title" name="twitter:title" content="Free and open source 2D and 3D game engine" /> <meta property="og:description" name="twitter:description" content="Use the Godot Engine editor directly in your web browser, without having to install anything." /> <meta property="og:image" name="twitter:image" content="https://godotengine.org/themes/godotengine/assets/og_image.png" /> @@ -58,6 +58,29 @@ filter: brightness(82.5%); } + .welcome-modal { + display: none; + position: fixed; + z-index: 1; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: hsla(0, 0%, 0%, 0.5); + } + + .welcome-modal-content { + background-color: #333b4f; + box-shadow: 0 0.25rem 0.25rem hsla(0, 0%, 0%, 0.5); + line-height: 1.5; + max-width: 38rem; + margin: 4rem auto 0 auto; + color: white; + border-radius: 0.5rem; + padding: 1rem 1rem 2rem 1rem; + } + #tabs-buttons { /* Match the default background color of the editor window for a seamless appearance. */ background-color: #202531; @@ -206,23 +229,49 @@ </style> </head> <body> + <div + id="welcome-modal" + class="welcome-modal" + role="dialog" + aria-labelledby="welcome-modal-title" + aria-describedby="welcome-modal-description" + onclick="if (event.target === this) closeWelcomeModal(false)" + > + <div class="welcome-modal-content"> + <h2 id="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. + Its main focus is education and experimentation; + <strong>it is not recommended for production</strong>. + </p> + <p> + Refer to the + <a + href="https://docs.godotengine.org/en/latest/tutorials/editor/using_the_web_editor.html" + target="_blank" + rel="noopener" + >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> + </div> <div id="tabs-buttons"> <button id="btn-tab-loader" class="btn tab-btn" onclick="showTab('loader')">Loader</button> <button id="btn-tab-editor" class="btn tab-btn" disabled="disabled" onclick="showTab('editor')">Editor</button> <button id="btn-close-editor" class="btn close-btn" disabled="disabled" onclick="closeEditor()">×</button> <button id="btn-tab-game" class="btn tab-btn" disabled="disabled" onclick="showTab('game')">Game</button> <button id="btn-close-game" class="btn close-btn" disabled="disabled" onclick="closeGame()">×</button> + <button id="btn-tab-update" class="btn tab-btn" style="display: none;">Update</button> </div> <div id="tabs"> <div id="tab-loader"> <div style="color: #e0e0e0;" id="persistence"> - <label for="videoMode" style="display: none;">Select video driver:</label><br /> - <select id="videoMode" style="display: none;"> - <option value="GLES2" selected="selected">WebGL</option> - <option value="GLES3">WebGL 2</option> - </select> <br /> - <img src="logo.svg" alt="Godot Engine logo" width="1024" height="414" style="width: auto; height: auto; max-width: 85%; max-height: 250px" /> + <img src="logo.svg" alt="Godot Engine logo" width="1024" height="414" style="width: auto; height: auto; max-width: min(85%, 50vh); max-height: 250px" /> <br /> @GODOT_VERSION@ <br /> @@ -230,6 +279,13 @@ <br /> <br /> <br /> + <label for="videoMode" style="margin-right: 1rem">Video driver:</label> + <select id="videoMode"> + <option value="" selected="selected">Auto</option> + <option value="opengl3">WebGL 2</option> + </select> + <br /> + <br /> <label for="zip-file" style="margin-right: 1rem">Preload project ZIP:</label> <input id="zip-file" type="file" name="files" style="margin-bottom: 1rem"/> <br /> <a href="demo.zip">(Try this for example)</a> @@ -269,13 +325,54 @@ <div id="status-notice" class="godot" style="display: none;"></div> </div> </div> - <script> + <script>//<![CDATA[ window.addEventListener("load", () => { + function notifyUpdate(sw) { + const btn = document.getElementById("btn-tab-update"); + btn.onclick = function () { + if (!window.confirm("Are you sure you want to update?\nClicking \"OK\" will reload all active instances!")) { + return; + } + sw.postMessage("update"); + btn.innerHTML = "Updating..."; + btn.disabled = true; + }; + btn.style.display = ""; + } if ("serviceWorker" in navigator) { - navigator.serviceWorker.register("service.worker.js"); + navigator.serviceWorker.register("service.worker.js").then(function (reg) { + if (reg.waiting) { + notifyUpdate(reg.waiting); + } + reg.addEventListener("updatefound", function () { + const update = reg.installing; + update.addEventListener("statechange", function () { + if (update.state === "installed") { + // It's a new install, claim and perform aggressive caching. + if (!reg.active) { + update.postMessage("claim"); + } else { + notifyUpdate(update); + } + } + }); + }); + }); + } + + if (localStorage.getItem("welcomeModalDismissed") !== 'true') { + document.getElementById("welcome-modal").style.display = "block"; + document.getElementById("welcome-modal-dismiss").focus(); } }); - </script> + + function closeWelcomeModal(dontShowAgain) { + document.getElementById("welcome-modal").style.display = "none"; + if (dontShowAgain) { + localStorage.setItem("welcomeModalDismissed", 'true'); + } + } + //]]></script> <script src="godot.tools.js"></script> <script>//<![CDATA[ @@ -283,7 +380,7 @@ var game = null; var setStatusMode; var setStatusNotice; - var video_driver = "GLES2"; + var video_driver = ""; function clearPersistence() { function deleteDB(path) { @@ -414,6 +511,15 @@ animationCallbacks.push(adjustCanvasDimensions); adjustCanvasDimensions(); + function replaceCanvas(from) { + const out = document.createElement("canvas"); + out.id = from.id; + out.tabIndex = from.tabIndex; + from.parentNode.replaceChild(out, from); + lastScale = 0; + return out; + } + setStatusMode = function setStatusMode(mode) { if (statusMode === mode || !initializing) return; @@ -469,6 +575,7 @@ 'canvas': gameCanvas, 'canvasResizePolicy': 1, 'onExit': function () { + gameCanvas = replaceCanvas(gameCanvas); setGameTabEnabled(false); showTab('editor'); game = null; @@ -483,9 +590,10 @@ const is_editor = args.filter(function(v) { return v == '--editor' || v == '-e' }).length != 0; const is_project_manager = args.filter(function(v) { return v == '--project-manager' }).length != 0; const is_game = !is_editor && !is_project_manager; - if (is_project_manager) { - args.push('--video-driver', video_driver); + if (video_driver) { + args.push('--rendering-driver', video_driver); } + if (is_game) { if (game) { console.error("A game is already running. Close it first"); @@ -496,7 +604,7 @@ showTab('game'); game.init().then(function() { requestAnimationFrame(function() { - game.start({'args': args}).then(function() { + game.start({'args': args, 'canvas': gameCanvas}).then(function() { gameCanvas.focus(); }); }); @@ -511,7 +619,7 @@ showTab('loader'); setLoaderEnabled(true); }; - editor.start({'args': args, 'persistentDrops': is_project_manager}); + editor.start({'args': args, 'persistentDrops': is_project_manager, 'canvas': editorCanvas}); }); }, 0); OnEditorExit = null; @@ -538,6 +646,7 @@ 'canvas': editorCanvas, 'canvasResizePolicy': 0, 'onExit': function() { + editorCanvas = replaceCanvas(editorCanvas); if (OnEditorExit) { OnEditorExit(); } @@ -569,10 +678,14 @@ } catch(e) { // File exists } - //selectVideoMode(); + selectVideoMode(); showTab('editor'); setLoaderEnabled(false); - editor.start({'args': ['--project-manager', '--video-driver', video_driver], 'persistentDrops': true}).then(function() { + const args = ['--project-manager', '--single-window']; + if (video_driver) { + args.push('--rendering-driver', video_driver); + } + editor.start({'args': args, 'persistentDrops': true}).then(function() { setStatusMode('hidden'); initializing = false; }); diff --git a/misc/dist/html/fixed-size.html b/misc/dist/html/fixed-size.html deleted file mode 100644 index 9d0a946497..0000000000 --- a/misc/dist/html/fixed-size.html +++ /dev/null @@ -1,389 +0,0 @@ -<!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> -<head> - <meta charset="utf-8" /> - <link id='-gd-engine-icon' rel='icon' type='image/png' href='favicon.png' /> - <title>$GODOT_PROJECT_NAME</title> - <style type="text/css"> - - body { - margin: 0; - border: 0 none; - padding: 0; - text-align: center; - background-color: #222226; - font-family: 'Noto Sans', Arial, sans-serif; - } - - - /* Godot Engine default theme style - * ================================ */ - - .godot { - color: #e0e0e0; - background-color: #3b3943; - background-image: linear-gradient(to bottom, #403e48, #35333c); - border: 1px solid #45434e; - box-shadow: 0 0 1px 1px #2f2d35; - } - - button.godot { - font-family: 'Droid Sans', Arial, sans-serif; /* override user agent style */ - padding: 1px 5px; - background-color: #37353f; - background-image: linear-gradient(to bottom, #413e49, #3a3842); - border: 1px solid #514f5d; - border-radius: 1px; - box-shadow: 0 0 1px 1px #2a2930; - } - - button.godot:hover { - color: #f0f0f0; - background-color: #44414e; - background-image: linear-gradient(to bottom, #494652, #423f4c); - border: 1px solid #5a5667; - box-shadow: 0 0 1px 1px #26252b; - } - - button.godot:active { - color: #fff; - background-color: #3e3b46; - background-image: linear-gradient(to bottom, #36343d, #413e49); - border: 1px solid #4f4c59; - box-shadow: 0 0 1px 1px #26252b; - } - - button.godot:disabled { - color: rgba(230, 230, 230, 0.2); - background-color: #3d3d3d; - background-image: linear-gradient(to bottom, #434343, #393939); - border: 1px solid #474747; - box-shadow: 0 0 1px 1px #2d2b33; - } - - - /* Canvas / wrapper - * ================ */ - - #container { - display: inline-block; /* scale with canvas */ - vertical-align: top; /* prevent extra height */ - position: relative; /* root for absolutely positioned overlay */ - margin: 0; - border: 0 none; - padding: 0; - background-color: #0c0c0c; - } - - #canvas { - display: block; - margin: 0 auto; - color: white; - } - - #canvas:focus { - outline: none; - } - - - /* Status display - * ============== */ - - #status { - position: absolute; - left: 0; - top: 0; - right: 0; - bottom: 0; - display: flex; - justify-content: center; - align-items: center; - /* don't consume click events - make children visible explicitly */ - visibility: hidden; - } - - #status-progress { - width: 244px; - height: 7px; - background-color: #38363A; - border: 1px solid #444246; - padding: 1px; - box-shadow: 0 0 2px 1px #1B1C22; - border-radius: 2px; - visibility: visible; - } - - #status-progress-inner { - height: 100%; - width: 0; - box-sizing: border-box; - transition: width 0.5s linear; - background-color: #202020; - border: 1px solid #222223; - box-shadow: 0 0 1px 1px #27282E; - border-radius: 3px; - } - - #status-indeterminate { - visibility: visible; - position: relative; - } - - #status-indeterminate > div { - width: 3px; - height: 0; - border-style: solid; - border-width: 6px 2px 0 2px; - border-color: #2b2b2b transparent transparent transparent; - transform-origin: center 14px; - position: absolute; - } - - #status-indeterminate > div:nth-child(1) { transform: rotate( 22.5deg); } - #status-indeterminate > div:nth-child(2) { transform: rotate( 67.5deg); } - #status-indeterminate > div:nth-child(3) { transform: rotate(112.5deg); } - #status-indeterminate > div:nth-child(4) { transform: rotate(157.5deg); } - #status-indeterminate > div:nth-child(5) { transform: rotate(202.5deg); } - #status-indeterminate > div:nth-child(6) { transform: rotate(247.5deg); } - #status-indeterminate > div:nth-child(7) { transform: rotate(292.5deg); } - #status-indeterminate > div:nth-child(8) { transform: rotate(337.5deg); } - - #status-notice { - margin: 0 100px; - line-height: 1.3; - visibility: visible; - padding: 4px 6px; - visibility: visible; - } - - - /* Debug output - * ============ */ - - #output-panel { - display: none; - max-width: 700px; - font-size: small; - margin: 6px auto 0; - padding: 0 4px 4px; - text-align: left; - line-height: 2.2; - } - - #output-header { - display: flex; - justify-content: space-between; - align-items: center; - } - - #output-container { - padding: 6px; - background-color: #2c2a32; - box-shadow: inset 0 0 1px 1px #232127; - color: #bbb; - } - - #output-scroll { - line-height: 1; - height: 12em; - overflow-y: scroll; - white-space: pre-wrap; - font-size: small; - font-family: "Lucida Console", Monaco, monospace; - } - </style> -$GODOT_HEAD_INCLUDE -</head> -<body> - <div id="container"> - <canvas id="canvas" width="640" height="480"> - HTML5 canvas appears to be unsupported in the current browser.<br /> - Please try updating or use a different browser. - </canvas> - <div id="status"> - <div id='status-progress' style='display: none;' oncontextmenu="event.preventDefault();"><div id ='status-progress-inner'></div></div> - <div id='status-indeterminate' style='display: none;' oncontextmenu="event.preventDefault();"> - <div></div> - <div></div> - <div></div> - <div></div> - <div></div> - <div></div> - <div></div> - <div></div> - </div> - <div id="status-notice" class="godot" style='display: none;'></div> - </div> - </div> - <div id="output-panel" class="godot"> - <div id="output-header"> - Output: - <button id='output-clear' class='godot' type='button' autocomplete='off'>Clear</button> - </div> - <div id="output-container"><div id="output-scroll"></div></div> - </div> - - <script type="text/javascript" src="$GODOT_BASENAME.js"></script> - <script type="text/javascript">//<![CDATA[ - - var engine = new Engine; - - (function() { - const EXECUTABLE_NAME = '$GODOT_BASENAME'; - const MAIN_PACK = '$GODOT_BASENAME.pck'; - const EXTRA_ARGS = JSON.parse('$GODOT_ARGS'); - const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED; - const INDETERMINATE_STATUS_STEP_MS = 100; - - var canvas = document.getElementById('canvas'); - var statusProgress = document.getElementById('status-progress'); - var statusProgressInner = document.getElementById('status-progress-inner'); - var statusIndeterminate = document.getElementById('status-indeterminate'); - var statusNotice = document.getElementById('status-notice'); - - var initializing = true; - var statusMode = 'hidden'; - var indeterminiateStatusAnimationId = 0; - - function setStatusMode(mode) { - if (statusMode === mode || !initializing) - return; - [statusProgress, statusIndeterminate, statusNotice].forEach(elem => { - elem.style.display = 'none'; - }); - if (indeterminiateStatusAnimationId !== 0) { - cancelAnimationFrame(indeterminiateStatusAnimationId); - indeterminiateStatusAnimationId = 0; - } - switch (mode) { - case 'progress': - statusProgress.style.display = 'block'; - break; - case 'indeterminate': - statusIndeterminate.style.display = 'block'; - indeterminiateStatusAnimationId = requestAnimationFrame(animateStatusIndeterminate); - break; - case 'notice': - statusNotice.style.display = 'block'; - break; - case 'hidden': - break; - default: - throw new Error("Invalid status mode"); - } - statusMode = mode; - } - - function animateStatusIndeterminate(ms) { - var i = Math.floor(ms / INDETERMINATE_STATUS_STEP_MS % 8); - if (statusIndeterminate.children[i].style.borderTopColor == '') { - Array.prototype.slice.call(statusIndeterminate.children).forEach(child => { - child.style.borderTopColor = ''; - }); - statusIndeterminate.children[i].style.borderTopColor = '#dfdfdf'; - } - requestAnimationFrame(animateStatusIndeterminate); - } - - function setStatusNotice(text) { - while (statusNotice.lastChild) { - statusNotice.removeChild(statusNotice.lastChild); - } - var lines = text.split('\n'); - lines.forEach((line, index) => { - statusNotice.appendChild(document.createTextNode(line)); - statusNotice.appendChild(document.createElement('br')); - }); - }; - - engine.setProgressFunc((current, total) => { - if (total > 0) { - statusProgressInner.style.width = current/total * 100 + '%'; - setStatusMode('progress'); - if (current === total) { - // wait for progress bar animation - setTimeout(() => { - setStatusMode('indeterminate'); - }, 500); - } - } else { - setStatusMode('indeterminate'); - } - }); - - if (DEBUG_ENABLED) { - var outputRoot = document.getElementById("output-panel"); - var outputScroll = document.getElementById("output-scroll"); - var OUTPUT_MSG_COUNT_MAX = 400; - - document.getElementById('output-clear').addEventListener('click', () => { - while (outputScroll.firstChild) { - outputScroll.firstChild.remove(); - } - }); - - outputRoot.style.display = 'block'; - - function print(text) { - while (outputScroll.childElementCount >= OUTPUT_MSG_COUNT_MAX) { - outputScroll.firstChild.remove(); - } - var msg = document.createElement("div"); - if (String.prototype.trim.call(text).startsWith("**ERROR**")) { - msg.style.color = "#d44"; - } else if (String.prototype.trim.call(text).startsWith("**WARNING**")) { - msg.style.color = "#ccc000"; - } else if (String.prototype.trim.call(text).startsWith("**SCRIPT ERROR**")) { - msg.style.color = "#c6d"; - } - msg.textContent = text; - var scrollToBottom = outputScroll.scrollHeight - (outputScroll.clientHeight + outputScroll.scrollTop) < 10; - outputScroll.appendChild(msg); - if (scrollToBottom) { - outputScroll.scrollTop = outputScroll.scrollHeight; - } - }; - - function printError(text) { - if (!String.prototype.trim.call(text).startsWith('**ERROR**: ')) { - text = '**ERROR**: ' + text; - } - print(text); - } - - engine.setStdoutFunc(text => { - print(text); - console.log(text); - }); - - engine.setStderrFunc(text => { - printError(text); - console.warn(text); - }); - } - - function displayFailureNotice(err) { - var msg = err.message || err; - if (DEBUG_ENABLED) { - printError(msg); - } - console.error(msg); - setStatusNotice(msg); - setStatusMode('notice'); - initializing = false; - }; - - if (!Engine.isWebGLAvailable()) { - displayFailureNotice("WebGL not available"); - } else { - setStatusMode('indeterminate'); - engine.setCanvas(canvas); - engine.startGame(EXECUTABLE_NAME, MAIN_PACK, EXTRA_ARGS).then(() => { - setStatusMode('hidden'); - initializing = false; - }, displayFailureNotice); - } - })(); - //]]></script> -</body> -</html> diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html index abc0479739..f385b82f1d 100644 --- a/misc/dist/html/full-size.html +++ b/misc/dist/html/full-size.html @@ -1,9 +1,8 @@ <!DOCTYPE html> -<html xmlns='http://www.w3.org/1999/xhtml' lang='' xml:lang=''> +<html xmlns='https://www.w3.org/1999/xhtml' lang='' xml:lang=''> <head> <meta charset='utf-8' /> <meta name='viewport' content='width=device-width, user-scalable=no' /> - <link id='-gd-engine-icon' rel='icon' type='image/png' href='favicon.png' /> <title>$GODOT_PROJECT_NAME</title> <style type='text/css'> @@ -81,6 +80,7 @@ } #status-indeterminate { + height: 42px; visibility: visible; position: relative; } diff --git a/misc/dist/html/manifest.json b/misc/dist/html/manifest.json index 0ca27b3742..ccfb793b20 100644 --- a/misc/dist/html/manifest.json +++ b/misc/dist/html/manifest.json @@ -5,8 +5,7 @@ "lang": "en", "start_url": "./godot.tools.html", "display": "standalone", - "orientation": "landscape", - "theme_color": "#478cbf", + "theme_color": "#202531", "icons": [ { "src": "favicon.png", diff --git a/misc/dist/html/offline-export.html b/misc/dist/html/offline-export.html new file mode 100644 index 0000000000..41ab42b04b --- /dev/null +++ b/misc/dist/html/offline-export.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>You are offline</title> + <style> + html { + background-color: #000000; + color: #ffffff; + } + + body { + font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + margin: 2rem; + } + + p { + margin-block: 1rem; + } + + button { + display: block; + padding: 1rem 2rem; + margin: 3rem auto 0; + } + </style> +</head> +<body> + <h1>You are offline</h1> + <p>This application requires an Internet connection to run for the first time.</p> + <p>Press the button below to try reloading:</p> + <button type="button">Reload</button> + + <script> + document.querySelector("button").addEventListener("click", () => { + window.location.reload(); + }); + </script> +</body> +</html> diff --git a/misc/dist/html/offline.html b/misc/dist/html/offline.html index 000c21b4d3..5cfc3362d9 100644 --- a/misc/dist/html/offline.html +++ b/misc/dist/html/offline.html @@ -4,6 +4,8 @@ <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="theme-color" content="#202531" /> + <meta name="msapplication-navbutton-color" content="#202531" /> <title>You are offline</title> <style> html { diff --git a/misc/dist/html/service-worker.js b/misc/dist/html/service-worker.js index d4eaed2b17..310574f21d 100644 --- a/misc/dist/html/service-worker.js +++ b/misc/dist/html/service-worker.js @@ -1,49 +1,48 @@ // This service worker is required to expose an exported Godot project as a // Progressive Web App. It provides an offline fallback page telling the user -// that they need an Internet conneciton to run the project if desired. +// that they need an Internet connection to run the project if desired. // Incrementing CACHE_VERSION will kick off the install event and force // previously cached resources to be updated from the network. const CACHE_VERSION = "@GODOT_VERSION@"; -const CACHE_NAME = "@GODOT_NAME@-cache"; -const OFFLINE_URL = "offline.html"; +const CACHE_PREFIX = "@GODOT_NAME@-sw-cache-"; +const CACHE_NAME = CACHE_PREFIX + CACHE_VERSION; +const OFFLINE_URL = "@GODOT_OFFLINE_PAGE@"; // Files that will be cached on load. -const CACHED_FILES = [ - "godot.tools.html", - "offline.html", - "godot.tools.js", - "godot.tools.worker.js", - "godot.tools.audio.worklet.js", - "logo.svg", - "favicon.png", -]; - +const CACHED_FILES = @GODOT_CACHE@; // Files that we might not want the user to preload, and will only be cached on first load. -const CACHABLE_FILES = [ - "godot.tools.wasm", -]; +const CACHABLE_FILES = @GODOT_OPT_CACHE@; const FULL_CACHE = CACHED_FILES.concat(CACHABLE_FILES); self.addEventListener("install", (event) => { - event.waitUntil(async function () { - const cache = await caches.open(CACHE_NAME); - // Clear old cache (including optionals). - await Promise.all(FULL_CACHE.map(path => cache.delete(path))); - // Insert new one. - const done = await cache.addAll(CACHED_FILES); - return done; - }()); + event.waitUntil(caches.open(CACHE_NAME).then(cache => cache.addAll(CACHED_FILES))); }); self.addEventListener("activate", (event) => { - event.waitUntil(async function () { - if ("navigationPreload" in self.registration) { - await self.registration.navigationPreload.enable(); - } - }()); - // Tell the active service worker to take control of the page immediately. - self.clients.claim(); + event.waitUntil(caches.keys().then( + function (keys) { + // Remove old caches. + return Promise.all(keys.filter(key => key.startsWith(CACHE_PREFIX) && key != CACHE_NAME).map(key => caches.delete(key))); + }).then(function() { + // Enable navigation preload if available. + return ("navigationPreload" in self.registration) ? self.registration.navigationPreload.enable() : Promise.resolve(); + }) + ); }); +async function fetchAndCache(event, cache, isCachable) { + // Use the preloaded response, if it's there + let response = await event.preloadResponse; + if (!response) { + // Or, go over network. + response = await self.fetch(event.request); + } + if (isCachable) { + // And update the cache + cache.put(event.request, response.clone()); + } + return response; +} + self.addEventListener("fetch", (event) => { const isNavigate = event.request.mode === "navigate"; const url = event.request.url || ""; @@ -53,32 +52,54 @@ self.addEventListener("fetch", (event) => { const isCachable = FULL_CACHE.some(v => v === local) || (base === referrer && base.endsWith(CACHED_FILES[0])); if (isNavigate || isCachable) { event.respondWith(async function () { - try { - // Use the preloaded response, if it's there - let request = event.request.clone(); - let response = await event.preloadResponse; - if (!response) { - // Or, go over network. - response = await fetch(event.request); - } - if (isCachable) { - // Update the cache - const cache = await caches.open(CACHE_NAME); - cache.put(request, response.clone()); - } - return response; - } catch (error) { - const cache = await caches.open(CACHE_NAME); - if (event.request.mode === "navigate") { - // Check if we have full cache. - const cached = await Promise.all(FULL_CACHE.map(name => cache.match(name))); - const missing = cached.some(v => v === undefined); - const cachedResponse = missing ? await caches.match(OFFLINE_URL) : await caches.match(CACHED_FILES[0]); - return cachedResponse; + // Try to use cache first + const cache = await caches.open(CACHE_NAME); + if (event.request.mode === "navigate") { + // Check if we have full cache during HTML page request. + const fullCache = await Promise.all(FULL_CACHE.map(name => cache.match(name))); + const missing = fullCache.some(v => v === undefined); + if (missing) { + try { + // Try network if some cached file is missing (so we can display offline page in case). + return await fetchAndCache(event, cache, isCachable); + } catch (e) { + // And return the hopefully always cached offline page in case of network failure. + console.error("Network error: ", e); + return await caches.match(OFFLINE_URL); + } } - const cachedResponse = await caches.match(event.request); - return cachedResponse; + } + const cached = await cache.match(event.request); + if (cached) { + return cached; + } else { + // Try network if don't have it in cache. + return await fetchAndCache(event, cache, isCachable); } }()); } }); + +self.addEventListener("message", (event) => { + // No cross origin + if (event.origin != self.origin) { + return; + } + const id = event.source.id || ""; + const msg = event.data || ""; + // Ensure it's one of our clients. + self.clients.get(id).then(function (client) { + if (!client) { + return; // Not a valid client. + } + if (msg === "claim") { + self.skipWaiting().then(() => self.clients.claim()); + } else if (msg === "clear") { + caches.delete(CACHE_NAME); + } else if (msg === "update") { + self.skipWaiting().then(() => self.clients.claim()).then(() => self.clients.matchAll()).then(all => all.forEach(c => c.navigate(c.url))); + } else { + onClientMessage(event); + } + }); +}); diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj index b9ad431e6e..69899cbe8d 100644 --- a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj +++ b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj @@ -45,6 +45,7 @@ D0BCFE3418AEBDA2004A7AAE /* $binary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "$binary.app"; sourceTree = BUILT_PRODUCTS_DIR; }; D0BCFE4318AEBDA2004A7AAE /* $binary-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "$binary-Info.plist"; sourceTree = "<group>"; }; D0BCFE4518AEBDA2004A7AAE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; + $pbx_locale_file_reference D0BCFE7718AEBFEB004A7AAE /* $binary.pck */ = {isa = PBXFileReference; lastKnownFileType = file; path = "$binary.pck"; sourceTree = "<group>"; }; $pbx_launch_screen_file_reference /* End PBXFileReference section */ @@ -207,6 +208,7 @@ isa = PBXVariantGroup; children = ( D0BCFE4518AEBDA2004A7AAE /* en */, + $pbx_locale_build_reference ); name = InfoPlist.strings; sourceTree = "<group>"; @@ -255,7 +257,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 11.0; OTHER_LDFLAGS = "$linker_flags"; SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "$targeted_device_family"; }; name = Debug; }; @@ -294,7 +296,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 11.0; OTHER_LDFLAGS = "$linker_flags"; SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "$targeted_device_family"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -308,6 +310,7 @@ CODE_SIGN_ENTITLEMENTS = "$binary/$binary.entitlements"; CODE_SIGN_IDENTITY = "$code_sign_identity_debug"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "$code_sign_identity_debug"; + CODE_SIGN_STYLE = "$code_sign_style_debug"; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; DEVELOPMENT_TEAM = $team_id; INFOPLIST_FILE = "$binary/$binary-Info.plist"; @@ -323,8 +326,8 @@ PRODUCT_BUNDLE_IDENTIFIER = $bundle_identifier; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = "$provisioning_profile_uuid_debug"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "armv7 armv7s arm64 i386 x86_64"; + TARGETED_DEVICE_FAMILY = "$targeted_device_family"; + VALID_ARCHS = "arm64 x86_64"; WRAPPER_EXTENSION = app; }; name = Debug; @@ -338,6 +341,7 @@ CODE_SIGN_ENTITLEMENTS = "$binary/$binary.entitlements"; CODE_SIGN_IDENTITY = "$code_sign_identity_release"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "$code_sign_identity_release"; + CODE_SIGN_STYLE = "$code_sign_style_release"; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; DEVELOPMENT_TEAM = $team_id; INFOPLIST_FILE = "$binary/$binary-Info.plist"; @@ -353,8 +357,8 @@ PRODUCT_BUNDLE_IDENTIFIER = $bundle_identifier; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = "$provisioning_profile_uuid_release"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "armv7 armv7s arm64 i386 x86_64"; + TARGETED_DEVICE_FAMILY = "$targeted_device_family"; + VALID_ARCHS = "arm64 x86_64"; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme b/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme index b6beeb012f..d61a53d5c2 100644 --- a/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme +++ b/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme @@ -23,7 +23,7 @@ </BuildActionEntries> </BuildAction> <TestAction - buildConfiguration = "Debug" + buildConfiguration = "$default_build_config" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -42,7 +42,7 @@ </AdditionalOptions> </TestAction> <LaunchAction - buildConfiguration = "Debug" + buildConfiguration = "$default_build_config" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" launchStyle = "0" @@ -67,7 +67,7 @@ </AdditionalOptions> </LaunchAction> <ProfileAction - buildConfiguration = "Debug" + buildConfiguration = "$default_build_config" shouldUseLaunchSchemeArgsEnv = "YES" savedToolIdentifier = "" useCustomWorkingDirectory = "NO" @@ -84,10 +84,10 @@ </BuildableProductRunnable> </ProfileAction> <AnalyzeAction - buildConfiguration = "Debug"> + buildConfiguration = "$default_build_config"> </AnalyzeAction> <ArchiveAction - buildConfiguration = "Debug" + buildConfiguration = "$default_build_config" revealArchiveInOrganizer = "YES"> </ArchiveAction> </Scheme> diff --git a/misc/dist/ios_xcode/godot_ios/dummy.cpp b/misc/dist/ios_xcode/godot_ios/dummy.cpp index acbf7f03d1..de5b02dc99 100644 --- a/misc/dist/ios_xcode/godot_ios/dummy.cpp +++ b/misc/dist/ios_xcode/godot_ios/dummy.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/misc/dist/linux/godot.6 b/misc/dist/linux/godot.6 index 4140094813..07e2a389a7 100644 --- a/misc/dist/linux/godot.6 +++ b/misc/dist/linux/godot.6 @@ -85,12 +85,6 @@ Force low\-DPI mode (macOS and Windows only). .TP \fB\-\-no\-window\fR Disable window creation (Windows only). Useful together with \fB\-\-script\fR. -.TP -\fB\-\-enable\-vsync\-via\-compositor\fR -When vsync is enabled, vsync via the OS' window compositor (Windows only). -.TP -\fB\-\-disable\-vsync\-via\-compositor\fR -Disable vsync via the OS' window compositor (Windows only). .SS "Debug options:" .TP \fB\-d\fR, \fB\-\-debug\fR @@ -156,9 +150,6 @@ Disallow dumping the base types (used with \fB\-\-doctool\fR). \fB\-\-build\-solutions\fR Build the scripting solutions (e.g. for C# projects). Implies \-\-editor and requires a valid project to edit. .TP -\fB\-\-gdnative\-generate\-json\-api\fR -Generate JSON dump of the Godot API for GDNative bindings. -.TP \fB\-\-test\fR <test> Run a unit test ('string', 'math', 'physics', 'physics_2d', 'render', 'oa_hash_map', 'gui', 'shaderlang', 'gd_tokenizer', 'gd_parser', 'gd_compiler', 'gd_bytecode', 'ordered_hash_map', 'astar'). .SH FILES diff --git a/misc/dist/linux/org.godotengine.Godot.appdata.xml b/misc/dist/linux/org.godotengine.Godot.appdata.xml index d0fb17433a..af647bc866 100644 --- a/misc/dist/linux/org.godotengine.Godot.appdata.xml +++ b/misc/dist/linux/org.godotengine.Godot.appdata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2017-2021 Rémi Verschelde <remi@godotengine.org> --> +<!-- Copyright 2017-2022 Rémi Verschelde <remi@godotengine.org> --> <component type="desktop"> <id>org.godotengine.Godot</id> <metadata_license>CC0-1.0</metadata_license> diff --git a/misc/dist/linux/org.godotengine.Godot.xml b/misc/dist/linux/org.godotengine.Godot.xml index 2f647f71a6..2f06bb3639 100644 --- a/misc/dist/linux/org.godotengine.Godot.xml +++ b/misc/dist/linux/org.godotengine.Godot.xml @@ -1,29 +1,38 @@ <?xml version="1.0"?> -<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> +<mime-info xmlns="https://specifications.freedesktop.org/shared-mime-info-spec"> <mime-type type="application/x-godot-project"> <comment>Godot Engine project</comment> - <icon name="x-godot-project" /> - <glob pattern="*.godot"/> + <sub-class-of type="text/plain"/> + <icon name="x-godot-project"/> + <glob pattern="project.godot"/> </mime-type> <mime-type type="application/x-godot-resource"> <comment>Godot Engine resource</comment> - <icon name="x-godot-resource" /> + <icon name="x-godot-resource"/> <glob pattern="*.res"/> <glob pattern="*.tres"/> </mime-type> <mime-type type="application/x-godot-scene"> <comment>Godot Engine scene</comment> - <icon name="x-godot-scene" /> + <icon name="x-godot-scene"/> <glob pattern="*.scn"/> <glob pattern="*.tscn"/> <glob pattern="*.escn"/> </mime-type> + <mime-type type="application/x-godot-shader"> + <comment>Godot Engine shader</comment> + <sub-class-of type="text/plain"/> + <icon name="x-godot-shader"/> + <glob pattern="*.gdshader"/> + </mime-type> + <mime-type type="application/x-gdscript"> <comment>GDScript script</comment> - <icon name="x-gdscript" /> + <sub-class-of type="text/plain"/> + <icon name="x-gdscript"/> <glob pattern="*.gd"/> </mime-type> </mime-info> diff --git a/misc/dist/osx/editor.entitlements b/misc/dist/osx/editor.entitlements new file mode 100644 index 0000000000..d0137910a3 --- /dev/null +++ b/misc/dist/osx/editor.entitlements @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>com.apple.security.cs.allow-dyld-environment-variables</key> + <true/> + <key>com.apple.security.cs.allow-jit</key> + <true/> + <key>com.apple.security.cs.allow-unsigned-executable-memory</key> + <true/> + <key>com.apple.security.cs.disable-executable-page-protection</key> + <true/> + <key>com.apple.security.cs.disable-library-validation</key> + <true/> + <key>com.apple.security.device.audio-input</key> + <true/> + <key>com.apple.security.device.camera</key> + <true/> +</dict> +</plist> diff --git a/misc/dist/osx_template.app/Contents/Info.plist b/misc/dist/osx_template.app/Contents/Info.plist index aad24935d0..542146cdb8 100644 --- a/misc/dist/osx_template.app/Contents/Info.plist +++ b/misc/dist/osx_template.app/Contents/Info.plist @@ -8,8 +8,8 @@ <string>$binary</string> <key>CFBundleName</key> <string>$name</string> - <key>CFBundleGetInfoString</key> - <string>$info</string> + <key>CFBundleDisplayName</key> + <string>$name</string> <key>CFBundleIconFile</key> <string>icon.icns</string> <key>CFBundleIdentifier</key> @@ -24,10 +24,7 @@ <string>$signature</string> <key>CFBundleVersion</key> <string>$version</string> - <key>NSMicrophoneUsageDescription</key> - <string>$microphone_usage_description</string> - <key>NSCameraUsageDescription</key> - <string>$camera_usage_description</string> +$usage_descriptions <key>NSHumanReadableCopyright</key> <string>$copyright</string> <key>CFBundleSupportedPlatforms</key> @@ -36,6 +33,8 @@ </array> <key>NSPrincipalClass</key> <string>NSApplication</string> + <key>LSApplicationCategoryType</key> + <string>public.app-category.$app_category</string> <key>LSMinimumSystemVersion</key> <string>10.12</string> <key>LSMinimumSystemVersionByArchitecture</key> @@ -44,6 +43,6 @@ <string>10.12</string> </dict> <key>NSHighResolutionCapable</key> - $highres +$highres </dict> </plist> diff --git a/misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json b/misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json index 6bf2edb02d..c4f8f71d0e 100644 --- a/misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json +++ b/misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json @@ -2,6 +2,6 @@ "file_format_version" : "1.0.0", "ICD": { "library_path": "../../../Frameworks/libMoltenVK.dylib", - "api_version" : "1.0.0" + "api_version" : "1.1.0" } } diff --git a/misc/dist/osx_tools.app/Contents/Info.plist b/misc/dist/osx_tools.app/Contents/Info.plist index 1c682f339f..886df87cc6 100644 --- a/misc/dist/osx_tools.app/Contents/Info.plist +++ b/misc/dist/osx_tools.app/Contents/Info.plist @@ -8,8 +8,6 @@ <string>Godot</string> <key>CFBundleName</key> <string>Godot</string> - <key>CFBundleGetInfoString</key> - <string>(c) 2007-2021 Juan Linietsky, Ariel Manzur & Godot Engine contributors</string> <key>CFBundleIconFile</key> <string>Godot.icns</string> <key>CFBundleIdentifier</key> @@ -31,13 +29,15 @@ <key>NSRequiresAquaSystemAppearance</key> <false/> <key>NSHumanReadableCopyright</key> - <string>© 2007-2021 Juan Linietsky, Ariel Manzur & Godot Engine contributors</string> + <string>© 2007-2022 Juan Linietsky, Ariel Manzur & Godot Engine contributors</string> <key>CFBundleSupportedPlatforms</key> <array> <string>MacOSX</string> </array> <key>NSPrincipalClass</key> <string>NSApplication</string> + <key>LSApplicationCategoryType</key> + <string>public.app-category.developer-tools</string> <key>LSMinimumSystemVersion</key> <string>10.12</string> <key>LSMinimumSystemVersionByArchitecture</key> @@ -82,7 +82,7 @@ <key>UTTypeReferenceURL</key> <string></string> <key>UTTypeDescription</key> - <string>Godot Scene</string> + <string>Godot Engine scene</string> <key>UTTypeIconFile</key> <string>Scene.icns</string> <key>UTTypeConformsTo</key> @@ -95,6 +95,7 @@ <array> <string>scn</string> <string>tscn</string> + <string>escn</string> </array> <key>public.mime-type</key> <string>application/x-godot-scene</string> @@ -106,7 +107,7 @@ <key>UTTypeReferenceURL</key> <string></string> <key>UTTypeDescription</key> - <string>Godot Script</string> + <string>GDScript script</string> <key>UTTypeIconFile</key> <string>GDScript.icns</string> <key>UTTypeConformsTo</key> @@ -120,7 +121,7 @@ <string>gd</string> </array> <key>public.mime-type</key> - <string>text/x-gdscript</string> + <string>application/x-gdscript</string> </dict> </dict> <dict> @@ -129,7 +130,7 @@ <key>UTTypeReferenceURL</key> <string></string> <key>UTTypeDescription</key> - <string>Godot Resource</string> + <string>Godot Engine resource</string> <key>UTTypeIconFile</key> <string>Resource.icns</string> <key>UTTypeConformsTo</key> @@ -149,11 +150,34 @@ </dict> <dict> <key>UTTypeIdentifier</key> + <string>public.gdshader</string> + <key>UTTypeReferenceURL</key> + <string></string> + <key>UTTypeDescription</key> + <string>Godot Engine shader</string> + <key>UTTypeIconFile</key> + <string>Shader.icns</string> + <key>UTTypeConformsTo</key> + <array> + <string>public.script</string> + </array> + <key>UTTypeTagSpecification</key> + <dict> + <key>public.filename-extension</key> + <array> + <string>gdshader</string> + </array> + <key>public.mime-type</key> + <string>application/x-godot-shader</string> + </dict> + </dict> + <dict> + <key>UTTypeIdentifier</key> <string>public.godot</string> <key>UTTypeReferenceURL</key> <string></string> <key>UTTypeDescription</key> - <string>Godot Project</string> + <string>Godot Engine project</string> <key>UTTypeIconFile</key> <string>Project.icns</string> <key>UTTypeConformsTo</key> @@ -167,7 +191,7 @@ <string>godot</string> </array> <key>public.mime-type</key> - <string>text/x-godot-project</string> + <string>application/x-godot-project</string> </dict> </dict> </array> diff --git a/misc/dist/osx_tools.app/Contents/Resources/Godot.icns b/misc/dist/osx_tools.app/Contents/Resources/Godot.icns Binary files differindex be9254630c..61697976c6 100644 --- a/misc/dist/osx_tools.app/Contents/Resources/Godot.icns +++ b/misc/dist/osx_tools.app/Contents/Resources/Godot.icns diff --git a/misc/dist/osx_tools.app/Contents/Resources/Shader.icns b/misc/dist/osx_tools.app/Contents/Resources/Shader.icns Binary files differnew file mode 100644 index 0000000000..a76e648a1a --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/Shader.icns diff --git a/misc/dist/osx_tools.app/Contents/Resources/af.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/af.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/af.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/az.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/az.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/az.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/br.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/br.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/br.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/da.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/da.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/da.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/de.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/de.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/de.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/el.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/el.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/el.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/en.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/en.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/en.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/es.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/es.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/et.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/et.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/et.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/he.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/he.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/he.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/id.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/id.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/id.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/is.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/is.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/is.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/it.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/it.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/it.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/km.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/km.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/km.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/or.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/or.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/or.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/si.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/si.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/si.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/te.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/te.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/te.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/th.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/th.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/th.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json b/misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json index 6bf2edb02d..c4f8f71d0e 100644 --- a/misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json +++ b/misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json @@ -2,6 +2,6 @@ "file_format_version" : "1.0.0", "ICD": { "library_path": "../../../Frameworks/libMoltenVK.dylib", - "api_version" : "1.0.0" + "api_version" : "1.1.0" } } diff --git a/misc/dist/osx_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings diff --git a/misc/dist/osx_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings b/misc/dist/osx_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/misc/dist/osx_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings diff --git a/misc/dist/shell/_godot.zsh-completion b/misc/dist/shell/_godot.zsh-completion index 8e14240b53..aaa5fe0a06 100644 --- a/misc/dist/shell/_godot.zsh-completion +++ b/misc/dist/shell/_godot.zsh-completion @@ -4,8 +4,8 @@ # To use it, install this file as `_godot` in a directory specified in your # `fpath` environment variable then restart your shell. # -# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. -# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). +# Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. +# Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -30,10 +30,11 @@ _arguments \ '(-h --help)'{-h,--help}'[display the full help message]' \ '--version[display the version string]' \ '(-v --verbose)'{-v,--verbose}'[use verbose stdout mode]' \ - '--quiet[quiet mode, silences stdout messages (errors are still displayed)]' \ + '(-q --quiet)'{-q,--quiet}'[quiet mode, silences stdout messages (errors are still displayed)]' \ '(-e --editor)'{-e,--editor}'[start the editor instead of running the scene]' \ '(-p --project-manager)'{-p,--project-manager}'[start the project manager, even if a project is auto-detected]' \ - '(-q --quit)'{-q,--quit}'[quit after the first iteration]' \ + '--debug-server[start the editor debug server]:editor debugger listen address' \ + '--quit[quit after the first iteration]' \ '(-l --language)'{-l,--language}'[use a specific locale (<locale> being a two-letter code)]:two-letter locale code' \ "--path[path to a project (<directory> must contain a 'project.godot' file)]:path to directory with 'project.godot' file:_dirs" \ '(-u --upwards)'{-u,--upwards}'[scan folders upwards for project.godot file]' \ @@ -42,23 +43,30 @@ _arguments \ '--remote-fs[use a remote filesystem]:remote filesystem address' \ '--remote-fs-password[password for remote filesystem]:remote filesystem password' \ '--audio-driver[set the audio driver]:audio driver name' \ - "--video-driver[set the video driver]:video driver name:((Vulkan\:'Vulkan renderer' GLES2\:'OpenGL ES 2.0 renderer'))" \ + '--display-driver[set the display driver]:display driver name' \ + "--rendering-driver[set the rendering driver]:rendering driver name:((vulkan\:'Vulkan renderer' opengl3\:'OpenGL ES 3.0 renderer' dummy\:'Dummy renderer'))" \ + "--gpu-index[use a specific GPU (run with --verbose to get available device list)]:device index" \ + '--text-driver[set the text driver]:text driver name' \ + '--tablet-driver[set the pen tablet input driver]:tablet driver name' \ + '--headless[enable headless mode (--display-driver headless --audio-driver Dummy), useful for servers and with --script]' \ '(-f --fullscreen)'{-f,--fullscreen}'[request fullscreen mode]' \ '(-m --maximized)'{-m,--maximized}'[request a maximized window]' \ '(-w --windowed)'{-w,--windowed}'[request windowed mode]' \ '(-t --always-on-top)'{-t,--always-on-top}'[request an always-on-top window]' \ '--resolution[request window resolution]:resolution in WxH format' \ '--position[request window position]:position in X,Y format' \ - '--low-dpi[force low-DPI mode (macOS and Windows only)]' \ - '--no-window[disable window creation (Windows only), useful together with --script]' \ - "--enable-vsync-via-compositor[when Vsync is enabled, Vsync via the OS' window compositor (Windows only)]" \ - "--disable-vsync-via-compositor[disable Vsync via the OS' window compositor (Windows only)]" \ + '--headless[enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script]' \ + '--single-window[use a single window (no separate subwindows)]' \ '(-d --debug)'{-d,--debug}'[debug (local stdout debugger)]' \ '(-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)]' \ '--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]' \ + '--debug-stringnames[print all StringName allocations to stdout when the engine quits]' \ '--frame-delay[simulate high CPU load (delay each frame by the given number of milliseconds)]:number of milliseconds' \ '--time-scale[force time scale (higher values are faster, 1.0 is normal speed)]:time scale' \ '--disable-render-loop[disable render loop so rendering only occurs when called explicitly from script]' \ @@ -67,11 +75,11 @@ _arguments \ '--print-fps[print the frames per second to the stdout]' \ '(-s, --script)'{-s,--script}'[run a script]:path to script:_files' \ '--check-only[only parse for errors and quit (use with --script)]' \ - '--export[export the project using the given preset and matching release template]:export preset name' \ - '--export-debug[same as --export, but using the debug template]:export preset name' \ - '--export-pack[same as --export, but only export the game pack for the given preset]:export preset name' \ - '--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:_dirs' \ + '--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' \ + '--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)]' \ - '--gdnative-generate-json-api[generate JSON dump of the Godot API for GDNative bindings]' \ - '--test[run a unit test]:unit test name' + '--dump-extension-api[generate JSON dump of the Godot API for GDExtension bindings named "extension_api.json" in the current folder]' \ + '--test[run all unit tests; run with "--test --help" for more information]' diff --git a/misc/dist/shell/godot.bash-completion b/misc/dist/shell/godot.bash-completion index 14f2be37b1..7927d26171 100644 --- a/misc/dist/shell/godot.bash-completion +++ b/misc/dist/shell/godot.bash-completion @@ -4,8 +4,8 @@ # To use it, install this file in `/etc/bash_completion.d` then restart your shell. # You can also `source` this file directly in your shell startup file. # -# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. -# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). +# Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. +# Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -36,6 +36,7 @@ _complete_godot_options() { --quiet --editor --project-manager +--debug-server --quit --language --path @@ -45,23 +46,30 @@ _complete_godot_options() { --remote-fs --remote-fs-password --audio-driver ---video-driver +--display-driver +--rendering-driver +--gpu-index +--text-driver +--tablet-driver +--headless --fullscreen --maximized --windowed --always-on-top --resolution --position ---low-dpi ---no-window ---enable-vsync-via-compositor ---disable-vsync-via-compositor +--headless +--single-window --debug --breakpoints --profiling +--gpu-profile +--vk-layers +--gpu-abort --remote-debug --debug-collisions --debug-navigation +--debug-stringnames --frame-delay --time-scale --disable-render-loop @@ -76,7 +84,7 @@ _complete_godot_options() { --doctool --no-docbase --build-solutions ---gdnative-generate-json-api +--dump-extension-api --test " -- "$1")) } @@ -102,10 +110,10 @@ _complete_godot_bash() { local IFS=$' \n\t' # shellcheck disable=SC2207 COMPREPLY=($(compgen -W "unsafe safe separate" -- "$cur")) - elif [[ $prev == "--video-driver" ]]; then + elif [[ $prev == "--rendering-driver" ]]; then local IFS=$' \n\t' # shellcheck disable=SC2207 - COMPREPLY=($(compgen -W "Vulkan GLES2" -- "$cur")) + COMPREPLY=($(compgen -W "vulkan opengl3 dummy" -- "$cur")) elif [[ $prev == "--path" || $prev == "--doctool" ]]; then local IFS=$'\n\t' # shellcheck disable=SC2207 diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish index a485a1dcdb..c05aa74017 100644 --- a/misc/dist/shell/godot.fish +++ b/misc/dist/shell/godot.fish @@ -2,8 +2,8 @@ # To use it, install this file in `~/.config/fish/completions` then restart your shell. # You can also `source` this file directly in your shell startup file. # -# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. -# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). +# Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. +# Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -23,10 +23,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -function godot_video_driver_args +function godot_rendering_driver_args # Use a function instead of a fixed string to customize the argument descriptions. - echo -e "Vulkan\tVulkan renderer" - echo -e "GLES2\tOpenGL ES 2.0 renderer" + echo -e "vulkan\tVulkan renderer" + echo -e "opengl3\tOpenGL ES 3.0 renderer" + echo -e "dummy\tDummy renderer" end # Erase existing completions for Godot. @@ -36,12 +37,13 @@ complete -c godot -e complete -c godot -s h -l help -d "Display the full help message" complete -c godot -l version -d "Display the version string" complete -c godot -s v -l verbose -d "Use verbose stdout mode" -complete -c godot -l quiet -d "Quiet mode, silences stdout messages (errors are still displayed)" +complete -c godot -s q -l quiet -d "Quiet mode, silences stdout messages (errors are still displayed)" # Run options: complete -c godot -s e -l editor -d "Start the editor instead of running the scene" complete -c godot -s p -l project-manager -d "Start the project manager, even if a project is auto-detected" -complete -c godot -s q -l quit -d "Quit after the first iteration" +complete -c godot -l debug-server -d "Start the editor debug server (<protocol>://<host/IP>[:<port>] address)" -x +complete -c godot -l quit -d "Quit after the first iteration" complete -c godot -s l -l language -d "Use a specific locale (<locale> being a two-letter code)" -x complete -c godot -l path -d "Path to a project (<directory> must contain a 'project.godot' file)" -r complete -c godot -s u -l upwards -d "Scan folders upwards for project.godot file" @@ -50,7 +52,12 @@ complete -c godot -l render-thread -d "Set the render thread mode" -x -a "unsafe complete -c godot -l remote-fs -d "Use a remote filesystem (<host/IP>[:<port>] address)" -x complete -c godot -l remote-fs-password -d "Password for remote filesystem" -x complete -c godot -l audio-driver -d "Set the audio driver" -x -complete -c godot -l video-driver -d "Set the video driver" -x -a "(godot_video_driver_args)" +complete -c godot -l display-driver -d "Set the display driver" -x +complete -c godot -l rendering-driver -d "Set the rendering driver" -x -a "(godot_rendering_driver_args)" +complete -c godot -l gpu-index -d "Use a specific GPU (run with --verbose to get available device list)" -x +complete -c godot -l text-driver -d "Set the text driver" -x +complete -c godot -l tablet-driver -d "Set the pen tablet input driver" -x +complete -c godot -l headless -d "Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script" # Display options: complete -c godot -s f -l fullscreen -d "Request fullscreen mode" @@ -59,18 +66,20 @@ complete -c godot -s w -l windowed -d "Request windowed mode" complete -c godot -s t -l always-on-top -d "Request an always-on-top window" complete -c godot -l resolution -d "Request window resolution" -x complete -c godot -l position -d "Request window position" -x -complete -c godot -l low-dpi -d "Force low-DPI mode (macOS and Windows only)" -complete -c godot -l no-window -d "Disable window creation (Windows only), useful together with --script" -complete -c godot -l enable-vsync-via-compositor -d "When Vsync is enabled, Vsync via the OS' window compositor (Windows only)" -complete -c godot -l disable-vsync-via-compositor -d "Disable Vsync via the OS' window compositor (Windows only)" +complete -c godot -l headless -d "Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script" +complete -c godot -l single-window -d "Use a single window (no separate subwindows)" # Debug options: 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 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" +complete -c godot -l debug-stringnames -d "Print all StringName allocations to stdout when the engine quits" complete -c godot -l frame-delay -d "Simulate high CPU load (delay each frame by the given number of milliseconds)" -x complete -c godot -l time-scale -d "Force time scale (higher values are faster, 1.0 is normal speed)" -x complete -c godot -l disable-render-loop -d "Disable render loop so rendering only occurs when called explicitly from script" @@ -87,5 +96,5 @@ complete -c godot -l export-pack -d "Same as --export, but only export the game 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)" -complete -c godot -l gdnative-generate-json-api -d "Generate JSON dump of the Godot API for GDNative bindings" -complete -c godot -l test -d "Run a unit test" -x +complete -c godot -l dump-extension-api -d "Generate JSON dump of the Godot API for GDExtension bindings named 'extension_api.json' in the current folder" +complete -c godot -l test -d "Run all unit tests; run with '--test --help' for more information" -x diff --git a/misc/dist/windows/modpath.pas b/misc/dist/windows/modpath.pas index c55ec60163..6d80d4201e 100644 --- a/misc/dist/windows/modpath.pas +++ b/misc/dist/windows/modpath.pas @@ -3,9 +3,9 @@ // Inno Setup Ver: 5.4.2 // Script Version: 1.4.2 // Author: Jared Breland <jbreland@legroom.net> -// Homepage: http://www.legroom.net/software +// Homepage: https://www.legroom.net/software // License: GNU Lesser General Public License (LGPL), version 3 -// http://www.gnu.org/licenses/lgpl.html +// https://www.gnu.org/licenses/lgpl.html // // Script Function: // Allow modification of environmental path directly from Inno Setup installers @@ -144,7 +144,7 @@ begin end; end; -// Split a string into an array using passed delimeter +// Split a string into an array using passed delimiter. procedure MPExplode(var Dest: TArrayOfString; Text: String; Separator: String); var i: Integer; diff --git a/misc/hooks/README.md b/misc/hooks/README.md index 5661c239ed..8732237244 100644 --- a/misc/hooks/README.md +++ b/misc/hooks/README.md @@ -12,8 +12,8 @@ contributors to make sure they comply with our requirements. `PATH`, or if you want to enable colored output with `pygmentize`. - Pre-commit hook for `black`: Applies `black` to the staged Python files before accepting a commit. -- Pre-commit hook for `makerst`: Checks the class reference syntax using - `makerst.py`. +- Pre-commit hook for `make_rst`: Checks the class reference syntax using + `make_rst.py`. ## Installation @@ -28,7 +28,7 @@ so they should work out of the box on Linux/macOS. #### Windows ##### clang-format -- Download LLVM for Windows (version 8 or later) from +- Download LLVM for Windows (version 13 or later) from <https://releases.llvm.org/download.html> - Make sure LLVM is added to the `PATH` during installation diff --git a/misc/hooks/canonicalize_filename.sh b/misc/hooks/canonicalize_filename.sh index 5eecabf5bc..fe66999d8c 100755 --- a/misc/hooks/canonicalize_filename.sh +++ b/misc/hooks/canonicalize_filename.sh @@ -13,10 +13,10 @@ # There should be no need to change anything below this line. # Canonicalize by recursively following every symlink in every component of the -# specified filename. This should reproduce the results of the GNU version of +# specified filename. This should reproduce the results of the GNU version of # readlink with the -f option. # -# Reference: http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac +# Reference: https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac canonicalize_filename () { local target_file="$1" local physical_directory="" diff --git a/misc/hooks/pre-commit b/misc/hooks/pre-commit index 40cb00253b..ab0fc8176f 100755 --- a/misc/hooks/pre-commit +++ b/misc/hooks/pre-commit @@ -14,7 +14,7 @@ # as this script. Hooks should return 0 if successful and nonzero to cancel the # commit. They are executed in the order in which they are listed. #HOOKS="pre-commit-compile pre-commit-uncrustify" -HOOKS="pre-commit-clang-format pre-commit-black pre-commit-makerst" +HOOKS="pre-commit-clang-format pre-commit-black pre-commit-make-rst" ########################################################### # There should be no need to change anything below this line. diff --git a/misc/hooks/pre-commit-black b/misc/hooks/pre-commit-black index 76d97294da..fd93bfe73c 100755 --- a/misc/hooks/pre-commit-black +++ b/misc/hooks/pre-commit-black @@ -14,7 +14,7 @@ DELETE_OLD_PATCHES=false # File types to parse. FILE_NAMES="SConstruct SCsub" -FILE_EXTS="py" +FILE_EXTS=".py" # Use pygmentize instead of cat to parse diff with highlighting. # Install it with `pip install pygments` (Linux) or `easy_install Pygments` (Mac) @@ -139,11 +139,11 @@ fi while true; do if [ $terminal = "0" ] ; then if [ -x "$ZENITY" ] ; then - ans=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage") + choice=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage") if [ "$?" = "0" ] ; then yn="Y" else - if [ "$ans" = "Apply and stage" ] ; then + if [ "$choice" = "Apply and stage" ] ; then yn="S" else yn="N" @@ -151,10 +151,10 @@ while true; do fi elif [ -x "$XMSG" ] ; then $XMSG -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?" - ans=$? - if [ "$ans" = "100" ] ; then + choice=$? + if [ "$choice" = "100" ] ; then yn="Y" - elif [ "$ans" = "200" ] ; then + elif [ "$choice" = "200" ] ; then yn="S" else yn="N" @@ -162,10 +162,10 @@ while true; do elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")" $PWSH -noprofile -executionpolicy bypass -file "$winmessage" -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?" - ans=$? - if [ "$ans" = "100" ] ; then + choice=$? + if [ "$choice" = "100" ] ; then yn="Y" - elif [ "$ans" = "200" ] ; then + elif [ "$choice" = "200" ] ; then yn="S" else yn="N" diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format index 7c6e5fcb42..2ee3f569d5 100755 --- a/misc/hooks/pre-commit-clang-format +++ b/misc/hooks/pre-commit-clang-format @@ -76,10 +76,11 @@ fi # To get consistent formatting, we recommend contributors to use the same # clang-format version as CI. -RECOMMENDED_CLANG_FORMAT_MAJOR="11" +RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="12" +RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="13" if [ ! -x "$CLANG_FORMAT" ] ; then - message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR.x.x." + message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX." if [ ! -t 1 ] ; then if [ -x "$ZENITY" ] ; then @@ -99,11 +100,15 @@ if [ ! -x "$CLANG_FORMAT" ] ; then exit 1 fi -CLANG_FORMAT_VERSION="$(clang-format --version | cut -d' ' -f3)" -CLANG_FORMAT_MAJOR="$(echo "$CLANG_FORMAT_VERSION" | cut -d'.' -f1)" +# The returned string can be inconsistent depending on where clang-format comes from. +# Example output strings reported by `clang-format --version`: +# - Ubuntu: "Ubuntu clang-format version 11.0.0-2" +# - Fedora: "clang-format version 11.0.0 (Fedora 11.0.0-2.fc33)" +CLANG_FORMAT_VERSION="$(clang-format --version | sed "s/[^0-9\.]*\([0-9\.]*\).*/\1/")" +CLANG_FORMAT_MAJOR="$(echo "$CLANG_FORMAT_VERSION" | cut -d. -f1)" -if [ "$CLANG_FORMAT_MAJOR" != "$RECOMMENDED_CLANG_FORMAT_MAJOR" ]; then - echo "Warning: Your clang-format binary is the wrong version ($CLANG_FORMAT_VERSION, expected $RECOMMENDED_CLANG_FORMAT_MAJOR.x.x)." +if [[ "$CLANG_FORMAT_MAJOR" -lt "$RECOMMENDED_CLANG_FORMAT_MAJOR_MIN" || "$CLANG_FORMAT_MAJOR" -gt "$RECOMMENDED_CLANG_FORMAT_MAJOR_MAX" ]]; then + echo "Warning: Your clang-format binary is the wrong version ($CLANG_FORMAT_VERSION, expected between $RECOMMENDED_CLANG_FORMAT_MAJOR_MIN and $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX)." echo " Consider upgrading or downgrading clang-format as formatting may not be applied correctly." fi @@ -141,7 +146,7 @@ do # +++ - timestamp # to both lines working on the same file and having a/ and b/ prefix. # Else it can not be applied with 'git apply'. - "$CLANG_FORMAT" -style=file "$file" | \ + "$CLANG_FORMAT" -style=file "$file" --Wno-error=unknown | \ diff -u "$file" - | \ sed -e "1s|--- |--- a/|" -e "2s|+++ -|+++ b/$file|" >> "$patch" done @@ -174,11 +179,11 @@ fi while true; do if [ $terminal = "0" ] ; then if [ -x "$ZENITY" ] ; then - ans=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage") + choice=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage") if [ "$?" = "0" ] ; then yn="Y" else - if [ "$ans" = "Apply and stage" ] ; then + if [ "$choice" = "Apply and stage" ] ; then yn="S" else yn="N" @@ -186,10 +191,10 @@ while true; do fi elif [ -x "$XMSG" ] ; then $XMSG -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?" - ans=$? - if [ "$ans" = "100" ] ; then + choice=$? + if [ "$choice" = "100" ] ; then yn="Y" - elif [ "$ans" = "200" ] ; then + elif [ "$choice" = "200" ] ; then yn="S" else yn="N" @@ -197,10 +202,10 @@ while true; do elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")" $PWSH -noprofile -executionpolicy bypass -file "$winmessage" -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?" - ans=$? - if [ "$ans" = "100" ] ; then + choice=$? + if [ "$choice" = "100" ] ; then yn="Y" - elif [ "$ans" = "200" ] ; then + elif [ "$choice" = "200" ] ; then yn="S" else yn="N" diff --git a/misc/hooks/pre-commit-makerst b/misc/hooks/pre-commit-make-rst index b990788b99..38b397c494 100755 --- a/misc/hooks/pre-commit-makerst +++ b/misc/hooks/pre-commit-make-rst @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Git pre-commit hook that checks the class reference syntax using makerst.py. +# Git pre-commit hook that checks the class reference syntax using make_rst.py. # Workaround because we can't execute the .py file directly on windows PYTHON=python @@ -9,4 +9,4 @@ if [[ "$py_ver" != "3" ]]; then PYTHON+=3 fi -$PYTHON doc/tools/makerst.py doc/classes modules --dry-run +$PYTHON doc/tools/make_rst.py doc/classes modules --dry-run diff --git a/misc/scripts/black_format.sh b/misc/scripts/black_format.sh index f93e8cbc2a..99343f1c5a 100755 --- a/misc/scripts/black_format.sh +++ b/misc/scripts/black_format.sh @@ -6,28 +6,20 @@ set -uo pipefail # Apply black. echo -e "Formatting Python files..." -PY_FILES=$(find \( -path "./.git" \ - -o -path "./thirdparty" \ - \) -prune \ - -o \( -name "SConstruct" \ - -o -name "SCsub" \ - -o -name "*.py" \ - \) -print) +PY_FILES=$(git ls-files -- '*SConstruct' '*SCsub' '*.py' ':!:.git/*' ':!:thirdparty/*') black -l 120 $PY_FILES -git diff > patch.patch +diff=$(git diff --color) # If no patch has been generated all is OK, clean up, and exit. -if [ ! -s patch.patch ] ; then +if [ -z "$diff" ] ; then printf "Files in this commit comply with the black style rules.\n" - rm -f patch.patch exit 0 fi # A patch 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" -cat patch.patch +echo "$diff" printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n" -rm -f patch.patch exit 1 diff --git a/misc/scripts/check_ci_log.py b/misc/scripts/check_ci_log.py new file mode 100755 index 0000000000..2c75b83bd7 --- /dev/null +++ b/misc/scripts/check_ci_log.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys + +if len(sys.argv) < 2: + print("ERROR: You must run program with file name as argument.") + sys.exit(50) + +fname = sys.argv[1] + +fileread = open(fname.strip(), "r") +file_contents = fileread.read() + +# If find "ERROR: AddressSanitizer:", then happens invalid read or write +# This is critical bug, so we need to fix this as fast as possible + +if file_contents.find("ERROR: AddressSanitizer:") != -1: + print("FATAL ERROR: An incorrectly used memory was found.") + sys.exit(51) + +# There is also possible, that program crashed with or without backtrace. + +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 +): + print("FATAL ERROR: Godot has been crashed.") + sys.exit(52) + +# Finding memory leaks in Godot is quite difficult, because we need to take into +# account leaks also in external libraries. They are usually provided without +# debugging symbols, so the leak report from it usually has only 2/3 lines, +# so searching for 5 element - "#4 0x" - should correctly detect the vast +# majority of memory leaks + +if file_contents.find("ERROR: LeakSanitizer:") != -1: + if file_contents.find("#4 0x") != -1: + print("ERROR: Memory leak was found") + sys.exit(53) + +# It may happen that Godot detects leaking nodes/resources and removes them, so +# this possibility should also be handled as a potential error, even if +# LeakSanitizer doesn't report anything + +if file_contents.find("ObjectDB instances leaked at exit") != -1: + print("ERROR: Memory leak was found") + sys.exit(54) + +# In test project may be put several assert functions which will control if +# project is executed with right parameters etc. which normally will not stop +# execution of project + +if file_contents.find("Assertion failed") != -1: + print("ERROR: Assertion failed in project, check execution log for more info") + sys.exit(55) + +# For now Godot leaks a lot of rendering stuff so for now we just show info +# about it and this needs to be re-enabled after fixing this memory leaks. + +if file_contents.find("were leaked") != -1 or file_contents.find("were never freed") != -1: + print("WARNING: Memory leak was found") + +sys.exit(0) diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh index 63c66d41c3..13b5ab79b6 100755 --- a/misc/scripts/clang_format.sh +++ b/misc/scripts/clang_format.sh @@ -4,55 +4,36 @@ # This is the primary script responsible for fixing style violations. set -uo pipefail -IFS=$'\n\t' -CLANG_FORMAT_FILE_EXTS=(".c" ".h" ".cpp" ".hpp" ".cc" ".hh" ".cxx" ".m" ".mm" ".inc" ".java" ".glsl") +# Loops through all code files tracked by Git. +git ls-files -- '*.c' '*.h' '*.cpp' '*.hpp' '*.cc' '*.hh' '*.cxx' '*.m' '*.mm' '*.inc' '*.java' '*.glsl' \ + ':!:.git/*' ':!:thirdparty/*' ':!:platform/android/java/lib/src/com/google/*' ':!:*-so_wrap.*' | +while read -r f; do + # Run clang-format. + clang-format --Wno-error=unknown -i "$f" -# Loops through all text files tracked by Git. -git grep -zIl '' | -while IFS= read -rd '' f; do - # Exclude some files. - if [[ "$f" == "thirdparty"* ]]; then + # Fix copyright headers, but not all files get them. + if [[ "$f" == *"inc" ]]; then continue - elif [[ "$f" == "platform/android/java/lib/src/com/google"* ]]; then + elif [[ "$f" == *"glsl" ]]; then continue - elif [[ "$f" == *"-so_wrap."* ]]; then + elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/input/InputManager"* ]]; then continue fi - for extension in ${CLANG_FORMAT_FILE_EXTS[@]}; do - if [[ "$f" == *"$extension" ]]; then - # Run clang-format. - clang-format -i "$f" - # Fix copyright headers, but not all files get them. - if [[ "$f" == *"inc" ]]; then - continue 2 - elif [[ "$f" == *"glsl" ]]; then - continue 2 - elif [[ "$f" == *"theme_data.h" ]]; then - continue 2 - elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/input/InputManager"* ]]; then - continue 2 - fi - python misc/scripts/copyright_headers.py "$f" - continue 2 - fi - done + python misc/scripts/copyright_headers.py "$f" done -git diff > patch.patch +diff=$(git diff --color) # If no patch has been generated all is OK, clean up, and exit. -if [ ! -s patch.patch ] ; then - printf "Files in this commit comply with the clang-format style rules.\n" - rm -f patch.patch +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. -printf "\n*** The following differences were found between the code " -printf "and the formatting rules:\n\n" -cat patch.patch -printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n" -rm -f patch.patch +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" exit 1 diff --git a/misc/scripts/clang_tidy.sh b/misc/scripts/clang_tidy.sh new file mode 100755 index 0000000000..e49f6ac9f4 --- /dev/null +++ b/misc/scripts/clang_tidy.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# This script runs clang-tidy on all relevant files in the repo. +# This is more thorough than clang-format and thus slower; it should only be run manually. + +set -uo pipefail + +# Loops through all code files tracked by Git. +git ls-files -- '*.c' '*.h' '*.cpp' '*.hpp' '*.cc' '*.hh' '*.cxx' '*.m' '*.mm' '*.inc' '*.java' '*.glsl' \ + ':!:.git/*' ':!:thirdparty/*' ':!:platform/android/java/lib/src/com/google/*' ':!:*-so_wrap.*' | +while read -r f; do + # Run clang-tidy. + clang-tidy --quiet --fix "$f" &> /dev/null + + # Run clang-format. This also fixes the output of clang-tidy. + clang-format --Wno-error=unknown -i "$f" +done + +diff=$(git diff --color) + +# If no patch 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. +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" +exit 1 diff --git a/misc/scripts/codespell.sh b/misc/scripts/codespell.sh new file mode 100644 index 0000000000..2822c6421b --- /dev/null +++ b/misc/scripts/codespell.sh @@ -0,0 +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,curvelinear,expct,fave,findn,gird,inout,lod,nd,numer,ois,ro,statics,te,varn" + +codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" diff --git a/misc/scripts/compare_extension_api.py b/misc/scripts/compare_extension_api.py new file mode 100755 index 0000000000..f96db4278c --- /dev/null +++ b/misc/scripts/compare_extension_api.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys + +# TODO: +# Add a process that compares the original godot-cpp/godot-headers/extension_api.json with the new extension_api.json (both passed as arguments) and reports any API calls that have been removed. +# If we only have additions or no changes to the file, we pass +# For now we deem this too early because the API isn't stable enough yet. + +sys.exit(0) diff --git a/misc/scripts/copyright_headers.py b/misc/scripts/copyright_headers.py index 2f3e4a1b6a..cf3adbfbfa 100755 --- a/misc/scripts/copyright_headers.py +++ b/misc/scripts/copyright_headers.py @@ -11,8 +11,8 @@ header = """\ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh index 795431cd28..0c7235817d 100755 --- a/misc/scripts/file_format.sh +++ b/misc/scripts/file_format.sh @@ -20,6 +20,11 @@ while IFS= read -rd '' f; do continue elif [[ "$f" == *"sln" ]]; then continue + elif [[ "$f" == *".bat" ]]; then + continue + elif [[ "$f" == *".out" ]]; then + # GDScript integration testing files. + continue elif [[ "$f" == *"patch" ]]; then continue elif [[ "$f" == *"pot" ]]; then @@ -42,10 +47,10 @@ while IFS= read -rd '' f; do perl -i -ple 's/\s*$//g' "$f" done -git diff > patch.patch +diff=$(git diff --color) # If no patch has been generated all is OK, clean up, and exit. -if [ ! -s patch.patch ] ; then +if [ -z "$diff" ] ; then printf "Files in this commit comply with the formatting rules.\n" rm -f patch.patch exit 0 @@ -54,7 +59,6 @@ fi # A patch 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" -cat patch.patch +echo "$diff" printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n" -rm -f patch.patch exit 1 diff --git a/misc/scripts/make_icons.sh b/misc/scripts/make_icons.sh index b590f03d38..cbb9266055 100755 --- a/misc/scripts/make_icons.sh +++ b/misc/scripts/make_icons.sh @@ -20,7 +20,7 @@ zip godot-icons.zip icon*.png icotool -c -o godot-icon.ico icon{16,24,32,48,64,128,256}.png # icns for macOS -# Only some sizes: http://iconhandbook.co.uk/reference/chart/osx/ +# Only some sizes: https://iconhandbook.co.uk/reference/chart/osx/ png2icns godot-icon.icns icon{16,32,128,256,512,1024}.png rm -f icon*.png diff --git a/misc/scripts/make_tarball.sh b/misc/scripts/make_tarball.sh new file mode 100755 index 0000000000..9e02b80af1 --- /dev/null +++ b/misc/scripts/make_tarball.sh @@ -0,0 +1,66 @@ +#!/bin/sh + +if [ ! -e "version.py" ]; then + echo "This script should be ran from the root folder of the Godot repository." + exit 1 +fi + +while getopts "h?sv:g:" opt; do + case "$opt" in + h|\?) + echo "Usage: $0 [OPTIONS...]" + echo + echo " -s script friendly file name (godot.tar.gz)" + echo " -v godot version for file name (e.g. 4.0-stable)" + echo " -g git treeish to archive (e.g. master)" + echo + exit 1 + ;; + s) + script_friendly_name=1 + ;; + v) + godot_version=$OPTARG + ;; + g) + git_treeish=$OPTARG + ;; + esac +done + +if [ ! -z "$git_treeish" ]; then + HEAD=$(git rev-parse $git_treeish) +else + HEAD=$(git rev-parse HEAD) +fi + +if [ ! -z "$script_friendly_name" ]; then + NAME=godot +else + if [ ! -z "$godot_version" ]; then + NAME=godot-$godot_version + else + NAME=godot-$HEAD + fi +fi + +CURDIR=$(pwd) +TMPDIR=$(mktemp -d -t godot-XXXXXX) + +echo "Generating tarball for revision $HEAD with folder name '$NAME'." +echo +echo "The tarball will be written to the parent folder:" +echo " $(dirname $CURDIR)/$NAME.tar.gz" + +git archive $HEAD --prefix=$NAME/ -o $TMPDIR/$NAME.tar + +# Adding custom .git/HEAD to tarball so that we can generate VERSION_HASH. +cd $TMPDIR +mkdir -p $NAME/.git +echo $HEAD > $NAME/.git/HEAD +tar -uf $NAME.tar $NAME + +cd $CURDIR +gzip -c $TMPDIR/$NAME.tar > ../$NAME.tar.gz + +rm -rf $TMPDIR |