Commit graph

215 commits

Author SHA1 Message Date
Hugo Locurcio 1b7d42c99e
Print colored diffs when there are formatting failures in CI
This makes diffs more readable in CI logs.

(cherry picked from commit 38424714b1)
2021-09-29 08:57:25 +02:00
Rémi Verschelde 22c9ef8f0f
Bump version to 3.3.4-rc 2021-08-19 18:51:41 +02:00
Rémi Verschelde edef9a9c86
Add script to make source tarball with .git/HEAD
This allows to generate the `VERSION_HASH` constant with the Git commit hash
even when building from a source tarball which is not a Git repository (and
without dependency on Git itself).

(cherry picked from commit 9a71038e34)
2021-08-03 09:29:10 +02:00
Aaron Franke 752c1451db
[3.x] Allow reading shaders from .gdshader files
(cherry picked from commit 7dc2edc430)
2021-07-20 12:00:16 +02:00
Hugo Locurcio 5738d6ee6e
Allow clang-format 12 in the pre-commit hook
clang-format 12's formatting is identical to clang-format 11's.

(cherry picked from commit d74413ebd0)
2021-06-07 22:56:01 +02:00
Rémi Verschelde 3117f04759
Bump version to 3.3.3-rc 2021-05-24 18:25:08 +02:00
Rémi Verschelde 7678e73398
Dist: Add macOS entitlements files for editor code signing
These are the entitlements we define for official macOS editor builds since
Godot 3.3.

Users making custom builds of the engine can use those files with `codesign` to
sign their own builds. E.g.:
```
codesign --force --timestamp \
  --options=runtime --entitlements editor.entitlements \
  -s <your key> -v osx_template.app
```

