[misc] small improvements for 2.13 release

This commit is contained in:
Pete Batard 2017-04-01 17:29:42 +01:00
parent abce1a2aa0
commit e33b4589b6
5 changed files with 24 additions and 14 deletions

View File

@ -1,3 +1,13 @@
o Version 2.13 (2017.04.??)
Preserve 'GPT for UEFI' option if the user changed it before selecting an ISO
Fix unwanted notification sound when closing with the X button (#893)
Fix inability to restore the minimized application after a popup is displayed (#896)
Fix an issue when trying to install Syslinux/NTFS twice in a row (#904)
Work around Microsoft's inconsistent casing of device IDs during device enumeration
Work around Microsoft's aggressive locking of partitions in Windows 10 Creators Update (#883)
Restrict write sharing permissions when accessing a device
Update libcdio to latest
o Version 2.12 (2017.01.27) o Version 2.12 (2017.01.27)
Add Hebrew translation, courtesy of NSBuilder and פלוני אלמוני Add Hebrew translation, courtesy of NSBuilder and פלוני אלמוני
Add a cheat mode (Alt-O) to create an ISO from the first optical media found Add a cheat mode (Alt-O) to create an ISO from the first optical media found

View File

@ -104,7 +104,7 @@ static __inline char* sanitize_filename(char* filename, BOOL* is_identical)
{ {
size_t i, j; size_t i, j;
char* ret = NULL; char* ret = NULL;
char unauthorized[] = {'<', '>', ':', '|', '*', '?'}; char unauthorized[] = { '*', '?', '<', '>', ':', '|', '\\', '/'};
*is_identical = TRUE; *is_identical = TRUE;
ret = safe_strdup(filename); ret = safe_strdup(filename);

View File

@ -77,10 +77,10 @@
#define MAX_FAT32_SIZE 2.0f // Threshold above which we disable FAT32 formatting (in TB) #define MAX_FAT32_SIZE 2.0f // Threshold above which we disable FAT32 formatting (in TB)
#define FAT32_CLUSTER_THRESHOLD 1.011f // For FAT32, cluster size changes don't occur at power of 2 boundaries but sligthly above #define FAT32_CLUSTER_THRESHOLD 1.011f // For FAT32, cluster size changes don't occur at power of 2 boundaries but sligthly above
#define DD_BUFFER_SIZE 65536 // Minimum size of the buffer we use for DD operations #define DD_BUFFER_SIZE 65536 // Minimum size of the buffer we use for DD operations
#define RUFUS_URL "http://rufus.akeo.ie" #define RUFUS_URL "https://rufus.akeo.ie"
#define DOWNLOAD_URL RUFUS_URL "/downloads" #define DOWNLOAD_URL RUFUS_URL "/downloads"
#define FILES_URL RUFUS_URL "/files" #define FILES_URL RUFUS_URL "/files"
#define SEVENZIP_URL "http://sourceforge.net/projects/sevenzip/files/7-Zip/" #define SEVENZIP_URL "http://www.7-zip.org"
#define FILES_DIR "rufus_files" #define FILES_DIR "rufus_files"
#define IGNORE_RETVAL(expr) do { (void)(expr); } while(0) #define IGNORE_RETVAL(expr) do { (void)(expr); } while(0)
#ifndef ARRAYSIZE #ifndef ARRAYSIZE

View File

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376 IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 2.13.1076" CAPTION "Rufus 2.13.1077"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0 FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -334,8 +334,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,13,1076,0 FILEVERSION 2,13,1077,0
PRODUCTVERSION 2,13,1076,0 PRODUCTVERSION 2,13,1077,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -352,13 +352,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.13.1076" VALUE "FileVersion", "2.13.1077"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.13.1076" VALUE "ProductVersion", "2.13.1077"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -1,7 +1,7 @@
/* /*
* Rufus: The Reliable USB Formatting Utility * Rufus: The Reliable USB Formatting Utility
* Standard User I/O Routines (logging, status, etc.) * Standard User I/O Routines (logging, status, etc.)
* Copyright © 2011-2016 Pete Batard <pete@akeo.ie> * Copyright © 2011-2017 Pete Batard <pete@akeo.ie>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -102,6 +102,7 @@ char *_printbits(size_t const size, void const * const ptr, int leading_zeroes)
return str; return str;
} }
// Display an hex dump of buffer 'buf'
void DumpBufferHex(void *buf, size_t size) void DumpBufferHex(void *buf, size_t size)
{ {
unsigned char* buffer = (unsigned char*)buf; unsigned char* buffer = (unsigned char*)buf;
@ -135,10 +136,7 @@ void DumpBufferHex(void *buf, size_t size)
uprintf("%s\n", line); uprintf("%s\n", line);
} }
/* // Convert a windows error to human readable string
* Convert a windows error to human readable string
* uses retval as errorcode, or, if 0, use GetLastError()
*/
const char *WindowsErrorString(void) const char *WindowsErrorString(void)
{ {
static char err_string[256] = {0}; static char err_string[256] = {0};
@ -178,7 +176,7 @@ char* GuidToString(const GUID* guid)
return guid_string; return guid_string;
} }
// find upper power of 2 // Find upper power of 2
static __inline uint16_t upo2(uint16_t v) static __inline uint16_t upo2(uint16_t v)
{ {
v--; v--;
@ -225,6 +223,7 @@ char* SizeToHumanReadable(uint64_t size, BOOL copy_to_log, BOOL fake_units)
return str_size; return str_size;
} }
// Convert custom error code to messages
const char* _StrError(DWORD error_code) const char* _StrError(DWORD error_code)
{ {
if ( (!IS_ERROR(error_code)) || (SCODE_CODE(error_code) == ERROR_SUCCESS)) { if ( (!IS_ERROR(error_code)) || (SCODE_CODE(error_code) == ERROR_SUCCESS)) {
@ -312,6 +311,7 @@ const char* StrError(DWORD error_code, BOOL use_default_locale)
return ret; return ret;
} }
// A WriteFile() equivalent, with up to nNumRetries write attempts on error.
BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten, DWORD nNumRetries) LPDWORD lpNumberOfBytesWritten, DWORD nNumRetries)
{ {