From 9ddee7394d0b6f509e7f830b42054d5d30e59168 Mon Sep 17 00:00:00 2001 From: longpanda Date: Wed, 21 Oct 2020 17:15:31 +0800 Subject: [PATCH] support different themes for Legacy BIOS mode and UEFI mode --- .../grub-core/ventoy/ventoy_plugin.c | 5 +++++ INSTALL/grub/debug.cfg | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c index 00d537fe..07deb918 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c @@ -1180,6 +1180,11 @@ static plugin_entry g_plugin_entries[] = { { "control", ventoy_plugin_control_entry, ventoy_plugin_control_check }, { "theme", ventoy_plugin_theme_entry, ventoy_plugin_theme_check }, +#ifdef GRUB_MACHINE_EFI + { "theme_uefi", ventoy_plugin_theme_entry, ventoy_plugin_theme_check }, +#else + { "theme_legacy", ventoy_plugin_theme_entry, ventoy_plugin_theme_check }, +#endif { "auto_install", ventoy_plugin_auto_install_entry, ventoy_plugin_auto_install_check }, { "persistence", ventoy_plugin_persistence_entry, ventoy_plugin_persistence_check }, { "menu_alias", ventoy_plugin_menualias_entry, ventoy_plugin_menualias_check }, diff --git a/INSTALL/grub/debug.cfg b/INSTALL/grub/debug.cfg index 46ee3956..44d0bb8c 100644 --- a/INSTALL/grub/debug.cfg +++ b/INSTALL/grub/debug.cfg @@ -19,6 +19,27 @@ submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json { unset pager } + if [ "$grub_platform" = "pc" ]; then + menuentry 'Check legacy theme plugin configuration' --class=debug_theme_legacy { + set pager=1 + vt_check_plugin_json $vt_plugin_path theme_legacy $vtoy_iso_part + + echo -e "\npress ENTER to exit ..." + read vtInputKey + unset pager + } + else + menuentry 'Check uefi theme plugin configuration' --class=debug_theme_uefi { + set pager=1 + vt_check_plugin_json $vt_plugin_path theme_uefi $vtoy_iso_part + + echo -e "\npress ENTER to exit ..." + read vtInputKey + unset pager + } + fi + + menuentry 'Check auto install plugin configuration' --class=debug_autoinstall { set pager=1 vt_check_plugin_json $vt_plugin_path auto_install $vtoy_iso_part