From 9c939d389e3172fefbbb00fc583d85ce630af9ca Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Sun, 21 Feb 2016 20:15:47 -0300 Subject: ._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 --- tools/editor/editor_settings.cpp | 28 +- tools/editor/editor_settings.h | 3 +- tools/steam/community_capsule.jpg | Bin 0 -> 4738 bytes tools/steam/header.png | Bin 0 -> 117016 bytes tools/steam/icon32.icns | 1029 +++++++++++++++++++++++++++++++++++++ tools/steam/icon32.ico | Bin 0 -> 4286 bytes tools/steam/icons.zip | Bin 0 -> 114972 bytes tools/steam/large_capsule.png | Bin 0 -> 120655 bytes tools/steam/main_capsule.png | Bin 0 -> 199379 bytes tools/steam/make_icons.sh | 7 + tools/steam/small_capsule.png | Bin 0 -> 34147 bytes 11 files changed, 1063 insertions(+), 4 deletions(-) create mode 100644 tools/steam/community_capsule.jpg create mode 100644 tools/steam/header.png create mode 100644 tools/steam/icon32.icns create mode 100644 tools/steam/icon32.ico create mode 100644 tools/steam/icons.zip create mode 100644 tools/steam/large_capsule.png create mode 100644 tools/steam/main_capsule.png create mode 100644 tools/steam/make_icons.sh create mode 100644 tools/steam/small_capsule.png diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 1298e447d5..78fde9950d 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -170,6 +170,7 @@ void EditorSettings::create() { String config_path; String config_dir; String config_file="editor_settings.xml"; + Ref 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 list = extra_config->get_value("init_projects", "list"); + for (int i=0; iset_value("init_projects", "list", list); + }; + singleton = Ref( 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(); } -void EditorSettings::_load_defaults() { +void EditorSettings::_load_defaults(Ref 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 list = p_extra_config->get_value("init_projects", "list"); + for (int i=0; i p_extra_config = NULL); String project_config_path; diff --git a/tools/steam/community_capsule.jpg b/tools/steam/community_capsule.jpg new file mode 100644 index 0000000000..7ac8d6d0a1 Binary files /dev/null and b/tools/steam/community_capsule.jpg differ diff --git a/tools/steam/header.png b/tools/steam/header.png new file mode 100644 index 0000000000..3e11c56629 Binary files /dev/null and b/tools/steam/header.png differ diff --git a/tools/steam/icon32.icns b/tools/steam/icon32.icns new file mode 100644 index 0000000000..6234e7d5ac --- /dev/null +++ b/tools/steam/icon32.icns @@ -0,0 +1,1029 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/steam/icon32.ico b/tools/steam/icon32.ico new file mode 100644 index 0000000000..17637c6784 Binary files /dev/null and b/tools/steam/icon32.ico differ diff --git a/tools/steam/icons.zip b/tools/steam/icons.zip new file mode 100644 index 0000000000..eaeee02298 Binary files /dev/null and b/tools/steam/icons.zip differ diff --git a/tools/steam/large_capsule.png b/tools/steam/large_capsule.png new file mode 100644 index 0000000000..0cc15dba91 Binary files /dev/null and b/tools/steam/large_capsule.png differ diff --git a/tools/steam/main_capsule.png b/tools/steam/main_capsule.png new file mode 100644 index 0000000000..ad05f7a1d1 Binary files /dev/null and b/tools/steam/main_capsule.png differ diff --git a/tools/steam/make_icons.sh b/tools/steam/make_icons.sh new file mode 100644 index 0000000000..111d7bec2c --- /dev/null +++ b/tools/steam/make_icons.sh @@ -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 + + diff --git a/tools/steam/small_capsule.png b/tools/steam/small_capsule.png new file mode 100644 index 0000000000..640f9ea84a Binary files /dev/null and b/tools/steam/small_capsule.png differ -- cgit v1.2.3