重写 menu.c

This commit is contained in:
Aoran Zeng 2025-08-22 11:01:13 +08:00
parent 83e8084d22
commit 4b11ee3d8b
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -5,8 +5,8 @@
* Contributors : Mikachu2333 <mikachu.23333@zohomail.com> * Contributors : Mikachu2333 <mikachu.23333@zohomail.com>
* | * |
* Created On : <2023-09-01> * Created On : <2023-09-01>
* Major Revision : 4 * Major Revision : 5
* Last Modified : <2025-08-20> * Last Modified : <2025-08-22>
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
#include "lang/rawstr4c.h" #include "lang/rawstr4c.h"
@ -104,95 +104,86 @@
#include "ware/Anaconda/Anaconda.c" #include "ware/Anaconda/Anaconda.c"
void
#define t(o) &o##_target, &o##_prelude chsrc_init_menu ()
TargetRegisterInfo_t
chsrc_pl_menu[] =
{ {
{t(pl_ruby)}, #define add(t) xy_seq_push(ProgStore.pl, &pl_##t##_target); (&pl_##t##_target)->preludefn = pl_##t##_prelude
{t(pl_python_group)}, add (ruby);
{t(pl_python_pip)}, add (python_group);
{t(pl_python_poetry)}, add (python_pip);
{t(pl_python_pdm)}, add (python_poetry);
{t(pl_python_rye)}, add (python_pdm);
{t(pl_python_uv)}, add (python_rye);
{t(pl_js_group)}, add (python_uv);
{t(pl_js_bun)}, add (js_group);
{t(pl_js_npm)}, add (js_bun);
{t(pl_js_yarn)}, add (js_npm);
{t(pl_js_pnpm)}, add (js_yarn);
{t(pl_js_nvm)}, add (js_pnpm);
{t(pl_perl)}, add (js_nvm);
{t(pl_php)}, add (perl);
{t(pl_lua)}, add (php);
{t(pl_go)}, add (lua);
{t(pl_rust_cargo)}, add (go);
{t(pl_rust_rustup)}, add (rust_cargo);
{t(pl_java)}, add (rust_rustup);
{t(pl_clojure)}, add (java);
{t(pl_dart)}, add (clojure);
{t(pl_dart_flutter)}, add (dart);
{t(pl_nuget)}, add (dart_flutter);
{t(pl_haskell)}, add (nuget);
{t(pl_ocaml)}, add (haskell);
{t(pl_r)}, add (ocaml);
{t(pl_julia)}, add (r);
}; add (julia);
#undef add
#define add(t) xy_seq_push(ProgStore.os, &os_##t##_target); (&os_##t##_target)->preludefn = os_##t##_prelude
add (ubuntu);
add (linuxmint);
add (debian);
add (fedora);
add (opensuse);
add (kali);
add (msys2);
add (arch);
add (archlinuxcn);
add (manjaro);
add (gentoo);
add (rockylinux);
add (almalinux);
add (alpine);
add (voidlinux);
add (solus);
add (trisquel);
add (linuxlite);
add (ros);
add (raspberrypi);
add (armbian);
add (openwrt);
add (termux);
add (openkylin);
add (openeuler);
add (anolis);
add (deepin);
add (freebsd);
add (netbsd);
add (openbsd);
#undef add
#define add(t) xy_seq_push(ProgStore.wr, &wr_##t##_target); (&wr_##t##_target)->preludefn = wr_##t##_prelude
TargetRegisterInfo_t add (winget);
chsrc_os_menu[] = add (homebrew);
{ add (cocoapods);
{t(os_ubuntu)}, add (docker);
{t(os_linuxmint)}, add (flatpak);
{t(os_debian)}, add (nix);
{t(os_fedora)}, add (guix);
{t(os_opensuse)}, add (emacs);
{t(os_kali)}, add (tex);
{t(os_msys2)}, add (anaconda);
{t(os_arch)}, #undef add
{t(os_archlinuxcn)}, }
{t(os_manjaro)},
{t(os_gentoo)},
{t(os_rockylinux)},
{t(os_almalinux)},
{t(os_alpine)},
{t(os_voidlinux)},
{t(os_solus)},
{t(os_trisquel)},
{t(os_linuxlite)},
{t(os_ros)},
{t(os_raspberrypi)},
{t(os_armbian)},
{t(os_openwrt)},
{t(os_termux)},
{t(os_openkylin)},
{t(os_openeuler)},
{t(os_anolis)},
{t(os_deepin)},
{t(os_freebsd)},
{t(os_netbsd)},
{t(os_openbsd)},
};
TargetRegisterInfo_t
chsrc_wr_menu[] =
{
{t(wr_winget)},
{t(wr_homebrew)},
{t(wr_cocoapods)},
{t(wr_docker)},
{t(wr_flatpak)},
{t(wr_nix)},
{t(wr_guix)},
{t(wr_emacs)},
{t(wr_tex)},
{t(wr_anaconda)},
};
#undef t