diff --git a/src/rime/lever/customizer.cc b/src/rime/lever/customizer.cc index 727f6c37c4..0ada600d4b 100644 --- a/src/rime/lever/customizer.cc +++ b/src/rime/lever/customizer.cc @@ -28,6 +28,7 @@ namespace rime { // 1.0 X 2.0.custom.X (up-to-date) // 1.0 Y 1.0.custom.X --> Update: 1.0.custom.Y // +// DEPRECATED: in favor of auto-patch config compiler plugin bool Customizer::UpdateConfigFile() { bool need_update = false; bool redistribute = false; @@ -146,4 +147,9 @@ bool Customizer::UpdateConfigFile() { return true; } +bool Customizer::TrashCustomizedCopy() { + // TODO: unimplemented + return false; +} + } // namespace rime diff --git a/src/rime/lever/customizer.h b/src/rime/lever/customizer.h index a1df6fd89c..42d892d7b0 100644 --- a/src/rime/lever/customizer.h +++ b/src/rime/lever/customizer.h @@ -2,8 +2,6 @@ // Copyright RIME Developers // Distributed under the BSD License // -// 2012-02-12 GONG Chen -// #ifndef RIME_CUSTOMIZER_H_ #define RIME_CUSTOMIZER_H_ @@ -20,8 +18,11 @@ class Customizer { dest_path_(dest_path), version_key_(version_key) {} + // DEPRECATED: in favor of auto-patch config compiler plugin bool UpdateConfigFile(); + bool TrashCustomizedCopy(); + protected: boost::filesystem::path source_path_; boost::filesystem::path dest_path_; diff --git a/src/rime/lever/deployment_tasks.cc b/src/rime/lever/deployment_tasks.cc index 0a0766b486..4c66023edd 100644 --- a/src/rime/lever/deployment_tasks.cc +++ b/src/rime/lever/deployment_tasks.cc @@ -268,8 +268,8 @@ bool SchemaUpdate::Run(Deployer* deployer) { fs::path user_data_path(deployer->user_data_dir); fs::path destination_path(user_data_path / (schema_id + ".schema.yaml")); Customizer customizer(source_path, destination_path, "schema/version"); - if (customizer.UpdateConfigFile()) { - LOG(INFO) << "schema '" << schema_id << "' is updated."; + if (customizer.TrashCustomizedCopy()) { + LOG(INFO) << "patched copy of schema '" << schema_id << "' is moved to trash"; } Schema schema(schema_id, new Config); @@ -327,7 +327,8 @@ bool ConfigFileUpdate::Run(Deployer* deployer) { source_config_path = dest_config_path; } Customizer customizer(source_config_path, dest_config_path, version_key_); - return customizer.UpdateConfigFile(); + customizer.TrashCustomizedCopy(); + return true; } bool PrebuildAllSchemas::Run(Deployer* deployer) {