(cherry picked from commit 6999e332e4)
2021-05-22 19:10:53 +02:00
Rémi Verschelde 337ef03958
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```

(cherry picked from commit eb78f80f03)
2021-05-20 14:36:39 +02:00
Rémi Verschelde 0f3f706ca6
Bump version to 3.3.2-rc 2021-05-19 14:56:50 +02:00
Hugo Locurcio c93b8be3b6
Fix Ubuntu clang-format version detection in the pre-commit hook
(cherry picked from commit 61aa09097f)
2021-05-10 17:47:36 +02:00
Fabio Alessandrelli 488f448fbb
[HTML5] Remove "fixed-size.html".
No longer used in 3.3+.

(cherry picked from commit 3faf8d6e40)
2021-05-09 16:27:48 +02:00
Rémi Verschelde 5a26bcda12
OSX: Clarify min version requirement (10.12) in Info.plist
The min requirement was upped by #45618 to have proper support for C++14.

Related to #48222.

(cherry picked from commit 8851fa7808)
2021-04-27 13:42:57 +02:00
Rémi Verschelde 0ecbf77e30
Bump version to 3.3.1-rc
Directly RC as we'll keep changes conservative to keep this branch usable
in production at any time.
2021-04-22 15:30:52 +02:00
Hugo Locurcio 1304b85c63
Add a welcome dialog to the HTML5 editor
This modal dialog displayed when the page is loaded. It can be
dismissed permanently by clicking the "OK, don't show again" button.
Clicking outside the modal will only dismiss it once.

This dialog is used to remind people that the HTML5 editor is still in
release candidate stage and isn't considered production-ready yet.

(cherry picked from commit 8b08146894)
2021-04-20 20:12:52 +02:00
Rémi Verschelde 1d20bba0c4
HTML5: Fix link to documentation on editor template 2021-03-30 11:47:43 +02:00
Hugo Locurcio 4126d27468
Add Open Graph metadata to the HTML5 editor
- Consistently use double quotes in the HTML markup.
- Define English language to assist screen readers and search engines.
- Add missing `alt` text for the logo image.
- Remove duplicate `id` for the preload project ZIP input.

(cherry picked from commit 197d391f08)
2021-03-26 13:47:53 +01:00
Rémi Verschelde 015973df04
doc: Make all tutorial links point to 3.3 branch of docs 2021-03-26 10:43:43 +01:00
Fabio Alessandrelli 193233e893
[HTML5] Clarify editor PWA manifest.json
Update name and description to clarify it's the web version.

(cherry picked from commit ecb792b1da)
2021-03-24 11:53:08 +01:00
Fabio Alessandrelli 3ed72c3ef4
[HTML5] Fix bogus Web Editor manifest.
The `start_url` in the PWA manifest.json must be relative for it to
work in subfolders (like in the official Web Editor page).

(cherry picked from commit 85c1a41021)
2021-03-17 17:08:23 +01:00
Rémi Verschelde 0341251d0f
Bump version to 3.3-rc
We decided to rename the upcoming 3.2.4 release to 3.3 to better reflect that
it is a significant feature release, and not a maintenance update.

The `3.2` branch was also renamed to `3.x` and will now be the development
branch for future 3.x releases (3.3, 3.4, etc.).
2021-03-16 12:16:36 +01:00
Rémi Verschelde c7c7a0b822
clang-format: Fix version number in hook warning
(cherry picked from commit f4d46f6290)
2021-03-14 12:03:21 +01:00
Fabio Alessandrelli 64feaed39b [HTML5] Drag and drop zip in project manager.
With a very nice hack, a new hidden configuration option that delays
dropped files removal at exit.

This still leaks while the project manager is running, but will clear
memory as soon as it exits or load something.
(reminder, dropped files are reguarly removed after the signal is
emitted specifically to avoid leaks, but I prefer hacking the HTML5
config then the project manager).

(cherry picked from commit f1e810adcb)
2021-03-12 10:43:52 +01:00
Fabio Alessandrelli d942d553ef [HTML5] Add PWA support to the editor page.
This allows to install it as an app, and provide offline support (after
the first run).
Practically, this boils down to adding a JSON file as a manifest, an
offline page to be displayed when the cached files are not avaialble,
and a JS file to cache resources and return them.

The reason for the "first run requirements" is that some browsers, will
emit an "install" by just visiting the page (to see if the JS code is
compatibile), and we do not want to force casual visitors to just
download the 10 MiB+ compressed editor WebAssembly file without pressing
the start button.

Special thanks to Hugo Locurcio (Calinou) for the initial work.
2021-03-08 17:06:41 +01:00
Fabio Alessandrelli e3664e971b [HTML5] Make editor HTML build tag scons4-proof.
We used to have it like `$GODOT_VERSION` which caused inconsistencies
between different scons versions when substituting it.
It's now `@GODOT_VERSION@`, which is safe on both scons3 and scons4.

(cherry picked from commit 4404eb57e4)
2021-02-26 15:22:51 +01:00
Hugo Locurcio 3b4dd88e56 Improve the editor HTML template
- Darken the header tab background to match the default editor
  background color.
- Hide the distracting focus outlines for the editor and game canvas.
- Use a pure black background for the game canvas to better distinguish it
  from the editor and provide a more neutral background.
- Use a bold font weight for the Start Godot editor button on the
  loader page.
- Link to the web editor documentation on the loader page.
- Clarify what happens when clicking "OK" in the persistent data removal
  warning dialog.
- Tidy up the HTML template by removing obsolete attributes.

(cherry picked from commit 3527756943)
2021-02-25 22:37:49 +01:00
Riteo Siuga 6d7b25b98a Improve the MIME source file
- Add MIME definitions for resources, scenes and scripts
- Remove the "weight" property, which defaults to 50, a much saner value than the previous 100, which was a bit excessive.
- Changes their icon names in order to follow the XDG icon naming conventions.

(cherry picked from commit 876e165a49)
2021-02-25 15:14:32 +01:00
Marcel Admiraal 95272e11c4 Remove unused variables from full-size.html
(cherry picked from commit 548edfc4fe)
2021-02-22 10:18:26 +01:00
Fabio Alessandrelli 45a67fab35 [HTML5] Better fullscreen, canvas resizing.
Three canvas resize policies:
- `None`: Godot window settings are ignored.
- `Project`: Godot handles the canvas like a native app (resizing it
  when setting the window size).
- `Adaptive`: Canvas size will always adapt to browser window size.

Use `None` if you want to control the canvas size with custom JavaScript
code.
2021-02-19 05:13:44 +01:00
Fabio Alessandrelli 1eef8a318b [HTML5] Easier HTML templates, better deinit/cleanup. 2021-02-19 05:13:44 +01:00
Rémi Verschelde ad7710ae5e
Dynamically load libudev.so.1 on Linux if udev=yes
This makes it possibly to run Linux binaries compiled with udev support on
Linux systems which do not provide udev (typically systemd-less distros).

If udev is missing, we fall back to parsing `/dev/input` like when compiled
without udev support (`udev=no`).

Also adding some verbose debug statements to know which method we're using
when debugging Linux joypad issues.

The libudev so wrappers were generated on Mageia 8 with libudev 246.9 using
https://github.com/hpvb/dynload-wrapper:
```
./generate-wrapper.py --include /usr/include/libudev.h --sys-include '<libudev.h>' \
  --soname libudev.so.1 --init-name libudev --omit-prefix gnu_ \
  --output-header libudev-so_wrap.h --output-implementation libudev-so_wrap.c
