Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
Add pt_BR, AIO-Boot & Ventoy menu support
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ive committed Aug 4, 2020
1 parent 03d6a6f commit 71fba7d
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 25 deletions.
6 changes: 4 additions & 2 deletions boot/grubfm/distro/win.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ function win_isoboot {
fi;
if [ -z "${2}" ];
then
wimboot @:bootmgfw.efi:(wimboot)/bootmgfw.efi \
wimboot --highest=no --testmode=no \
@:bootmgfw.efi:(wimboot)/bootmgfw.efi \
@:null.cfg:(envblk)/null.cfg \
@:mount_x64.exe:(install)/mount_x64.exe \
@:mount_x86.exe:(install)/mount_x86.exe \
@:start.bat:${grubfm_startbat} \
@:winpeshl.ini:(install)/winpeshl.ini \
@:boot.wim:"${1}";
else
wimboot @:bootmgfw.efi:(wimboot)/bootmgfw.efi \
wimboot --highest=no --testmode=no \
@:bootmgfw.efi:(wimboot)/bootmgfw.efi \
@:null.cfg:(envblk)/null.cfg \
@:mount_x64.exe:(install)/mount_x64.exe \
@:mount_x86.exe:(install)/mount_x86.exe \
Expand Down
2 changes: 2 additions & 0 deletions boot/grubfm/distro/winxp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ source ${prefix}/func.sh;

menuentry $"Install Windows XP - STEP 1" --class nt5 {
set g4d_cmd="find --set-root --ignore-floppies /fm.loop;/INSTALLXP cd ${grubfm_path};";
auto_swap;
linux ${prefix}/grub.exe --config-file=${g4d_cmd};
initrd ${prefix}/winvblk.img;
}

menuentry $"Install Windows XP - STEP 2" --class nt5 {
set g4d_cmd="find --set-root --ignore-floppies /fm.loop;/INSTALLXP hd ${grubfm_path};";
auto_swap;
linux ${prefix}/grub.exe --config-file=${g4d_cmd};
initrd ${prefix}/winvblk.img;
}
36 changes: 36 additions & 0 deletions boot/grubfm/f5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Grub2-FileManager
# Copyright (C) 2020 A1ive.
#
# Grub2-FileManager is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Grub2-FileManager is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Grub2-FileManager. If not, see <http://www.gnu.org/licenses/>.

if [ -n "${aioboot}" ];
then
set root=${aioboot};
set prefix=(${root})/AIO/grub;
unset theme;
terminal_output console;
configfile ${prefix}/grub.cfg;
elif [ -n "${ventoy}" ];
then
if [ "${grub_platform}" = "efi" ];
then
chainloader -t (${ventoy})/EFI/BOOT/BOOTX64.EFI;
else
regexp --set=1:vtdisk '(hd[0-9]+)[0-9,]*' "${ventoy}";
chainloader (${vtdisk})+1;
fi;
boot;
else
configfile ${prefix}/netboot.sh;
fi;
18 changes: 7 additions & 11 deletions boot/grubfm/global.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ then
export theme=${theme_fm};
fi;

hiddenentry "---- HOTKEY MENU ----" {
echo;
}

hiddenentry "[F1] HELP" --hotkey f1 {
hiddenentry " " --hotkey f1 {
configfile ${prefix}/help.sh;
}

hiddenentry "[F2] FILE MANAGER" --hotkey f2 {
hiddenentry " " --hotkey f2 {
if [ -n "${grubfm_current_path}" ];
then
grubfm "${grubfm_current_path}";
Expand All @@ -36,19 +32,19 @@ hiddenentry "[F2] FILE MANAGER" --hotkey f2 {
fi;
}

hiddenentry "[F3] OS DETECT" --hotkey f3 {
hiddenentry " " --hotkey f3 {
configfile ${prefix}/osdetect.sh;
}

hiddenentry "[F4] SETTINGS" --hotkey f4 {
hiddenentry " " --hotkey f4 {
configfile ${prefix}/settings.sh;
}

hiddenentry "[F5] PXE BOOT MENU" --hotkey f5 {
configfile ${prefix}/netboot.sh;
hiddenentry " " --hotkey f5 {
configfile ${prefix}/f5.sh;
}

hiddenentry "[F6] POWER OFF" --hotkey f6 {
hiddenentry " " --hotkey f6 {
configfile ${prefix}/power.sh;
}

Expand Down
19 changes: 17 additions & 2 deletions boot/grubfm/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,23 @@ then
fi;

export grubfm_lang="${lang}";
source ${prefix}/pxeinit.sh;
net_detect;

search --set=aioboot -f -q -n /AIO/grub/grub.cfg;
search --set=ventoy -f -q -n /ventoy/ventoy.cpio;
if [ -n "${aioboot}" ];
then
dd --if=${prefix}/themes/slack/dock/aioboot.png \
--of=${prefix}/themes/slack/dock/f5.png --bs=512;
elif [ -n "${ventoy}" ];
then
dd --if=${prefix}/themes/slack/dock/ventoy.png \
--of=${prefix}/themes/slack/dock/f5.png --bs=512;
else
dd --if=${prefix}/themes/slack/dock/net.png \
--of=${prefix}/themes/slack/dock/f5.png --bs=512;
source ${prefix}/pxeinit.sh;
net_detect;
fi;
if [ "${grub_netboot}" = "1" ];
then
configfile ${prefix}/netboot.sh;
Expand Down
14 changes: 7 additions & 7 deletions boot/grubfm/rules/generic/dummy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ then
export theme=${theme_fm};
fi;

hiddenentry "[F1] HELP" --hotkey f1 {
hiddenentry " " --hotkey f1 {
configfile ${prefix}/help.sh;
}

hiddenentry "[F2] ${grubfm_name}" --hotkey f2 {
hiddenentry " " --hotkey f2 {
grubfm_open "${grubfm_file}";
}

hiddenentry "[F3] OS DETECT" --hotkey f3 {
hiddenentry " " --hotkey f3 {
configfile ${prefix}/osdetect.sh;
}

hiddenentry "[F4] SETTINGS" --hotkey f4 {
hiddenentry " " --hotkey f4 {
configfile ${prefix}/settings.sh;
}

hiddenentry "[F5] PXE BOOT MENU" --hotkey f5 {
configfile ${prefix}/netboot.sh;
hiddenentry " " --hotkey f5 {
configfile ${prefix}/f5.sh;
}

hiddenentry "[F6] POWER OFF" --hotkey f6 {
hiddenentry " " --hotkey f6 {
configfile ${prefix}/power.sh;
}
Binary file added boot/grubfm/themes/slack/dock/aioboot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added boot/grubfm/themes/slack/dock/f5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added boot/grubfm/themes/slack/dock/ventoy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion boot/grubfm/themes/slack/fm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ terminal-box: "term_bkg_*.png"
+ image {file = "dock/space.png"}
+ vbox {
+ label {text = "[F5]" color = "#ffffff"}
+ image {file = "dock/net.png"}
+ image {file = "dock/f5.png"}
}
+ image {file = "dock/space.png"}
+ vbox {
Expand Down
2 changes: 1 addition & 1 deletion boot/grubfm/themes/slack/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ terminal-box: "term_bkg_*.png"
+ image {file = "dock/space.png"}
+ vbox {
+ label {text = "[F5]" color = "#ffffff"}
+ image {file = "dock/net.png"}
+ image {file = "dock/f5.png"}
}
+ image {file = "dock/space.png"}
+ vbox {
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ echo "10. Polish"
echo "11. Ukrainian"
echo "12. French"
echo "13. Danish"
echo "14. Portuguese (Brazil)"
read -p "Please make a choice: " choice
case "$choice" in
2)
Expand Down Expand Up @@ -111,6 +112,10 @@ case "$choice" in
echo "da_DK"
cp lang/da_DK/lang.sh build/boot/grubfm/
;;
14)
echo "pt_BR"
cp lang/pt_BR/lang.sh build/boot/grubfm/
;;
*)
echo "zh_CN"
cp lang/zh_CN/lang.sh build/boot/grubfm/
Expand Down
1 change: 1 addition & 0 deletions lang/pt_BR/lang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export lang=pt_BR;
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ then
fi

i=0
for lang in zh_CN zh_TW en_US tr_TR de_DE vi_VN ru_RU he_IL es_ES pl_PL uk_UA fr_FR da_DK
for lang in zh_CN zh_TW en_US tr_TR de_DE vi_VN ru_RU he_IL es_ES pl_PL uk_UA fr_FR da_DK pt_BR
do
if [ -d "releases" ]
then
Expand Down

0 comments on commit 71fba7d

Please sign in to comment.