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)
{
FeatInfo fi = target->featfn("");
cli_print_target_features (fi, input);
FeatInfo f = target->featfn("");
cli_print_target_features (f, input);
}
}
else if (TargetOp_Measure_Source==code)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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