File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ namespace rime {
2828// 1.0 X 2.0.custom.X (up-to-date)
2929// 1.0 Y 1.0.custom.X --> Update: 1.0.custom.Y
3030//
31+ // DEPRECATED: in favor of auto-patch config compiler plugin
3132bool Customizer::UpdateConfigFile () {
3233 bool need_update = false ;
3334 bool redistribute = false ;
@@ -146,4 +147,9 @@ bool Customizer::UpdateConfigFile() {
146147 return true ;
147148}
148149
150+ bool Customizer::TrashCustomizedCopy () {
151+ // TODO: unimplemented
152+ return false ;
153+ }
154+
149155} // namespace rime
Original file line number Diff line number Diff line change 22// Copyright RIME Developers
33// Distributed under the BSD License
44//
5- // 2012-02-12 GONG Chen <chen.sst@gmail.com>
6- //
75#ifndef RIME_CUSTOMIZER_H_
86#define RIME_CUSTOMIZER_H_
97
@@ -20,8 +18,11 @@ class Customizer {
2018 dest_path_ (dest_path),
2119 version_key_(version_key) {}
2220
21+ // DEPRECATED: in favor of auto-patch config compiler plugin
2322 bool UpdateConfigFile ();
2423
24+ bool TrashCustomizedCopy ();
25+
2526 protected:
2627 boost::filesystem::path source_path_;
2728 boost::filesystem::path dest_path_;
Original file line number Diff line number Diff line change @@ -268,8 +268,8 @@ bool SchemaUpdate::Run(Deployer* deployer) {
268268 fs::path user_data_path (deployer->user_data_dir );
269269 fs::path destination_path (user_data_path / (schema_id + " .schema.yaml" ));
270270 Customizer customizer (source_path, destination_path, " schema/version" );
271- if (customizer.UpdateConfigFile ()) {
272- LOG (INFO) << " schema '" << schema_id << " ' is updated. " ;
271+ if (customizer.TrashCustomizedCopy ()) {
272+ LOG (INFO) << " patched copy of schema '" << schema_id << " ' is moved to trash " ;
273273 }
274274
275275 Schema schema (schema_id, new Config);
@@ -327,7 +327,8 @@ bool ConfigFileUpdate::Run(Deployer* deployer) {
327327 source_config_path = dest_config_path;
328328 }
329329 Customizer customizer (source_config_path, dest_config_path, version_key_);
330- return customizer.UpdateConfigFile ();
330+ customizer.TrashCustomizedCopy ();
331+ return true ;
331332}
332333
333334bool PrebuildAllSchemas::Run (Deployer* deployer) {
You can’t perform that action at this time.
0 commit comments