Commit graph

444 commits

Author SHA1 Message Date
Rémi Verschelde
39facb35a0 SCons: Unify tools/target build type configuration
Implements https://github.com/godotengine/godot-proposals/issues/3371.

New `target` presets
====================

The `tools` option is removed and `target` changes to use three new presets,
which match the builds users are familiar with. These targets control the
default optimization level and enable editor-specific and debugging code:

- `editor`: Replaces `tools=yes target=release_debug`.
  * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_debug`: Replaces `tools=no target=release_debug`.
  * Defines: `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_release`: Replaces `tools=no target=release`.
  * Defines: `-O3`/`/O2`

New `dev_build` option
======================

The previous `target=debug` is now replaced by a separate `dev_build=yes`
option, which can be used in combination with either of the three targets,
and changes the following:

- `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`),
  enables generating debug symbols, does not define `NDEBUG` so `assert()`
  works in thirdparty libraries, adds a `.dev` suffix to the binary name.

Note: Unlike previously, `dev_build` defaults to off so that users who
compile Godot from source get an optimized and small build by default.
Engine contributors should now set `dev_build=yes` in their build scripts or
IDE configuration manually.

Changed binary names
====================

The name of generated binaries and object files are changed too, to follow
this format:

`godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]`

For example:
- `godot.linuxbsd.editor.dev.arm64`
- `godot.windows.template_release.double.x86_64.mono.exe`

Be sure to update your links/scripts/IDE config accordingly.

More flexible `optimize` and `debug_symbols` options
====================================================

The optimization level and whether to generate debug symbols can be further
specified with the `optimize` and `debug_symbols` options. So the default
values listed above for the various `target` and `dev_build` combinations
are indicative and can be replaced when compiling, e.g.:

`scons p=linuxbsd target=template_debug dev_build=yes optimize=debug`
will make a "debug" export template with dev-only code enabled, `-Og`
optimization level for GCC/Clang, and debug symbols. Perfect for debugging
complex crashes at runtime in an exported project.
2022-09-26 16:31:46 +02:00
Rémi Verschelde
49fcf4ffad Style: Cleanup header guards for consistency
Fix file names for {Static,Lightmap}RaycasterEmbree.
2022-09-26 13:51:17 +02:00
Rémi Verschelde
26e9145c26 SCons: Cleanup DEBUG, _DEBUG and NDEBUG defines
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
  Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
  outside thirdparty code, which we usually don't intend to debug, so it
  seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
  and `release_debug` targets. This used to be set for `release` for all
  platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
  code, which was only implemented for Unix anyway, should have been
  `DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
  target as we don't want OIDN and Embree asserting all over the place.
2022-09-23 15:21:26 +02:00
Rémi Verschelde
5408af1407 Style: Ensure consistent formatting with clang-format 15
When going from version 14 to 15 it would introduce a tiny change in
`websocket_macros.h` just before the comment re-enabling clang-format,
but this can be solved by just letting it do its work.

Bonus cosmetic change in `math_fieldwise.cpp` where clang-format isn't
used, and bump recommended versions for pre-commit hook to [13; 15].
2022-09-21 12:48:58 +02:00
Rémi Verschelde
7da532275b Merge pull request #65541 from clayjohn/renderer-setting
Split rendering driver project setting into renderer_name and rendering_driver
2022-09-20 09:43:59 +02:00
clayjohn
4a1c7de57c Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer). 2022-09-19 10:26:10 -07:00
Fabio Alessandrelli
51484028fd [Web] Add missing features warning in editor and export shell. 2022-09-17 11:33:53 +02:00
Ignacio Roldán Etcheverry
f784fb2000 C#: Replace libnethost dependency to find hostfxr
We want to replace libnethost as it gives us issues with some compilers.
Our implementation tries to mimic libnethost's hostfxr_resolver search
logic. We try to use the same function names for easier comparing in
case we need to update this in the future.
2022-09-07 16:36:36 +02:00
Gergely Kis
20bf72751c Fix UTF-8 validation in static checks
Use isutf8 instead of recode to detect invalid UTF-8 sequences.

Also add the necessary dependencies to run the static checks locally
using act (https://github.com/nektos/act) with the Medium size image.
2022-09-05 13:18:27 +02:00
Rémi Verschelde
08eafbd52b
Merge pull request #65078 from RandomShaper/git_hooks_extend 2022-08-30 16:18:31 +02:00
Pedro J. Estébanez
8e2d0e1bb1 Add ability to extend the set of Git pre-commit hooks 2022-08-30 13:34:10 +02:00
Pedro J. Estébanez
4bf03afe8b Make Git hooks work on worktrees on Windows 2022-08-30 11:18:11 +02:00
Raul Santos
ea6b8ecb6f
Add dotnet format to CI to check C# style 2022-08-27 10:11:35 +02:00
Jiri Suchan
388d35b74d ci: add basic test pipeline for shader builders 2022-08-19 20:32:13 +09:00
Sergey Minakov
c99e8aeac3 [iOS] Extend iOS plugins to support Swift runtime 2022-08-09 20:20:54 +03:00
Rémi Verschelde
1418f97c70 File: Re-add support to skip CR (\r) in File::get_as_text
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in `String::parse_utf8`.

Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.

Supersedes #63717.
2022-08-01 00:40:35 +02:00
Rémi Verschelde
da14b19bbf CI: Link MoltenVK statically on macOS
Same as done for official builds.

Also make artifacts executable before zipping.
2022-07-29 14:32:57 +02:00
Rémi Verschelde
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
bruvzg
8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
Hugo Locurcio
2582981719
Download Vulkan SDK disk image to a temporary folder in the script
This prevents a `vulkan-sdk.dmg` file from lingering in the current
working directory after installing the Vulkan SDK.
2022-07-14 18:35:51 +02:00
Hugo Locurcio
28a702d580
Add a script to install the Vulkan SDK on macOS
This script can be used to make Godot easier to compile on a fresh
macOS installation, including on CI platforms and containers where
the Vulkan SDK isn't preinstalled.
2022-07-12 22:53:06 +02:00
bruvzg
860e24683f
Make enum/constant binds 64-bit. 2022-06-17 16:36:26 +03:00
Rafał Mikrut
80237a54e0 Stop CI when Godot crash 2022-06-15 23:02:14 +02:00
Rafał Mikrut
24f45bd533 Add Godot 3.x -> Godot 4.x project converter 2022-06-15 10:11:17 +02:00
Hugo Locurcio
d45351f413
makerst: Print colored output for easier visual grepping
This is automatically enabled on all platforms including
Windows 10 and later, whenever a TTY environment is detected.

In non-TTY environments such as CI, this can be forced using the
`--color` command line argument.
2022-06-11 00:19:36 +02:00
Fredia Huya-Kouadio
d38ffda2c3 Fix the logic to restart the Godot application 2022-05-23 13:15:48 -07:00
Rémi Verschelde
9923851370 Fix typos with codespell
Using codespell 2.2-dev from current git.
2022-05-23 21:32:19 +02:00
Hugo Locurcio
cd99ea5882
Rename --vk-layers command line argument to --gpu-validation
The new name is independent of the graphics API in use.
This prepares Godot for implementations of graphics APIs other than Vulkan.
2022-05-16 22:29:26 +02:00
Rémi Verschelde
e3a9a03a8d
Merge pull request #57006 from Calinou/web-editor-no-threads-modal 2022-05-16 15:54:20 +02:00
Emmanouil Papadeas
ab444469f0 Add Greek translation for Linux desktop file
Follow-up to #60777 and #60800.
2022-05-06 19:16:45 +03:00
Hugo Locurcio
2212afd794
Add French translation for Linux desktop file 2022-05-05 19:29:46 +02:00
Rémi Verschelde
9e66a947e4 Relax version warning in clang-format precommit hook
Closes #60778.
2022-05-05 13:39:28 +02:00
Haoyu Qiu
31394aced3 Add Simplified Chinese translation for Linux desktop file 2022-05-05 14:02:51 +08:00
Rémi Verschelde
bef00b2b0d
Merge pull request #60445 from nathanfranke/minor-changes
small changes: improve OS.get_name classref, misc/scripts fixes, remove trailing quote
2022-04-25 23:10:48 +02:00
Nathan Franke
1304d72fc1
improve OS.get_name classref, misc/scripts fixes, remove trailing quote 2022-04-22 17:13:08 -05:00
Marcel Admiraal
22ca5b2eba Remove superfluous Android InputManager interface and implementation 2022-04-22 18:52:06 +02:00
Rémi Verschelde
a647fb3e62 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-03-31 14:07:29 +02:00
Fredia Huya-Kouadio
b176b31f5d Fix flickering issues with low processor mode on Android 2022-03-29 12:17:09 -07:00
Rémi Verschelde
2b8b051838
Merge pull request #47526 from backwardspy/master
set StartupWMClass in linux `.desktop` file
2022-03-18 07:38:34 +01:00
Rémi Verschelde
fb28025785
Merge pull request #59153 from Calinou/debug-stringnames-improve
Improve `--debug-stringnames` to be more useful
2022-03-15 20:26:18 +01:00
Hugo Locurcio
38995961df
Improve --debug-stringnames to be more useful
- Print all StringNames, not just the top 100.
- Print statistics at the end of the list of StringNames,
  with unreferenced and rarely referenced StringNames.
- List the CLI argument in `--help` and shell completion.
2022-03-15 18:54:51 +01:00
Hugo Locurcio
eae16f73a6
Make -q CLI argument toggle quiet stdout instead of quitting
`-q` is a common toggle in a command line applications for quiet mode
(see apt or dnf for examples). In contrast, `--quit` isn't needed
as often.
2022-03-13 23:55:01 +01:00
Hugo Locurcio
f4a0573379
Tweak the display order of CLI arguments in --help for consistency
`--profile-gpu` was renamed to `--gpu-profile` for consistency with
`--gpu-abort`.

This also updates the shell completion files to the latest `master`
branch.
2022-03-13 20:36:52 +01:00
Rémi Verschelde
952b71a425
Merge pull request #58751 from bruvzg/loc_str_props 2022-03-11 10:45:02 +01:00
Rémi Verschelde
9b05f29894 Remove unused GDNative code
This has been superseded by GDExtension so this code is no longer useful
nor usable.

There's still some GDNative-related stuff in platform export code which
needs to be adapted for GDExtension (e.g. to include GDExtension libraries
in exports).
2022-03-09 13:59:03 +01:00
bruvzg
12cb6386f6
Improve app name and system permission message localization.
Add localizable string (Dictionary<Lang Code, String>) property editor and property hint.
Add localized "app name" property to the project settings.
Add localized permission and copyright properties to the macOS and iOS export settings.
Remove some duplicated ("app name") and deprecated ("info") macOS and iOS export properties.
2022-03-04 18:11:31 +02:00
bruvzg
5fdea69276
[macOS and iOS export] Add localized application name to the translation .plist files. 2022-03-04 09:27:44 +02:00
bruvzg
1aa6a95081
[macOS] Add missing translation file. 2022-02-12 10:25:53 +02:00
Fabio Alessandrelli
d05f0f15f3
Merge pull request #57005 from Calinou/web-editor-tweak-logo-max-width
Tweak logo max width on the web editor
2022-02-12 02:54:06 +01:00
Fabio Alessandrelli
9c3cbc9edc
Merge pull request #56966 from Calinou/web-editor-allow-any-orientation
Allow using the web editor on any device orientation
2022-02-12 02:43:52 +01:00
Rémi Verschelde
1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Hugo Locurcio
74fc4410f4
Remove support for ARMv7 (32-bit) on iOS
All iOS devices since the iPhone 5S support ARMv8 (64-bit).

The last iOS version supported on ARMv7 devices is 10.x, which is
too old to run Godot 4.0 projects since the minimum supported
iOS version is 11.0.
2022-02-08 22:11:29 +01:00
Fabio Alessandrelli
3cc72ac03f [HTML5] Improve editor progressive web app behavior.
Ensures early claim for aggressive caching.
Adds a button to update when it detects a new version asking
confirmation due to the necessary reload.
2022-02-06 18:46:42 +01:00
Fabio Alessandrelli
cc4612277b [HTML5] PWA service worker prefers cached version.
Use an offline first approach, where we prefer the cached version over
the network one.
This forces games using PWA to always re-export the project and not just
the PCK, so that the service worker version gets updated correctly, and
the end-user cache is correctly cleared on update.
2022-02-06 18:46:22 +01:00
Rémi Verschelde
969780cd2d
Merge pull request #57203 from bruvzg/ios_export_fix 2022-02-02 23:14:30 +01:00
Rémi Verschelde
56549a0195
CI: Fix exclude patterns with git ls-files
Follow-up to #55785.

In `black_format.sh`, the `--exclude` switch was wrongly used. It's a misnomer
that only excludes _untracked_ files, arcane pathspec patterns should instead
be used to exclude _tracked_ files.

Using this newfound knowledge, we can also simplify the other scripts.
2022-02-01 09:58:57 +01:00
Nathan Franke
8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
bruvzg
57db989a97
[iOS] Fix iOS export with manually specified signing/provisioning data. 2022-01-25 17:13:03 +02:00
Hugo Locurcio
078475f354
Allow using the web editor on any device orientation
On tablets and foldable phones, the editor can remain usable
while in portrait mode thanks to the wide display.
2022-01-21 01:59:34 +01:00
Hugo Locurcio
304a286502
Display a modal dialog if threads are unavailable in the web editor
Threads are required for the web editor to function. If the web server
is not correctly configured, threads won't be available.

This makes troubleshooting easier for people looking to self-host
the web editor.
2022-01-20 17:58:10 +01:00
Hugo Locurcio
34a4ff0cef
Tweak logo max width on the web editor
The logo's maximum width is now dependent on the viewport height
in addition to the page width. This prevents the "Start Godot editor"
button from overflowing the page on mobile devices (although the
"Clear persistent data" and "Web editor documentation" buttons will
still overflow for now).
2022-01-20 17:03:43 +01:00
Rémi Verschelde
eab8c07114
Merge pull request #56969 from Calinou/web-editor-tweak-theme-color
Tweak theme color to match the Godot editor's background color
2022-01-20 07:32:52 +01:00
Hugo Locurcio
7ef459c2d7
Tweak theme color to match the Godot editor's background color
This makes for a more seamless-looking address bar/status bar
when using the web editor on a mobile device, either directly
in the brower or installed as a progressive web app.

This also specifies a theme color for the web editor's offline
fallback.
2022-01-19 20:19:24 +01:00
Hugo Locurcio
84a69d7429 Improve the default project theme
The new default project theme uses StyleBoxFlat extensively for
a more modern design and better scalability to multiple resolutions.

SVG icons are now used in place of PNG icons. While this does not
allow for true vector-based icon drawing (icons are still rasterized
at load-time), this makes the design work easier for contributors
and opens the door to vector drawing in the future (e.g. with polygons
or SDFs).

Like for editor icons, the SVG header file is now built automatically
when a SVG file is changed. This removing the need for running
`make_header.py` manually (TODO).

The "Use Hidpi" project setting has been removed in favor of a
"Default Theme Scale" project setting, which allows creating the
default theme at a higher/lower scale than the default.
This can be used when designing GUIs with a high base resolution
to ensure crisp visuals.

Co-authored-by: Yuri Sizov <yuris@humnom.net>
2022-01-19 18:46:01 +03:00
bruvzg
8bb00a2dfd [macOS export] Implements ad-hoc signing on Linux/Windows, adds extra privacy settings, entitlements warnings and error checking. 2022-01-18 11:11:02 +02:00
Rémi Verschelde
8fce6166cb
Merge pull request #56311 from Calinou/default-allow-hidpi 2022-01-13 09:33:00 +01:00
Aaron Franke
4cdc75915f
Skip formatting .bat files in file_format.sh
These are supposed to have CRLF because Windows, so we'll just skip this file type in the script.
2022-01-05 18:30:27 -08:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Hugo Locurcio
0a86dd4718
Enable "Allow Hidpi" by default
This fixes window management issues across platforms on hiDPI monitors.

The `--low-dpi` command line argument has been removed as similar
functionality (forcing low-DPI mode on DPI-aware programs) is
already provided by Windows and macOS itself.
2021-12-30 22:24:49 +01:00
Haoyu Qiu
84982f5778 Center the indeterminate spinner on HTML5 page 2021-12-09 23:18:48 +08:00
Fabio Alessandrelli
46fdba5f8b [HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.
Note, the editor build requires the mbedtls module to be manually
enabled, as it is currently needed as a ResourceUID dependency.

This will need to be addressed in a separate PR.
2021-11-19 16:59:27 +01:00
David Sichma
3fe10c7e9d
Fixed pre-commit-black file extensions
Now hook can find .py files.
2021-11-18 19:29:17 +01:00
Rémi Verschelde
098e3cf8f7
Fix style issue after #54148 2021-11-16 14:27:44 +01:00
Rémi Verschelde
e6ffb10bcd
Merge pull request #52945 from bruvzg/macos_editor_translation 2021-11-09 00:09:32 +01:00
Rémi Verschelde
2ecab0491c
Merge pull request #54179 from aaronfranke/make-rst 2021-10-26 08:43:07 +02:00
Rémi Verschelde
55d05565d0
clang-format: Enable --Wno-error=unknown for compat with older versions
This prevents errors when encountering options which have been defined in newer
versions of clang-format, and are invalid in the YAML for the old version.

Bump minimum supported clang-format version to 12 (where `--Wno-error=unknown`
was added).

Use clang-format 12 on CI (13 is not available yet on the Ubuntu 20.04 images).
2021-10-25 00:19:22 +02:00
Aaron Franke
8f05e26198
Rename "makerst.py" to "make_rst.py" 2021-10-24 01:58:59 -05:00
Rémi Verschelde
99cee2b414
Merge pull request #54067 from bruvzg/oidn_ent 2021-10-23 00:51:24 +02:00
Rémi Verschelde
63544c3a9d
clang-format: Sync config with LLVM 13
Disable minimum amount of spaces in comment prefix for now, as it otherwise
modifies the whole codebase. That's something we probably want to use as it
matches our convention, but we should look into fully converting these
comments to our style guide at the same time.
2021-10-22 21:51:02 +02:00
bruvzg
53cb556841 [macOS] Add entitlements required by OIDN JIT for the editor build. 2021-10-21 14:42:48 +03:00
Bastiaan Olij
daff03576d Add CI step for compiling and testing godot-cpp 2021-10-21 20:30:19 +11:00
Fabio Alessandrelli
9de577ba12 [HTML5] Editor video driver option. Replace canvas on exit.
Default is "Auto", but can be forced to a specific WebGL version if the
automatic detection fails.

The game and editor canvas are now replaced with a new one in the exit
hooks. This helps the browser do some context cleanup, and allow us to
create a new context of a different type (WebGL/WebGL2).
2021-10-19 15:45:32 +02:00
Rémi Verschelde
50bb0896fa
Merge pull request #52043 from Calinou/macos-use-big-sur-icon 2021-09-30 15:52:51 +02:00
bruvzg
3b4de845fe [macOS] Add empty translation files to the editor app bundle, to allow translation detection by the OS. 2021-09-22 23:33:20 +03:00
bruvzg
9231aab119 [macOS] Update MIME codes and file type names to match "dist/linux/org.godotengine.Godot.xml" definitions. Add missing "shader" type icon. 2021-09-20 13:12:34 +03:00
Hugo Locurcio
c0083c0f90
Add dozens of new integration tests to the GDScript test suite
This also ignores `.out` files in the file format static checks.
2021-09-14 18:42:08 +02:00
Hugo Locurcio
38424714b1
Print colored diffs when there are formatting failures in CI
This makes diffs more readable in CI logs.
2021-08-25 17:17:29 +02:00
Hugo Locurcio
4589790348
Use a Big Sur-style macOS icon for the Godot editor
This provides a more coherent visual look with the rest of macOS.

Co-authored-by: Hazar <36481442+hazarek@users.noreply.github.com>
2021-08-24 01:53:28 +02:00
Aaron Franke
ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions 2021-08-22 20:13:11 -05:00
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
backwardspy
7b346258a9
set StartupWMClass in linux .desktop file
this allows linux app launchers and docks to correctly associate the godot project selector & editor windows with the icon used to launch godot.
it prevents this problem specifically: https://askubuntu.com/questions/1144214/why-does-my-custom-launcher-file-create-two-icons-on-the-launcher-bar
2021-03-31 14:45:13 +01: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