{"comment":{"url":"https://api.github.com/repos/godotengine/godot/comments/16197829","html_url":"https://github.com/godotengine/godot/commit/c0e7155591184dffe2d292a0b17d19cb852ae6b2#commitcomment-16197829","id":16197829,"user":{"login":"punto-","id":6645309,"avatar_url":"https://avatars.githubusercontent.com/u/6645309?v=3","gravatar_id":"","url":"https://api.github.com/users/punto-","html_url":"https://github.com/punto-","followers_url":"https://api.github.com/users/punto-/followers","following_url":"https://api.github.com/users/punto-/following{/other_user}","gists_url":"https://api.github.com/users/punto-/gists{/gist_id}","starred_url":"https://api.github.com/users/punto-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punto-/subscriptions","organizations_url":"https://api.github.com/users/punto-/orgs","repos_url":"https://api.github.com/users/punto-/repos","events_url":"https://api.github.com/users/punto-/events{/privacy}","received_events_url":"https://api.github.com/users/punto-/received_events","type":"User","site_admin":false},"position":18,"line":176,"path":"tools/editor/editor_settings.cpp","commit_id":"c0e7155591184dffe2d292a0b17d19cb852ae6b2","created_at":"2016-02-19T09:00:18Z","updated_at":"2016-02-19T09:00:18Z","body":"I did use a text editor, but I was too lazy to press enter :)\n\nI don't know if there's advantages to making it a compile option, but\nhaving it on run time means we don't have to build extra binaries for Steam\nfor example..\n\nOn 19 February 2016 at 05:50, Rémi Verschelde <notifications@github.com>\nwrote:\n\n> Wouldn't it be better to add a SELF_CONTAINED macro that can be passed to\n> the compiler with a SCons option (e.g. self_container=yes) instead of\n> relying on the presence of an undocumented ._sc_ file next to the binary?\n>\n> Something like:\n> ```#ifdef SELF_CONTAINED\n> String exe_path =\n> OS::get_singleton()->get_executable_path().get_base_dir();\n> config_path = exe_path;\n> config_dir = \"editor_data\";\n> #else\n> if (OS::get_singleton()->has_environment(\"APPDATA\")) {\n> // Most likely under windows, save here\n> config_path=OS::get_singleton()->get_environment(\"APPDATA\");\n> config_dir=String(_MKSTR(VERSION_SHORT_NAME)).capitalize();\n> } else if (OS::get_singleton()->has_environment(\"HOME\")) {\n> config_path=OS::get_singleton()->get_environment(\"HOME\");\n> config_dir=\".\"+String(_MKSTR(VERSION_SHORT_NAME)).to_lower();\n> }\n> #endif\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/godotengine/godot/commit/c0e7155591184dffe2d292a0b17d19cb852ae6b2#commitcomment-16197657>\n> .\n>\n"}}