diff --git a/config/autoiso.cfg b/config/autoiso.cfg new file mode 100644 index 0000000..63fd0c0 --- /dev/null +++ b/config/autoiso.cfg @@ -0,0 +1,143 @@ +rmmod echo +insmod (hd0,msdos2)/boot/grubfm/x86_64-efi/echo.mod +#set lang="tr_TR" + +function pathname { + regexp -s tw '^\([^\)]*\)(.*)$' "$1" + regexp -s $2 '^(.*/)[^/]*$' "$tw" +} + +function scan_isos { + for d in (*,*) ; do + + if ! regexp -s iso_device '\((.*)\)' "$d"; then continue; fi + if regexp 'loop' "$iso_device"; then continue; fi + + set realdev="($iso_device)" + set puredev="$iso_device" + + probe -s devlabel -l "$realdev" + probe -s devfs --fs "$realdev" + + set fs_msg="${devfs}" + set devlabel_msg="" + + if test "$devlabel"; then set devlabel_msg=" \"$devlabel\""; fi + + if regexp "hd0,msdos[12]" "$realdev"; then + set two="USB" + else + set two="HDD" + fi + + submenu " ${two} DISK :=-> ${realdev}${devlabel_msg} [${fs_msg}]" "$realdev" "$puredev" --class ${two} { + unset theme + + if test $SECOND -le 11; then + set x=1 + elif test $SECOND -le 23; then + set x=2 + elif test $SECOND -le 35; then + set x=3 + elif test $SECOND -le 47; then + set x=4 + else + set x=5 + fi + + set theme_path="/MultiOS-USB/themes/MultiOS-USB/theme${x}.txt" + + if [ -e "$theme_path" ]; then + set theme="$theme_path" + export theme + else + set theme="/MultiOS-USB/themes/MultiOS-USB/theme.txt" + export theme + fi + + set realdev="$2" + set puredev="$3" + set dirs="|" + + for file in "${realdev}"/*.iso "${realdev}"/*/*.iso; do + if [ ! -f "$file" ]; then continue; fi + + set isopath="" + pathname "$file" isopath + + if [ -z "$isopath" ]; then set isopath="/"; fi + if regexp "\|${isopath}\|" "$dirs"; then continue; fi + set dirs="${dirs}${isopath}|" + + if regexp "hd0,msdos[12]" "$realdev"; then set tws="USB"; else set tws="HDD"; fi + + submenu " ${tws} DİZİN :=-> ${realdev}${isopath}" "$realdev" "$isopath" --class diriso { + unset theme + + if test $SECOND -le 11; then + set x=1 + elif test $SECOND -le 23; then + set x=2 + elif test $SECOND -le 35; then + set x=3 + elif test $SECOND -le 47; then + set x=4 + else + set x=5 + fi + + set theme_path="/MultiOS-USB/themes/MultiOS-USB/theme${x}.txt" + + if [ -e "$theme_path" ]; then + set theme="$theme_path" + export theme + else + set theme="/MultiOS-USB/themes/MultiOS-USB/theme.txt" + export theme + fi + + set dev="" + set iso_dir="$3" + + if regexp ',' "$2"; then + regexp -s dev '^\(([^,]+)' "$2" + else + regexp -s dev '^\(?([^\)]+)\)?' "$2" + fi + + regexp -s iso_dir '^(.*)/$' "$iso_dir" + + export dev + export iso_dir + + echo -e "\e0xe1 YAPILANDIRMAYA AKTARILAN DEĞİŞKENLER" + echo -e "\e0x5f-------------------------------------------------" + echo "" + echo -e "\e0x1f SEÇİLEN DİSK (dev) : $2" + echo "" + echo -e "\e0x1f HEDEF KLASÖR (iso_dir) : "$iso_dir" " + echo "" + echo -e "\e0x5f-------------------------------------------------" + echo "" + echo "" + echo -e "\e0x8e !!! DİKKAT \e0xf1 $2$3 \e0x9f klasör adında BOŞLUK olmamalı " + echo -e "\e0x5f-------------------------------------------------" + echo "" + echo -e "\e0x2b ... Yapılandırma dosyalarıyla eşleştirme başlıyor... " + + for cfgfile in /MultiOS-USB/config/*/*.cfg /MultiOS-USB/config_priv/*/*.cfg; do + if [ -f "$cfgfile" ]; then + source "$cfgfile" + fi + done + } + done + } + done +} + +if [ -z "$iso_dir" ]; then + set iso_dir="/" +fi + +scan_isos "$iso_dir" diff --git a/config/grub.config b/config/grub.config index cce3526..8e1c9af 100644 --- a/config/grub.config +++ b/config/grub.config @@ -28,9 +28,9 @@ regexp -s dev '^(.*),' "$root" probe --fs-uuid $root --set=rootuuid set imgdevpath="/dev/disk/by-uuid/$rootuuid" set pager=1 -set iso_dir="/ISOs" +#set iso_dir="/ISOs" set theme_path="/MultiOS-USB/themes/MultiOS-USB/theme.txt" -export dev rootuuid imgdevpath iso_dir +export dev rootuuid imgdevpath if [ -e "$theme_path" ]; then set theme="$theme_path" @@ -83,6 +83,12 @@ function find_grub_cfg { } } +set grub_version="/MultiOS-USB/config/config.version" +if [ -e "$grub_version" ]; then + set versiyon="$grub_version" + export versiyon +fi + function LOOPBACK { if [ -e (loop) ]; then loopback --delete loop @@ -90,11 +96,10 @@ function LOOPBACK { loopback loop "$1" } -submenu "Auto-detect ISOs/WIMs (Directory: $iso_dir) -->" { - echo -n "Loading configuration files... " - for cfgfile in /MultiOS-USB/config/*/*.cfg /MultiOS-USB/config_priv/*/*.cfg; do - source "$cfgfile" - done +source /MultiOS-USB/config/autoiso.cfg + +submenu "Bilgisayar Donanım Bilgileri (hwinfo.cfg) -->" --class=hwinfo { + configfile /MultiOS-USB/config/hwinfo.cfg } if [ "${grub_platform}" == "pc" ]; then diff --git a/config/hwinfo.cfg b/config/hwinfo.cfg new file mode 100644 index 0000000..b8b3702 --- /dev/null +++ b/config/hwinfo.cfg @@ -0,0 +1,77 @@ +# +set cpu_brand="-" +smbios -t 4 -s 0x10 --set=cpu_brand + +set system_vendor="-" +smbios -t 1 -s 0x04 --set=system_vendor +set system_product="-" +smbios -t 1 -s 0x05 --set=system_product +set system_version="-" +smbios -t 1 -s 0x06 --set=system_version + +set board_vendor="-" +smbios -t 2 -s 0x04 --set=board_vendor +set board_product="-" +smbios -t 2 -s 0x05 --set=board_product +set board_version="-" +smbios -t 2 -s 0x06 --set=board_version + +set bios_vendor="-" +smbios -t 0 -s 0x04 --set=bios_vendor +set bios_version="-" +smbios -t 0 -s 0x05 --set=bios_ver +set bios_date="-" +smbios -t 0 -s 0x08 --set=bios_date +set bios_size="-" +smbios -t 0 -b 0x09 --set=bios_size + +smbios -t 17 --match 1 --get-word 0x0c --set=r1 +smbios -t 17 --match 2 --get-word 0x0c --set=r2 +smbios -t 17 --match 3 --get-word 0x0c --set=r3 +smbios -t 17 --match 4 --get-word 0x0c --set=r4 + +if [ -z "$r1" ]; then set r1=0; fi +if [ -z "$r2" ]; then set r2=0; fi +if [ -z "$r3" ]; then set r3=0; fi +if [ -z "$r4" ]; then set r4=0; fi + +if [ "$shim_lock" = "y" ]; then + grub_secureboot="Enabled" +else + grub_secureboot="Disabled" +fi + + +echo "" +echo -e "\MultiOS-USB Versiyon " +cat $versiyon + +echo "" +echo -e "\ Platform $grub_cpu-$grub_platform " +echo "" +echo -e "\ Secureboot $grub_secureboot " +echo "" +echo -e "\ CPU Model $cpu_brand" +echo -e "\ Physical RAM ${r1} | ${r2} | ${r3} | ${r4} MB " + +echo "" +echo -e "\ Manufacturer $system_vendor " +echo -e "\ Product Name $system_product " +echo -e "\ Version $system_version " + +echo "" +echo -e "\ Board Manufacturer $board_vendor " +echo -e "\ Board Name $board_product " +echo -e "\ Board Version $board_version " + +echo "" +echo -e "\ BIOS Manufacturer $bios_vendor " +echo -e "\ BIOS Version $bios_ver " +echo -e "\ BIOS Date $bios_date " +echo -e "\ BIOS ROM Size $bios_size " + + +echo -en "\n\n\nÇıkmak için ENTER Tuşuna basın ..." +read + + diff --git a/themes/MultiOS-USB/icons/HDD.png b/themes/MultiOS-USB/icons/HDD.png new file mode 100644 index 0000000..a4d9b95 Binary files /dev/null and b/themes/MultiOS-USB/icons/HDD.png differ diff --git a/themes/MultiOS-USB/icons/USB.png b/themes/MultiOS-USB/icons/USB.png new file mode 100644 index 0000000..a1f422a Binary files /dev/null and b/themes/MultiOS-USB/icons/USB.png differ diff --git a/themes/MultiOS-USB/icons/hwinfo.png b/themes/MultiOS-USB/icons/hwinfo.png new file mode 100644 index 0000000..4791482 Binary files /dev/null and b/themes/MultiOS-USB/icons/hwinfo.png differ