summaryrefslogtreecommitdiff
path: root/misc/dist
diff options
context:
space:
mode:
Diffstat (limited to 'misc/dist')
-rw-r--r--misc/dist/html/editor.html95
-rw-r--r--misc/dist/html/manifest.json3
-rw-r--r--misc/dist/html/offline.html2
-rw-r--r--misc/dist/html/service-worker.js112
-rw-r--r--misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj8
-rw-r--r--misc/dist/ios_xcode/godot_ios/dummy.cpp4
-rw-r--r--misc/dist/linux/godot.63
-rw-r--r--misc/dist/linux/org.godotengine.Godot.appdata.xml2
-rw-r--r--misc/dist/linux/org.godotengine.Godot.desktop7
-rw-r--r--misc/dist/osx_template.app/Contents/Info.plist11
-rw-r--r--misc/dist/osx_tools.app/Contents/Info.plist4
-rw-r--r--misc/dist/osx_tools.app/Contents/Resources/en.lproj/InfoPlist.strings0
-rw-r--r--misc/dist/shell/_godot.zsh-completion34
-rw-r--r--misc/dist/shell/godot.bash-completion24
-rw-r--r--misc/dist/shell/godot.fish33
15 files changed, 241 insertions, 101 deletions
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index 8b077a5725..7c44dd45a1 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -9,8 +9,8 @@
<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" />
@@ -68,6 +68,11 @@
height: 100%;
overflow: auto;
background-color: hsla(0, 0%, 0%, 0.5);
+ text-align: left;
+ }
+
+ .welcome-modal-title {
+ text-align: center;
}
.welcome-modal-content {
@@ -238,7 +243,7 @@
onclick="if (event.target === this) closeWelcomeModal(false)"
>
<div class="welcome-modal-content">
- <h2 id="welcome-modal-title">Important - Please read before continuing</h2>
+ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read before continuing</h2>
<div id="welcome-modal-description">
<p>
The Godot Web Editor has some limitations compared to the native version.
@@ -254,9 +259,38 @@
>Web editor documentation</a> for usage instructions and limitations.
</p>
</div>
- <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem">
- OK, don't show again
- </button>
+ <div id="welcome-modal-description-no-cross-origin-isolation" style="display: none">
+ <p>
+ The web server does not support cross-origin isolation,
+ which is required for the Godot Web Editor to function.
+ </p>
+ <p>
+ <strong>Reasons for cross-origin isolation being disabled:</strong>
+ <ul>
+ <li id="welcome-modal-reason-not-secure">
+ This page is not served from a secure context (HTTPS <i>or</i> localhost).
+ </li>
+ <li>
+ This page may not be served with cross-origin isolation headers
+ (check with the developer tools' Network tab).
+ </li>
+ </ul>
+ </p>
+ <p>
+ If you are self-hosting the web editor,
+ refer to
+ <a
+ href="https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#threads"
+ target="_blank"
+ rel="noopener"
+ >Exporting for the Web - Threads</a> for more information.
+ </p>
+ </div>
+ <div style="text-align: center">
+ <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem">
+ OK, don't show again
+ </button>
+ </div>
</div>
</div>
<div id="tabs-buttons">
@@ -265,12 +299,13 @@
<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">
<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 />
@@ -324,13 +359,51 @@
<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') {
+ if (!crossOriginIsolated) {
+ // Display error dialog as threading support is required for the editor.
+ setButtonEnabled('startButton', false);
+ document.getElementById("welcome-modal-description").style.display = "none";
+ document.getElementById("welcome-modal-description-no-cross-origin-isolation").style.display = "block";
+ document.getElementById("welcome-modal-dismiss").style.display = "none";
+ document.getElementById("welcome-modal-reason-not-secure").style.display = window.isSecureContext ? "none" : "list-item";
+ }
+
+ if (!crossOriginIsolated || localStorage.getItem("welcomeModalDismissed") !== 'true') {
document.getElementById("welcome-modal").style.display = "block";
document.getElementById("welcome-modal-dismiss").focus();
}
@@ -342,7 +415,7 @@
localStorage.setItem("welcomeModalDismissed", 'true');
}
}
- </script>
+ //]]></script>
<script src="godot.tools.js"></script>
<script>//<![CDATA[
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.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 063e40a6cb..310574f21d 100644
--- a/misc/dist/html/service-worker.js
+++ b/misc/dist/html/service-worker.js
@@ -4,7 +4,8 @@
// 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 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_CACHE@;
@@ -13,26 +14,35 @@ 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 || "";
@@ -42,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 fd69725a21..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>";
@@ -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";
@@ -324,7 +327,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "$provisioning_profile_uuid_debug";
TARGETED_DEVICE_FAMILY = "$targeted_device_family";
- VALID_ARCHS = "armv7 armv7s arm64 i386 x86_64";
+ 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";
@@ -354,7 +358,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "$provisioning_profile_uuid_release";
TARGETED_DEVICE_FAMILY = "$targeted_device_family";
- VALID_ARCHS = "armv7 armv7s arm64 i386 x86_64";
+ VALID_ARCHS = "arm64 x86_64";
WRAPPER_EXTENSION = app;
};
name = Release;
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 3e5bdefdce..07e2a389a7 100644
--- a/misc/dist/linux/godot.6
+++ b/misc/dist/linux/godot.6
@@ -150,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.desktop b/misc/dist/linux/org.godotengine.Godot.desktop
index 8b74234174..db0c80e4f1 100644
--- a/misc/dist/linux/org.godotengine.Godot.desktop
+++ b/misc/dist/linux/org.godotengine.Godot.desktop
@@ -1,7 +1,13 @@
[Desktop Entry]
Name=Godot Engine
GenericName=Libre game engine
+GenericName[el]=Ελεύθερη μηχανή παιχνιδιού
+GenericName[fr]=Moteur de jeu libre
+GenericName[zh_CN]=自由的游戏引擎
Comment=Multi-platform 2D and 3D game engine with a feature-rich editor
+Comment[el]=2D και 3D μηχανή παιχνιδιού πολλαπλών πλατφορμών με επεξεργαστή πλούσιο σε χαρακτηριστικά
+Comment[fr]=Moteur de jeu 2D et 3D multiplateforme avec un éditeur riche en fonctionnalités
+Comment[zh_CN]=多平台 2D 和 3D 游戏引擎,带有功能丰富的编辑器
Exec=godot %f
Icon=godot
Terminal=false
@@ -9,3 +15,4 @@ PrefersNonDefaultGPU=true
Type=Application
MimeType=application/x-godot-project;
Categories=Development;IDE;
+StartupWMClass=Godot
diff --git a/misc/dist/osx_template.app/Contents/Info.plist b/misc/dist/osx_template.app/Contents/Info.plist
index 8e221df946..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>
@@ -46,6 +43,6 @@
<string>10.12</string>
</dict>
<key>NSHighResolutionCapable</key>
- $highres
+$highres
</dict>
</plist>
diff --git a/misc/dist/osx_tools.app/Contents/Info.plist b/misc/dist/osx_tools.app/Contents/Info.plist
index 923bc7312a..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 &amp; Godot Engine contributors</string>
<key>CFBundleIconFile</key>
<string>Godot.icns</string>
<key>CFBundleIdentifier</key>
@@ -31,7 +29,7 @@
<key>NSRequiresAquaSystemAppearance</key>
<false/>
<key>NSHumanReadableCopyright</key>
- <string>© 2007-2021 Juan Linietsky, Ariel Manzur &amp; Godot Engine contributors</string>
+ <string>© 2007-2022 Juan Linietsky, Ariel Manzur &amp; Godot Engine contributors</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
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/shell/_godot.zsh-completion b/misc/dist/shell/_godot.zsh-completion
index 8f42c3a1a2..6444ca337e 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,21 +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)]' \
'--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]' \
+ '--gpu-validation[enable graphics API validation layers for debugging]' \
+ '--gpu-abort[abort on graphics API usage errors (usually validation layer errors)]' \
'--remote-debug[enable remote debugging]:remote debugger address' \
'--debug-collisions[show collision shapes when running the scene]' \
'--debug-navigation[show navigation polygons when running the scene]' \
+ '--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]' \
@@ -65,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 0a31c545e1..31e067e29a 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,21 +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
--headless
+--single-window
--debug
--breakpoints
--profiling
+--gpu-profile
+--gpu-validation
+--gpu-abort
--remote-debug
--debug-collisions
--debug-navigation
+--debug-stringnames
--frame-delay
--time-scale
--disable-render-loop
@@ -74,7 +84,7 @@ _complete_godot_options() {
--doctool
--no-docbase
--build-solutions
---gdnative-generate-json-api
+--dump-extension-api
--test
" -- "$1"))
}
@@ -100,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 b44762c4ab..da4ce1190c 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,16 +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 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 gpu-validation -d "Enable graphics API validation layers for debugging"
+complete -c godot -l gpu-abort -d "Abort on graphics API usage errors (usually validation layer errors)"
complete -c godot -l remote-debug -d "Enable remote debugging"
complete -c godot -l debug-collisions -d "Show collision shapes when running the scene"
complete -c godot -l debug-navigation -d "Show navigation polygons when running the scene"
+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"
@@ -85,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