Update template

This commit is contained in:
Aoran Zeng 2024-10-04 02:21:54 +08:00
parent d9e6840399
commit 423b041a91
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
22 changed files with 194 additions and 193 deletions

View File

@ -559,8 +559,8 @@ get_target (const char *input, TargetOp code, char *option)
if (target->featfn) if (target->featfn)
{ {
FeatInfo fi = target->featfn(""); FeatInfo f = target->featfn("");
cli_print_target_features (fi, input); cli_print_target_features (f, input);
} }
} }
else if (TargetOp_Measure_Source==code) else if (TargetOp_Measure_Source==code)

View File

@ -92,19 +92,19 @@ pl_dart_flutter_setsrc (char *option)
FeatInfo FeatInfo
pl_dart_flutter_feat (char *option) pl_dart_flutter_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = "该换源通过写入环境变量实现若多次换源请手动清理profile文件"; f.note = "该换源通过写入环境变量实现若多次换源请手动清理profile文件";
return fi; return f;
} }
def_target_gsf(pl_dart_flutter); def_target_gsf(pl_dart_flutter);

View File

@ -85,19 +85,19 @@ pl_dart_setsrc (char *option)
FeatInfo FeatInfo
pl_dart_feat (char *option) pl_dart_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = "该换源通过写入环境变量实现若多次换源请手动清理profile文件"; f.note = "该换源通过写入环境变量实现若多次换源请手动清理profile文件";
return fi; return f;
} }
def_target_gsf(pl_dart); def_target_gsf(pl_dart);

View File

@ -65,18 +65,18 @@ pl_nodejs_bun_resetsrc (char *option)
FeatInfo FeatInfo
pl_nodejs_bun_feat (char *option) pl_nodejs_bun_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = FullyCan; f.cap_locally = FullyCan;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }
// def_target_gsrf(pl_nodejs_bun); // def_target_gsrf(pl_nodejs_bun);

View File

@ -113,17 +113,17 @@ pl_nodejs_resetsrc (char *option)
FeatInfo FeatInfo
pl_nodejs_feat (char *option) pl_nodejs_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = FullyCan; f.cap_locally = FullyCan;
fi.locally = "Support npm (chsrc v0.1.7)\nSupport yarn v2 (chsrc v0.1.8.1)\nSupport pnpm (chsrc v0.1.8.2)"; f.locally = "Support npm (chsrc v0.1.7)\nSupport yarn v2 (chsrc v0.1.8.1)\nSupport pnpm (chsrc v0.1.8.2)";
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
return fi; return f;
} }
def_target_gsrf (pl_nodejs); def_target_gsrf (pl_nodejs);

View File

@ -92,18 +92,18 @@ pl_nodejs_yarn_resetsrc (char *option)
FeatInfo FeatInfo
pl_nodejs_yarn_feat (char *option) pl_nodejs_yarn_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = FullyCan; f.cap_locally = FullyCan;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }
// def_target_gsrf(pl_nodejs_yarn); // def_target_gsrf(pl_nodejs_yarn);

View File

@ -61,18 +61,18 @@ pl_nodejs_npm_resetsrc (char *option)
FeatInfo FeatInfo
pl_nodejs_npm_feat (char *option) pl_nodejs_npm_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = FullyCan; f.cap_locally = FullyCan;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }
// def_target_gsrf(pl_nodejs_npm); // def_target_gsrf(pl_nodejs_npm);

View File

@ -64,18 +64,18 @@ pl_nodejs_nvm_resetsrc (char *option)
FeatInfo FeatInfo
pl_nodejs_nvm_feat (char *option) pl_nodejs_nvm_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.locally = ""; f.locally = "";
fi.can_english = false; f.can_english = false;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }
// def_target_gsrf(pl_nodejs_nvm); // def_target_gsrf(pl_nodejs_nvm);

View File

