mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[syslinux] work on duplicated copies of ldlinux.sys and ldlinux.bss
* If not, a VS2012 compiled Rufus will crash, as it doesn't allow working directly on embedded resources * Closes #118 * Also update ChangeLog for previous patch
This commit is contained in:
parent
97576d79cb
commit
6b8833bcfb
3 changed files with 22 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
o Version 1.3.1 (2013.01.09)
|
||||
Fix Windows XP ISO support, that was broken in 1.3.0
|
||||
Drops support for ArchLinux, until they fix their ISO9660 compliance
|
||||
Drop support for newer ArchLinux ISOs - this will be fixed in 1.3.2
|
||||
Indicate which of FAT32 or Large FAT32 will be used as well as Partition Scheme
|
||||
Various internal fixes
|
||||
o Version 1.3.0 (2012.12.16)
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 316
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.3.1.221"
|
||||
CAPTION "Rufus v1.3.1.222"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,278,50,14
|
||||
|
@ -274,8 +274,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,3,1,221
|
||||
PRODUCTVERSION 1,3,1,221
|
||||
FILEVERSION 1,3,1,222
|
||||
PRODUCTVERSION 1,3,1,222
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -292,13 +292,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.3.1.221"
|
||||
VALUE "FileVersion", "1.3.1.222"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "(c) 2011-2012 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.3.1.221"
|
||||
VALUE "ProductVersion", "1.3.1.222"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
#include "libfat.h"
|
||||
#include "setadv.h"
|
||||
|
||||
unsigned char* syslinux_ldlinux;
|
||||
unsigned char* syslinux_ldlinux = NULL;
|
||||
unsigned int syslinux_ldlinux_len;
|
||||
unsigned char* syslinux_bootsect;
|
||||
unsigned char* syslinux_bootsect = NULL;
|
||||
unsigned int syslinux_bootsect_len;
|
||||
|
||||
/*
|
||||
|
@ -102,8 +102,13 @@ BOOL InstallSyslinux(DWORD num, const char* drive_name)
|
|||
uprintf("Unable to load ldlinux.sys resource: %s\n", WindowsErrorString());
|
||||
goto out;
|
||||
}
|
||||
syslinux_ldlinux = (unsigned char*)LockResource(res_handle);
|
||||
syslinux_ldlinux_len = SizeofResource(NULL, res);
|
||||
syslinux_ldlinux = (unsigned char*)malloc(syslinux_ldlinux_len);
|
||||
if (syslinux_ldlinux == NULL) {
|
||||
uprintf("Unable to allocate ldlinux.sys resource\n");
|
||||
goto out;
|
||||
}
|
||||
memcpy(syslinux_ldlinux, LockResource(res_handle), syslinux_ldlinux_len);
|
||||
|
||||
/* Access ldlinux.bss resource */
|
||||
res = FindResource(hMainInstance, MAKEINTRESOURCE(IDR_SL_LDLINUX_BSS), RT_RCDATA);
|
||||
|
@ -116,8 +121,13 @@ BOOL InstallSyslinux(DWORD num, const char* drive_name)
|
|||
uprintf("Unable to load ldlinux.bss resource: %s\n", WindowsErrorString());
|
||||
goto out;
|
||||
}
|
||||
syslinux_bootsect = (unsigned char*)LockResource(res_handle);
|
||||
syslinux_bootsect_len = SizeofResource(NULL, res);
|
||||
syslinux_bootsect = (unsigned char*)malloc(syslinux_bootsect_len);
|
||||
if (syslinux_bootsect == NULL) {
|
||||
uprintf("Unable to allocate ldlinux.bss resource\n");
|
||||
goto out;
|
||||
}
|
||||
memcpy(syslinux_bootsect, LockResource(res_handle), syslinux_bootsect_len);
|
||||
|
||||
/* Create ldlinux.sys file */
|
||||
f_handle = CreateFileA(ldlinux_name, GENERIC_READ | GENERIC_WRITE,
|
||||
|
@ -220,6 +230,8 @@ BOOL InstallSyslinux(DWORD num, const char* drive_name)
|
|||
r = TRUE;
|
||||
|
||||
out:
|
||||
safe_free(syslinux_ldlinux);
|
||||
safe_free(syslinux_bootsect);
|
||||
safe_free(sectors);
|
||||
safe_closehandle(d_handle);
|
||||
safe_closehandle(f_handle);
|
||||
|
|
Loading…
Reference in a new issue