Quick fix for #82585.
A better fix requires refactoring the way we detect the compiler version
to make it more reliable, and get a consistent output. But I prefer to
keep changes minimal for 3.x branches at this point.
Also set CI version to 3.1.39, which is what we use for official 3.6 builds
since 3.6-beta4.
Remove the base error message in `OS`, we no longer really error out this
way for not implemented methods. Instead, each platform should override them
to provide the context they want.
Fixes#82439.
(cherry picked from commit 0a10f09ce4)
- Set `-sSTACK_SIZE` to what it was before emscripten 3.1.27.
It was renamed in 3.1.25 so also set `-sTOTAL_SIZE` for older
versions for consistency.
- Set `-sDEFAULT_PTHREAD_STACK_SIZE` to what it was before 3.1.30.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit 8e5fbd4348)
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.
This is wasteful on multiple aspects:
- Binary size: Around 20% binary size reduction with exceptions disabled
for both MSVC and GCC binaries.
- Compile time:
* More than 50% build time reduction with MSVC.
* 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.
Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
Backported from #70885.
You can now run the test HTTP server by calling:
scons p=javascript serve
If you also wish to run the browser, call instead:
scons p=javascript run
The default listen port is 8060, but can be overriden via the env
variable GODOT_WEB_TEST_PORT which must be a valid integer.
(cherry picked from commit a06602363c)
This makes it easier to set up, as you always have Python installed
when building Godot. On the other hand, you don't always have Node.js
+ npm installed (and you may not want to spend time running `npm install`).
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
(cherry picked from commit 1be1b15a57)
Adds support for LTO on macOS and Android.
Disable LTO by default on iOS even if `production=yes` is set.
Also add `linker` option to `server` platform missed in #63283.
Refactor code handling old arguments to make it simpler (breaks compat,
but is explicit enough about it and scripts are easy to fix).
Replace a bisect with a single multiplication when calling
screen_get_dpi() in Javascript
Tested the value of
window.matchMedia(`(resolution:${(window.devicePixelRatio*96).toFixed(100)}dpi)`).matches
which is true except for values that cause a lot of rounding errors
(e.g. dpr : 0.3 => resolution: 28.799999999999997dpi)
Even in these cases the value matches the result of the previous
`findDPI()` method.
See also:
6cff589b5b (r81273660)
(cherry picked from commit c2e3971013)
Increases the size of the wasm by around 3% (~300-350 KiB).
This enables using the Crypto object for hashing, signing and encryption,
and therefore reduces the gap between the features of the HTML5 platform
and other platforms.
Closes https://github.com/godotengine/godot-proposals/issues/3574.
(cherry picked from commit 3ff6d794c0)
Adds the is_process_running function to the native OS class and exposes it to script.
This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.
Documentation is updated to reflect new API function.
(cherry picked from commit f3c1232c59)
Used default value before, i.e. "same-origin", now uses "include" (i.e.
include for cross-origin if cross-origin is allowed).
(cherry picked from commit ffe248cbdf)
Allows detecting when a new version of the progressive web app service
worker is waiting (i.e. an update is pending), along a function to force
the update and reload all clients.
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.