summaryrefslogtreecommitdiff
path: root/drivers/unix
AgeCommit message (Collapse)Author
2017-12-15Remove "const" from PacketPeer get_packet/get_varFabio Alessandrelli
They are NOT constant methods, as state by the comment message, they fetch the last packet and then forget about it, actively changing the state of the object.
2017-12-10Drop unused OS_Unix::has_data and related logicRémi Verschelde
Closes #5536.
2017-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde
2017-12-07Style: Apply clang-format again on all filesRémi Verschelde
Fixes issues introduced by newer clang-format versions or commits pushed directly without using the clang-format pre-commit hook.
2017-12-05Improve slang, especially in user-visible partsUnknown
2017-11-30Changed the dynamic library open function to allow setting the path of the ↵Juan Linietsky
library to open extra libraries.
2017-11-26Allow customizing user:// path (folder in OS::get_data_path())Rémi Verschelde
This allows to specify any valid folder name (including with subfolders) to use as user:// on all platforms. The folder is constrained to the platform-specific OS::get_data_path() (typically what `XDG_DATA_HOME` resolves to). Fixes #13236.
2017-11-21Return and repair file loggingRuslan Mustakov
And make it configurable, too.
2017-11-19Add initial support for the XDG Base Directory specRémi Verschelde
Spec version 0.7 from https://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html (latest as of this commit). Three virtual methods are added to OS for the various XDG paths we will use: - OS::get_data_path gives XDG_DATA_HOME, or if missing: ~/.local/share on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows - OS::get_config_path gives XDG_CONFIG_HOME, or if missing: ~/.config on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows - OS::get_cache_path gives XDG_CACHE_HOME, or if missing: ~/.cache on X11, ~/Library/Caches on macOS and %APPDATA% on Windows So for Windows there are no changes, for Linux we follow the full split spec and for macOS stuff will move from ~/.godot to ~/Library/Application Support/Godot. Support for system-wide installation of templates on Unix was removed for now, as it's a bit hackish and I don't think anyone uses it. user:// will still be OS::get_data_path() + "/godot/app_userdata/$name" by default, but when using the application/config/use_shared_user_dir option it will now use XDG_DATA_HOME/$name, e.g. ~/.local/share/MyGame. For now everything still goes in EditorSettings::get_settings_dir(), but this will be changed in a later commit to make use of the new splitting where relevant. Part of #3513.
2017-11-17Rename OS::get_data_dir to OS::get_user_data_dirRémi Verschelde
Will be needed to avoid confusion with system data path (XDG_DATA_HOME) and editor data dir in upcoming refactoring.
2017-11-09Remove get_default_video_mode definition on OSX/iOSRémi Verschelde
It had been missed in d09160a8b67fdc60e8108962c4e9bd4c0bc7f13e and broke compilation for those platforms. Took the opportunity to run clang-format on the code base to fix some corner cases that went through our static tests/were overlooked recently.
2017-10-29Disable logging until the logs location is sorted outRémi Verschelde
Temporary workaround for #12277.
2017-10-11Use execvp instead of execv to allow OS.execute() to search through PATH.Elia Argentieri
Fix #12003.
2017-10-03OS::execute can now read from stderr too when executing with a pipeMarcelo Fernandez
2017-09-25Extract logging logicRuslan Mustakov
Previously logging logic was scattered over OS class implementations with plenty of duplication. Major changes in this commit: - Extracted logging logic into a separate Logger hierarchy. It allows easy configuration of logging mechanism depending on compile-time or run-time configuration. - Implemented RotatedFileLogger which is usually used with StdLogger, providing persistency of logs. It is often important to be able to obtain logs of the game even in production to be able to understand what happened prior to some problem. On mobile there previously was no way to obtain the logs aside from having the device connected to your machine. - flush() is not performed in release mode for every logged line. It is only performed for errors.
2017-09-20Rename pos to position in user facing methods and variablesletheed
Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
2017-09-17Fix x11 exported executables not getting the +x flagMarcelo Fernandez
2017-09-14Only do 'drive' discovery on X11Hein-Pieter van Braam
As it turns out older versions of the Android NDK have mntent.h but not a complete implementation. If it did work it would most likely give the wrong results on Android anyway. This commit enables the UNIX drive discovery only for X11 We also missed '/run/media' (default for gnome desktops) in the list of places to look for 'drives' on Linux. Add that to the list also. This fixes #11270
2017-09-13Merge pull request #11160 from marcelofg55/drive_funcs_x11Rémi Verschelde
Implemented DirAccess get_drive and get_drive_count for Linux
2017-09-12Implemented DirAccess get_drive and get_drive_count for LinuxMarcelo Fernandez
2017-09-12Merge pull request #10908 from hpvb/fix-unused-variablesRémi Verschelde
Fix unused variable warnings
2017-09-10DirAccess constructor sets current_dir to an absolute pathsupagu
2017-09-08Fix unused variable warningsHein-Pieter van Braam
The forth in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-07Fix EOF in wav file importerHein-Pieter van Braam
In #10973 I reset the state of the stream in get_pos() assuming that the ftell failing would cause proper error checking. This is not how this class was designed, however. This commit fixes the get_8() method to not return unitialized data on eof, and removes the wrong error resets added in #10973. This fixes #11022
2017-09-06Further symlink fixessupagu
2017-09-05Merge pull request #10986 from hpvb/fix-unix-file-openRémi Verschelde
Fix UNIX file open
2017-09-05Fix UNIX file openHein-Pieter van Braam
In #10973 I refactored FileAccessUnix::_open() but I accidentally made it impossible to create new files. This fixes that and fixes #10984
2017-09-05Merge pull request #10973 from hpvb/fix-file-access-unixRémi Verschelde
Make UNIX file access more correct
2017-09-04Merge pull request #10883 from supagu/symlink2Rémi Verschelde
Another take at fixing symlinks
2017-09-04Make UNIX file access more correctHein-Pieter van Braam
Check for errors in the POSIX recommended ways.
2017-09-03Another take at fixing symlinksFabian Mathews
2017-09-02Fix use of unitialized variablesHein-Pieter van Braam
The second in my quest to make Godot 3.x compile with -Werror on GCC7
2017-08-29Merge pull request #10552 from RandomShaper/improve-posixRémi Verschelde
Improve Mac/UNIX conformance/reliability
2017-08-27Make build scripts Python3 compatibleMatthias Hoelzl
- The Windows, UWP, Android (on Windows) and Linux builds are tested with Scons 3.0 alpha using Python 3. - OSX and iOS should hopefully work but are not tested since I don't have a Mac. - Builds using SCons 2.5 and Python 2 should not be impacted.
2017-08-27Dead code tells no talesRémi Verschelde
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-24Implement custom thread numbering for POSIXPedro J. Estébanez
For every UNIX-derived (Android, Linux, macOS, iOS) flavor, a global counter is atomically incremented on thread start. That id is kept as thread-local storage. Therefore, thread ids are sequential numbers, trivially comparable. This improves the previous state of things, in which `pthread_t` were casted to `Thread::ID` and unportabily compared. Also big, ugly thread ids appeared.
2017-08-24Make OS::delay_usec() more reliable on UNIXPedro J. Estébanez
Implemented with `nanosleep()`. `usleep()` is deprecated. Also loops to ensure that __at least__ the requested time is waited, accounting for spurious interruptions. May help in situations like reattempting to connect to the debugger.
2017-08-21Revert "Reworked change_dir to support symlinks"Juan Linietsky
2017-08-17Merge pull request #8144 from supagu/symlinkRémi Verschelde
Reworked change_dir to support symlinks
2017-08-16Synchronize parameter names in definition and declarationTwistedTwigleg
Fixes #10244.
2017-08-14Use const reference where favorableWilson E. Alvarez
2017-08-11Explicitily unsed AI_NUMERICHOST flag to fix HTML5Fabio Alessandrelli
2017-08-07Makes all Godot API's methods Lower CaseIndah Sylvia
2017-07-27added an optional parameter to OS symbol lookupKarroffel
When looking up a symbol from a library, previously an error was shown when the symbol did not exist. That caused confusion when the lookup was completely optional. This adds a new parameter to that method so that those errors can be handled manually if needed.
2017-07-19-Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky
-Added system for feature overrides, it's pretty cool :)
2017-07-17-Reorganized all properties of project settings (Sorry, Again).Juan Linietsky
(Lot's of bloat accumulated, so it was time for clean up.) -Made EditorSettings and ProjectSettings search more useful (search in sections too)
2017-07-16get_executable_path slight change to make it work under OpenBSDDavid Carlier
2017-06-25BuildSystem: generated files have .gen.extensionPoommetee Ketson
2017-05-08Fix local ip addresses (interfaces) detection.Fabio Alessandrelli
Ignore non-IP addresses for both windows and unix