From 32c12a92a5633678921ee9e43f72eb3b59a635ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 17 Nov 2017 17:11:41 +0100 Subject: Add initial support for the XDG Base Directory spec 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. --- drivers/unix/SCsub | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'drivers/unix/SCsub') diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub index c560e1289f..ada8255580 100644 --- a/drivers/unix/SCsub +++ b/drivers/unix/SCsub @@ -2,16 +2,6 @@ Import('env') -g_set_p = '#ifdef UNIX_ENABLED\n' -g_set_p += '#include "os_unix.h"\n' -g_set_p += 'String OS_Unix::get_global_settings_path() const {\n' -g_set_p += '\treturn "' + env["unix_global_settings_path"] + '";\n' -g_set_p += '}\n' -g_set_p += '#endif' -f = open("os_unix_global_settings_path.gen.cpp", "w") -f.write(g_set_p) -f.close() - env.add_source_files(env.drivers_sources, "*.cpp") env["check_c_headers"] = [ [ "mntent.h", "HAVE_MNTENT" ] ] -- cgit v1.2.3