diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index ea264b55..fe131f71 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -67,7 +67,7 @@ DEBUG 模式(`-DXY_DEBUG`)会启用诊断功能:输出 `chsrc_debug*` 日 - **`Scope_t`** — 作用域:`ProjectScope`/`UserScope`/`SystemScope`,外加特殊的 `ImplementationDefinedScope`(由 recipe 按实际情况决定;多数 recipe 的 `default_scope` 设为它)。 - **`SourceProvider_t` / `MirrorSite_t`** — 镜像站或上游源提供者。类型:`IS_GeneralMirrorSite`(通用镜像站)、`IS_DedicatedMirrorSite`(专用镜像站)、`IS_UpstreamProvider`(上游默认源)、`IS_UserDefinedProvider`(用户自定义源)。 - **Chef DSL** — 宏与函数的混合 API,供 recipe 作者使用: - - 宏:`def_target()`、`chef_prep_this()`、`chef_allow_gsr()/s()/sr()/gs()/NOOP()`、`def_sources_begin()/end()`、`chsrc_use_this_source()`。 + - 宏:`def_dish()`、`chef_prep_this()`、`chef_allow_gsr()/s()/sr()/gs()/NOOP()`、`def_sources_begin()/end()`、`chsrc_use_this_source()`。 - 函数:贡献者 `chef_set_chefs()`/`chef_set_sauciers()`;作用域 `chef_set_scope_cap()`/`chef_set_default_scope()`;换源与测速链接 `chef_set_repoURL()`、`chef_set_smURL()`、`chef_set_smURL_with_postfix()`、`chef_set_smURL_with_func()`、`chef_set_provider_smURL()`;特性 `chef_allow_english()`/`chef_deny_english()`、`chef_allow_user_define()`/`chef_deny_user_define()`;其他 `chef_set_note()`、`chef_use_other_target_sources()`、`chef_verify_contributor()`。 - **xy.h** — 跨平台运行时:`xy_on_windows`、字符串操作(`xy_str_gsub`、`xy_2strcat`)、`XySeq_t`(链表)、`XyMap_t`(哈希表)、命令执行、文件 I/O。内存约定:`return caller-free` 表示调用方必须释放返回值。 diff --git a/src/framework/struct.h b/src/framework/struct.h index 65d5f58f..314cb2a8 100644 --- a/src/framework/struct.h +++ b/src/framework/struct.h @@ -221,13 +221,13 @@ Dish_t; -#define def_target(t, aliases) void t##_getsrc(char *option);void t##_setsrc(char *option);void t##_resetsrc(char *option); Dish_t t##_target={aliases}; +#define def_dish(t, aliases) void t##_getsrc(char *option);void t##_setsrc(char *option);void t##_resetsrc(char *option); Dish_t t##_target={aliases}; /* 仅内部使用的 "源target",只用来存储源信息,请参考 pl_nodejs_binary 以及 pl_pypi */ -#define def_sources_target(t, name) Dish_t t##_target={"__internal_target_only_for_storing_sources__" name "__"} +#define def_sources_dish(t, name) Dish_t t##_target={"__internal_target_only_for_storing_sources__" name "__"} /* group target 不需要实现任何操作(除了preparefn)即可使用 */ -#define def_group_target(t, aliases) Dish_t t##_target={aliases}; +#define def_group_dish(t, aliases) Dish_t t##_target={aliases}; #define chef_allow_gsr(t) this->getfn = t##_getsrc; this->setfn = t##_setsrc; this->resetfn = t##_resetsrc; #define chef_allow_s(t) this->getfn = NULL; this->setfn = t##_setsrc; this->resetfn = NULL; diff --git a/src/recipe/lang/Clojure.c b/src/recipe/lang/Clojure.c index 1e0484f5..d58595f1 100644 --- a/src/recipe/lang/Clojure.c +++ b/src/recipe/lang/Clojure.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_clojure, "clojure/clojars/cloj/lein"); +def_dish(pl_clojure, "clojure/clojars/cloj/lein"); void pl_clojure_prepare () diff --git a/src/recipe/lang/Dart/Flutter.c b/src/recipe/lang/Dart/Flutter.c index ecbe9865..69cd4579 100644 --- a/src/recipe/lang/Dart/Flutter.c +++ b/src/recipe/lang/Dart/Flutter.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_dart_flutter, "flutter"); +def_dish(pl_dart_flutter, "flutter"); void pl_dart_flutter_prepare (void) diff --git a/src/recipe/lang/Dart/Pub.c b/src/recipe/lang/Dart/Pub.c index 6d9b2dc1..6a352494 100644 --- a/src/recipe/lang/Dart/Pub.c +++ b/src/recipe/lang/Dart/Pub.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_dart, "dart/pub"); +def_dish(pl_dart, "dart/pub"); void pl_dart_prepare (void) diff --git a/src/recipe/lang/Go.c b/src/recipe/lang/Go.c index b5136f17..d88673b8 100644 --- a/src/recipe/lang/Go.c +++ b/src/recipe/lang/Go.c @@ -16,7 +16,7 @@ GoProxyIO = {NotSkip, NA, NA, "https://goproxy.io/github.com/aws/aws-sdk-go/@v/v1.45.2.zip", ACCURATE} // 30 MB }; -def_target(pl_go, "go/golang/goproxy"); +def_dish(pl_go, "go/golang/goproxy"); void pl_go_prepare () diff --git a/src/recipe/lang/Haskell.c b/src/recipe/lang/Haskell.c index 97ce3044..6ed9be72 100644 --- a/src/recipe/lang/Haskell.c +++ b/src/recipe/lang/Haskell.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_haskell, "haskell/cabal/stack/hackage"); +def_dish(pl_haskell, "haskell/cabal/stack/hackage"); void pl_haskell_prepare () diff --git a/src/recipe/lang/Java.c b/src/recipe/lang/Java.c index f8de9821..4ade26ce 100644 --- a/src/recipe/lang/Java.c +++ b/src/recipe/lang/Java.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_java, "java/maven/mvn/maven-daemon/mvnd/gradle"); +def_dish(pl_java, "java/maven/mvn/maven-daemon/mvnd/gradle"); void pl_java_prepare () diff --git a/src/recipe/lang/JavaScript/Bun.c b/src/recipe/lang/JavaScript/Bun.c index c9dbc83f..0cf34621 100644 --- a/src/recipe/lang/JavaScript/Bun.c +++ b/src/recipe/lang/JavaScript/Bun.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_bun, "bun"); +def_dish(pl_bun, "bun"); void pl_bun_prepare (void) diff --git a/src/recipe/lang/JavaScript/JavaScript.c b/src/recipe/lang/JavaScript/JavaScript.c index d119f53a..c319eb5b 100644 --- a/src/recipe/lang/JavaScript/JavaScript.c +++ b/src/recipe/lang/JavaScript/JavaScript.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_group_target(pl_js_group, "js/javascript/node/nodejs"); +def_group_dish(pl_js_group, "js/javascript/node/nodejs"); void pl_js_group_prepare (void) diff --git a/src/recipe/lang/JavaScript/Node.js-binary.c b/src/recipe/lang/JavaScript/Node.js-binary.c index 96612a8e..50870466 100644 --- a/src/recipe/lang/JavaScript/Node.js-binary.c +++ b/src/recipe/lang/JavaScript/Node.js-binary.c @@ -9,7 +9,7 @@ static MirrorSite_t NpmMirror = {SKIP, NULL, NULL, NULL, ACCURATE} }; -def_sources_target(pl_nodejs_binary, "nodejs-binary"); +def_sources_dish(pl_nodejs_binary, "nodejs-binary"); void pl_nodejs_binary_prepare (void) diff --git a/src/recipe/lang/JavaScript/Yarn.c b/src/recipe/lang/JavaScript/Yarn.c index ecd447aa..76fd693b 100644 --- a/src/recipe/lang/JavaScript/Yarn.c +++ b/src/recipe/lang/JavaScript/Yarn.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_yarn, "yarn"); +def_dish(pl_yarn, "yarn"); void pl_yarn_prepare (void) diff --git a/src/recipe/lang/JavaScript/npm.c b/src/recipe/lang/JavaScript/npm.c index 90020156..6bd707b3 100644 --- a/src/recipe/lang/JavaScript/npm.c +++ b/src/recipe/lang/JavaScript/npm.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_npm, "npm"); +def_dish(pl_npm, "npm"); void pl_npm_prepare (void) diff --git a/src/recipe/lang/JavaScript/nvm.c b/src/recipe/lang/JavaScript/nvm.c index 35d78b46..26aace6e 100644 --- a/src/recipe/lang/JavaScript/nvm.c +++ b/src/recipe/lang/JavaScript/nvm.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_nvm, "nvm"); +def_dish(pl_nvm, "nvm"); void pl_nvm_prepare (void) diff --git a/src/recipe/lang/JavaScript/pnpm.c b/src/recipe/lang/JavaScript/pnpm.c index 192d05b2..be47fae4 100644 --- a/src/recipe/lang/JavaScript/pnpm.c +++ b/src/recipe/lang/JavaScript/pnpm.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_pnpm, "pnpm"); +def_dish(pl_pnpm, "pnpm"); void pl_pnpm_prepare (void) diff --git a/src/recipe/lang/Julia.c b/src/recipe/lang/Julia.c index f339fc70..ee75ce19 100644 --- a/src/recipe/lang/Julia.c +++ b/src/recipe/lang/Julia.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_julia, "julia"); +def_dish(pl_julia, "julia"); void pl_julia_prepare () diff --git a/src/recipe/lang/Lua.c b/src/recipe/lang/Lua.c index 78467c92..38148656 100644 --- a/src/recipe/lang/Lua.c +++ b/src/recipe/lang/Lua.c @@ -9,7 +9,7 @@ static MirrorSite_t Api7 = {SKIP, ToFill, ToFill, NULL, ROUGH} }; -def_target(pl_lua, "lua/luarocks"); +def_dish(pl_lua, "lua/luarocks"); void pl_lua_prepare () diff --git a/src/recipe/lang/NuGet.c b/src/recipe/lang/NuGet.c index 827b7073..84e33d44 100644 --- a/src/recipe/lang/NuGet.c +++ b/src/recipe/lang/NuGet.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_nuget, "nuget/net/.net/dotnet"); +def_dish(pl_nuget, "nuget/net/.net/dotnet"); void pl_nuget_prepare () diff --git a/src/recipe/lang/OCaml.c b/src/recipe/lang/OCaml.c index 7c12d598..b9c876eb 100644 --- a/src/recipe/lang/OCaml.c +++ b/src/recipe/lang/OCaml.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_ocaml, "ocaml/opam"); +def_dish(pl_ocaml, "ocaml/opam"); void pl_ocaml_prepare () diff --git a/src/recipe/lang/PHP.c b/src/recipe/lang/PHP.c index c8f11dc1..9e44efb7 100644 --- a/src/recipe/lang/PHP.c +++ b/src/recipe/lang/PHP.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_php, "php/composer"); +def_dish(pl_php, "php/composer"); void pl_php_prepare () diff --git a/src/recipe/lang/Perl.c b/src/recipe/lang/Perl.c index 6b582ee6..23165f42 100644 --- a/src/recipe/lang/Perl.c +++ b/src/recipe/lang/Perl.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_perl, "perl/cpan"); +def_dish(pl_perl, "perl/cpan"); void pl_perl_prepare () diff --git a/src/recipe/lang/Python/PDM.c b/src/recipe/lang/Python/PDM.c index 56da3b1f..a08a0b04 100644 --- a/src/recipe/lang/Python/PDM.c +++ b/src/recipe/lang/Python/PDM.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_pdm, "pdm"); +def_dish(pl_pdm, "pdm"); void pl_pdm_prepare (void) diff --git a/src/recipe/lang/Python/Poetry.c b/src/recipe/lang/Python/Poetry.c index 12252aa7..a6d2c1bf 100644 --- a/src/recipe/lang/Python/Poetry.c +++ b/src/recipe/lang/Python/Poetry.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_poetry, "poetry"); +def_dish(pl_poetry, "poetry"); void pl_poetry_prepare (void) diff --git a/src/recipe/lang/Python/PyPI.c b/src/recipe/lang/Python/PyPI.c index 979b0583..571ce11d 100644 --- a/src/recipe/lang/Python/PyPI.c +++ b/src/recipe/lang/Python/PyPI.c @@ -4,7 +4,7 @@ #include "rawstr4c.h" -def_sources_target(pl_pypi, "pypi"); +def_sources_dish(pl_pypi, "pypi"); /** * @note 测速链接的这个前缀是 ${host}/pipi/web/pacakges/56/e4.... diff --git a/src/recipe/lang/Python/Python.c b/src/recipe/lang/Python/Python.c index 78c02fb5..bff2b059 100644 --- a/src/recipe/lang/Python/Python.c +++ b/src/recipe/lang/Python/Python.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_group_target(pl_py_group, "py/python"); +def_group_dish(pl_py_group, "py/python"); void pl_py_group_prepare (void) diff --git a/src/recipe/lang/Python/Rye.c b/src/recipe/lang/Python/Rye.c index 1c9ce26c..6e0115b6 100644 --- a/src/recipe/lang/Python/Rye.c +++ b/src/recipe/lang/Python/Rye.c @@ -4,7 +4,7 @@ * 由于Rye已经有后继uv了,所以我们不把该管理器纳入Python group中 * ------------------------------------------------------------*/ -def_target(pl_rye, "rye"); +def_dish(pl_rye, "rye"); void pl_rye_prepare (void) diff --git a/src/recipe/lang/Python/pip.c b/src/recipe/lang/Python/pip.c index b8504106..9083564b 100644 --- a/src/recipe/lang/Python/pip.c +++ b/src/recipe/lang/Python/pip.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_pip, "pip"); +def_dish(pl_pip, "pip"); void pl_pip_prepare (void) diff --git a/src/recipe/lang/Python/uv/uv-pypi-index.c b/src/recipe/lang/Python/uv/uv-pypi-index.c index 56d42ee5..09abb450 100644 --- a/src/recipe/lang/Python/uv/uv-pypi-index.c +++ b/src/recipe/lang/Python/uv/uv-pypi-index.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_uv_pypi_index, "uv-pypi-index"); +def_dish(pl_uv_pypi_index, "uv-pypi-index"); void pl_uv_pypi_index_prepare (void) diff --git a/src/recipe/lang/Python/uv/uv-python-build.c b/src/recipe/lang/Python/uv/uv-python-build.c index c6757765..6f8b56fb 100644 --- a/src/recipe/lang/Python/uv/uv-python-build.c +++ b/src/recipe/lang/Python/uv/uv-python-build.c @@ -10,7 +10,7 @@ * 针对上游仓库 python-build-standalone 的镜像。 */ -def_target(pl_uv_python_build, "uv-python-build"); +def_dish(pl_uv_python_build, "uv-python-build"); // CNB (Cloud Native Build, 腾讯) 托管的 python-build-standalone releases 镜像 static MirrorSite_t CnbUvPython = diff --git a/src/recipe/lang/Python/uv/uv.c b/src/recipe/lang/Python/uv/uv.c index ed8e6770..51283fef 100644 --- a/src/recipe/lang/Python/uv/uv.c +++ b/src/recipe/lang/Python/uv/uv.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_group_target(pl_uv, "uv"); +def_group_dish(pl_uv, "uv"); void pl_uv_prepare (void) diff --git a/src/recipe/lang/R.c b/src/recipe/lang/R.c index a0ccb1c4..27da1e0c 100644 --- a/src/recipe/lang/R.c +++ b/src/recipe/lang/R.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_r, "r/cran"); +def_dish(pl_r, "r/cran"); void pl_r_prepare () diff --git a/src/recipe/lang/Ruby/Ruby.c b/src/recipe/lang/Ruby/Ruby.c index 9c7ea32f..985e6374 100644 --- a/src/recipe/lang/Ruby/Ruby.c +++ b/src/recipe/lang/Ruby/Ruby.c @@ -9,7 +9,7 @@ static MirrorSite_t RubyChina = {NotSkip, NA, NA, "https://gems.ruby-china.com/rubygems/gems/nokogiri-1.15.0-java.gem", ACCURATE} // 9.9 MB }; -def_target(pl_ruby, "gem/ruby/rb/rubygem/rubygems/bundler"); +def_dish(pl_ruby, "gem/ruby/rb/rubygem/rubygems/bundler"); void pl_ruby_prepare (void) diff --git a/src/recipe/lang/Rust/Cargo.c b/src/recipe/lang/Rust/Cargo.c index 0d0b8395..8f40095d 100644 --- a/src/recipe/lang/Rust/Cargo.c +++ b/src/recipe/lang/Rust/Cargo.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(pl_rust_cargo, "rust/cargo/crate/crates"); +def_dish(pl_rust_cargo, "rust/cargo/crate/crates"); void pl_rust_cargo_prepare (void) diff --git a/src/recipe/lang/Rust/rustup.c b/src/recipe/lang/Rust/rustup.c index c4525a04..c5584628 100644 --- a/src/recipe/lang/Rust/rustup.c +++ b/src/recipe/lang/Rust/rustup.c @@ -5,7 +5,7 @@ // Size: 20MB #define PL_Rustup_Speed_URL_Suffix -def_target(pl_rust_rustup, "rustup"); +def_dish(pl_rust_rustup, "rustup"); void pl_rust_rustup_prepare (void) diff --git a/src/recipe/os/APT/Armbian.c b/src/recipe/os/APT/Armbian.c index 9204524f..8856194e 100644 --- a/src/recipe/os/APT/Armbian.c +++ b/src/recipe/os/APT/Armbian.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_armbian, "armbian"); +def_dish(os_armbian, "armbian"); void os_armbian_prepare () diff --git a/src/recipe/os/APT/Debian.c b/src/recipe/os/APT/Debian.c index 13d8675c..9d198028 100644 --- a/src/recipe/os/APT/Debian.c +++ b/src/recipe/os/APT/Debian.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_debian, "debian"); +def_dish(os_debian, "debian"); void os_debian_prepare () diff --git a/src/recipe/os/APT/Kali-Linux.c b/src/recipe/os/APT/Kali-Linux.c index 27106712..6b7f8716 100644 --- a/src/recipe/os/APT/Kali-Linux.c +++ b/src/recipe/os/APT/Kali-Linux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_kali, "kali"); +def_dish(os_kali, "kali"); void os_kali_prepare () diff --git a/src/recipe/os/APT/Linux-Lite.c b/src/recipe/os/APT/Linux-Lite.c index 3b9ff160..bddfe3e2 100644 --- a/src/recipe/os/APT/Linux-Lite.c +++ b/src/recipe/os/APT/Linux-Lite.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_linuxlite, "linuxlite"); +def_dish(os_linuxlite, "linuxlite"); void os_linuxlite_prepare () diff --git a/src/recipe/os/APT/Linux-Mint.c b/src/recipe/os/APT/Linux-Mint.c index f5c171d0..36c6e718 100644 --- a/src/recipe/os/APT/Linux-Mint.c +++ b/src/recipe/os/APT/Linux-Mint.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_linuxmint, "linuxmint"); +def_dish(os_linuxmint, "linuxmint"); void os_linuxmint_prepare () diff --git a/src/recipe/os/APT/ROS.c b/src/recipe/os/APT/ROS.c index 54cf1c4f..5cba07a8 100644 --- a/src/recipe/os/APT/ROS.c +++ b/src/recipe/os/APT/ROS.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_ros, "ros/ros2"); +def_dish(os_ros, "ros/ros2"); void os_ros_prepare () diff --git a/src/recipe/os/APT/Raspberry-Pi-OS.c b/src/recipe/os/APT/Raspberry-Pi-OS.c index 4d61430d..2544bc5b 100644 --- a/src/recipe/os/APT/Raspberry-Pi-OS.c +++ b/src/recipe/os/APT/Raspberry-Pi-OS.c @@ -4,7 +4,7 @@ * Raspberry Pi OS 树莓派操作系统,以前称为 Raspbian * ------------------------------------------------------------*/ -def_target(os_raspberrypi, "raspi/raspberrypi"); +def_dish(os_raspberrypi, "raspi/raspberrypi"); void os_raspberrypi_prepare () diff --git a/src/recipe/os/APT/Termux.c b/src/recipe/os/APT/Termux.c index 39ab1a35..c5c4a75b 100644 --- a/src/recipe/os/APT/Termux.c +++ b/src/recipe/os/APT/Termux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_termux, "termux"); +def_dish(os_termux, "termux"); void os_termux_prepare () diff --git a/src/recipe/os/APT/Trisquel.c b/src/recipe/os/APT/Trisquel.c index 9d335a83..9488df27 100644 --- a/src/recipe/os/APT/Trisquel.c +++ b/src/recipe/os/APT/Trisquel.c @@ -4,7 +4,7 @@ * Trisquel基于Ubuntu开发,不含任何专有软件及专有固件,内核使用 Linux-libre * ------------------------------------------------------------*/ -def_target(os_trisquel, "trisquel"); +def_dish(os_trisquel, "trisquel"); void os_trisquel_prepare () diff --git a/src/recipe/os/APT/Ubuntu.c b/src/recipe/os/APT/Ubuntu.c index 5996832e..a61b552e 100644 --- a/src/recipe/os/APT/Ubuntu.c +++ b/src/recipe/os/APT/Ubuntu.c @@ -3,7 +3,7 @@ * ------------------------------------------------------------*/ /* Zorin OS 完全使用 Ubuntu 的换源方法,二者兼容 */ -def_target(os_ubuntu, "ubuntu/zorinos"); +def_dish(os_ubuntu, "ubuntu/zorinos"); void os_ubuntu_prepare () diff --git a/src/recipe/os/APT/deepin.c b/src/recipe/os/APT/deepin.c index e71517d7..d4db6f5e 100644 --- a/src/recipe/os/APT/deepin.c +++ b/src/recipe/os/APT/deepin.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_deepin, "deepin"); +def_dish(os_deepin, "deepin"); void os_deepin_prepare () diff --git a/src/recipe/os/APT/openKylin.c b/src/recipe/os/APT/openKylin.c index dd6ed8f3..8b38bb92 100644 --- a/src/recipe/os/APT/openKylin.c +++ b/src/recipe/os/APT/openKylin.c @@ -5,7 +5,7 @@ * 同一级别的、根社区发布的系统 * ------------------------------------------------------------*/ -def_target(os_openkylin, "openkylin"); +def_dish(os_openkylin, "openkylin"); void os_openkylin_prepare () diff --git a/src/recipe/os/Alpine-Linux.c b/src/recipe/os/Alpine-Linux.c index 851e19b7..be530b59 100644 --- a/src/recipe/os/Alpine-Linux.c +++ b/src/recipe/os/Alpine-Linux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_alpine, "alpine"); +def_dish(os_alpine, "alpine"); void os_alpine_prepare () diff --git a/src/recipe/os/BSD/FreeBSD.c b/src/recipe/os/BSD/FreeBSD.c index 8a43140f..9b110210 100644 --- a/src/recipe/os/BSD/FreeBSD.c +++ b/src/recipe/os/BSD/FreeBSD.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_freebsd, "freebsd"); +def_dish(os_freebsd, "freebsd"); void os_freebsd_prepare () diff --git a/src/recipe/os/BSD/NetBSD.c b/src/recipe/os/BSD/NetBSD.c index 02532069..97130ba2 100644 --- a/src/recipe/os/BSD/NetBSD.c +++ b/src/recipe/os/BSD/NetBSD.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_netbsd, "netbsd"); +def_dish(os_netbsd, "netbsd"); void os_netbsd_prepare () diff --git a/src/recipe/os/BSD/OpenBSD.c b/src/recipe/os/BSD/OpenBSD.c index 3aa55b98..b9682192 100644 --- a/src/recipe/os/BSD/OpenBSD.c +++ b/src/recipe/os/BSD/OpenBSD.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_openbsd, "openbsd"); +def_dish(os_openbsd, "openbsd"); void os_openbsd_prepare () diff --git a/src/recipe/os/Gentoo-Linux.c b/src/recipe/os/Gentoo-Linux.c index 33095da6..0b2bcc4b 100644 --- a/src/recipe/os/Gentoo-Linux.c +++ b/src/recipe/os/Gentoo-Linux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_gentoo, "gentoo"); +def_dish(os_gentoo, "gentoo"); void os_gentoo_prepare () diff --git a/src/recipe/os/OpenWrt.c b/src/recipe/os/OpenWrt.c index 5653386e..1a8e567e 100644 --- a/src/recipe/os/OpenWrt.c +++ b/src/recipe/os/OpenWrt.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_openwrt, "openwrt/opkg/LEDE"); +def_dish(os_openwrt, "openwrt/opkg/LEDE"); void os_openwrt_prepare () diff --git a/src/recipe/os/Solus.c b/src/recipe/os/Solus.c index 743615b3..4a72796c 100644 --- a/src/recipe/os/Solus.c +++ b/src/recipe/os/Solus.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_solus, "solus"); +def_dish(os_solus, "solus"); void os_solus_prepare () diff --git a/src/recipe/os/Void-Linux.c b/src/recipe/os/Void-Linux.c index 08fd0558..5372897c 100644 --- a/src/recipe/os/Void-Linux.c +++ b/src/recipe/os/Void-Linux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_voidlinux, "voidlinux"); +def_dish(os_voidlinux, "voidlinux"); void os_voidlinux_prepare () diff --git a/src/recipe/os/YUM/AlmaLinux.c b/src/recipe/os/YUM/AlmaLinux.c index d9ee4bdb..c308c9c9 100644 --- a/src/recipe/os/YUM/AlmaLinux.c +++ b/src/recipe/os/YUM/AlmaLinux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_almalinux, "alma/almalinux"); +def_dish(os_almalinux, "alma/almalinux"); void os_almalinux_prepare () diff --git a/src/recipe/os/YUM/Anolis-OS.c b/src/recipe/os/YUM/Anolis-OS.c index 381b262a..88bb99cb 100644 --- a/src/recipe/os/YUM/Anolis-OS.c +++ b/src/recipe/os/YUM/Anolis-OS.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_anolis, "anolis/openanolis"); +def_dish(os_anolis, "anolis/openanolis"); void os_anolis_prepare () diff --git a/src/recipe/os/YUM/Fedora-Linux.c b/src/recipe/os/YUM/Fedora-Linux.c index 44fa96d9..0e232d98 100644 --- a/src/recipe/os/YUM/Fedora-Linux.c +++ b/src/recipe/os/YUM/Fedora-Linux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_fedora, "fedora"); +def_dish(os_fedora, "fedora"); void os_fedora_prepare () diff --git a/src/recipe/os/YUM/Rocky-Linux.c b/src/recipe/os/YUM/Rocky-Linux.c index 5036a0c5..8058ff67 100644 --- a/src/recipe/os/YUM/Rocky-Linux.c +++ b/src/recipe/os/YUM/Rocky-Linux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_rockylinux, "rocky/rockylinux"); +def_dish(os_rockylinux, "rocky/rockylinux"); void os_rockylinux_prepare () diff --git a/src/recipe/os/YUM/openEuler.c b/src/recipe/os/YUM/openEuler.c index b5dbde52..c2bad2f6 100644 --- a/src/recipe/os/YUM/openEuler.c +++ b/src/recipe/os/YUM/openEuler.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_openeuler, "openeuler"); +def_dish(os_openeuler, "openeuler"); void os_openeuler_prepare () diff --git a/src/recipe/os/openSUSE.c b/src/recipe/os/openSUSE.c index 6eeab1d9..87a6d011 100644 --- a/src/recipe/os/openSUSE.c +++ b/src/recipe/os/openSUSE.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_opensuse, "opensuse/opensuse-leap/opensuse-tumbleweed"); +def_dish(os_opensuse, "opensuse/opensuse-leap/opensuse-tumbleweed"); void os_opensuse_prepare () diff --git a/src/recipe/os/pacman/Arch-Linux.c b/src/recipe/os/pacman/Arch-Linux.c index 14afcf1e..59af3bd7 100644 --- a/src/recipe/os/pacman/Arch-Linux.c +++ b/src/recipe/os/pacman/Arch-Linux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_arch, "arch/archlinux"); +def_dish(os_arch, "arch/archlinux"); #define OS_Pacman_MirrorList "/etc/pacman.d/mirrorlist" #define OS_Pacman_ArchLinuxCN_MirrorList "/etc/pacman.conf" @@ -106,7 +106,7 @@ os_arch_setsrc (char *option) * archlinuxcn target * ------------------------------------------------------------*/ -def_target(os_archlinuxcn, "archlinuxcn/archcn"); +def_dish(os_archlinuxcn, "archlinuxcn/archcn"); void os_archlinuxcn_prepare () diff --git a/src/recipe/os/pacman/MSYS2.c b/src/recipe/os/pacman/MSYS2.c index 2c2c3c70..f340067f 100644 --- a/src/recipe/os/pacman/MSYS2.c +++ b/src/recipe/os/pacman/MSYS2.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_msys2, "msys2/msys"); +def_dish(os_msys2, "msys2/msys"); void os_msys2_prepare () diff --git a/src/recipe/os/pacman/Manjaro-Linux.c b/src/recipe/os/pacman/Manjaro-Linux.c index 8e2bda12..f3392e0c 100644 --- a/src/recipe/os/pacman/Manjaro-Linux.c +++ b/src/recipe/os/pacman/Manjaro-Linux.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(os_manjaro, "manjaro"); +def_dish(os_manjaro, "manjaro"); void os_manjaro_prepare () diff --git a/src/recipe/recipe-template.c b/src/recipe/recipe-template.c index ae6f0cd1..7894ce74 100644 --- a/src/recipe/recipe-template.c +++ b/src/recipe/recipe-template.c @@ -31,7 +31,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(_); +def_dish(_); /** * 定义专服务于该target的镜像站,该例数据为虚拟填充 diff --git a/src/recipe/ware/Anaconda/Anaconda.c b/src/recipe/ware/Anaconda/Anaconda.c index dd71cf08..3c2ca8b6 100644 --- a/src/recipe/ware/Anaconda/Anaconda.c +++ b/src/recipe/ware/Anaconda/Anaconda.c @@ -4,7 +4,7 @@ #include "rawstr4c.h" -def_target(wr_anaconda, "conda/anaconda"); +def_dish(wr_anaconda, "conda/anaconda"); void wr_anaconda_prepare () diff --git a/src/recipe/ware/CocoaPods.c b/src/recipe/ware/CocoaPods.c index c402e8da..a83b3df1 100644 --- a/src/recipe/ware/CocoaPods.c +++ b/src/recipe/ware/CocoaPods.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(wr_cocoapods, "cocoa/cocoapods/cocoapod"); +def_dish(wr_cocoapods, "cocoa/cocoapods/cocoapod"); void wr_cocoapods_prepare () diff --git a/src/recipe/ware/Docker/Docker.c b/src/recipe/ware/Docker/Docker.c index 2b28649d..14bebf8c 100644 --- a/src/recipe/ware/Docker/Docker.c +++ b/src/recipe/ware/Docker/Docker.c @@ -19,7 +19,7 @@ Fit2Cloud = {SKIP, ToFill, ToFill, NULL, ROUGH} }; -def_target(wr_docker, "docker/dockerhub"); +def_dish(wr_docker, "docker/dockerhub"); void wr_docker_prepare () diff --git a/src/recipe/ware/Emacs.c b/src/recipe/ware/Emacs.c index 37051ce4..b8d4f434 100644 --- a/src/recipe/ware/Emacs.c +++ b/src/recipe/ware/Emacs.c @@ -9,7 +9,7 @@ static MirrorSite_t EmacsChina = {SKIP, ToFill, ToFill, NULL, ROUGH} }; -def_target(wr_emacs, "emacs/elpa"); +def_dish(wr_emacs, "emacs/elpa"); void wr_emacs_prepare () diff --git a/src/recipe/ware/Flatpak.c b/src/recipe/ware/Flatpak.c index 7f7e3a32..965cf9fa 100644 --- a/src/recipe/ware/Flatpak.c +++ b/src/recipe/ware/Flatpak.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(wr_flatpak, "flatpak/flathub"); +def_dish(wr_flatpak, "flatpak/flathub"); void wr_flatpak_prepare () diff --git a/src/recipe/ware/Guix.c b/src/recipe/ware/Guix.c index 32c343b8..a67ed7a4 100644 --- a/src/recipe/ware/Guix.c +++ b/src/recipe/ware/Guix.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(wr_guix, "guix"); +def_dish(wr_guix, "guix"); void wr_guix_prepare () diff --git a/src/recipe/ware/Homebrew/Homebrew.c b/src/recipe/ware/Homebrew/Homebrew.c index ab45d85c..eff41e1d 100644 --- a/src/recipe/ware/Homebrew/Homebrew.c +++ b/src/recipe/ware/Homebrew/Homebrew.c @@ -4,7 +4,7 @@ #include "rawstr4c.h" -def_target(wr_homebrew, "brew/homebrew"); +def_dish(wr_homebrew, "brew/homebrew"); void wr_homebrew_prepare () diff --git a/src/recipe/ware/Nix.c b/src/recipe/ware/Nix.c index 9d4f7e67..9a6321d0 100644 --- a/src/recipe/ware/Nix.c +++ b/src/recipe/ware/Nix.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(wr_nix, "nix"); +def_dish(wr_nix, "nix"); /** * 运行时检查到底是哪种安装方式 diff --git a/src/recipe/ware/TeX-Live.c b/src/recipe/ware/TeX-Live.c index 735501e6..949da0b9 100644 --- a/src/recipe/ware/TeX-Live.c +++ b/src/recipe/ware/TeX-Live.c @@ -4,7 +4,7 @@ * MiKTeX 和 TeX Live 都是流行的 LaTeX 发行版,但它们是不同的实现 * ------------------------------------------------------------*/ -def_target(wr_tex, "latex/ctan/tex/texlive/miktex/tlmgr/mpm"); +def_dish(wr_tex, "latex/ctan/tex/texlive/miktex/tlmgr/mpm"); void wr_tex_prepare () diff --git a/src/recipe/ware/WinGet.c b/src/recipe/ware/WinGet.c index 776a893a..ffa08f03 100644 --- a/src/recipe/ware/WinGet.c +++ b/src/recipe/ware/WinGet.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------*/ -def_target(wr_winget, "winget"); +def_dish(wr_winget, "winget"); void wr_winget_prepare ()