mirror of
https://github.com/RubyMetric/chsrc
synced 2026-01-04 10:10:14 +08:00
Update WinGet
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
define_target(wr_flathub);
|
||||
def_target(wr_flathub);
|
||||
|
||||
void
|
||||
wr_flathub_prelude ()
|
||||
@@ -11,7 +11,7 @@ wr_flathub_prelude ()
|
||||
|
||||
chef_set_created_on (this, "2023-09-11");
|
||||
chef_set_last_updated (this, "2025-08-09");
|
||||
|
||||
chef_set_sources_last_updated (this, "2025-05-27");
|
||||
|
||||
chef_set_authors (this, 1, "Aoran Zeng", "ccmywish@qq.com");
|
||||
chef_set_chef (this, NULL, NULL);
|
||||
@@ -31,8 +31,8 @@ wr_flathub_prelude ()
|
||||
|
||||
|
||||
|
||||
chef_set_sources_last_updated (this, "2025-05-27");
|
||||
def_upstream_provider("https://flathub.org/repo");
|
||||
|
||||
def_upstream("https://flathub.org/repo");
|
||||
|
||||
def_sources_begin()
|
||||
{&upstream, "https://flathub.org/repo", DelegateToUpstream},
|
||||
|
||||
@@ -1,25 +1,38 @@
|
||||
/** ------------------------------------------------------------
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* -------------------------------------------------------------
|
||||
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||
* Contributors : Nil Null <nil@null.org>
|
||||
* Created On : <2024-06-07>
|
||||
* Last Modified : <2025-07-13>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @update 2025-07-13
|
||||
*/
|
||||
static Source_t wr_winget_sources[] =
|
||||
def_target(wr_winget);
|
||||
|
||||
void
|
||||
wr_winget_prelude ()
|
||||
{
|
||||
{&UpstreamProvider, "https://cdn.winget.microsoft.com/cache", NULL},
|
||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/winget-source", NULL},
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/winget-source", NULL},
|
||||
{&Nju, "https://mirror.nju.edu.cn/winget-source", NULL},
|
||||
{&Nyist, "https://mirror.nyist.edu.cn/winget-source", NULL},
|
||||
{&Xjtu, "https://mirrors.xjtu.edu.cn/winget-source", NULL}
|
||||
};
|
||||
def_sources_n(wr_winget);
|
||||
use_this(wr_winget);
|
||||
|
||||
chef_set_created_on (this, "2024-06-07");
|
||||
chef_set_last_updated (this, "2025-07-13");
|
||||
chef_set_sources_last_updated (this, "2025-07-13");
|
||||
|
||||
chef_set_authors (this, 1, "Aoran Zeng", "ccmywish@qq.com");
|
||||
chef_set_chef (this, NULL, NULL);
|
||||
chef_set_sous_chefs (this, 0);
|
||||
chef_set_contributors (this, 0);
|
||||
|
||||
this.can_english = false;
|
||||
this.can_user_define = true;
|
||||
|
||||
|
||||
def_upstream("https://github.com/microsoft/winget-cli/");
|
||||
|
||||
def_sources_begin()
|
||||
{&upstream, "https://cdn.winget.microsoft.com/cache", NULL},
|
||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/winget-source", NULL},
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/winget-source", NULL},
|
||||
{&Nju, "https://mirror.nju.edu.cn/winget-source", NULL},
|
||||
{&Nyist, "https://mirror.nyist.edu.cn/winget-source", NULL},
|
||||
{&Xjtu, "https://mirrors.xjtu.edu.cn/winget-source", NULL}
|
||||
def_sources_end()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
@@ -35,7 +48,8 @@ wr_winget_getsrc (char *option)
|
||||
void
|
||||
wr_winget_setsrc (char *option)
|
||||
{
|
||||
chsrc_yield_source_and_confirm (wr_winget);
|
||||
use_this(wr_winget);
|
||||
Source_t source = chsrc_yield_source_and_confirm (this, option);
|
||||
|
||||
chsrc_run ("winget source remove winget", RunOpt_Default);
|
||||
chsrc_run (xy_strjoin (3, "winget source add winget ", source.url, " --trust-level trusted"), RunOpt_Default);
|
||||
@@ -53,20 +67,3 @@ wr_winget_resetsrc (char *option)
|
||||
chsrc_determine_chgtype (ChgType_Reset);
|
||||
chsrc_conclude (NULL);
|
||||
}
|
||||
|
||||
|
||||
Feature_t
|
||||
wr_winget_feat (char *option)
|
||||
{
|
||||
Feature_t f = {0};
|
||||
|
||||
f.can_get = true;
|
||||
f.can_reset = true;
|
||||
|
||||
f.can_english = false;
|
||||
f.can_user_define = true;
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
def_target_gsrf(wr_winget);
|
||||
|
||||
Reference in New Issue
Block a user