Commit graph

254 commits

Author SHA1 Message Date
Fabio Alessandrelli
09386ba9fd [Headless] Add --headless switch (no rendering, no audio).
Also remove now unused "--no-window" option, and relative OS getter and
setter.
2021-08-03 17:45:50 +02:00
Rafał Mikrut
e8877806ec Fix 'Attempted to remove invalid ID' errors 2021-07-31 15:30:31 +02:00
Michael Alexsander
a47e48987d Properly tag project files as a subclass of plain text in the MIME info 2021-07-29 19:18:24 -03:00
Michael Alexsander
0218616747 Make some small tweaks to the MIME info 2021-07-29 12:06:35 -03:00
Rémi Verschelde
9a71038e34
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).
2021-07-29 11:52:43 +02:00
luz paz
3564c16cb8
Fix various typos with codespell
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-25 11:21:51 +02:00
Hendrik Brucker
043ae91560 Restructure and reimplement vsync options
-Add a v-sync mode setting which allows to choose between DISABLED, ON, ADAPTIVE and MAILBOX
-Removed the V-Sync via Compositor option
2021-07-06 16:34:26 +02:00
bruvzg
cb480376d8 Add LSApplicationCategoryType to the template and export dialog. 2021-06-14 14:28:34 +03:00
Hugo Locurcio
d74413ebd0
Allow clang-format 12 in the pre-commit hook
clang-format 12's formatting is identical to clang-format 11's.
2021-06-07 16:59:52 +02:00
Rémi Verschelde
c1c76850cb
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.
2021-06-07 11:03:08 +02:00
Rémi Verschelde
875ed4d600
Merge pull request #47336 from Calinou/rename-shader-file-extension
Rename the `.shader` file extension to `.gdshader`
2021-06-04 11:26:14 +02:00
Rémi Verschelde
f7bcada709
Merge pull request #49137 from RandomShaper/ios_targeted_family
Add iOS export option for device family
2021-05-31 10:34:49 +02:00
Pedro J. Estébanez
19ae8193ee Add iOS export option for device family 2021-05-27 11:46:22 +02:00
Pedro J. Estébanez
1534b4e65e Set schemes' build config to debug/release in iOS Xcode export 2021-05-25 10:26:54 +02:00
Rémi Verschelde
6999e332e4
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
```
2021-05-20 16:10:12 +02:00
Rémi Verschelde
4219a4cb6f
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
```
2021-05-20 12:38:56 +02:00
Hugo Locurcio
61aa09097f
Fix Ubuntu clang-format version detection in the pre-commit hook 2021-05-10 17:05:46 +02:00
Fabio Alessandrelli
3faf8d6e40 [HTML5] Remove "fixed-size.html".
No longer used in 3.3+.
2021-05-07 13:17:54 +02:00
Fabio Alessandrelli
88c060b00d [HTML5] Export as Progressive Web App.
Adds possibility to export as a progressive web app.
Allows customizing base icons, display mode, orientation and offline
page.
2021-04-27 14:44:31 +02:00
Fabio Alessandrelli
5d095ed21d [HTML5] Optional icon generation, use export name for it.
We used to only generate the favicon if it was specified in the user
project settings, now it's optional, will export it to `NAME.icon.png`,
(falling back to the default project icon if none is set in project
settings), and the `<link>` tag is added using the `$HEAD_INCLUDE`
instead of being hardcoded in the template.
2021-04-27 11:50:11 +02:00
Fabio Alessandrelli
0ee744ff5f
Merge pull request #47069 from Calinou/html5-editor-welcome-dialog
Add a welcome dialog to the HTML5 editor
2021-04-17 14:43:16 +02:00
Rafał Mikrut
599d96163c Test Godot with Vulkan in CI 2021-04-15 16:17:28 +02:00
bruvzg
f4026ba404
[macOS] Update required Vulkan API version the ICD configs. 2021-04-14 08:35:44 +03:00
Hugo Locurcio
b191a7547c
Rename the .shader file extension to .gdshader
This lets third-party software recognize Godot shaders more easily,
without relying on guesswork since the `.shader` extension is generic.
2021-03-24 21:33:44 +01:00
Hugo Locurcio
197d391f08
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.
2021-03-24 18:42:41 +01:00
Fabio Alessandrelli
ecb792b1da [HTML5] Clarify editor PWA manifest.json
Update name and description to clarify it's the web version.
2021-03-24 11:35:19 +01:00
Hugo Locurcio
8b08146894
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.
2021-03-17 21:50:18 +01:00
Fabio Alessandrelli
85c1a41021 [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).
2021-03-17 16:49:31 +01:00
Rémi Verschelde
f4d46f6290
clang-format: Fix version number in hook warning 2021-03-14 01:07:14 +01:00
Fabio Alessandrelli
f1e810adcb [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).
2021-03-12 10:16:02 +01:00
Fabio Alessandrelli
d8bd54fbf2 [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:24 +01:00
Fabio Alessandrelli
4404eb57e4 [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.
2021-02-26 15:08:47 +01:00
Hugo Locurcio
3527756943
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.
2021-02-24 22:50:49 +01:00
Rémi Verschelde
3357c4d28c
Merge pull request #45871 from Riteo/improve-mime-types
General improvements to the MIME source file
2021-02-24 13:04:55 +01:00
Marcel Admiraal
548edfc4fe Remove unused variables from full-size.html 2021-02-21 16:02:15 +00:00
Fabio Alessandrelli
65abf94675 [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:12:32 +01:00
Fabio Alessandrelli
2972ea3229 [HTML5] Easier HTML templates, better deinit/cleanup. 2021-02-19 05:12:32 +01:00
Rémi Verschelde
ab4f5c0668
Merge pull request #46117 from akien-mga/dynamic-load-libudev
Dynamically load libudev.so.1 on Linux
2021-02-17 13:40:15 +01:00
Rémi Verschelde
a10c259c1d
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
```
2021-02-17 13:14:59 +01:00
Rémi Verschelde
1efb4ee6b3
Merge pull request #46050 from akien-mga/ci-simplify-file_format
CI: Remove file_format.sh changes hard to reproduce on Windows
2021-02-17 13:10:27 +01:00
Hein-Pieter van Braam-Stewart
09f82fa6ea 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.

This closes #20978
2021-02-16 20:31:49 +01:00
Rémi Verschelde
aed41cdfc9
CI: Remove file_format.sh changes hard to reproduce on Windows
Until we provide a cross-platform pre-commit hook that can perform those changes
on Windows, this only leads to a lot of frustration from Windows contributors.

The UTF-8, newline and EOF and BOM checks are still good to keep as those are
issues that we'd otherwise have to point out manually in the review.
The removed changes are mostly cosmetic and should be handled by clang-format
ideally, or by some self-developed cross-platform tooling.
2021-02-15 13:34:27 +01:00
Danil Alexeev
c553ca54d5 Change logo in the About dialog box (return Godot's teeth) 2021-02-14 18:50:05 +03:00
Fabio Alessandrelli
b148ea2a64 [HTML5] Editor: ensure canvas focus when switching tabs. 2021-02-11 13:10:18 +01:00
Fabio Alessandrelli
7866cd5881 [HTML5] Fix web editor "clear persistent data".
Was broken after update to new persistent path "/home/web_user".
2021-02-11 08:25:19 +01:00
Riteo Siuga
876e165a49 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.
2021-02-09 00:06:42 +01:00
Fabio Alessandrelli
95d2102565 [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 18:59:54 +01:00
Rémi Verschelde
6525662f27
Merge pull request #45141 from Calinou/clang-format-hook-check-version
Check for clang-format version in the pre-commit hook
2021-01-26 15:26:46 +01:00
Rémi Verschelde
7086d72e13
Merge pull request #45277 from bruvzg/ios_arm64_sim
Add separate `simulator` flag for iOS build, change main library to `xcframework`.
2021-01-26 14:02:16 +01:00
Fabio Alessandrelli
4e09453407 [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:15:57 +01:00