._sc_ file is now a ConfigFile for self contained mode
can contain a pre-loaded list of projects to be added to editor_settings.xml
|
@ -170,6 +170,7 @@ void EditorSettings::create() {
|
|||
String config_path;
|
||||
String config_dir;
|
||||
String config_file="editor_settings.xml";
|
||||
Ref<ConfigFile> extra_config = memnew(ConfigFile);
|
||||
|
||||
String exe_path = OS::get_singleton()->get_executable_path().get_base_dir();
|
||||
DirAccess* d = DirAccess::create_for_path(exe_path);
|
||||
|
@ -178,7 +179,7 @@ void EditorSettings::create() {
|
|||
// editor is self contained
|
||||
config_path = exe_path;
|
||||
config_dir = "editor_data";
|
||||
|
||||
extra_config->load(exe_path + "/._sc_");
|
||||
} else {
|
||||
|
||||
if (OS::get_singleton()->has_environment("APPDATA")) {
|
||||
|
@ -296,10 +297,20 @@ void EditorSettings::create() {
|
|||
|
||||
fail:
|
||||
|
||||
// patch init projects
|
||||
if (extra_config->has_section("init_projects")) {
|
||||
Vector<String> list = extra_config->get_value("init_projects", "list");
|
||||
for (int i=0; i<list.size(); i++) {
|
||||
|
||||
list[i] = exe_path + "/" + list[i];
|
||||
};
|
||||
extra_config->set_value("init_projects", "list", list);
|
||||
};
|
||||
|
||||
singleton = Ref<EditorSettings>( memnew( EditorSettings ) );
|
||||
singleton->config_file_path=config_file_path;
|
||||
singleton->settings_path=config_path+"/"+config_dir;
|
||||
singleton->_load_defaults();
|
||||
singleton->_load_defaults(extra_config);
|
||||
singleton->setup_network();
|
||||
singleton->scan_plugins();
|
||||
|
||||
|
@ -445,7 +456,7 @@ void EditorSettings::destroy() {
|
|||
singleton=Ref<EditorSettings>();
|
||||
}
|
||||
|
||||
void EditorSettings::_load_defaults() {
|
||||
void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
|
@ -552,6 +563,17 @@ void EditorSettings::_load_defaults() {
|
|||
set("run/auto_save_before_running",true);
|
||||
set("resources/save_compressed_resources",true);
|
||||
set("resources/auto_reload_modified_images",true);
|
||||
|
||||
if (p_extra_config.is_valid() && p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
|
||||
|
||||
Vector<String> list = p_extra_config->get_value("init_projects", "list");
|
||||
for (int i=0; i<list.size(); i++) {
|
||||
|
||||
String name = list[i].replace("/", "::");
|
||||
set("projects/"+name, list[i]);
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
void EditorSettings::notify_changes() {
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include "resource.h"
|
||||
#include "os/thread_safe.h"
|
||||
#include "core/io/config_file.h"
|
||||
|
||||
class EditorPlugin;
|
||||
|
||||
|
@ -86,7 +87,7 @@ private:
|
|||
EditorPlugin *_load_plugin_editor(const String& p_path);
|
||||
Error _load_plugin(const String& p_path,Plugin& plugin);
|
||||
|
||||
void _load_defaults();
|
||||
void _load_defaults(Ref<ConfigFile> p_extra_config = NULL);
|
||||
|
||||
String project_config_path;
|
||||
|
||||
|
|
BIN
tools/steam/community_capsule.jpg
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
tools/steam/header.png
Normal file
After Width: | Height: | Size: 114 KiB |
1029
tools/steam/icon32.icns
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
tools/steam/icon32.ico
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
tools/steam/icons.zip
Normal file
BIN
tools/steam/large_capsule.png
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
tools/steam/main_capsule.png
Normal file
After Width: | Height: | Size: 195 KiB |
7
tools/steam/make_icons.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
convert -resize 32x32 ../../godot_icon.svg icon32.ico
|
||||
convert -resize 32x32 ../../godot_icon.svg icon32.icns
|
||||
for s in 16 24 32 64 96 128 256; do convert -resize ${s}x$s ../../godot_icon.svg icon$s.png; done
|
||||
zip icons.zip icon*.png
|
||||
rm icon*.png
|
||||
|
||||
|
BIN
tools/steam/small_capsule.png
Normal file
After Width: | Height: | Size: 33 KiB |