@ -62,18 +62,18 @@ pl_nodejs_pnpm_resetsrc (char *option)
FeatInfo FeatInfo
pl_nodejs_pnpm_feat (char *option) pl_nodejs_pnpm_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = FullyCan; f.cap_locally = FullyCan;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }

View File

@ -64,17 +64,17 @@ pl_php_setsrc (char *option)
FeatInfo FeatInfo
pl_php_feat (char *option) pl_php_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = FullyCan; f.cap_locally = FullyCan;
fi.locally = "composer 支持 (From v0.1.7)"; f.locally = "composer 支持 (From v0.1.7)";
fi.can_english = false; f.can_english = false;
fi.can_user_define = true; f.can_user_define = true;
return fi; return f;
} }
def_target_gsf (pl_php); def_target_gsf (pl_php);

View File

@ -63,20 +63,20 @@ pl_python_pdm_resetsrc (char *option)
FeatInfo FeatInfo
pl_python_pdm_feat (char *option) pl_python_pdm_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
// PDM 完全支持项目级换源 // PDM 完全支持项目级换源
fi.cap_locally = FullyCan; f.cap_locally = FullyCan;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }
// def_target_gsrf(pl_python_pdm); // def_target_gsrf(pl_python_pdm);

View File

@ -61,18 +61,18 @@ pl_python_poetry_resetsrc (char *option)
FeatInfo FeatInfo
pl_python_poetry_feat (char *option) pl_python_poetry_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = FullyCan; f.cap_locally = FullyCan;
fi.locally = NULL; f.locally = NULL;
fi.can_english = false; f.can_english = false;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }
// def_target_gsrf(pl_python_poetry); // def_target_gsrf(pl_python_poetry);

View File

@ -84,17 +84,17 @@ pl_python_resetsrc (char *option)
FeatInfo FeatInfo
pl_python_feat (char *option) pl_python_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = PartiallyCan; f.cap_locally = PartiallyCan;
fi.locally = "pip 不支持,其他支持"; f.locally = "pip 不支持,其他支持";
fi.can_english = false; f.can_english = false;
fi.can_user_define = true; f.can_user_define = true;
return fi; return f;
} }
def_target_gsrf(pl_python); def_target_gsrf(pl_python);

View File

@ -73,19 +73,19 @@ pl_python_pip_resetsrc (char *option)
FeatInfo FeatInfo
pl_python_pip_feat (char *option) pl_python_pip_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
// pip 不支持项目级换源 // pip 不支持项目级换源
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }
// def_target_gsrf(pl_python_pip); // def_target_gsrf(pl_python_pip);

View File

@ -98,18 +98,18 @@ pl_ruby_resetsrc (char *option)
FeatInfo FeatInfo
pl_ruby_feat (char *option) pl_ruby_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = PartiallyCan; f.cap_locally = PartiallyCan;
fi.locally = "gem 不支持; bundler 支持 (From v0.1.6)"; f.locally = "gem 不支持; bundler 支持 (From v0.1.6)";
fi.can_english = false; f.can_english = false;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }

View File

@ -73,18 +73,18 @@ pl_rust_cargo_resetsrc (char *option)
FeatInfo FeatInfo
pl_rust_cargo_feat (char *option) pl_rust_cargo_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.cap_locally = PartiallyCan; f.cap_locally = PartiallyCan;
fi.locally = "可以基于本项目换源吗?请帮助确认"; f.locally = "可以基于本项目换源吗?请帮助确认";
fi.can_english = false; f.can_english = false;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }

View File

@ -100,18 +100,18 @@ pl_rust_rustup_resetsrc (char *option)
FeatInfo FeatInfo
pl_rust_rustup_feat (char *option) pl_rust_rustup_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.locally = ""; f.locally = "";
fi.can_english = false; f.can_english = false;
fi.can_user_define = true; f.can_user_define = true;
fi.note = NULL; f.note = NULL;
return fi; return f;
} }

View File

