Commit graph

237 commits

Author SHA1 Message Date
bruvzg
30ee208bd9
[macOS export, 3.x] Implements ad-hoc signing on Linux/Windows, adds extra privacy settings, entitlements warnings and error checking. 2022-01-20 10:46:29 +02:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Rémi Verschelde
b197de6f5f
Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2022-01-07 00:14:54 +01:00
Aaron Franke
c58391c9d1
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.

(cherry picked from commit 4cdc75915f)
2022-01-06 21:44:40 +01:00
Max Hilbrunner
717801c9cb Fix docs links in 3.x after docs reorg 2022-01-05 11:54:52 +01:00
Haoyu Qiu
56574aa891
Center the indeterminate spinner on HTML5 page
(cherry picked from commit 84982f5778)
2021-12-10 11:18:38 +01:00
David Sichma
85ff6e3e07
Fixed pre-commit-black file extensions
Now hook can find .py files.

(cherry picked from commit 3fe10c7e9d)
2021-11-18 22:23:59 +01:00
Rémi Verschelde
14c366ddd7
Bump version to 3.5-beta 2021-11-05 16:10:17 +01:00
Aaron Franke
69e90daae3
Rename "makerst.py" to "make_rst.py"
(cherry picked from commits 8f05e26198
and cce7797a75)
2021-10-26 13:34:36 +02:00
Rémi Verschelde
d09b33dab2
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).

(cherry picked from commit 55d05565d0)
2021-10-25 11:16:13 +02:00
bruvzg
ea844046c3
[macOS] Add entitlements required by OIDN JIT for the editor build.
(cherry picked from commit 53cb556841)
2021-10-23 12:04:35 +02:00
Rémi Verschelde
093919196a
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.

(cherry picked from commit 63544c3a9d)
2021-10-23 12:03:51 +02:00
Fabio Alessandrelli
3a61d0990e [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).

Enable GLES3/WebGL2 in the Web Editor.
2021-10-19 15:52:02 +02:00
Hugo Locurcio
7c624b6b2b
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>
(cherry picked from commit 4589790348)
2021-10-04 14:33:46 +02:00
Hugo Locurcio
d1a4cb2bea
Print colored diffs when there are formatting failures in CI
This makes diffs more readable in CI logs.

(cherry picked from commit 38424714b1)
2021-09-14 13:41:26 +02:00
Rémi Verschelde
f0b37b1519
doc: Point URLs to 3.4 version of the online docs 2021-08-12 17:08:10 +02:00
Rémi Verschelde
91d29ddcfb
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).

(cherry picked from commit 9a71038e34)
2021-08-03 10:20:18 +02:00
Michael Alexsander
e74ee7294e
Properly tag project files as a subclass of plain text in the MIME info
(cherry picked from commit a47e48987d)
2021-08-03 09:15:33 +02:00
Michael Alexsander
e71640af2f
Make some small tweaks to the MIME info
(cherry picked from commit 0218616747)
2021-08-03 09:15:33 +02:00
Aaron Franke
7dc2edc430
[3.x] Allow reading shaders from .gdshader files 2021-07-19 23:34:23 -04:00
bruvzg
30393b6401
Add LSApplicationCategoryType to the template and export dialog.
(cherry picked from commit cb480376d8)
2021-06-17 12:47:55 +02:00
Hugo Locurcio
f80b15bebc
Allow clang-format 12 in the pre-commit hook
clang-format 12's formatting is identical to clang-format 11's.

(cherry picked from commit d74413ebd0)
2021-06-07 22:36:31 +02:00
Rémi Verschelde
80e1585a6e
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.

(cherry picked from commit c1c76850cb)
2021-06-07 12:06:59 +02:00
Ignacio Roldán Etchevery
c9047de455 C#+iOS: Fix simulator builds
Replaced obsolete preprocessor check for simulator/device in C code.
Architecture can no longer be used to determine this with Apple Silicon.
The new code uses `TARGET_OS_SIMULATOR` from `TargetConditionals.h`.

We have some mono libs which can only be used in devide builds.
We were adding them as static libs. Previously it was only causing
warnings because missing arch for the simulator, but now this
is treated as an error.

To fix this we turn them into xcframeworks with dummy static libs
for the simulator and the actual ones for devices.
2021-06-02 01:34:00 +02:00
bruvzg
683f96df35 Add separate simulator flag for iOS build, change main library to xcframework.
Build and export iOS Mono libs as `.xcframework`s, for Apple Silicon iOS simulator support.
2021-06-02 01:09:03 +02:00
Pedro J. Estébanez
0d7130f37c
Add iOS export option for device family
(cherry picked from commit 19ae8193ee)
2021-06-01 12:52:19 +02:00
Pedro J. Estébanez
857fd831c1
Set schemes' build config to debug/release in iOS Xcode export
(cherry picked from commit 1534b4e65e)
2021-06-01 12:52:19 +02:00
Rémi Verschelde
379ecd532a
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
```

(cherry picked from commit 6999e332e4)
2021-05-21 13:41:27 +02:00
Rémi Verschelde
eb78f80f03
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:56:56 +02:00
Hugo Locurcio
fcfce4be67
Fix Ubuntu clang-format version detection in the pre-commit hook
(cherry picked from commit 61aa09097f)
2021-05-11 10:44:24 +02:00
Fabio Alessandrelli
73f19ec2da
[HTML5] Remove "fixed-size.html".
No longer used in 3.3+.

(cherry picked from commit 3faf8d6e40)
2021-05-09 17:14:36 +02:00
Fabio Alessandrelli
9446be7dad [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 15:09:03 +02:00
Fabio Alessandrelli
a7f2b723d6 [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 15:09:03 +02:00
Rémi Verschelde
8851fa7808
OSX: Clarify min version requirement (10.12) in Info.plist
The min requirement was upped by #45618 to have proper support for C++14.

Related to #48222.
2021-04-27 09:54:27 +02:00
Rémi Verschelde
5e74554c9a
Bump version to 3.4-beta
Feature work in 3.x likely won't have a big impact on stability so we can skip
the dev/alpha phases and we'll start directly with a 3.4 beta 1 build once
significant changes have been implemented.
2021-04-22 15:27:35 +02:00
Hugo Locurcio
1304b85c63
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.

(cherry picked from commit 8b08146894)
2021-04-20 20:12:52 +02:00
Rémi Verschelde
1d20bba0c4
HTML5: Fix link to documentation on editor template 2021-03-30 11:47:43 +02:00
Hugo Locurcio
4126d27468
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.

(cherry picked from commit 197d391f08)
2021-03-26 13:47:53 +01:00
Rémi Verschelde
015973df04
doc: Make all tutorial links point to 3.3 branch of docs 2021-03-26 10:43:43 +01:00
Fabio Alessandrelli
193233e893
[HTML5] Clarify editor PWA manifest.json
Update name and description to clarify it's the web version.

(cherry picked from commit ecb792b1da)
2021-03-24 11:53:08 +01:00
Fabio Alessandrelli
3ed72c3ef4
[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).

(cherry picked from commit 85c1a41021)
2021-03-17 17:08:23 +01:00
Rémi Verschelde
0341251d0f
Bump version to 3.3-rc
We decided to rename the upcoming 3.2.4 release to 3.3 to better reflect that
it is a significant feature release, and not a maintenance update.

The `3.2` branch was also renamed to `3.x` and will now be the development
branch for future 3.x releases (3.3, 3.4, etc.).
2021-03-16 12:16:36 +01:00
Rémi Verschelde
c7c7a0b822
clang-format: Fix version number in hook warning
(cherry picked from commit f4d46f6290)
2021-03-14 12:03:21 +01:00
Fabio Alessandrelli
64feaed39b [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).

(cherry picked from commit f1e810adcb)
2021-03-12 10:43:52 +01:00
Fabio Alessandrelli
d942d553ef [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:41 +01:00
Fabio Alessandrelli
e3664e971b [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.

(cherry picked from commit 4404eb57e4)
2021-02-26 15:22:51 +01:00
Hugo Locurcio
3b4dd88e56 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.

(cherry picked from commit 3527756943)
2021-02-25 22:37:49 +01:00
Riteo Siuga
6d7b25b98a 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.

(cherry picked from commit 876e165a49)
2021-02-25 15:14:32 +01:00
Marcel Admiraal
95272e11c4 Remove unused variables from full-size.html
(cherry picked from commit 548edfc4fe)
2021-02-22 10:18:26 +01:00
Fabio Alessandrelli
45a67fab35 [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:13:44 +01:00