summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/dist/html/editor.html42
-rw-r--r--misc/dist/osx/editor.entitlements12
-rw-r--r--misc/dist/osx/editor_mono.entitlements18
-rw-r--r--misc/dist/osx_tools.app/Contents/Resources/Godot.icnsbin67500 -> 271163 bytes
-rw-r--r--misc/hooks/README.md4
-rwxr-xr-xmisc/hooks/pre-commit2
-rwxr-xr-xmisc/hooks/pre-commit-clang-format10
-rwxr-xr-xmisc/hooks/pre-commit-make-rst (renamed from misc/hooks/pre-commit-makerst)4
-rwxr-xr-xmisc/scripts/clang_format.sh2
-rwxr-xr-xmisc/scripts/compare_extension_api.py11
10 files changed, 62 insertions, 43 deletions
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index 2cae215951..69e267f665 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -14,7 +14,7 @@
<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" />
@@ -269,11 +269,6 @@
<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" />
<br />
@@ -283,6 +278,14 @@
<br />
<br />
<br />
+ <label for="videoMode" style="margin-right: 1rem">Video driver:</label>
+ <select id="videoMode">
+ <option value="" selected="selected">Auto</option>
+ <option value="GLES2">WebGL</option>
+ <option value="GLES3">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>
@@ -348,7 +351,7 @@
var game = null;
var setStatusMode;
var setStatusNotice;
- var video_driver = "GLES2";
+ var video_driver = "";
function clearPersistence() {
function deleteDB(path) {
@@ -479,6 +482,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;
@@ -534,6 +546,7 @@
'canvas': gameCanvas,
'canvasResizePolicy': 1,
'onExit': function () {
+ gameCanvas = replaceCanvas(gameCanvas);
setGameTabEnabled(false);
showTab('editor');
game = null;
@@ -548,7 +561,7 @@
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) {
+ if (video_driver) {
args.push('--video-driver', video_driver);
}
if (is_game) {
@@ -561,7 +574,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();
});
});
@@ -576,7 +589,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;
@@ -603,6 +616,7 @@
'canvas': editorCanvas,
'canvasResizePolicy': 0,
'onExit': function() {
+ editorCanvas = replaceCanvas(editorCanvas);
if (OnEditorExit) {
OnEditorExit();
}
@@ -634,10 +648,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'];
+ if (video_driver) {
+ args.push('--video-driver', video_driver);
+ }
+ editor.start({'args': args, 'persistentDrops': true}).then(function() {
setStatusMode('hidden');
initializing = false;
});
diff --git a/misc/dist/osx/editor.entitlements b/misc/dist/osx/editor.entitlements
index 5496f65dcc..d0137910a3 100644
--- a/misc/dist/osx/editor.entitlements
+++ b/misc/dist/osx/editor.entitlements
@@ -2,11 +2,19 @@
<!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.device.audio-input</key>
+ <key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
- <key>com.apple.security.device.camera</key>
+ <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/editor_mono.entitlements b/misc/dist/osx/editor_mono.entitlements
deleted file mode 100644
index c61c287652..0000000000
--- a/misc/dist/osx/editor_mono.entitlements
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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-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_tools.app/Contents/Resources/Godot.icns b/misc/dist/osx_tools.app/Contents/Resources/Godot.icns
index be9254630c..61697976c6 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/Godot.icns
+++ b/misc/dist/osx_tools.app/Contents/Resources/Godot.icns
Binary files differ
diff --git a/misc/hooks/README.md b/misc/hooks/README.md
index 5661c239ed..e420c6cb5c 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
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-clang-format b/misc/hooks/pre-commit-clang-format
index 81bc412944..de5d9c3f06 100755
--- a/misc/hooks/pre-commit-clang-format
+++ b/misc/hooks/pre-commit-clang-format
@@ -76,11 +76,11 @@ fi
# To get consistent formatting, we recommend contributors to use the same
# clang-format version as CI.
-RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="11"
-RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="12"
+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
@@ -108,7 +108,7 @@ CLANG_FORMAT_VERSION="$(clang-format --version | sed "s/[^0-9\.]*\([0-9\.]*\).*/
CLANG_FORMAT_MAJOR="$(echo "$CLANG_FORMAT_VERSION" | cut -d. -f1)"
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.x.x and $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX.x.x)."
+ 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
@@ -146,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
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/clang_format.sh b/misc/scripts/clang_format.sh
index bcd63aa73b..b0020da597 100755
--- a/misc/scripts/clang_format.sh
+++ b/misc/scripts/clang_format.sh
@@ -23,7 +23,7 @@ while IFS= read -rd '' f; do
for extension in ${CLANG_FORMAT_FILE_EXTS[@]}; do
if [[ "$f" == *"$extension" ]]; then
# Run clang-format.
- clang-format -i "$f"
+ clang-format --Wno-error=unknown -i "$f"
# Fix copyright headers, but not all files get them.
if [[ "$f" == *"inc" ]]; then
continue 2
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)