Commit Graph

364 Commits

Author SHA1 Message Date
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