mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[syslinux] support ISOs that use boot.bin instead of isolinux.bin
* Such as WebConverger (webc-35.1.iso) * Also fix non installation of Syslinux if Alt-E (dual UEFI/BIOS) is set * Also update README and AppVeyor script
This commit is contained in:
parent
19536ddd1a
commit
e7578bc12d
6 changed files with 23 additions and 22 deletions
|
@ -10,7 +10,7 @@ Rufus: The Reliable USB Formatting Utility
|
|||
Features
|
||||
--------
|
||||
|
||||
* Format USB and Virtual HD drives to FAT/FAT32/NTFS/UDF/exFAT/ReFS
|
||||
* Format USB, flash card and virtual drives to FAT/FAT32/NTFS/UDF/exFAT/ReFS
|
||||
* Create DOS bootable USB drives, using [FreeDOS](http://www.freedos.org/) or MS-DOS
|
||||
* Create BIOS or UEFI bootable drives, including [UEFI bootable NTFS](https://github.com/pbatard/uefi-ntfs)
|
||||
* Create bootable drives from bootable ISOs (Windows, Linux, etc.)
|
||||
|
@ -18,6 +18,7 @@ Features
|
|||
* Create [Windows To Go](https://en.wikipedia.org/wiki/Windows_To_Go) drives
|
||||
* Twice as fast as Microsoft's USB/DVD tool or UNetbootin, on ISO -> USB creation <sup>(1)</sup>
|
||||
* Perform bad blocks checks, including detection of "fake" flash drives
|
||||
* Compute MD5, SHA-1 and SHA-256 checksums of the selected image
|
||||
* Modern and familiar UI, with more than [35 languages natively supported](https://rufus.akeo.ie/translations)
|
||||
* Small footprint. No installation required.
|
||||
* Portable
|
||||
|
|
|
@ -2,12 +2,9 @@ os: Visual Studio 2015
|
|||
|
||||
init:
|
||||
- ps: >-
|
||||
if ($env:appveyor_repo_tag -eq "true")
|
||||
{
|
||||
if ($env:appveyor_repo_tag -eq "true") {
|
||||
Update-AppveyorBuild -Version "$env:appveyor_repo_tag_name"
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Update-AppveyorBuild -Version "dev-$($env:appveyor_repo_commit.substring(0,7))"
|
||||
}
|
||||
|
||||
|
|
|
@ -912,7 +912,7 @@ static BOOL WriteMBR(HANDLE hPhysicalDrive)
|
|||
|
||||
// What follows is really a case statement with complex conditions listed
|
||||
// by order of preference
|
||||
if ((allow_dual_uefi_bios) && (tt == TT_BIOS))
|
||||
if (IS_WINDOWS(img_report) && (allow_dual_uefi_bios) && (tt == TT_BIOS))
|
||||
goto windows_mbr;
|
||||
|
||||
// Forced UEFI (by zeroing the MBR)
|
||||
|
@ -1826,7 +1826,7 @@ DWORD WINAPI FormatThread(void* param)
|
|||
}
|
||||
} else if ( (bt == BT_SYSLINUX_V4) || (bt == BT_SYSLINUX_V6) ||
|
||||
((bt == BT_ISO) && (HAS_SYSLINUX(img_report) || IS_REACTOS(img_report)) &&
|
||||
(!allow_dual_uefi_bios) && (IS_FAT(fs))) ) {
|
||||
(!IS_WINDOWS(img_report) || !allow_dual_uefi_bios) && (IS_FAT(fs))) ) {
|
||||
if (!InstallSyslinux(DriveIndex, drive_name[0], fs)) {
|
||||
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|ERROR_INSTALL_FAILURE;
|
||||
}
|
||||
|
|
16
src/iso.c
16
src/iso.c
|
@ -80,8 +80,8 @@ static const char* install_wim_name[] = { "install.wim", "install.swm" };
|
|||
static const char* grub_dirname = "/boot/grub/i386-pc";
|
||||
static const char* grub_cfg = "grub.cfg";
|
||||
static const char* syslinux_cfg[] = { "isolinux.cfg", "syslinux.cfg", "extlinux.conf" };
|
||||
static const char dot_isolinux_bin[] = ".\\isolinux.bin";
|
||||
static const char* isolinux_bin = &dot_isolinux_bin[2];
|
||||
static const char* isolinux_tmp = ".\\isolinux.tmp";
|
||||
static const char* isolinux_bin[] = { "isolinux.bin", "boot.bin" };
|
||||
static const char* pe_dirname[] = { "/i386", "/minint" };
|
||||
static const char* pe_file[] = { "ntdetect.com", "setupldr.bin", "txtsetup.sif" };
|
||||
static const char* reactos_name = "setupldr.sys"; // TODO: freeldr.sys doesn't seem to work
|
||||
|
@ -217,10 +217,12 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t i_file_length, cons
|
|||
// Maintain a list of all the isolinux/syslinux configs identified so far
|
||||
StrArrayAdd(&config_path, psz_fullpath);
|
||||
}
|
||||
if (safe_stricmp(psz_basename, isolinux_bin) == 0) {
|
||||
for (i=0; i<ARRAYSIZE(isolinux_bin); i++) {
|
||||
if (safe_stricmp(psz_basename, isolinux_bin[i]) == 0) {
|
||||
// Maintain a list of all the isolinux.bin files found
|
||||
StrArrayAdd(&isolinux_path, psz_fullpath);
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<NB_OLD_C32; i++) {
|
||||
if (props->is_old_c32[i])
|
||||
|
@ -769,13 +771,13 @@ out:
|
|||
uprintf(" Will use '%s' for Syslinux", img_report.cfg_path);
|
||||
// Extract all of the isolinux.bin files we found to identify their versions
|
||||
for (i=0; i<isolinux_path.Index; i++) {
|
||||
size = (size_t)ExtractISOFile(src_iso, isolinux_path.String[i], dot_isolinux_bin, FILE_ATTRIBUTE_NORMAL);
|
||||
size = (size_t)ExtractISOFile(src_iso, isolinux_path.String[i], isolinux_tmp, FILE_ATTRIBUTE_NORMAL);
|
||||
if (size == 0) {
|
||||
uprintf(" Could not access %s", isolinux_path.String[i]);
|
||||
} else {
|
||||
buf = (char*)calloc(size, 1);
|
||||
if (buf == NULL) break;
|
||||
fd = fopen(dot_isolinux_bin, "rb");
|
||||
fd = fopen(isolinux_tmp, "rb");
|
||||
if (fd == NULL) {
|
||||
free(buf);
|
||||
continue;
|
||||
|
@ -788,7 +790,7 @@ out:
|
|||
img_report.sl_version = sl_version;
|
||||
sl_index = i;
|
||||
} else if ((img_report.sl_version != sl_version) || (safe_strcmp(img_report.sl_version_ext, ext) != 0)) {
|
||||
uprintf(" Found conflicting %s versions:\n '%s' (%d.%02d%s) vs '%s' (%d.%02d%s)", isolinux_bin,
|
||||
uprintf(" Found conflicting isolinux versions:\n '%s' (%d.%02d%s) vs '%s' (%d.%02d%s)",
|
||||
isolinux_path.String[sl_index], SL_MAJOR(img_report.sl_version), SL_MINOR(img_report.sl_version),
|
||||
img_report.sl_version_ext, isolinux_path.String[i], SL_MAJOR(sl_version), SL_MINOR(sl_version), ext);
|
||||
// Workaround for Antergos and other ISOs, that have multiple Syslinux versions.
|
||||
|
@ -801,7 +803,7 @@ out:
|
|||
}
|
||||
}
|
||||
free(buf);
|
||||
_unlink(dot_isolinux_bin);
|
||||
_unlink(isolinux_tmp);
|
||||
}
|
||||
}
|
||||
if (img_report.sl_version != 0) {
|
||||
|
|
|
@ -253,6 +253,7 @@ enum checksum_type {
|
|||
#define HAS_INSTALL_WIM(r) (r.install_wim_path[0] != 0)
|
||||
#define HAS_TOGO(r) (r.has_bootmgr && r.has_efi && HAS_INSTALL_WIM(r) && (r.install_wim_version < MAX_WIM_VERSION))
|
||||
#define IS_WINPE(r) (((r & WINPE_MININT) == WINPE_MININT)||(( r & WINPE_I386) == WINPE_I386))
|
||||
#define IS_WINDOWS(r) ((r.has_bootmgr) || (r.uses_minint) || IS_WINPE(r.winpe))
|
||||
#define IS_WIN7_EFI(r) ((r.has_efi == 1) && HAS_INSTALL_WIM(r))
|
||||
#define IS_REACTOS(r) (r.reactos_path[0] != 0)
|
||||
#define IS_GRUB(r) ((r.has_grub2) || (r.has_grub4dos))
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_ACCEPTFILES
|
||||
CAPTION "Rufus 2.10.981"
|
||||
CAPTION "Rufus 2.10.982"
|
||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -320,8 +320,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,10,981,0
|
||||
PRODUCTVERSION 2,10,981,0
|
||||
FILEVERSION 2,10,982,0
|
||||
PRODUCTVERSION 2,10,982,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -338,13 +338,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.10.981"
|
||||
VALUE "FileVersion", "2.10.982"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "2.10.981"
|
||||
VALUE "ProductVersion", "2.10.982"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue