1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00: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:
Pete Batard 2013-12-28 01:27:09 +00:00
parent 92fd7636a7
commit 83a9ec472c
4 changed files with 14 additions and 13 deletions

View file

@ -1524,7 +1524,7 @@ t MSG_214 "Echec de lancement de l'application"
t MSG_215 "%s ouvert" t MSG_215 "%s ouvert"
t MSG_216 "%s sauvegardé" t MSG_216 "%s sauvegardé"
t MSG_217 "Formatage: %0.1f%% complet" 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_219 "Finalisation NTFS: %d%% complète"
t MSG_220 "Formatage (%s) - durée estimée %d:%02d..." t MSG_220 "Formatage (%s) - durée estimée %d:%02d..."
t MSG_221 "Ecriture du label (peut prendre du temps)..." t MSG_221 "Ecriture du label (peut prendre du temps)..."

View file

@ -1240,11 +1240,6 @@ DWORD WINAPI FormatThread(LPVOID param)
bt = GETBIOSTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme))); bt = GETBIOSTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme)));
use_large_fat32 = (fs == FS_FAT32) && ((SelectedDrive.DiskSize > LARGE_FAT32_SIZE) || (force_large_fat32)); 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); PrintStatus(0, TRUE, MSG_225);
hPhysicalDrive = GetPhysicalHandle(DriveIndex, TRUE, TRUE); hPhysicalDrive = GetPhysicalHandle(DriveIndex, TRUE, TRUE);
if (hPhysicalDrive == INVALID_HANDLE_VALUE) { if (hPhysicalDrive == INVALID_HANDLE_VALUE) {
@ -1497,7 +1492,6 @@ DWORD WINAPI FormatThread(LPVOID param)
goto out; goto out;
} }
if ((bt == BT_UEFI) && (!iso_report.has_efi) && (iso_report.has_win7_efi)) { if ((bt == BT_UEFI) && (!iso_report.has_efi) && (iso_report.has_win7_efi)) {
// TODO: Check ISO with EFI only
PrintStatus(0, TRUE, MSG_232); PrintStatus(0, TRUE, MSG_232);
wim_image[0] = drive_name[0]; wim_image[0] = drive_name[0];
efi_dst[0] = drive_name[0]; efi_dst[0] = drive_name[0];
@ -1528,6 +1522,12 @@ DWORD WINAPI FormatThread(LPVOID param)
RemountVolume(drive_name); RemountVolume(drive_name);
// NTFS fixup (WinPE/AIK images don't seem to boot without an extra checkdisk) // NTFS fixup (WinPE/AIK images don't seem to boot without an extra checkdisk)
if ((dt == DT_ISO) && (fs == FS_NTFS)) { 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]); CheckDisk(drive_name[0]);
UpdateProgress(OP_FINALIZE, -1.0f); UpdateProgress(OP_FINALIZE, -1.0f);
} }

View file

@ -114,6 +114,7 @@ static BOOL existing_key = FALSE; // For LGP set/restore
static BOOL size_check = TRUE; static BOOL size_check = TRUE;
static BOOL log_displayed = FALSE; static BOOL log_displayed = FALSE;
static BOOL iso_provided = FALSE; static BOOL iso_provided = FALSE;
static BOOL user_notified = FALSE;
static BOOL relaunch = FALSE; static BOOL relaunch = FALSE;
extern BOOL force_large_fat32, enable_joliet, enable_rockridge; extern BOOL force_large_fat32, enable_joliet, enable_rockridge;
static int selection_default; 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 void CALLBACK BlockingTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{ {
static BOOL user_notified = FALSE;
if (iso_blocking_status < 0) { if (iso_blocking_status < 0) {
KillTimer(hMainDialog, TID_BLOCKING_TIMER); KillTimer(hMainDialog, TID_BLOCKING_TIMER);
user_notified = FALSE; user_notified = FALSE;
@ -1142,6 +1142,7 @@ DWORD WINAPI ISOScanThread(LPVOID param)
if (iso_path == NULL) if (iso_path == NULL)
goto out; goto out;
PrintStatus(0, TRUE, MSG_202); PrintStatus(0, TRUE, MSG_202);
user_notified = FALSE;
EnableControls(FALSE); EnableControls(FALSE);
r = ExtractISO(iso_path, "", TRUE); r = ExtractISO(iso_path, "", TRUE);
EnableControls(TRUE); EnableControls(TRUE);

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 329 IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.4.2.364" CAPTION "Rufus v1.4.2.365"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -288,8 +288,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,2,364 FILEVERSION 1,4,2,365
PRODUCTVERSION 1,4,2,364 PRODUCTVERSION 1,4,2,365
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -306,13 +306,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", "1.4.2.364" VALUE "FileVersion", "1.4.2.365"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2013 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", "1.4.2.364" VALUE "ProductVersion", "1.4.2.365"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"