Commit graph

102 commits

Author SHA1 Message Date
Hugo Locurcio 6799d000b1
Only support XDG directory path configuration on Linux
XDG support breaks when running Windows builds via WINE.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-12-12 11:43:16 +01:00
Rémi Verschelde 0a3f66471e
Merge pull request #69712 from bruvzg/real_size
Rename `window_get_real_size`, add position counterpart.
2022-12-07 14:29:46 +01:00
bruvzg 9189c96aef
[macOS export] Add support for Xcode notarytool. 2022-12-07 13:01:12 +02:00
bruvzg edf13eb5a6
Rename window_get_real_size to window_get_size_with_decorations, add window_get_position_with_decorations. 2022-12-07 11:07:30 +02:00
bruvzg ecec415988
Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00
Rémi Verschelde 7bffdca41c
Merge pull request #69380 from bruvzg/mac_max_ws
[macOS] Improve maximized and non-resizable modes handling.
2022-12-02 12:25:25 +01:00
bruvzg 8cd08f8b6f
[macOS] Improve maximized and non-resizable modes handling. 2022-11-30 11:34:40 +02:00
bruvzg aa117a128e
[macOS] Fix export button incorrectly disabled when using login/app password for notarization. 2022-11-30 10:38:53 +02:00
bruvzg aaf4d7dfe1
[macOS] Fix sub-windows opening in fullscreen. 2022-11-28 14:11:21 +02:00
Rémi Verschelde afe1c89fb5
Merge pull request #68897 from bruvzg/mac_reparent
[macOS] Dynamically attach and detach transient windows to allow them to stay on top of parent and be moved to another screen.
2022-11-21 11:44:02 +01:00
bruvzg 908bef8eee
[Export] Use image loader directly to avoid "resource as image file" errors. 2022-11-21 10:11:59 +02:00
bruvzg c2b061dec3
[macOS] Dynamically attach and detach transient windows to allow them to stay on top of parent and can be moved to another screen. 2022-11-21 10:11:14 +02:00
Markus Sauermann 567a591f87 Fix unused exitcode in macos export plugin
Fix that the exitcode is never set.
2022-11-20 22:27:23 +01:00
bruvzg ac0ed9ce67
Windows icon export improvements.
Regenerate Windows icon on export to ensure correct icon size order.
Add support for using PNG/WebP/SVG files as an icon for Windows exports.
Allow using WebP/SVG files as icon for macOS exports.
Add option to select generated icons interpolation, and set default interpolation to Lanczos.
2022-11-18 19:42:07 +02:00
bruvzg 153d06d79b
[macOS] Update activation hack to work on Ventura. 2022-11-17 11:14:03 +02:00
clayjohn 58a9cfee80 Set vsync on window creation when using GLES3.
Add vsync to Windows platform
2022-11-15 14:14:21 -08:00
Rémi Verschelde a70431559b
Merge pull request #68683 from bruvzg/mvk_detect
[macOS] Automatically detect MoltenVK libs installed via homebrew and macports.
2022-11-15 11:56:47 +01:00
bruvzg 00d3ceb870
[macOS] Automatically detect MoltenVK libs installed via homebrew and macports. 2022-11-15 11:59:53 +02:00
Riteo f6397bffb1 Regenerate GL loader code with GLAD 2
GLAD 1 creates unusable loaders for EGL, while the newly released GLAD 2
does not, so for consistency I thought that it would be a good idea to
uniform things beforehand. While it had some API changes some renames
were all that was needed and everything works like before, at least on
the Wayland branch.

I've kept the structure identical, although this new generator has quite
a few hefty features, such as a single header mode.

I've also added GLAD to `thirdparty/README.md`, but I haven't specified
that in the commit title because it's a very small "fix".
2022-11-14 21:48:01 +01:00
bruvzg 964d8b2d00
[macOS] Add exclusive fullscreen mode with Dock and Menu disabled. 2022-11-14 07:57:22 +02:00
David Snopek 4c8409c0fe Added missing null checks for gl_manager in MacOS and Windows display servers 2022-11-13 07:06:26 -06:00
Markus Sauermann 52d75c9b35 Fix unsent WINDOW_EVENT_MOUSE_ENTER event on mouse_mode-change
coauthor: @bruvzg