```

(cherry picked from commits a10c259c1d
and e26a1f807b)

Edit: Updated to version 0.2 of dynload-wrapper to fix symbols clobbering as
done in #46143.
2021-02-18 10:31:31 +01:00
Hein-Pieter van Braam-Stewart 228803e9db Dynamically load libpulse.so.0 and libasound.so.1 on Linux
By generating stubs using https://github.com/hpvb/dynload-wrapper we
can dynamically load libpulse and libasound on systems where it is available.
Both are still a build-time requirement but no longer a run-time dependency.

For maintenance purposes the wrappers should not need to be re-generated
unless we want to bump pulse or asound to an incompatible version. It is
unlikely we will want to do this any time soon.

cherry-pick from 09f82fa6ea
2021-02-17 10:31:52 +01:00
Danil Alexeev 1fa8595bff
Change logo in the About dialog box (return Godot's teeth)
(cherry picked from commit c553ca54d5)

And fixup previous bogus cherry-pick that included merge conflicts.
2021-02-16 14:27:39 +01:00
Fabio Alessandrelli 5abe08f484
[HTML5] Editor: ensure canvas focus when switching tabs.
(cherry picked from commit b148ea2a64)
2021-02-11 13:17:08 +01:00
Fabio Alessandrelli cd2a996d9e
[HTML5] Fix web editor "clear persistent data".
Was broken after update to new persistent path "/home/web_user".

(cherry picked from commit 7866cd5881)
2021-02-11 13:12:06 +01:00
Fabio Alessandrelli 2668ca7a8c [HTML5] Make home path persistent in editor.
We used to only persist specific sub-folder of /home/web_user/ when
running the Web Editor. This resulted in bad UX about default project
creation path etc.
This PR makes the whole folder persistent, move the zip preloading to a
different folder (to avoid persisting it), and automatically prompt the
user to import it if present.
2021-02-03 17:18:28 +01:00
Rémi Verschelde c2ea80348c
Revert "[3.2] Add separate simulator flag for iOS build, change main library to xcframework." 2021-01-27 21:53:16 +01:00
Hugo Locurcio 3a3e796485
Check for clang-format version in the pre-commit hook
Different clang-format versions may result in different formatting.
Therefore, it's recommended to use the same version as used in CI.

(cherry picked from commit 3333b58a7f)
2021-01-26 17:00:17 +01:00
Rémi Verschelde 9f2c24e8ce
Cleanup: Remove executable bit from files which don't need it
Drop unused xpmfix.sh script.

(cherry picked from commit 76c6007aa6)
2021-01-26 17:00:15 +01:00
bruvzg 389a4bfa59
[3.2] Add separate simulator flag for iOS build, change main library to xcframework format. 2021-01-26 16:00:26 +02:00
Fabio Alessandrelli 276b831c45 [HTML5] Better editor HTML, small refactor.
Side and GDNative libraries are now added by engine.js , the dynlink pre
js had been deleted.
2021-01-25 20:16:44 +01:00
Sergey Minakov d5047603a3 iOS Export: export modification to support plugins
Added plugin configuration.
Export options now use plugins that could be enabled/disabled.
Plugin changes are observed at runtime.
2021-01-14 15:38:05 +03:00
Sergey Minakov 614f701373 iOS Modules: separate main platform code from modules
Moved previously builtin modules 'GameCenter', 'AppStore', 'iCloud' to separate modules to be represented as plugin.
Modified 'ARKit' and 'Camera' to not be builtin into engine and work as plugin.
Changed platform code so it's not affected by the move.
Modified Xcode project file to remove parameters that doesn't make any effect.
Added basic '.gdip' plugin config file.
2021-01-14 15:30:00 +03:00
Hugo Locurcio 49c2f2fec2
Make links on the HTML5 editor more readable
This also tweaks the focus style to apply to all elements for
better keyboard navigation.

(cherry picked from commit 663466b882)
2021-01-13 16:17:08 +01:00
Rémi Verschelde 49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Hugo Locurcio 3db7ff3d82
Fix and decrease Godot logo size in the HTML5 editor loader
The logo can no longer overflow the viewport.

(cherry picked from commit d80224934e)
2020-12-29 16:02:02 +01:00
Lorenzo Cerqua 70af74587a
Remove two very slightly displaced duplicate vertices on Gobot's face
They didn't show up at all in the rendered PNG, but were pretty annoying when working with Gobot face on Inkscape

(cherry picked from commit 17b9cb2cdf)
2020-12-29 13:54:08 +01:00
Fabio Alessandrelli 6936ac9d5d [HTML5] Add logo and favicon to editor html. 2020-12-09 18:09:30 +01:00
Hugo Locurcio 295b16dcf2 [HTML5] Improve the editor HTML template. 2020-12-09 15:35:17 +01:00
Fabio Alessandrelli b4b1df613e [HTML5] Editor also persists cache. 2020-12-09 13:47:23 +01:00
Fabio Alessandrelli 4ad95cc039 [HTML5] EditorRunNative works with GDNative.
This "breaks" our loading bar logic (libraries are not counted).
Fixing it is non trivial and probably deserves investigating a different
strategy.
2020-12-05 01:00:29 +01:00