Commit graph

268 commits

Author SHA1 Message Date
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
Aaron Franke
7dbe8b65ae
Make file formatting comply with POSIX and Unix standards
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-21 17:41:03 -04:00
Rémi Verschelde
a4801674c5 SCons: Bump required C++ standard to C++17
As per #36436, we now need C++17's guaranteed copy elision feature to
solve ambiguities in Variant.

Core developers discussed the idea to move from C++14 to C++17 as our
minimum required C++ standard, and all agreed. Note that this doesn't
mean that Godot is going to be written in "modern C++", but we'll use
modern features where they make sense to simplify our "C with classes"
codebase. Apart from new code written recently, most of the codebase
still has to be ported to use newer features where relevant.

Proper support for C++17 means that we need recent compiler versions:

 - GCC 7+
 - Clang 6+
 - VS 2017 15.7+

Additionally, C++17's `std::shared_mutex` (conditionally used by
`vk_mem_alloc.h` when C++17 support is enabled) is only available in
macOS 10.12+, so we increase our minimum supported version.
2020-02-22 20:00:21 +01:00
Rémi Verschelde
e479231b21 Travis: Fix clang-format on non-master branches
`git diff-tree` used to fail on the `3.2` branch (and other non-master
branches) as Travis doesn't actually check that branch from the remote:
```
fatal: ambiguous argument '3.2': unknown revision or path not in the
working tree.
```

The exit code would still be 0 so we'd miss badly formatted commits
targeting stable branches.

We do it manually to ensure that it's going to work as we want it.
2020-02-19 11:37:26 +01:00
Hugo Locurcio
4d8dce1606
Add a fish shell completion file for the Godot editor 2020-02-16 17:44:03 +01:00
Rémi Verschelde
386968ea97 Remove obsolete GLES3 backend
Due to the port to Vulkan and complete redesign of the rendering backend,
the `drivers/gles3` code is no longer usable in this state and is not
planned to be ported to the new architecture.

The GLES2 backend is kept (while still disabled and non-working) as it
will eventually be ported to serve as the low-end renderer for Godot 4.0.

Some GLES3 features might be selectively ported to the updated GLES2
backend if there's a need for them, and extensions we can use for that.

So long, OpenGL driver bugs!
2020-02-13 10:36:44 +01:00
bruvzg
eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Fabio Alessandrelli
343b29a651 Merge pull request #35381 from Calinou/html5-export-favicon
Export and reference the icon as favicon when exporting to HTML5
2020-02-08 04:45:53 +01:00
Rémi Verschelde
9576ba8cdc Drop obsolete Dockerfile, we now have official build containers
Cf. https://github.com/godotengine/build-containers

A user-friendly tool using those containers will soon be released and
documented.
2020-02-05 16:53:20 +01:00
Hugo Locurcio
4492cf856b
Export and reference the icon as favicon when exporting to HTML5
This makes the project icon display immediately as a favicon when
opening the page, without having to wait for the project to finish
loading.
2020-02-01 10:33:23 +01:00
Rémi Verschelde
9823dab954 Bump version to 4.0-dev
No peace for the weary. :)
2020-01-29 13:37:17 +01:00
Hugo Locurcio
f5951e757d
Add a Bash completion script for the Godot editor 2020-01-27 00:53:03 +01:00
Rémi Verschelde
9ed14815d8 Linux: Sync man page with current --help output 2020-01-26 19:02:09 +01:00
Hugo Locurcio
8e3e41642b
Add a zsh completion file for the Godot editor
This provides rich autocompletion when using Godot's command line
interface.
2020-01-10 14:54:04 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00