mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
v1.1.0 (#131)
* first release with ISO support (bootmgr ISO only) * fix ISO9660 extraction and error reports
This commit is contained in:
parent
c1a8135d30
commit
7753c017d6
3 changed files with 17 additions and 17 deletions
20
src/iso.c
20
src/iso.c
|
@ -74,13 +74,17 @@ static __inline char* size_to_hr(int64_t size)
|
|||
{
|
||||
int suffix = 0;
|
||||
static char str_size[24];
|
||||
const char* sizes[] = { "bytes", "KB", "MB", "GB", "TB", "PB" };
|
||||
const char* sizes[] = { "", "KB", "MB", "GB", "TB" };
|
||||
double hr_size = (double)size;
|
||||
while ((suffix < ARRAYSIZE(sizes)) && (hr_size >= 1024.0)) {
|
||||
hr_size /= 1024.0;
|
||||
suffix++;
|
||||
}
|
||||
safe_sprintf(str_size, sizeof(str_size), " (%0.1f %s)", hr_size, sizes[suffix]);
|
||||
if (suffix == 0) {
|
||||
safe_sprintf(str_size, sizeof(str_size), " (%d bytes)", (int)hr_size);
|
||||
} else {
|
||||
safe_sprintf(str_size, sizeof(str_size), " (%0.1f %s)", hr_size, sizes[suffix]);
|
||||
}
|
||||
return str_size;
|
||||
}
|
||||
|
||||
|
@ -150,10 +154,7 @@ static int udf_extract_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const cha
|
|||
}
|
||||
// Replace slashes with backslashes and append the size to the path for UI display
|
||||
nul_pos = safe_strlen(psz_fullpath);
|
||||
for (i=0; i<nul_pos; i++) {
|
||||
if (psz_fullpath[i] == '/')
|
||||
psz_fullpath[i] = '\\';
|
||||
}
|
||||
for (i=0; i<nul_pos; i++) if (psz_fullpath[i] == '/') psz_fullpath[i] = '\\';
|
||||
safe_strcpy(&psz_fullpath[nul_pos], 24, size_to_hr(i_file_length));
|
||||
uprintf("Extracting: %s\n", psz_fullpath);
|
||||
SetWindowTextU(hISOFileName, psz_fullpath);
|
||||
|
@ -265,13 +266,12 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path)
|
|||
}
|
||||
// Replace slashes with backslashes and append the size to the path for UI display
|
||||
nul_pos = safe_strlen(psz_fullpath);
|
||||
for (i=0; i<nul_pos; i++) {
|
||||
if (psz_fullpath[i] == '/')
|
||||
psz_fullpath[i] = '\\';
|
||||
}
|
||||
for (i=0; i<nul_pos; i++) if (psz_fullpath[i] == '/') psz_fullpath[i] = '\\';
|
||||
safe_strcpy(&psz_fullpath[nul_pos], 24, size_to_hr(i_file_length));
|
||||
uprintf("Extracting: %s\n", psz_fullpath);
|
||||
SetWindowTextU(hISOFileName, psz_fullpath);
|
||||
// ISO9660 cannot handle backslashes
|
||||
for (i=0; i<nul_pos; i++) if (psz_fullpath[i] == '\\') psz_fullpath[i] = '/';
|
||||
psz_fullpath[nul_pos] = 0;
|
||||
file_handle = CreateFileU(psz_fullpath, GENERIC_READ | GENERIC_WRITE,
|
||||
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
|
12
src/rufus.rc
12
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 | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.1.0.130"
|
||||
CAPTION "Rufus v1.1.0.131"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,236,50,14
|
||||
|
@ -71,7 +71,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.1.0 (Build 130)",IDC_STATIC,46,19,78,8
|
||||
LTEXT "Version 1.1.0 (Build 131)",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
|
||||
|
@ -223,8 +223,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,1,0,130
|
||||
PRODUCTVERSION 1,1,0,130
|
||||
FILEVERSION 1,1,0,131
|
||||
PRODUCTVERSION 1,1,0,131
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -241,13 +241,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "akeo.ie"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.1.0.130"
|
||||
VALUE "FileVersion", "1.1.0.131"
|
||||
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.1.0.130"
|
||||
VALUE "ProductVersion", "1.1.0.131"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -223,7 +223,7 @@ const char* StrError(DWORD error_code)
|
|||
case ERROR_ISO_SCAN:
|
||||
return "ISO image scan failure";
|
||||
case ERROR_ISO_EXTRACT:
|
||||
return "ISO image scan failure";
|
||||
return "ISO image extraction failure";
|
||||
case ERROR_CANT_REMOUNT_VOLUME:
|
||||
return "Unable to remount volume. You may have to use the\n"
|
||||
"mountvol.exe command to make your device accessible again";
|
||||
|
|
Loading…
Reference in a new issue