summaryrefslogtreecommitdiffstats
path: root/drivers/unix
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename String `plus_file` to `path_join`Aaron Franke2022-08-292-19/+19
|
* [Web] Rename JavaScript platform to Web.Fabio Alessandrelli2022-08-292-4/+4
| | | | Also rename export name from "HTML5" to "Web".
* [Net] IP uses print_verbose when getaddrinfo fails.Fabio Alessandrelli2022-08-051-2/+2
| | | | | | Avoid spamming errors when network is disconnected. Returned address will be invalid, so it can be checked by the user via `ret.is_valid_ip_address`.
* Add override keywords to DirAccess derived classesMarcel Admiraal2022-08-021-23/+23
|
* Add override keywords to FileAccess derived classesMarcel Admiraal2022-08-021-19/+19
|
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-259-14/+17
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Rename OSX to macOS and iPhoneOS to iOS.bruvzg2022-07-211-1/+1
|
* Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows ↵bruvzg2022-07-072-3/+8
| | | | filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose.
* Add Desktop to file dialog drive on UnixShlomi2022-07-051-4/+13
|
* Add full support for Android scoped storage.Fredia Huya-Kouadio2022-07-054-12/+1
| | | | | This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer. This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
* Replace most uses of Map by HashMapreduz2022-05-163-8/+8
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Add OS::is_process_running function.mdavisprog2022-05-032-0/+10
| | | | | | | | 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.
* Merge pull request #60601 from touilleMan/gdextension_get_library_pathRémi Verschelde2022-05-032-2/+7
|\ | | | | Add GDNativeInterface::get_library_path to GDExtension
| * Add GDNativeInterface::get_library_path to GDExtensionEmmanuel Leblond2022-04-292-2/+7
| |
* | Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-2/+2
|/ | | | | | | | | | | Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
* Remove or make private `FileAccess` `close()` methods.bruvzg2022-04-122-7/+4
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-114-6/+6
|
* Zero initialize all pointer class and struct membersRémi Verschelde2022-04-041-1/+1
| | | | | This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
* Remove unused GDNative codeRémi Verschelde2022-03-091-2/+2
| | | | | | | | | 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).
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-166-33/+44
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* [OS/Crypto] Add get_entropy to OS.Fabio Alessandrelli2022-02-142-10/+41
| | | | | | | | | | | | | | | Implemented via `BCryptGenRandom` on Windows. Implemented via `getentropy` syscall when available. Implemented via `/dev/urandom` device as a fallback. The `/dev/urandom` fallback can be disabled via the `NO_URANDOM` build flag. Note: The HTML5 version relies on emscripten file system urandom device which itself uses the Crypto API when available or the plain old not crypto-safe `Math.random()` otherwise. Restore get_entropy.
* [Net] Simplify IP resolution code, fix caching.Fabio Alessandrelli2022-01-291-1/+1
| | | | | | | | | | First, we should not insert into cache if the hostname resolution has failed (as it might be a temporary internet issue), second, the async resolver should also properly insert into cache. Took the chance to remove some duplicate code with critical section in it at the cost of little performance when calling the blocking resolve_hostname function.
* Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde2022-01-172-4/+4
|\
| * [Windows] Improve console handling and execute/create_process.bruvzg2021-12-182-4/+4
| | | | | | | | | | | | | | | | | | | | Always build with the GUI subsystem. Redirect stdout and stderr output to the parent process console. Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`). Add `open_console` argument to the `execute` and `create_process` to open a new console window. Remove `interface/editor/hide_console_window` editor setting. Remove `Toggle System Console` menu option. Remove `set_console_visible` and `is_console_visible` functions.
* | Update copyright statements to 2022Rémi Verschelde2022-01-0314-28/+28
|/ | | | Happy new year to the wonderful Godot community!
* Add / to the unix shortcut drive listHaoyu Qiu2021-12-152-0/+17
| | | | Also made `get_current_drive()` to pick the longest match on Unix.
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-093-6/+6
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Only print message for `get_modified_time()` failure when in verbose modeHugo Locurcio2021-12-011-1/+2
| | | | | | | | This error message was often displayed for no good reason when PCK files were loaded in the editor. Since file modification dates are secondary metadata, it's not very important if it can't be retrieved successfully anyway.
* Fix console colors on WindowsYuri Roubinsky2021-11-261-1/+1
|
* Fix data directory of unnamed projectskobewi2021-11-181-1/+1
|
* Update Time documentationAaron Franke2021-10-282-6/+6
|
* Implement toast notifications in the editorGilles Roudière2021-10-142-2/+2
|
* Replaced NULL with nullptrM. Huri2021-10-121-1/+1
|
* Merge pull request #52963 from Pineapple/WIN32_LEAN_AND_MEAN_masterRémi Verschelde2021-10-051-2/+2
|\
| * Add missing WIN32_LEAN_AND_MEANBartłomiej T. Listwon2021-09-231-2/+2
| |
* | Use range iterators for `Map`Lightning_A2021-09-301-2/+2
|/
* Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez2021-08-292-14/+14
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-1/+1
|
* Merge pull request #50786 from reduz/implement-resource-uidsRémi Verschelde2021-07-241-1/+1
|\ | | | | Implement Resource UIDs
| * Implement Resource UIDsreduz2021-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Most resource types now have unique identifiers. * Applies to text, binary and imported resources. * File formats reference both by text and UID (when available). UID always has priority. * Resource UIDs are 64 bits for better compatibility with the engine. * Can be represented and used textually, example `uuid://dapwmgsmnl28u`. * A special binary cache file is used and exported, containing the mappings. Example of how it looks: ```GDScript [gd_scene load_steps=2 format=3 uid="uid://dw86wq31afig2"] [ext_resource type="PackedScene" uid="uid://bt36ojelx8q6c" path="res://subscene.scn" id="1_t56hs"] ``` GDScript, shaders and other special resource files can't currently provide UIDs, but this should be doable with special keywords on the files. This will be reserved for future PRs.
* | Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-3/+3
|/
* Move `alert` function from `DisplayServer` to `OS`.bruvzg2021-07-222-5/+0
|
* Remove unused code related to Travis CIHugo Locurcio2021-07-011-12/+0
|
* Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde2021-06-121-2/+2
|\ | | | | Add a Time singleton
| * Add Time singletonAaron Franke2021-06-111-2/+2
| |
* | Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-112-2/+2
|/ | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* FileAccess: Don't err in `store_buffer` with buffer of size 0Rémi Verschelde2021-06-071-1/+1
| | | | | | | | | | | The error check was added for `FileAccessUnix` but it's not an error when both `p_src` and `p_length` are zero. Added correct error checks to all implementations to prevent the actual erroneous case: `p_src` is nullptr but `p_length > 0` (risk of null pointer indexing). Fixes #33564.
* Style: Cleanup uses of double spaces between wordsRémi Verschelde2021-06-071-1/+1
| | | | | Or after punctuation. Tried to leave third-party stuff alone, unless it has been heavily modified for Godot.
* Merge pull request #49026 from sarchar/multiple-dns-resolvesRémi Verschelde2021-06-012-7/+17
|\
| * Support multiple address resolution in DNS requestsChuck2021-06-012-7/+17
| | | | | | | | | | | | | | | | Add two new functions to the IP class that returns all addresses/aliases associated with a given address. This is a cherry-pick merge from 010a3433df43a94fee95474360ffa6662c7441b9 which was merged in 2.1, and has been updated to build with the latest code. This merge adds two new methods IP.resolve_hostname_addresses and IP.get_resolve_item_addresses that returns a List of all addresses returned from the DNS request.