summaryrefslogtreecommitdiffstats
path: root/platform/windows/os_windows.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix 32-bit Windows build.Pāvels Nadtočajevs2024-11-171-2/+2
| | | | (cherry picked from commit 287b7543a0861a74e1b1f8b8d88102f5d9e13586)
* Merge commit godotengine/godot@711c725cf1b641d05d6cc988a64601622e48fe4aSpartan3222024-11-151-23/+66
|\
| * Windows: Avoid child processes inheriting all file handlesPedro J. Estébanez2024-11-121-23/+66
| |
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotSpartan3222024-10-131-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* [Windows] Use the same API for all `OS_Windows::*_environment` functions.bruvzg2024-09-171-10/+1
| | | | (cherry picked from commit 319bfa9965daae7d9e9ba5f6553afa701aad8f46)
* Windows: Call `AddDllDirectory()` with an absolute pathDavid Snopek2024-09-161-1/+2
| | | | (cherry picked from commit e8bd385f534cf02696100d90a2c4ed636353cddc)
* Fix reload of GDExtension libraries in framework package on macosJoel Croteau2024-09-161-15/+15
| | | | | | | | | | | | | | | | | | | | | | | `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. (cherry picked from commit f44d6a235f198e3f8c5189161840315f43cfdd2e)
* Remove unused `is_wow64` method in `OS_Windows`Rémi Verschelde2024-07-111-20/+0
| | | | | It was added in b4d369c88 for `get_processor_count`, but this was later changed to rely on `std::thread` in 6bf02c016.
* [Windows] Improve console IO redirection.bruvzg2024-04-271-7/+27
|
* Collapse the gdextension arguments into the `GDExtensionData` structFredia Huya-Kouadio2024-04-191-8/+8
| | | | This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
* Fix loading GDExtension dependencies on AndroidFredia Huya-Kouadio2024-04-191-1/+1
|
* Add get_process_exit_code() methodkobewi2024-04-161-1/+40
|
* Add renaming of PDB files to avoid blocking themDmitriySalnikov2024-04-051-3/+60
|
* Implement `OS.execute_with_pipe` method to run process with redirected stdio.bruvzg2024-03-271-0/+101
| | | | Implement `pipe://*` path handling for creation of named pipes.
* clang-tidy: Enforce `modernize-use-nullptr`Thaddeus Crews2024-03-121-14/+14
|
* Add const lvalue ref to core/* container parametersMuller-Castro2024-02-141-3/+3
|
* Merge pull request #86682 from ↵Rémi Verschelde2024-01-021-0/+2
|\ | | | | | | | | | | Daylily-Zeleen/daylily-zeleen/distinguish_between_dynamic_libaray_not_found_and_can't_open Distinguish between dynamic library not found and can't be opened.
| * Distinguishs between dynamic library not found and can't be opened.Daylily-Zeleen2024-01-011-0/+2
| |
* | Fix `OS.get_system_font_path` and `OS.get_system_font_path_for_text` to ↵Septian2023-12-271-2/+2
|/ | | | return correct value
* [Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-121-2/+2
|
* Windows: Always double-quote path when launching explorer.exe to browseBrecht Kuppens2023-08-281-7/+2
| | | | | | | | | | Code now always double quotes the filename to use as command line argument when calling explorer.exe. In particular, commas in a filename would be interpreted by explorer.exe as separators for commands. Similarly a trim_suffix for "file://" is assumed to be a mistake, this could potentially be a PREfix that we want to strip, but never a suffix. Since it didn't seem needed in the end, we removed it.
* [Windows] Initialize COM as apartment-threaded.bruvzg2023-07-201-1/+1
|
* Fix formatting of dlopen error message on WindowsKamil Brzoskowski2023-07-091-3/+3
| | | | | | And harmonize the format for all platforms. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Style: Harmonize header includes in platform portsRémi Verschelde2023-06-081-4/+5
| | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module should be included with relative paths (relative to the root folder of the modular component, e.g. `platform/linuxbsd/`), in their own section before Godot's "core" includes. The `api` and `export` subfolders also need to be handled as self-contained (and thus use relative paths for their "local" includes) as they are all compiled for each editor platform, without necessarily having the api/export matching platform folder in the include path. E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp` and those need to use relative includes for it to work.
* Replace get_rendering_device() call to prevent crashes on OpenGL.MJacred2023-06-061-2/+2
| | | | And make OpenGL video adapter info align with Vulkan.
* Copy system info to clipboard + Update bug_report.ymlMJacred2023-05-271-3/+7
| | | | | | | | plus minor static-related fixes * linuxbsd: get_systemd_os_release_info_value() -> static breaks usage if used multiple times * windows/linuxbsd: get_video_adapter_driver_info() writes info into static * linuxbsd: get_distribution_name() + get_version() -> write bsd fallback into static variable * windows/uwp/android: remove unnecessary use of static
* [TLS/Windows] Skip disallowed certs in the trusted CA list.Fabio Alessandrelli2023-05-141-1/+11
| | | | | | | | | Turns out the list of trusted root certificates contains disallowed certificates (i.e. certificates which are no longer trusted or have been revoked). We need to check for the property `CERT_DISALLOWED_FILETIME_PROP_ID` to check if and when the certificates should be distrusted.
* Merge pull request #76836 from Faless/tls/system_certsRémi Verschelde2023-05-121-0/+21
|\ | | | | | | [TLS] Add support for platform-specific CA bundles.
| * [TLS] Add support for platform-specific CA bundles.Fabio Alessandrelli2023-05-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new OS::get_system_ca_certs method which can be implemented by platforms to retrieve the list of trusted CA certificates using OS specific APIs. The function should return the certificates in PEM format, and is currently implemented for Windows/macOS/LinuxBSD(*)/Android. mbedTLS will fall back to bundled certificates when the OS returns no certificates. (*) LinuxBSD does not have a standardized certificates store location. The current implementation will test for common locations and may return an empty string on some distributions (falling back to the bundled certificates).
* | Enable shadow warnings and fix raised errorsNinni Pipping2023-05-111-8/+6
|/
* Fix building the Windows x86_32 targetDavi2023-05-071-4/+4
| | | | In x86_32, `ULONG_PTR` and `SIZE_T` are defined as `unsigned long`, which is not a type supported by Variant without the `NEED_LONG_INT` define.
* Merge pull request #69698 from Daylily-Zeleen/daylily-zeleen/show_in_explorerRémi Verschelde2023-04-251-0/+45
|\ | | | | | | Implement and expose OS::shell_show_in_file_manager()
| * Implement and expose OS::shell_show_in_file_manager()Daylily-Zeleen2023-04-251-0/+45
| |
* | [OS] Implement and expose to scripting APIs `get_memory_info` method instead ↵bruvzg2023-04-241-0/+38
|/ | | | of old `get_free_static_memory`.
* Merge pull request #75881 from bruvzg/win_coinitRémi Verschelde2023-04-181-3/+3
|\ | | | | | | [Windows] Cleanup COM library initialization/uninitialization.
| * [Windows] Cleanup COM library initialization/uninitialization.bruvzg2023-04-101-3/+3
| |
* | [Windows] Detect missing DLL dependencies and list them in the ↵bruvzg2023-03-271-3/+98
|/ | | | open_dynamic_library error message.
* Windows: Workaround missing DWRITE_FONT_WEIGHT value in old MinGWRémi Verschelde2023-03-051-0/+5
| | | | Fixes #74339.
* Fix Windows to Windows SSH remote deploy. Fix Windows `execute` exit code.bruvzg2023-02-271-2/+1
|
* Fixed a few godot engine 4 warnings on clang with Opengl and Windows apis.K. S. Ernest (iFire) Lee2023-01-301-3/+3
|
* Merge pull request #71220 from reduz/prevent-opening-windows-console-filesRémi Verschelde2023-01-211-0/+4
|\ | | | | | | Prevent opening Windows console files
| * Prevent opening Windows console filesJuan Linietsky2023-01-111-0/+4
| | | | | | | | Fixes #20110.
* | OS: Add `unset_environment`, better validate inputRémi Verschelde2023-01-161-2/+11
| | | | | | | | | | | | | | | | | | Instead of returning an undocumented boolean error code, we do the validation checks that should ensure a successful result. Based on: - https://linux.die.net/man/3/setenv - https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
* | [Windows] Allow OS::kill method to terminate non-child processes.bruvzg2023-01-121-6/+14
| |
* | Merge pull request #70714 from Calinou/doc-os-stdinRémi Verschelde2023-01-121-7/+5
|\ \ | |/ |/| Improve documentation for `OS.read_string_from_stdin()`
| * Improve documentation for `OS.read_string_from_stdin()`Hugo Locurcio2023-01-111-7/+5
| | | | | | | | | | | | This makes it clearer that calls to this method are blocking. The unused method parameter was also removed.
* | One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
|/ | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix reading Unicode from stdio.bruvzg2022-12-211-2/+5
|
* Windows: Validate that the font family name exists before trying to get the ↵oOjor-elOo2022-12-121-1/+1
| | | | | | font family I didn't have the first emoji font installed, which led an an exception when calling font_collection->GetFontFamily() no the new rows.