Update reset and local feat

This commit is contained in:
Aoran Zeng 2024-08-17 05:30:28 +08:00
parent 9e515872c2
commit 56559b57b2
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
5 changed files with 75 additions and 18 deletions

View File

@ -7,7 +7,7 @@
* Contributors : Shengwei Chen <414685209@qq.com>
* |
* Created on : <2023-08-29>
* Last modified : <2024-08-16>
* Last modified : <2024-08-17>
*
*
* ------------------------------------------------------------*/
@ -160,5 +160,6 @@ typedef struct TargetInfo_t {
// 大部分target还不支持reset所以暂时先默认设置为NULL来过渡
#define def_target(t) TargetInfo t##_target = {def_target_inner_gs(t),def_target_sourcesn(t)}
#define def_target_gsr(t) TargetInfo t##_target = {def_target_inner_gsr(t),def_target_sourcesn(t)}
#define def_target_gsf(t) TargetInfo t##_target = {def_target_inner_gsf(t),def_target_sourcesn(t)}
#define def_target_gsrf(t) TargetInfo t##_target = {def_target_inner_gsrf(t),def_target_sourcesn(t)}
#define def_target_s(t) TargetInfo t##_target = {def_target_inner_s(t),def_target_sourcesn(t)}

View File

@ -4,7 +4,7 @@
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-08-30>
* Last Modified : <2024-08-09>
* Last Modified : <2024-08-17>
* ------------------------------------------------------------*/
static MirrorSite
@ -114,4 +114,19 @@ pl_nodejs_setsrc (char *option)
}
def_target(pl_nodejs);
FeatInfo
pl_nodejs_feat (char *option)
{
FeatInfo fi = {0};
fi.can_get = true;
fi.can_reset = false;
fi.locally = "npm 支持 (From v0.1.7); yarn 未知; pnpm 未知;";
fi.can_english = false;
fi.can_user_define = true;
return fi;
}
def_target_gsf (pl_nodejs);

View File

@ -4,7 +4,7 @@
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-08-30>
* Last Modified : <2024-08-09>
* Last Modified : <2024-08-17>
* ------------------------------------------------------------*/
/**
@ -61,4 +61,20 @@ pl_php_setsrc (char *option)
chsrc_say_lastly (&source, ChsrcTypeSemiAuto);
}
def_target(pl_php);
FeatInfo
pl_php_feat (char *option)
{
FeatInfo fi = {0};
fi.can_get = true;
fi.can_reset = false;
fi.locally = "composer 支持 (From v0.1.7)";
fi.can_english = false;
fi.can_user_define = true;
return fi;
}
def_target_gsf (pl_php);

View File

@ -4,10 +4,9 @@
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-09-03>
* Last Modified : <2024-08-09>
* Last Modified : <2024-08-17>
* ------------------------------------------------------------*/
/**
* 2024-05-24
*
@ -47,18 +46,13 @@ pl_python_check_cmd (char **prog, bool *poetry_exist, bool *pdm_exist)
// 因此我们首先测试 python3
py_exist = chsrc_check_program ("python3");
if (py_exist)
{
*prog = "python3";
}
if (py_exist) *prog = "python3";
else
{
// 不要调用 python 自己,而是使用 python --version避免Windows弹出Microsoft Store
py_exist = chsrc_check_program ("python");
if (py_exist)
{
*prog = "python";
}
if (py_exist) *prog = "python";
else
{
chsrc_error ("未找到 Python 相关命令,请检查是否存在");
@ -149,4 +143,20 @@ pl_python_resetsrc (char *option)
pl_python_setsrc (ChsrcTypeReset);
}
def_target_gsr(pl_python);
FeatInfo
pl_python_feat (char *option)
{
FeatInfo fi = {0};
fi.can_get = true;
fi.can_reset = true;
fi.locally = "pip 不支持; pdm 支持 (From v0.1.6); poetry 默认使用项目级 (From v0.1.7.2)";
fi.can_english = false;
fi.can_user_define = true;
return fi;
}
def_target_gsrf(pl_python);

View File

@ -4,7 +4,7 @@
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2024-06-07>
* Last Modified : <2024-08-15>
* Last Modified : <2024-08-17>
* ------------------------------------------------------------*/
/**
@ -46,4 +46,19 @@ wr_winget_resetsrc (char *option)
chsrc_say_lastly (NULL, ChsrcTypeAuto);
}
def_target_gsr(wr_winget);
FeatInfo
wr_winget_feat (char *option)
{
FeatInfo fi = {0};
fi.can_get = true;
fi.can_reset = true;
fi.can_english = false;
fi.can_user_define = true;
return fi;
}
def_target_gsrf(wr_winget);