From d828500af733453c0fe3348fbdcec93688712cfe Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sun, 5 Jan 2014 19:54:19 +0000 Subject: [PATCH] [misc] Fix various issues * Attempt to remount the drive in case of failure (Closes #270) * Minor fixes to localization * Fix errors not being properly reported in DownloadFile() * Also update ChangeLog.txt for beta --- ChangeLog.txt | 14 ++++++++++++++ res/localization/rufus.loc | 21 +++++++++++---------- src/format.c | 8 ++++++++ src/net.c | 4 ++-- src/rufus.rc | 10 +++++----- 5 files changed, 40 insertions(+), 17 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index f8375e91..7668584a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,17 @@ +o Version 1.4.2 (2014.01.??) + Add ReactOS support + Add EFI/NTFS boot support, for targets that support it + Add card hotplug detection for USB memory card readers + Add retry when writing ISO files... again + Add Malay translation, courtesy of Muhammad Aman + Speed up boot record cleanup, for slow drives + Improve initial locale detection + Save user selected locale between sessions + Always use English locale in the log, where possible + Fix detection of SanDisk, Kingston and Toshiba drives + Fix an issue with drive letter assignation + Many other minor fixes and improvements + o Version 1.4.1 (2013.12.05) [BUGFIX RELEASE] Fix broken Syslinux support (reported by ank91) Add Slovenian support, courtesy of Matej Horvat diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index ee98f0d0..1057392a 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -353,9 +353,9 @@ t MSG_207 "New Volume" # Same message, once for singular and plural ("1 device found", "2 devices found") t MSG_208 "%d device found" t MSG_209 "%d devices found" -t MSG_210 "DONE." -t MSG_211 "Cancelled." -t MSG_212 "FAILED." +t MSG_210 "DONE" +t MSG_211 "Cancelled" +t MSG_212 "FAILED" # Used when a new update has been downloaded and launched t MSG_213 "Launching new application..." t MSG_214 "Failed to launch new application" @@ -1521,9 +1521,9 @@ t MSG_206 "Fichier %s manquant" t MSG_207 "Nouveau volume" t MSG_208 "%d périphérique détecté" t MSG_209 "%d périphériques détectés" -t MSG_210 "Opération terminée." -t MSG_211 "Opération annulée." -t MSG_212 "ECHEC." +t MSG_210 "Opération terminée" +t MSG_211 "Opération annulée" +t MSG_212 "ECHEC" t MSG_213 "Lancement de la nouvelle application..." t MSG_214 "Echec de lancement de l'application" t MSG_215 "%s ouvert" @@ -1712,7 +1712,7 @@ t MSG_028 "Megabyte" t MSG_029 "Standard" # The following gets appended to the file system, cluster size, etc. t MSG_030 "%s (Standard)" -t MSG_031 "%s Partitionierungsschema für BIOS oder UEFI Computers" +t MSG_031 "%s Partitionierungsschema für BIOS oder UEFI Computer" t MSG_032 "%s Partitionierungsschema für BIOS Computer" t MSG_033 "%s Partitionierungsschema für UEFI Computer" # Number of bad block check passes (singular for 1 pass, plural for 2 or more passes) @@ -1788,8 +1788,8 @@ t MSG_087 "Wählen Sie ein startfähiges ISO-Abbild aus " t MSG_088 "ISO-Abbild ist zu groß" t MSG_089 "Dieses ISO-Abbild ist zu groß für das gewählte Ziel." t MSG_090 "ISO-Abbild nicht unterstützt" -t MSG_091 "When using UEFI Target Type, only EFI bootable ISO images are supported. " - "Please select an EFI bootable ISO or set the Target Type to BIOS." +t MSG_091 "Wenn UEFI als Typ des Zielsystems gewählt ist, sind nur EFI-bootfähige ISO-Abbilder unterstützt." + "Bitte wählen Sie ein EFI-bootfähiges ISO-Abbild oder ändern Sie den Typ des Zielsystems zu BIOS." t MSG_092 "Nicht unterstütztes Dateisystem" t MSG_096 "Nur FAT/FAT32 sind unterstützt für diesen Typ des ISO-Abbilds. Bitte wählen Sie FAT/FAT32 als Dateisystem." t MSG_097 "Nur 'bootmgr' oder 'WinPE' basierende ISO-Abbilder können derzeit mit NTFS verwendet werden." @@ -3844,7 +3844,7 @@ t MSG_259 "Priversti naujintis" ################################################################################ l "ms-MY" "Malay (Bahasa Malaysia)" 0x043e, 0x083e -v 1.0.6 +v 1.0.7 b "en-US" # Main dialog @@ -4081,6 +4081,7 @@ t MSG_089 "Imej ISO ini terlalu besar untuk sasaran yang dipilih." t MSG_090 "ISO tidak disokong" t MSG_091 "Apabila menggunakan jenis sasaran UEFI , hanya imej boleh boot jenis EFI sahaja disokong. " "Tolong pilih ISO boleh boot jenis EFI atau tukarkan jenis sasaran kepada BIOS." +t MSG_092 "Sistem fail tidak disokong" t MSG_096 "Hanya FAT/FAT32 diskong untuk ISO ini. Tolong pilih FAT/FAT32 sebagai fail sistem." t MSG_097 "Hanya imej ISO yang berdasarkan 'bootmgr' atau 'WinPE' boleh digunakan dengan NTFS." t MSG_098 "FAT/FAT32 hanya boleh digunakan untuk imej ISO yang berdasarkan isolinux atau apabila jenis sasaran adalah UEFI." diff --git a/src/format.c b/src/format.c index ab556ae8..4e05548f 100644 --- a/src/format.c +++ b/src/format.c @@ -1482,6 +1482,14 @@ out: SendMessage(hISOProgressDlg, UM_ISO_EXIT, 0, 0); safe_unlockclose(hLogicalVolume); safe_unlockclose(hPhysicalDrive); // This can take a while + if (IS_ERROR(FormatStatus)) { + guid_volume = GetLogicalName(DriveIndex, TRUE, FALSE); + if (guid_volume != NULL) { + if (MountVolume(drive_name, guid_volume)) + uprintf("Re-mounted volume as '%c:' after error\n", drive_name[0]); + free(guid_volume); + } + } PostMessage(hMainDialog, UM_FORMAT_COMPLETED, 0, 0); ExitThread(0); } diff --git a/src/net.c b/src/net.c index dadc1080..53b63be9 100644 --- a/src/net.c +++ b/src/net.c @@ -268,7 +268,7 @@ BOOL DownloadFile(const char* url, const char* file, HWND hProgressDialog) uprintf("Downloading %s from %s\n", file, url); if (!InternetCrackUrlA(url, (DWORD)safe_strlen(url), 0, &UrlParts)) { - uprintf("Unable to decode URL: %s\n", WindowsErrorString()); + uprintf("Unable to decode URL: %s\n", WinInetErrorString()); goto out; } hostname[sizeof(hostname)-1] = 0; @@ -300,7 +300,7 @@ BOOL DownloadFile(const char* url, const char* file, HWND hProgressDialog) INTERNET_FLAG_HYPERLINK|INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP|INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS|INTERNET_FLAG_NO_COOKIES| INTERNET_FLAG_NO_UI|INTERNET_FLAG_NO_CACHE_WRITE, (DWORD_PTR)NULL); if (hRequest == NULL) { - uprintf("Could not open url %s: %s\n", url, WindowsErrorString()); + uprintf("Could not open url %s: %s\n", url, WinInetErrorString()); goto out; } diff --git a/src/rufus.rc b/src/rufus.rc index 34b508aa..5a148089 100644 --- a/src/rufus.rc +++ b/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.371" +CAPTION "Rufus v1.4.2.372" 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,371 - PRODUCTVERSION 1,4,2,371 + FILEVERSION 1,4,2,372 + PRODUCTVERSION 1,4,2,372 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.371" + VALUE "FileVersion", "1.4.2.372" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2014 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.371" + VALUE "ProductVersion", "1.4.2.372" END END BLOCK "VarFileInfo"