Commit graph

185 commits

Author SHA1 Message Date
Rémi Verschelde
4d52761da6 Hooks: Use pygmentize if available to visualize diff 2020-03-30 09:05:59 +02:00
Rémi Verschelde
164826a39b Hooks: Add pre-commit hook for psf/black formatting 2020-03-30 09:05:59 +02:00
Rémi Verschelde
cd4e46ee65 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.
2020-03-30 09:05:53 +02:00
Aaron Franke
7dbe8b65ae
Make file formatting comply with POSIX and Unix standards
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-21 17:41:03 -04:00
Rémi Verschelde
a4801674c5 SCons: Bump required C++ standard to C++17
As per #36436, we now need C++17's guaranteed copy elision feature to
solve ambiguities in Variant.

Core developers discussed the idea to move from C++14 to C++17 as our
minimum required C++ standard, and all agreed. Note that this doesn't
mean that Godot is going to be written in "modern C++", but we'll use
modern features where they make sense to simplify our "C with classes"
codebase. Apart from new code written recently, most of the codebase
still has to be ported to use newer features where relevant.

Proper support for C++17 means that we need recent compiler versions:

 - GCC 7+
 - Clang 6+
 - VS 2017 15.7+

Additionally, C++17's `std::shared_mutex` (conditionally used by
`vk_mem_alloc.h` when C++17 support is enabled) is only available in
macOS 10.12+, so we increase our minimum supported version.
2020-02-22 20:00:21 +01:00
Rémi Verschelde
e479231b21 Travis: Fix clang-format on non-master branches
`git diff-tree` used to fail on the `3.2` branch (and other non-master
branches) as Travis doesn't actually check that branch from the remote:
```
fatal: ambiguous argument '3.2': unknown revision or path not in the
working tree.
```

The exit code would still be 0 so we'd miss badly formatted commits
targeting stable branches.

We do it manually to ensure that it's going to work as we want it.
2020-02-19 11:37:26 +01:00
Hugo Locurcio
4d8dce1606
Add a fish shell completion file for the Godot editor 2020-02-16 17:44:03 +01:00
Rémi Verschelde
386968ea97 Remove obsolete GLES3 backend
Due to the port to Vulkan and complete redesign of the rendering backend,
the `drivers/gles3` code is no longer usable in this state and is not
planned to be ported to the new architecture.

The GLES2 backend is kept (while still disabled and non-working) as it
will eventually be ported to serve as the low-end renderer for Godot 4.0.

Some GLES3 features might be selectively ported to the updated GLES2
backend if there's a need for them, and extensions we can use for that.

So long, OpenGL driver bugs!
2020-02-13 10:36:44 +01:00
bruvzg
eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Fabio Alessandrelli
343b29a651 Merge pull request #35381 from Calinou/html5-export-favicon
Export and reference the icon as favicon when exporting to HTML5
2020-02-08 04:45:53 +01:00
Rémi Verschelde
9576ba8cdc Drop obsolete Dockerfile, we now have official build containers
Cf. https://github.com/godotengine/build-containers

A user-friendly tool using those containers will soon be released and
documented.
2020-02-05 16:53:20 +01:00
Hugo Locurcio
4492cf856b
Export and reference the icon as favicon when exporting to HTML5
This makes the project icon display immediately as a favicon when
opening the page, without having to wait for the project to finish
loading.
2020-02-01 10:33:23 +01:00
Rémi Verschelde
9823dab954 Bump version to 4.0-dev
No peace for the weary. :)
2020-01-29 13:37:17 +01:00
Hugo Locurcio
f5951e757d
Add a Bash completion script for the Godot editor 2020-01-27 00:53:03 +01:00
Rémi Verschelde
9ed14815d8 Linux: Sync man page with current --help output 2020-01-26 19:02:09 +01:00
Hugo Locurcio
8e3e41642b
Add a zsh completion file for the Godot editor
This provides rich autocompletion when using Godot's command line
interface.
2020-01-10 14:54:04 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Hugo Locurcio
b6d6863055
Remove unused scripts from the misc/scripts directory
This also makes `make_icons.sh` executable directly.
2019-12-17 23:22:47 +01:00
Catchawink
5152afa70c Added microphone and camera usage descriptions to macOS builds. 2019-12-13 19:15:50 -05:00
Hugo Locurcio
17add2dc86
Add a pre-commit hook to check the class reference syntax
This also makes documentation helper scripts executable.
2019-12-06 23:40:19 +01:00
bruvzg
ccf8778e86
[iOS] Add export options to control external access to user data. 2019-12-03 12:06:54 +02:00
bruvzg
2ef8c5fac5
iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
Rémi Verschelde
ab4b57de1f Travis: Force installing OpenJDK8 for Android SDK compatibility
Travis CI upgraded their Xenial VMs to default to openjdk11, which
is not working properly for sdkmanager, so we can no longer accept
licenses for the SDK.

They don't really seem to care about providing a good alternative
for us from the few threads I read, so let's just force openjdk8
back.
2019-10-26 14:28:07 +02:00
Rémi Verschelde
156b96af8a Travis: Update Android NDK to r20
Drop unused and outdated OSX setup.
2019-10-24 10:15:24 +02:00
Hugo Locurcio
c8a8be6dd1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2019-10-12 23:23:33 +02:00
Hugo Locurcio
10a8b1d380
Remove obsolete sort_demos.sh script
The Project Manager now sorts projects by name by default,
making this script redundant.
2019-10-02 09:46:27 +02:00
Relintai
6f1d6cfc78 Fixed running the export templates with newer emscripten versions. 2019-10-01 15:41:19 +02:00
Rémi Verschelde
823c3def72 Fix copyright headers and style issues 2019-09-24 11:52:06 +02:00
Rémi Verschelde
f9db6ad8c5
Merge pull request #31919 from m4gr3d/use_aar_for_custom_build
Leverage Android archive (AAR) file for Godot custom build
2019-09-19 20:22:09 +02:00
Fabio Alessandrelli
e7760deb74 Fix HTML5 export after #30864 2019-09-14 16:47:55 +02:00
fhuya
f2d203a8a4 Remove the jetbrains setup directory as it's now obsolete. 2019-09-04 16:21:55 -07:00
fhuya
7fabfd402f Split the Android platform java logic into an Android library module (lib) and an application module (app).
The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
2019-09-04 16:20:22 -07:00
Enzo Ferrari
5323d24fad Fixed javascript code to remove animateStatusIndeterminate callback when the game is loaded.
(cherry picked from commit a5a413c7e9)
2019-09-03 13:39:57 +02:00
Rémi Verschelde
bd9f6c23cb Style: Don't apply clang-format to platform/android/java/src/com 2019-08-27 14:33:41 +02:00
fhuya
4282e129df Bump gradle version to 5.1.1 2019-08-21 13:49:15 -07:00
fhuya
f35b1f3b91 Shut down Godot processes on app exit. 2019-08-20 22:35:46 -07:00
Bastiaan Olij
776dc93571 Add microphone privilege settings support back into export and add privilege exist check to camera server for iOS 2019-07-06 15:48:51 +10:00
fhuya
f7200d6960 Deprecate armv6 support for Android 2019-06-19 12:05:58 -07:00
Rémi Verschelde
24ee8c3566 Add script to fix style issues and copyright headers
This is only meant to check the validity of the whole codebase every
now and then, or to apply clang-format config changes when relevant.
2019-06-17 13:35:47 +02:00
Leonardo Giovanni Scur
31cc1bdb58 Fix pointer position in hidpi-corrected resolutions on web 2019-06-14 17:37:21 -03:00
Rémi Verschelde
f18121824c Add missing license headers
Make `fix_headers.py` script compatible with Python 3.
2019-06-11 15:33:32 +02:00
fhuya
669db2a50a Add Android Studio support. 2019-05-29 16:57:52 -07:00
Rémi Verschelde
b00d7bfc3f Travis: Update clang-format to version 8.0 2019-05-20 14:35:56 +02:00
Vasiliy Makarov
641922782e Make Xcode recursive search frameworks in project dir 2019-05-14 19:12:20 +03:00
Rémi Verschelde
7eabf4c8a3 dist: Rename Linux mime type to follow system convention
Mime type definitions are usually named like the mime type they define,
i.e. x-godot-project in our case.
It was introduced with reverse DNS naming as that's what FlatHub favors,
so it will need to be renamed there.
2019-04-03 13:24:28 +02:00
Allan Davis
bba5716899
Enable Mojave "dark mode" on the editor title bar
Enables "dark mode" in the editor and project selector title bars in macOS Mojave when selected in macOS System Preferences
2019-03-20 14:09:51 +00:00
Rémi Verschelde
860f097cc6 Bump version to 3.2-dev
No rest for the wicked.
2019-03-13 18:43:13 +01:00
Sam Green
36d627a9cf Remove microphone from export options and distribution plist 2019-03-04 18:01:02 -08:00
Bastiaan Olij
0f03ad379c New export options iOS 2019-02-16 12:11:53 +11:00
Rémi Verschelde
0f5a4fa7d5 Fix version in osx_tools.app 2019-02-10 17:01:25 +01:00
Rémi Verschelde
c363857426 Be explicit about usage of GDScript tests
Also drop empty "image" test, and print proper error when passing wrong
test name.

Fixes #25638.
2019-02-10 15:11:32 +01:00
Rémi Verschelde
8a5a24c6dd Travis: Fix accepting Android SDK licenses
It has been failing since a few days, apparently `sdkmanager --licenses`
is no longer sufficient to accept all licenses, the `platform-tools` install
triggers another license dialog. Now saying yes to all just in case.
2019-01-21 09:40:30 +01:00
Rémi Verschelde
ffc0792798 Travis: Use pip to install SCons on OSX
Not sure why we switched from homebrew to scons-local anymore,
but pip should work just fine and is recommended by upstream.

Downloads of scons-local from SourceForge were quite iffy, so
this should help avoid CI errors due to not having downloaded
SCons successfully.

Setting Python's user binary PATH seems necessary on Travis/OSX
as per travis-ci/travis-ci#5030 (confirmed that 'scons' is not
in PATH without it).
2019-01-09 13:39:46 +01:00
PrestonKnopp
8adc611bf5 escaped '&' in macos osx_tools.app Info.plist 2019-01-02 18:11:21 -08:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
d1f3b622f0 Fix missing/malformed license headers 2019-01-01 12:46:36 +01:00
bruvzg
c2aac1a1db
File icons: separate icons for gdscript, resource, scene and projects. 2018-12-06 15:16:36 +02:00
Rémi Verschelde
bc2e1eedc5 Tests: Drop old test_io referencing data which isn't included
This should eventually be rewritten to properly test IO features,
but this would be part of a bigger work on adding a proper testing
framework for Godot features.

Fixes #2454.
2018-12-05 00:47:05 +01:00
qarmin
ee39441cb3 Change old Godot logo/splash screen in UWP assets 2018-11-27 20:09:56 +01:00
bruvzg
ccafdb5d05
[macOS] Fix file associations (for *.scn, *.tscn and project.godot). 2018-11-10 22:49:07 +02:00
Rémi Verschelde
5f8af252e8 doc: Use HTTPS for docs.godotengine.org and point to latest branch
Fixes #23509.
2018-11-05 08:46:27 +01:00
Rémi Verschelde
470602699d
Merge pull request #22626 from akien-mga/travis-android-ndk
Travis: Update Android NDK to r18
2018-10-02 18:42:28 +02:00
Rémi Verschelde
3c62aa778d Style: Fix clang-format pre-commit hook for java and glsl 2018-10-02 16:10:50 +02:00
Rémi Verschelde
7be2152d2a Travis: Update Android NDK to r18 2018-10-02 15:17:17 +02:00
Rémi Verschelde
4226d56ca9 Style: Enable clang-format on GLSL shaders
As of clang-format 6.0.1, putting the `/* clang-format off */` hint
around our "invalid" `[vertex]` and `[shader]` statements isn't enough
to prevent a bogus indent of the next comments and first valid statement,
so we need to enclose that first valid statement in the unformatted chunk.
2018-08-27 07:34:14 +02:00
Rémi Verschelde
cef310e0ea
Merge pull request #21336 from eska014/html5-new-presentation
Add responsive HTML5 export page with full-size canvas as new default
2018-08-24 00:10:46 +02:00
Leon Krause
86d9e67d7a Add responsive HTML5 export page with full-size canvas as new default 2018-08-23 21:28:09 +02:00
Hugo Locurcio
01914ee00b
Tweak AppStream metadata and add MIME type integration
This allows Godot to be registered as an application to open
Godot project files.
2018-07-28 00:40:05 +02:00
Rémi Verschelde
2d4a4a245d Main: Fix --check-only option implemented as paired
Fixes #20503.

Also added the option to the Linux manpage.
2018-07-27 08:39:48 +02:00
Hugo Locurcio
7360f6aeff
Rename AppStream metadata and desktop files to follow the specification
This also adds a few more fields to the AppStream file to improve
desktop integration.
2018-07-24 15:18:50 +02:00
Rémi Verschelde
36efa7d445 Travis: Update clang-format version in shell script 2018-07-18 17:49:01 +02:00
Yasha Borevich
f78e5e5725 Respect window/handheld/orientation setting in iOS 2018-07-01 22:08:37 +03:00
Hugo Locurcio
53e94a1ce1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
Hugo Locurcio
8c08c4fe84
Remove the old AppImage structure
These files did not serve a real purpose since `icon.png` can be used
as the AppImage icon, and a .desktop file can be found at
`misc/dist/linux/godot.desktop` with the same contents.
2018-06-24 00:15:55 +02:00
Rémi Verschelde
e2acc602f3 Dist: update script to make Steam icon sets 2018-06-03 19:28:07 +02:00
Rémi Verschelde
eaa6613f06
Merge pull request #18770 from eska014/cmdline
Command line fixes
2018-05-11 14:20:50 +02:00
Leon Krause
c4c7270cc7 Fix help/man for --export and --export-debug 2018-05-10 22:08:21 +02:00
Rémi Verschelde
a415efa4b7
Merge pull request #18765 from eska014/enginejs-extalt
Facilitate using non-default filename extensions in HTML5 platform
2018-05-10 21:57:07 +02:00
Leon Krause
96f907c023 Accept non-default main packs in engine.js startGame()
Allows using startGame() with main packs exported as .zip, but also any
other custom extension, for example if a web game host does not allow
the .pck filename extension.
2018-05-10 15:08:19 +02:00
Leon Krause
9080e96bc8 Fix keyboard focus lock-out with HTML5 canvas in iframe 2018-05-10 02:42:47 +02:00
Rémi Verschelde
ab75fae564 Travis: Upgrade scons-local to 3.0.1 on OSX
Also change URL, prdownload alias seems broken right now on SF.
2018-04-12 14:07:48 +02:00
Ruslan Mustakov
1d9a3a9b1c iPhone X support and iOS-related fixes
Starting from April 2018 Apple no longer accepts apps that do not
support iPhone X. For games this mainly means respecting the safe area,
unobstructed by notch and virtual home button. UI controls must be
placed within the safe area so that users can interact with them.

This commit:

- Adds OS::get_window_safe_area method that returns unobscured area of
  the window, where interactive controls should be rendered.

- Reorganizes how launch screens are exported - the previous way was
  incorrect and modern iPhones did not pick up the correct screens and
  because of that used a non-native resolution to render the game.

- Adds launch screen options for iPhone X.

- Makes launch screens optional in the export template. If not
  specified, a white screen will be used.

- Adds App Store icon (1024x1024) export option as it now has to be
  bundled with the app instead of being provided in iTunes Connect.

- Fixes crash when launching games in iOS Simulator. It happened because
  controllerWasConnected callback came before the engine was
  initialized. Now in such case the controllers will be queued up and
  registered after initialization is done.

