Commit Graph

536 Commits

Author SHA1 Message Date
Thaddeus Crews
1dcb686325
Merge pull request #99026 from Faless/net/split_ip
[Net] Split Unix/Windows IP implementation
2024-11-18 09:23:43 -06:00
A Thousand Ships
68f638cf02
Use (r)find_char instead of (r)find for single characters 2024-11-17 10:02:18 +01:00
Fabio Alessandrelli
fc52821cfb [Net] Properly rename NetSocketPosix to NetSocketUnix 2024-11-13 10:27:01 +01:00
Thaddeus Crews
179321a0a3
Merge pull request #91201 from bruvzg/con_type
[OS] Add functions to determine standard I/O device type.
2024-11-12 12:13:12 -06:00
Fabio Alessandrelli
168a2a1466 [Net] Split Unix/Windows IP implementation 2024-11-12 17:33:47 +01:00
Thaddeus Crews
1cbe9715ea
Merge pull request #98969 from Faless/net/split_sockets
[Net] Split Unix/Windows NetSocket implementation
2024-11-12 09:27:40 -06:00
Fabio Alessandrelli
0c620b29cd [Net] Split Unix/Windows NetSocket implementation 2024-11-10 16:13:50 +01:00
Valentin Cocaud
c09731c413 Warn on filesystem case mismatch
When a file is opened with a wrong case, it can work on the developer system but break on a user system with a case-sensitive filesystem.

This will display a warning when it happens.

CAVEATS: It will also display the warning if a symlink is in the path.

Adapt warning if the file is a symlink. Avoid warning on symlinks.

Fix memory leak and avoid `lstat` usage.

Avoid exposing real_path when not in TOOLS_ENABLED mode.
2024-11-08 14:23:41 -08:00
bruvzg
76164c2aa9
[OS] Add functions to determine standard I/O device type. 2024-11-06 13:33:38 +02:00
bruvzg
4cc9d2f437
[Linux/BSD] Fix cross-device rename. 2024-10-02 08:57:37 +03:00
Rémi Verschelde
ef7547384c
Merge pull request #95678 from Hilderin/fix-slow-load-on-large-project-v2
Fix slow editor load on large projects (v2)
2024-09-26 12:45:31 +02:00
Hilderin
21f7c8a25f Fix slow editor load on large projects (v2) 2024-09-25 17:36:39 -04:00
Thaddeus Crews
9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Pablo Andres Fuente
84e24017b0
Adding a macro on NetSocketPosix to pick the right type for FIONREAD len
On Windows, `ioctlsocket` returns `len` as an unsigned long.
On Posix, `ioctl` returns `len` as an int.
This aims to fix #41287 bug, which was seen on Linux.
The implementation is just a new macro that is set with the proper type
for each platform.
2024-09-17 16:09:33 +02:00
Rémi Verschelde
cc52112144
Merge pull request #96643 from bruvzg/fs_links
[FileSystem Dock] Add symlink indicator and tooltip.
2024-09-12 10:28:44 +02:00
Rémi Verschelde
a87ceed163
Merge pull request #96639 from bruvzg/symlink_ren
Fix renaming directory symlinks on Linux.
2024-09-06 22:38:58 +02:00
bruvzg
da4f5fb953
[FileSystem Dock] Add symlink indicator and tooltip. 2024-09-06 14:55:07 +03:00
bruvzg
10f3c1f587
Add support for non-blocking IO mode to OS.execute_with_pipe. 2024-09-06 14:16:39 +03:00
bruvzg
3e936e795c
Fix renaming directory symlinks on Linux. 2024-09-06 13:22:20 +03:00
BlueCube3310
205a10e0ae Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
Joel Croteau
f44d6a235f Fix reload of GDExtension libraries in framework package on macos
`GDExtension::open_library` has a check in it to see if the library was loaded
from a temp file, and if it was to restore the original name as that is the one
we actually care about. This check is breaking extension reloading on Mac when
the library path is to a framework folder, as the file inside the framework
will not generally be the same name as the folder.

This check also shouldn't be necessary even on Windows, which is the only
platform that uses `generate_temp_files`, since disposal of the created temp
file is handled within `OS_Windows::open_dynamic_library`, and
`GDExtension::open_library` (which is the only function to call
`open_dynamic_library` with a `p_data` argument) only cares about the original
library file path and has to do extra work to remove the name of the temp file.
Instead, I have removed that check and set `OS_Windows::open_dynamic_library`
to return the name of the original file and not the name of the copy.

This fixes GDExtension reloading on macOS. I do not have a Windows machine
available to test that it still works properly on Windows, so someone should
check that before merging this.
2024-08-08 08:31:49 -06:00
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Rémi Verschelde
504d01b61e
Merge pull request #90403 from bruvzg/file_resize
[FileAccess] Implement `resize` method.
2024-04-22 12:51:55 +02:00
Fredia Huya-Kouadio
764de7fe31 Collapse the gdextension arguments into the GDExtensionData struct
This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
2024-04-19 07:56:02 -07:00
Fredia Huya-Kouadio
ede88cf59d Fix loading GDExtension dependencies on Android 2024-04-19 07:55:08 -07:00
Rémi Verschelde
7210d6cb43
Merge pull request #90358 from KoBeWi/finding_errors_in_other_apps
Add `OS.get_process_exit_code()` method
2024-04-16 13:30:41 +02:00
kobewi
dce4a3e4c2 Add get_process_exit_code() method 2024-04-16 12:46:15 +02:00
bruvzg
88b3e68f93
[FileAccess] Implement resize method. 2024-04-12 19:20:49 +03:00
bruvzg
57fde36f31
[Unix / DirAccess] Fix removing directory symlinks with remove, ensure erase_contents_recursive is not following directory symlinks. 2024-04-12 10:06:49 +03:00
DmitriySalnikov
b73e740786 Add renaming of PDB files to avoid blocking them 2024-04-05 00:14:23 +03:00
bruvzg
082b420c0a
Implement OS.execute_with_pipe method to run process with redirected stdio.
Implement `pipe://*` path handling for creation of named pipes.
2024-03-27 11:41:16 +02:00
Rémi Verschelde
b0d07b1bc2
Merge pull request #86936 from akx/env-utf-8
Attempt parsing environment variables as UTF-8
2024-03-11 14:02:22 +01:00
Omar Polo
32877ae994 fix FileAccessUnix on OpenBSD: there is no UF_HIDDEN
Part of the joint effort with @rfht to port Godot 4 on OpenBSD.
2024-03-01 19:33:49 +00:00
Muller-Castro
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
Adam Scott
bd70b8e1f6
Add THREADS_ENABLED macro in order to compile Godot to run on the main thread 2024-01-17 13:58:29 -05:00
Aarni Koskela
a4c5dae8cb Attempt to parse environment variables as UTF-8 2024-01-07 19:53:43 +02:00
Rémi Verschelde
5d44c85d4c
Merge pull request #84107 from BlueCube3310/file-access-optimization
Use platform-specific methods for FileAccess reading and writing
2024-01-04 16:39:47 +01:00
Rémi Verschelde
c921b6587c
Merge pull request #84469 from time-killer-games/patch-1
Fix NetBSD executable path
2024-01-04 14:25:46 +01:00
Daylily-Zeleen
fe6b073811 Distinguishs between dynamic library not found and can't be opened. 2024-01-01 20:01:57 +08:00
Samuel Venable
52da1e9b6b Fix NetBSD Executable Path 2023-11-06 06:33:36 -08:00
David Snopek
a039d0b61a Linux: Disable RTLD_DEEPBIND mode for dlopen() in sanitizer builds 2023-10-30 16:16:08 -05:00
BlueCube3310
6ed1731746 Use platform-specific methods for FileAccess reading and writing 2023-10-29 17:34:18 +01:00
bruvzg
54eae6221a
[Linux] Implement DirAccess.is_case_sensitive for EXT4 and F2FS. 2023-10-13 15:48:03 +03:00
Rémi Verschelde
49495293c7
Merge pull request #82973 from dsnopek/gdextension-linux-favor-local-symbols
On Linux, favor local symbols when loading a shared library
2023-10-10 12:33:06 +02:00
A Thousand Ships
f18aa00e85 Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-10-08 17:23:33 +02:00
David Snopek
7f4e700bf7 On Linux, favor local symbols when loading a shared library 2023-10-07 11:06:56 -05:00
Thaddeus Crews
e9b2af91cf
check_c_headers from tuple array to dictionary 2023-10-01 14:09:39 -05:00
Rémi Verschelde
814ab59c37
Windows: Remove MSVC define redundant with _MSC_VER
Cleanup unused MSVC code in FileAccessUnix.
2023-09-26 11:11:45 +02:00
A Thousand Ships
3565d1bf7e [Drivers,Platform] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-12 20:13:32 +02:00
Rémi Verschelde
8de6405288
UWP: Remove platform port, needs to be redone from scratch for 4.x
The UWP platform port was never ported to the Godot 4.0+ API,
and it's now accumulating bitrot as it doesn't compile, and thus
we no longer propagate platform changes in it.

So we finally remove to acknowledge this state. There's still some
interest in reviving the UWP port eventually, especially as support
for Direct3D 12 will soon be merged, but when that happens it will
be easiest to redo it from scratch.
2023-09-07 15:01:59 +02:00