On linuxbsd and macOS the WINDOW_EVENT_MOUSE_ENTER was not sent,
when the mouse became visible again after a mouse_mode-change.
2022-11-11 07:52:16 +01:00
David Snopek 23603e409c Add support for OpenGL to OpenXR 2022-11-08 18:47:11 -06:00
bruvzg 060d62e0dc
Load and use system emoji font in the editor. 2022-11-01 11:04:58 +02:00
Rémi Verschelde 9188bc7341
Merge pull request #67879 from bruvzg/fix_no_vlk
Fix build with Vulkan disabled and no Vulkan headers installed.
2022-10-31 14:29:05 +01:00
Rémi Verschelde 5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
bruvzg 4dd8f68120
Fix build with Vulkan disabled and no Vulkan headers installed. 2022-10-26 08:55:05 +03:00
Wei Guo d7e39e313b Make window creation with custom position do not flash 2022-10-24 13:50:25 +08:00
Clay John 021f524dfd
Merge pull request #67546 from clayjohn/DS-msg
Update the DisplayServer video driver error message to be more accurate and friendly
2022-10-21 16:57:35 -07:00
clayjohn c4ba1565d0 Update the DisplayServer video driver error message
to be more accurate and friendly
2022-10-18 10:15:11 -07:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
bruvzg a3cb6163cc
[macOS] Fit OS::alert to the text width for better readability. 2022-10-18 12:11:39 +03:00
bruvzg dac2047529
Fix macOS export plugin build without regex module. 2022-10-13 08:54:50 +03:00
Rémi Verschelde f2248969db
Merge pull request #66952 from bruvzg/macos_net_export
Fix macOS .NET export.
2022-10-12 22:52:59 +02:00
Rémi Verschelde a92c564a02 Cleanup unused defines in platform code 2022-10-11 11:52:41 +02:00
bruvzg 73430f292b
[macOS] Fix window button position and title bar size when editor scale do not match OS UI scale. 2022-10-10 10:32:41 +03:00
bruvzg 6daf4c6593
[.NET Export] Improve .NET export process.
[macOS export] Fix incorrect file placement, search paths and architecture detection.
[macOS export] Automatically detect executable files and set +x flag.
[macOS export] Automatically apply "Disable Library Validation" entitlements when required.
[macOS export] Remove old Mono export code.
Fix folder tree creation for shared objects export.
Add arch suffix to the exported .NET "data" folder name.
Remove old Mono code from .NET "data" folder lookup.
2022-10-07 13:33:06 +03:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Rémi Verschelde b7c68b343d Merge pull request #66832 from bruvzg/cmd_p_fix
[macOS] Fix ⌘ + . + other modifier triggering twice.
2022-10-04 11:19:41 +02:00
bruvzg bfbbe9c1d0
[macOS] Fix ⌘ + . + other modifier triggering twice. 2022-10-03 20:44:50 +03:00
Rémi Verschelde f501e4f665 Unix: Remove now unnecessary I/O defines, cleanup
- `LIBC_FILEIO_ENABLED` wasn't defined anywhere, even in _other platforms_.
- `NO_NETWORK` is also never defined. It probably isn't enough anyway to
  disable network APIs in the current codebase.
- `UNIX_SOCKET_UNAVAILABLE` is never defined in this code but used by some
  other platforms, clarify that.
- `NO_STATVFS` can be removed as Android supports it since API level 19,
  which is our current min SDK level. It's also only used for
  `DirAccessUnix::get_space_left()` which is anyway overridden by
  `DirAccessJAndroid::get_space_left()` so it shouldn't make a difference.
  * Fixed documentation for `DirAccess.get_space_left()`.
- `NO_FCNTL` is likely also a remnant of early Android days, in current NDK
  r23 it seems to be available. Also cleaned up unused `fcntl.h` includes.
- `NO_ALLOCA` is never defined, and we use alloca in many places now.
2022-10-03 12:33:41 +02:00
Jiri Suchan c5bd2f9dce ci: add Python static analysis check via mypy 2022-09-30 19:03:17 +07:00
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
bruvzg b66931946b
[macOS] Process menu callback after event processing step to avoid event queue corruption. 2022-09-24 23:57:24 +03:00
Rémi Verschelde c5c3d13dc0 SCons: Remove redundant -fomit-frame-pointer and -ftree-vectorize
- `-fomit-frame-pointer` is included automatically by both GCC and
  Clang in `-O1` and above.
- `-ftree-vectorize` is included automatically by GCC in `-O2` and
  beyond, and seems always enabled by Clang.

Closes #66296. See that issue for a detailed investigation.
2022-09-23 13:56:16 +02:00
bruvzg 0dab11afa4
[macOS extend-to-title] Add scene/project name to the editor title, fix incorrect window button position/order when system primary language is RTL. 2022-09-22 23:09:56 +03:00
Rémi Verschelde 0b06f8b0bd Merge pull request #65816 from bruvzg/proj_settings_missing_flags
Add missing initial window flags and window mode to the project settings.
2022-09-21 18:56:31 +02:00
bruvzg cdfa50dbe9
[macOS] Improve "extended to title" transition to / from fullscreen. 2022-09-21 11:21:48 +03:00
bruvzg 0ed4cc6287
[macOS] Add an option to align window buttons in "extend to title" mode. 2022-09-20 12:55:59 +03:00