- Fixes issue with the virtual keyboard where for some reason
  autocorrection panel would intersect with the keyboard itself and not
  allow you to use the top row of the keyboard. This is fixed by
  disabling autocorrection altogether.

Closes #17358. Fixes #17428. Fixes #17331.
2018-04-11 14:53:24 +07:00
Michael Alexsander Silva Dias
ea97e2d0eb Added the "GLES2" option for the video-driver in the terminal help. 2018-03-25 23:23:53 -03:00
Rémi Verschelde
87290ba4cd
Merge pull request #17666 from akien-mga/editor-fps-verbose
Add --print-fps option to output FPS to stdout
2018-03-21 17:40:37 +01:00
Poommetee Ketson
ff070de986 s/2017/2018/g for gles2, websocket, linux appdata 2018-03-21 16:07:51 +07:00
Rémi Verschelde
10fa69285c Add --print-fps option to output FPS to stdout
Works both for the editor and games.

Projects can still use "debug/settings/stdout/print_fps" to enable it
permanently. The --print-fps option takes precedence (so works even if
the project setting is disabled). That setting is also no longer redefined
on the fly based on the verbose flag, that was a mess.
2018-03-21 09:08:51 +01:00
Leon Krause
61026e62bf Check only for WebGL 1.0, move test to HTML file
Whether to use WebGL 1.0 or 2.0 can only be determined at runtime after
reading project settings, so check for the lower version.

The test is now in the HTML file, so if desired WebGL 2.0 can be
checked early by changing the behaviour there.
2018-03-15 04:04:24 +01:00
Rémi Verschelde
a55e2f2dac Dist: Fix Linux desktop file launch argument 2018-03-14 12:05:25 +01:00
Viktor Ferenczi
272ecddb28 Properly closing all files in Python code 2018-03-11 14:55:50 +01:00
robfram
52abf4ba84 Change shebang of pre-commit-clang-format hook to make it portable
The default one is "#!/bin/bash", but BSD systems doesn't have bash
in that path. For portability reasons, it should be changed to
"#!/usr/bin/env bash".

More info: https://en.wikipedia.org/wiki/Shebang_%28Unix%29#Portability
2018-03-06 19:53:37 +01:00
Rémi Verschelde
95b8984d5f Add --quit option to help output and update manpage 2018-02-24 18:22:29 +01:00
Rémi Verschelde
03d42e9e0d Dist: Update manpage and macOS version string 2018-01-25 23:21:31 +01:00
Leon Krause
cf5b074a95 Fix internal Emscripten JS API calls
Emscripten 1.37.24 no longer exports these by default
2018-01-06 15:53:04 +01:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
eb892cd0f1 Improve script to add/fix copyright headers
- The header now always ends with exactly one empty line
- Comments after the header are no longer removed
- Improved readability with clearer file names and comments
2018-01-05 01:22:22 +01:00
Razah
e3c9a7ed4f Fix broken Info.plist after copyright update
Fixes #15293.
+ related misc fixes by @akien-mga.
2018-01-03 17:10:07 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Rémi Verschelde
7cb6e6b723 Style: Apply clang-format to Java files
Only those from org/godotengine/godot though, not the thirdparty ones.
2017-12-10 01:16:07 +01:00
Rémi Verschelde
a8ceb7e3f2 Style: Update definitions for clang-format 5.0.0
This will be the new standard from now on.
2017-12-07 08:02:00 +01:00
Ruslan Mustakov
8f0f327f02 Allow configuring iOS export
- EditorExportPlugin's _export_begin accepts all the arguments related
   to the current export (is_debug, path, flags).

 - EditorExportPlugin API is extended with methods allowing to configure
   iOS export: add_ios_framework, add_ios_plist_content,
   add_ios_linker_flags, add_ios_bundle_file.

 - iOS export template now contains Godot as a static library so that
   it can be linked with third-party Frameworks and GDNative static
   libraries.

 - Adds method to DirAccess for recursive copying of a directory.

 - Fixes iOS export to work with Xcode 9 (released recently).
2017-11-21 01:16:49 +07:00