]> wimlib.net Git - wimlib/blobdiff - programs/mkwinpeimg.in
mount_image.c: add fallback definitions of RENAME_* constants
[wimlib] / programs / mkwinpeimg.in
index c74b9d42f6d24ad81cffed6a9493e7c46670d1c9..8e9cfeb0b141069b16918ef18823fa3a7dc2a0f5 100755 (executable)
@@ -16,7 +16,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 script_name="$(basename "$0")"
 PREFIX_REG="::"
@@ -437,7 +437,9 @@ modify_boot_wim() {
        exec 3>&-
 
        stat_busy "Rebuilding WIM with changes made"
-       wimlib-imagex update "$boot_wim" --rebuild \
+       # Use case-insensitive mode; some Windows PE images contain a "windows"
+       # directory instead of a "Windows" directory...
+       WIMLIB_IMAGEX_IGNORE_CASE=1 wimlib-imagex update "$boot_wim" --rebuild \
                < "$tmp_dir/__mkwinpeimg.update.cmds" > /dev/null || stat_fail
        stat_done
 }
@@ -483,13 +485,16 @@ make_disk_img() {
 
        syslinux --install "$image"
 
-       syslinuxdir="/usr/lib/syslinux"
-
-       if [ -d "$syslinuxdir/bios" ]; then
-               biosdir="$syslinuxdir/bios"
-       else
-               biosdir="$syslinuxdir"
-       fi
+       for biosdir in                          \
+               /usr/lib/syslinux/modules/bios  \
+               /usr/lib/syslinux/bios          \
+               /usr/lib/syslinux               \
+               /usr/share/syslinux
+       do
+               if [ -e "$biosdir/chain.c32" ]; then
+                       break
+               fi
+       done
 
        mcopy "$biosdir/chain.c32" s: || stat_fail
        if [ -e "$biosdir/libcom32.c32" ]; then