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

Commit

Permalink
iso: add support for windows xp (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ive committed May 13, 2020
1 parent 6b690dc commit 1bfced2
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
47 changes: 47 additions & 0 deletions arch/legacy/ntboot/INSTALLXP
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
!BAT
:: INSTALLXP
:: 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/>.
debug=off

set dev=@
if /I "%1"=="cd" set dev=(0xff) && set step=1
if /I "%1"=="hd" set dev=(hd0) && set step=2
if "%dev%"=="@" echo && echo #1 Parameters ERROR && goto :exit
shift

echo -e %* | set img=
find --set-root --ignore-floppies %img%
if NOT exist %img% echo File not exist && goto :exit

map --mem (rd)+1 (fd0)
map --mem (rd)+1 (fd1)

echo Loading %img% ...
map %img% (0xff) || map --mem %img% (0xff)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook

echo Install Windows XP - STEP %step%
rootnoverify %dev%
chainloader %dev% || chainloader +1 || chainloader %dev%+1 || goto :exit
boot

:exit
echo
pause press any key to exit ...
reboot
Binary file added arch/legacy/winvblk.gz
Binary file not shown.
13 changes: 13 additions & 0 deletions boot/grubfm/distro/winxp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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};";
linux ${prefix}/grub.exe --config-file=${g4d_cmd};
initrd ${prefix}/winvblk.gz;
}

menuentry "Install Windows XP - STEP 2" --class nt5 {
set g4d_cmd="find --set-root --ignore-floppies /fm.loop;/INSTALLXP hd ${grubfm_path};";
linux ${prefix}/grub.exe --config-file=${g4d_cmd};
initrd ${prefix}/winvblk.gz;
}
8 changes: 8 additions & 0 deletions boot/grubfm/rules/iso/loop_detect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ function iso_detect {
lua ${prefix}/rules/iso/winpe.lua;
}
fi;
if [ -f (loop)/WIN51 ];
then
export linux_extra=" ";
export icon=nt5;
export distro="Windows XP";
export src=winxp;
return;
fi;
if [ -d (loop)/casper ];
then
export linux_extra="iso-scan/filename=${grubfm_path}";
Expand Down

0 comments on commit 1bfced2

Please sign in to comment.