Commit graph

282 commits

Author SHA1 Message Date
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
Rémi Verschelde
76c6007aa6
Cleanup: Remove executable bit from files which don't need it
Drop unused xpmfix.sh script.
2021-01-19 23:36:42 +01:00
bruvzg
efd8f27790
[WIP] Add separate simulator flag for iOS build, change main library to xcframework format. 2021-01-18 10:36:14 +02:00
Hugo Locurcio
3333b58a7f
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.
2021-01-12 21:40:46 +01:00
Hugo Locurcio
663466b882
Make links on the HTML5 editor more readable
This also tweaks the focus style to apply to all elements for
better keyboard navigation.
2021-01-07 18:46:26 +01:00
Rémi Verschelde
b5334d14f7
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 🎆
2021-01-01 20:19:21 +01:00
Hugo Locurcio
d80224934e
Fix and decrease Godot logo size in the HTML5 editor loader
The logo can no longer overflow the viewport.
2020-12-26 17:51:42 +01:00
Lorenzo Cerqua
17b9cb2cdf 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
2020-12-11 07:05:54 +01:00
Fabio Alessandrelli
6bc07cf777 [HTML5] Add logo and favicon to editor html. 2020-12-09 17:54:50 +01:00
Hugo Locurcio
e31c6d484e [HTML5] Improve the editor HTML template. 2020-12-09 15:35:57 +01:00
Fabio Alessandrelli
f579b1d1f8 [HTML5] Editor also persists cache. 2020-12-09 14:27:41 +01:00
Fabio Alessandrelli
611c4998e8 [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 00:55:07 +01:00
Marcel Admiraal
f42284ed07 Add missing javascript semi-colons. 2020-11-17 18:18:46 +00:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Aaron Franke
66e3060ea1
Add line removal around braces to the file formatting script 2020-11-16 23:27:44 -05:00
Rémi Verschelde
fa698151cf
Merge pull request #42863 from Calinou/add-windows-installer-files
Add files to create a Windows editor installer using Inno Setup
2020-11-16 13:03:24 +01:00
Sergey Minakov
1f94a59859 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.
2020-11-10 16:40:01 +03:00
Sergey Minakov
30783d57cc 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.
2020-11-10 16:28:29 +03:00
Hugo Locurcio
a1d9c67f43
Optimize SVG using svgcleaner --multipass
This decreases the editor binary size by about 8 KB.
2020-10-25 10:02:37 +01:00
Rémi Verschelde
5f19e1d571
CI: Refactor Android workflow, use pre-installed SDK and NDK
No need to waste time downloading all this when it's readily available :)
Also use the official action to setup Java 8.

Also build both architectures (armv7 and arm64v8) and generate the APK,
so we can upload it.

Remove now unused and outdated `misc/ci/android-tools-linux.sh`.
2020-10-22 17:21:59 +02:00
Hugo Locurcio
8baa303d15
Add files to create a Windows editor installer using Inno Setup
This partially addresses
https://github.com/godotengine/godot-proposals/issues/1432.

To fully address the proposal above, official Windows installers will
have to be compiled and distributed.
2020-10-19 14:53:59 +02:00
Fabio Alessandrelli
3dfb769115 Add JavaScript editor html file. 2020-10-14 11:20:50 +02:00
Sergey Minakov
3cd1cb53a0 iOS: Refactoring
Enabled ARC for iOS.
Weakify/Strongify macros for objc blocks.
Removed old version checks.
Specific types for ObjC++ modules to exclude unneeded bridging.
Separate DeviceMetrics class for device specific data.
Replaced old/deprecated functionality.
2020-10-02 15:04:51 +03:00
Fabio Alessandrelli
53f04aa1b9 Make canvas resize optional in HTML5. 2020-09-23 09:51:06 +02:00
Fabio Alessandrelli
806edcae5b Better HiDPI support in HTML5. 2020-09-23 09:51:06 +02:00
Marcel Admiraal
1739f10459 Remove unused variable in fixed-size.html. 2020-09-10 08:02:06 +01:00
Marcel Admiraal
64095245ee Explicitly add implicitly added semicolons. 2020-09-09 15:30:57 +01:00
Hazar
5e5100afca
fix GDScript UTI
changed from public.data to public.script
2020-08-19 21:27:22 +03:00
Gordon MacPherson
974a4cde9d update to use scons compile db tool 2020-08-12 15:11:45 +01:00
Hugo Locurcio
4dc6efc08e
Fix inconsistent indentation in the FreeDesktop MIME type XML 2020-08-10 23:04:13 +02:00
Aaron Franke
05a418f9e6
Fix incorrect comments in file formatting script 2020-07-28 03:16:36 -04:00
Rémi Verschelde
bd9fc75768
Merge pull request #40706 from akien-mga/style-fix-file_format-macos
Fix code format scripts compat with non-GNU Unices
2020-07-27 13:27:56 +02:00
Rémi Verschelde
c71e189efd Style: Fix code format scripts compat with non-GNU Unices
It's too hard to get compatibility between GNU and BSD sed,
so let's just use perl oneliners.

And improve it to also remove trailing tabs, not just spaces.
2020-07-27 13:11:44 +02:00
Sergey Minakov
fe60815d66 iOS SCons: static Vulkan binary usage
Add VMA to iphone platform Use linkflag for iphone building to enforce static linking. Works fine with dynamic '.framework' library
Updated xcode project to use '.a' static library
2020-07-25 21:55:25 +02:00
Sergey Minakov
8e82ab4bf5 iOS Vulkan: copy icd to app 2020-07-25 21:55:23 +02:00
Sergey Minakov
8dc2b267f9 iOS Export: MoltenVK framework for Vulkan support 2020-07-25 21:55:18 +02:00
Rémi Verschelde
431930bd09 CI: Drop AppVeyor and desktop Travis builds
These have been replaced by GitHub Actions.
The remaining Travis builds will also be ported eventually.
2020-07-20 10:35:53 +02:00
RevoluPowered
d560f654ff fix CI builds on linux by using ubuntu default apt repositories 2020-07-20 09:51:12 +02:00
Rémi Verschelde
3ed5ff244f
Merge pull request #40298 from Calinou/optimize-ios-splash
Optimize the default iOS splash images
2020-07-14 19:39:28 +02:00
Aaron Franke
16f7b464b6
Remove Travis CI style checks and unnecessary scripts 2020-07-13 14:14:11 -04:00
Aaron Franke
9986439352
Commit other files changed by file_format.sh 2020-07-13 14:14:11 -04:00
Aaron Franke
d8b65461e3
Commit only the SVG files changed by file_format.sh
There were a lot of SVG files changed by file_format.sh
2020-07-13 14:08:55 -04:00
Aaron Franke
79a2e4c1ab
Add static formatting checks for GitHub Actions 2020-07-13 14:06:13 -04:00
Hugo Locurcio
2b3c9944b1
Optimize the default iOS splash images
Command used:

    parallel oxipng -o6 --strip --zopfli ::: **/*.png

This saves about 14 KB in total.
2020-07-11 22:31:17 +02:00
Sergey Minakov
d4c541c25a iOS Export: add option to use storyboard for launch screen 2020-07-07 01:46:26 +03:00
Rémi Verschelde
64aa25b2e5
Merge pull request #40050 from naithar/feature/ios-gdnative-master-2
[4.0] Add support of iOS's dynamic libraries to GDNative
2020-07-03 07:48:13 +02:00
Sergey Minakov
864224a5c1 iOS Export: Updated Info.plist. Framework embedding. Fixes for search paths 2020-07-02 12:56:11 +03:00
bruvzg
00299f15b4
[macOS] Add support for the Apple Silicon (ARM64) build target. 2020-06-29 12:33:51 +03:00
Sergey Minakov
488879f52b Export: Fix iOS enabling push notifications capability 2020-06-23 12:48:44 +03:00
Sergey Minakov
6a01fbc9a7 Export: Remove system frameworks from xcode template 2020-06-23 12:48:44 +03:00
Hugo Locurcio
fdb89a3f9a Rename "Identifier" to "Bundle Identifier" in macOS/iOS export presets
"Bundle Identifier" is more well-understood among macOS and iOS
developers and is less ambiguous.

This is a slight breaking change as export presets will need to be
updated to account for this change.

See https://github.com/godotengine/godot-docs/pull/3295.
2020-06-19 09:59:38 +02:00
Rémi Verschelde
22c718ab17 SCons: Improve registration of compilation_db tool, check version
There's a builtin `toolpath` option we can use for that, so no need to hack
around a custom `scons_site` path.

The script requires SCons 3.1.1 or later, so we enable it conditionally.

Follow-up to #32848.
2020-05-18 14:11:19 +02:00
Rémi Verschelde
2231673d42
Merge pull request #37099 from Faless/js/debugger_4.0
WebSocket profiler for HTML5 platform [4.0]
2020-05-12 18:02:38 +02:00
Fabio Alessandrelli
3097c2da96 Add WebSocket debugger, use it for Javascript. 2020-05-12 15:09:13 +02:00
RevoluPowered
5a6f275b74 Added compilation database support for clang and gcc
This tool is originally from mongodb.

- Updated CPPSUFFIXES to use scons suffixes
- objective-c files will also be loaded into the compilation database where the compiler / tooling is available to compile the files.

Known limitations:

- This will not work with msvc as your compiler.
2020-05-12 13:07:50 +02:00
Fabio Alessandrelli
7411e7fd37 DisplayServerJavaScript implementation. 2020-05-10 18:22:48 +02:00
Hugo Locurcio
b896ca8722
Request the dedicated GPU when starting Godot from the .desktop file
See <https://www.hadess.net/2020/05/dual-gpu-support-launch-on-discrete-gpu.html>
for more information on this newly added `.desktop` entry property.
2020-05-06 21:09:40 +02:00
Max Hilbrunner
23b7670d32
Merge pull request #35382 from Calinou/html5-export-title-tag
Set the `title` tag in the HTML5 export immediately
2020-04-26 18:23:35 +02:00
bruvzg
05f041127d
Git Hooks: Suppress "which" error messages. 2020-04-24 20:11:53 +03:00
Hugo Locurcio
eecce139ea Set the title tag in the HTML5 export immediately
This makes the project title display without having to wait for
the project to finish loading.
2020-04-22 11:31:14 +02:00
bruvzg
fdad0e3bd1
Git Hooks: Add support for GUI git clients.
[ci skip]
2020-04-21 16:24:33 +03:00
Rémi Verschelde
ca896ddbf0 Android: Bump build tools to 29.0.3 2020-04-14 13:47:13 +02:00
Rémi Verschelde
526deb724a Travis: Re-enable Android builds 2020-04-09 22:50:18 +02:00
Rémi Verschelde
8dd58a6157
Merge pull request #37153 from neikeq/mono_ios-4.0
[master] Mono/C#: Add iOS support
2020-03-31 14:17:27 +02:00
Rémi Verschelde
0926c192e8 Style: Add black format to fix_style.sh
Also ignore new Android build artifact.
2020-03-31 09:55:13 +02:00
Ignacio Etcheverry
21d1ea60a7 Fix exporting corrupted Xcode pbxproj if project name has spaces 2020-03-31 09:37:17 +02:00
Rémi Verschelde
dfed5efea3
Merge pull request #37445 from nekomatata/hook-makerst-fix
Fixed errors in makerst pre-commit hook
2020-03-31 00:17:51 +02:00
PouleyKetchoupp
619354fb2c Fixed errors in makerst pre-commit hook 2020-03-31 00:02:11 +02:00
PouleyKetchoupp
7b6e664178 Pre-commit hook instructions on Windows 2020-03-30 22:59:06 +02:00
Rémi Verschelde
3644036fd3 Travis: Add static check for Python black formatting
Also install and use pygmentize to visualize clang-format and black
diffs.
2020-03-30 09:31:53 +02:00
Rémi Verschelde
4d52761da6 Hooks: Use pygmentize if available to visualize diff 2020-03-30 09:05:59 +02:00
Rémi Verschelde
164826a39b Hooks: Add pre-commit hook for psf/black formatting 2020-03-30 09:05:59 +02:00
Rémi Verschelde
cd4e46ee65 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.
2020-03-30 09:05:53 +02:00