@ -61,16 +61,16 @@ os_armbian_setsrc (char *option)
FeatInfo FeatInfo
os_armbian_feat (char *option) os_armbian_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
return fi; return f;
} }
def_target_gsf(os_armbian); def_target_gsf(os_armbian);

View File

@ -132,34 +132,34 @@ os_archlinuxcn_setsrc (char *option)
FeatInfo FeatInfo
os_arch_feat (char *option) os_arch_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = "可额外使用 chsrc set archlinuxcn 来更换 Arch Linux CN Repository 源"; f.note = "可额外使用 chsrc set archlinuxcn 来更换 Arch Linux CN Repository 源";
return fi; return f;
} }
FeatInfo FeatInfo
os_archlinuxcn_feat (char *option) os_archlinuxcn_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.can_english = true; f.can_english = true;
fi.can_user_define = true; f.can_user_define = true;
fi.note = "可额外使用 chsrc set arch 来更换 Arch Linux 源"; f.note = "可额外使用 chsrc set arch 来更换 Arch Linux 源";
return fi; return f;
} }

View File

@ -4,7 +4,7 @@
* File Authors : Aoran Zeng <ccmywish@qq.com> * File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org> * Contributors : Nil Null <nil@null.org>
* Created On : <2024-08-09> * Created On : <2024-08-09>
* Last Modified : <2024-09-13> * Last Modified : <2024-10-04>
* ------------------------------------------------------------- * -------------------------------------------------------------
* *
* *
@ -24,8 +24,8 @@
* ------------------------------------------------------------- * -------------------------------------------------------------
* File Authors : Nil Null <nil@null.org> * File Authors : Nil Null <nil@null.org>
* Contributors : Nul None <nul@none.org> * Contributors : Nul None <nul@none.org>
* Created On : <202x-01-01> https://www.yuque.com/ccmywish/blog/nil-null-and-nul-none * Created On : <2024-01-01> https://www.yuque.com/ccmywish/blog/nil-null-and-nul-none
* Last Modified : <202x-01-01> * Last Modified : <2024-01-01>
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
/** /**
@ -106,18 +106,19 @@ void
FeatInfo FeatInfo
<category>_<target>_feat (char *option) <category>_<target>_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = PartiallyCan; f.cap_locally = PartiallyCan;
fi.locally = "具体说明是否支持项目级换源..."; f.locally = "具体说明是否支持项目级换源...";
fi.can_english = false;
fi.can_user_define = false;
fi.note = "备注说明..."; f.can_english = false;
return fi; f.can_user_define = false;
f.note = "备注说明...";
return f;
} }

View File

@ -97,20 +97,20 @@ wr_homebrew_setsrc (char *option)
FeatInfo FeatInfo
wr_homebrew_feat (char *option) wr_homebrew_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = false; f.can_reset = false;
fi.cap_locally = CanNot; f.cap_locally = CanNot;
fi.locally = NULL; f.locally = NULL;
fi.can_english = true; f.can_english = true;
/* 该换源方案中URL存在拼凑因此不能让用户手动使用某URL来换源 */ /* 该换源方案中URL存在拼凑因此不能让用户手动使用某URL来换源 */
fi.can_user_define = false; f.can_user_define = false;
fi.note = "该换源通过写入环境变量实现若多次换源请手动清理profile文件"; f.note = "该换源通过写入环境变量实现若多次换源请手动清理profile文件";
return fi; return f;
} }

View File

@ -48,15 +48,15 @@ wr_winget_resetsrc (char *option)
FeatInfo FeatInfo
wr_winget_feat (char *option) wr_winget_feat (char *option)
{ {
FeatInfo fi = {0}; FeatInfo f = {0};
fi.can_get = true; f.can_get = true;
fi.can_reset = true; f.can_reset = true;
fi.can_english = false; f.can_english = false;
fi.can_user_define = true; f.can_user_define = true;
return fi; return f;
} }
def_target_gsrf(wr_winget); def_target_gsrf(wr_winget);