mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[sl] add chain.c32 module for embedding
* also minor updates
This commit is contained in:
parent
b6252a913a
commit
9d2f9faa70
6 changed files with 20 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
rm -f rufus*.exe
|
||||
./configure --without-freedos
|
||||
./configure --without-freedos --without-syslinux
|
||||
make clean
|
||||
make release -j2
|
||||
./configure --with-freedos
|
||||
|
|
BIN
res/syslinux/chain.c32
Normal file
BIN
res/syslinux/chain.c32
Normal file
Binary file not shown.
|
@ -1,2 +1,3 @@
|
|||
o ldlinux.bss and ldlinux.sys were extracted from syslinux-4.05/core/
|
||||
http://www.kernel.org/pub/linux/utils/boot/syslinux/
|
||||
o ldlinux.bss and ldlinux.sys were extracted from syslinux-4.05/core/
|
||||
and chain.c32 from syslinux-4.05/com32/modules:
|
||||
http://www.kernel.org/pub/linux/utils/boot/syslinux/
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#define IDR_FD_EGA18_CPX 326
|
||||
#define IDR_SL_LDLINUX_BSS 400
|
||||
#define IDR_SL_LDLINUX_SYS 401
|
||||
#define IDR_SL_CHAIN_C32 402
|
||||
#define IDC_DEVICE 1001
|
||||
#define IDC_FILESYSTEM 1002
|
||||
#define IDC_START 1003
|
||||
|
|
14
src/rufus.rc
14
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 278
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.0.7.117"
|
||||
CAPTION "Rufus v1.0.7.118"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,236,50,14
|
||||
|
@ -69,7 +69,7 @@ BEGIN
|
|||
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
|
||||
CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL,
|
||||
"SysLink",WS_TABSTOP,46,47,114,9
|
||||
LTEXT "Version 1.0.7 (Build 117)",IDC_STATIC,46,19,78,8
|
||||
LTEXT "Version 1.0.7 (Build 118)",IDC_STATIC,46,19,78,8
|
||||
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
|
||||
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
|
||||
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
|
||||
|
@ -159,6 +159,7 @@ BEGIN
|
|||
"#if defined(WITH_SYSLINUX)\r\n"
|
||||
"IDR_SL_LDLINUX_BSS RCDATA ""../res/syslinux/ldlinux.bss""\r\n"
|
||||
"IDR_SL_LDLINUX_SYS RCDATA ""../res/syslinux/ldlinux.sys""\r\n"
|
||||
"IDR_SL_CHAIN_C32 RCDATA ""../res/syslinux/chain.c32""\r\n"
|
||||
"#endif\r\n"
|
||||
"\r\n"
|
||||
"// Must reference a manifest for visual styles and elevation\r\n"
|
||||
|
@ -206,8 +207,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,7,117
|
||||
PRODUCTVERSION 1,0,7,117
|
||||
FILEVERSION 1,0,7,118
|
||||
PRODUCTVERSION 1,0,7,118
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -224,13 +225,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "akeo.ie"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.0.7.117"
|
||||
VALUE "FileVersion", "1.0.7.118"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.0.7.117"
|
||||
VALUE "ProductVersion", "1.0.7.118"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -292,6 +293,7 @@ IDR_FD_EGA18_CPX RCDATA "../res/freedos/ega18.cpx"
|
|||
#if defined(WITH_SYSLINUX)
|
||||
IDR_SL_LDLINUX_BSS RCDATA "../res/syslinux/ldlinux.bss"
|
||||
IDR_SL_LDLINUX_SYS RCDATA "../res/syslinux/ldlinux.sys"
|
||||
IDR_SL_CHAIN_C32 RCDATA "../res/syslinux/chain.c32"
|
||||
#endif
|
||||
|
||||
// Must reference a manifest for visual styles and elevation
|
||||
|
|
|
@ -61,7 +61,10 @@ int libfat_readfile(intptr_t pp, void *buf, size_t secsize,
|
|||
return (int)secsize;
|
||||
}
|
||||
|
||||
// TODO: set format errors
|
||||
/*
|
||||
* Extract the ldlinux.sys and ldlinux.bss from resources,
|
||||
* then patch and install them
|
||||
*/
|
||||
BOOL InstallSyslinux(DWORD num, const char* drive_name)
|
||||
{
|
||||
HANDLE f_handle = INVALID_HANDLE_VALUE;
|
||||
|
@ -186,7 +189,7 @@ BOOL InstallSyslinux(DWORD num, const char* drive_name)
|
|||
/* Close file */
|
||||
safe_closehandle(f_handle);
|
||||
|
||||
/* Make the syslinux boot sector */
|
||||
/* Read existing FAT data into boot sector */
|
||||
if (SetFilePointer(d_handle, 0, NULL, FILE_BEGIN) != 0 ||
|
||||
!ReadFile(d_handle, sectbuf, SECTOR_SIZE,
|
||||
&bytes_read, NULL)
|
||||
|
@ -195,8 +198,10 @@ BOOL InstallSyslinux(DWORD num, const char* drive_name)
|
|||
goto out;
|
||||
}
|
||||
|
||||
/* Make the syslinux boot sector */
|
||||
syslinux_make_bootsect(sectbuf);
|
||||
|
||||
/* Write boot sector back */
|
||||
if (SetFilePointer(d_handle, 0, NULL, FILE_BEGIN) != 0 ||
|
||||
!WriteFile(d_handle, sectbuf, SECTOR_SIZE,
|
||||
&bytes_written, NULL)
|
||||
|
|
Loading…
Reference in a new issue