mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-19 09:25:12 -04:00
[core] fix slowdown when copying ISO files
* This slowdown was introduced in 897becd290
as the use of
SetThreadUILanguage apparently incurs a massive performance drawback.
* Closes #259
* Also fix a possible issue where the blocking operation message could appear twice
* Also improve the French translation
This commit is contained in:
parent
92fd7636a7
commit
83a9ec472c
4 changed files with 14 additions and 13 deletions
|
@ -1524,7 +1524,7 @@ t MSG_214 "Echec de lancement de l'application"
|
|||
t MSG_215 "%s ouvert"
|
||||
t MSG_216 "%s sauvegardé"
|
||||
t MSG_217 "Formatage: %0.1f%% complet"
|
||||
t MSG_218 "Création du système de fichiers: Tâche %d/%d complète"
|
||||
t MSG_218 "Système de fichiers: Tâche %d/%d complète"
|
||||
t MSG_219 "Finalisation NTFS: %d%% complète"
|
||||
t MSG_220 "Formatage (%s) - durée estimée %d:%02d..."
|
||||
t MSG_221 "Ecriture du label (peut prendre du temps)..."
|
||||
|
|
12
src/format.c
12
src/format.c
|
@ -1240,11 +1240,6 @@ DWORD WINAPI FormatThread(LPVOID param)
|
|||
bt = GETBIOSTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme)));
|
||||
use_large_fat32 = (fs == FS_FAT32) && ((SelectedDrive.DiskSize > LARGE_FAT32_SIZE) || (force_large_fat32));
|
||||
|
||||
// Try to ensure that all messages from Format and Checkdisk, which we report in the log, will be in English
|
||||
pfSetThreadUILanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
|
||||
if (PRIMARYLANGID(pfGetThreadUILanguage()) != LANG_ENGLISH)
|
||||
uprintf("Note: some formatting messages may still be localized");
|
||||
|
||||
PrintStatus(0, TRUE, MSG_225);
|
||||
hPhysicalDrive = GetPhysicalHandle(DriveIndex, TRUE, TRUE);
|
||||
if (hPhysicalDrive == INVALID_HANDLE_VALUE) {
|
||||
|
@ -1497,7 +1492,6 @@ DWORD WINAPI FormatThread(LPVOID param)
|
|||
goto out;
|
||||
}
|
||||
if ((bt == BT_UEFI) && (!iso_report.has_efi) && (iso_report.has_win7_efi)) {
|
||||
// TODO: Check ISO with EFI only
|
||||
PrintStatus(0, TRUE, MSG_232);
|
||||
wim_image[0] = drive_name[0];
|
||||
efi_dst[0] = drive_name[0];
|
||||
|
@ -1528,6 +1522,12 @@ DWORD WINAPI FormatThread(LPVOID param)
|
|||
RemountVolume(drive_name);
|
||||
// NTFS fixup (WinPE/AIK images don't seem to boot without an extra checkdisk)
|
||||
if ((dt == DT_ISO) && (fs == FS_NTFS)) {
|
||||
// Try to ensure that all messages from Checkdisk will be in English
|
||||
if (PRIMARYLANGID(pfGetThreadUILanguage()) != LANG_ENGLISH) {
|
||||
pfSetThreadUILanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
|
||||
if (PRIMARYLANGID(pfGetThreadUILanguage()) != LANG_ENGLISH)
|
||||
uprintf("Note: CheckDisk messages may be localized");
|
||||
}
|
||||
CheckDisk(drive_name[0]);
|
||||
UpdateProgress(OP_FINALIZE, -1.0f);
|
||||
}
|
||||
|
|
|
@ -114,6 +114,7 @@ static BOOL existing_key = FALSE; // For LGP set/restore
|
|||
static BOOL size_check = TRUE;
|
||||
static BOOL log_displayed = FALSE;
|
||||
static BOOL iso_provided = FALSE;
|
||||
static BOOL user_notified = FALSE;
|
||||
static BOOL relaunch = FALSE;
|
||||
extern BOOL force_large_fat32, enable_joliet, enable_rockridge;
|
||||
static int selection_default;
|
||||
|
@ -1068,7 +1069,6 @@ static void CALLBACK RefreshTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD
|
|||
*/
|
||||
static void CALLBACK BlockingTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
|
||||
{
|
||||
static BOOL user_notified = FALSE;
|
||||
if (iso_blocking_status < 0) {
|
||||
KillTimer(hMainDialog, TID_BLOCKING_TIMER);
|
||||
user_notified = FALSE;
|
||||
|
@ -1142,6 +1142,7 @@ DWORD WINAPI ISOScanThread(LPVOID param)
|
|||
if (iso_path == NULL)
|
||||
goto out;
|
||||
PrintStatus(0, TRUE, MSG_202);
|
||||
user_notified = FALSE;
|
||||
EnableControls(FALSE);
|
||||
r = ExtractISO(iso_path, "", TRUE);
|
||||
EnableControls(TRUE);
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.4.2.364"
|
||||
CAPTION "Rufus v1.4.2.365"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||
|
@ -288,8 +288,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,2,364
|
||||
PRODUCTVERSION 1,4,2,364
|
||||
FILEVERSION 1,4,2,365
|
||||
PRODUCTVERSION 1,4,2,365
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -306,13 +306,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.4.2.364"
|
||||
VALUE "FileVersion", "1.4.2.365"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.4.2.364"
|
||||
VALUE "ProductVersion", "1.4.2.365"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue