From bfecb9e29f010cdd9d7fee6fd63d1361b9fcb5fe Mon Sep 17 00:00:00 2001 From: Tiago Rinaldi Date: Wed, 28 Jun 2017 22:44:18 +0100 Subject: [PATCH 01/97] [loc] Update Portuguese (Brazilian) translation * Closes #974 --- res/localization/rufus.loc | 10 +++++----- src/rufus.rc | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 20e3e3b3..9fd64ddf 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -12311,7 +12311,7 @@ t IDCANCEL "Fechar" # Dialog that appears when a new version is available g IDD_NEW_VERSION t IDD_NEW_VERSION "Procurar atualizações de Rufus" -t IDS_NEW_VERSION_AVAIL_TXT "Nova versão disponível. Por favor, faça Download da última versão!" +t IDS_NEW_VERSION_AVAIL_TXT "Nova versão disponível. Por favor, faça o download da última versão!" t IDC_WEBSITE "Clique aqui para ir ao Site de Rufus" t IDS_NEW_VERSION_NOTES_GRP "Sobre esta versão" t IDCANCEL "Fechar" @@ -12364,7 +12364,7 @@ t MSG_035 "%d passos" t MSG_036 "Imagem ISO" t MSG_037 "Aplicação" t MSG_038 "Abortar" -t MSG_039 "Inciar" +t MSG_039 "Iniciar" t MSG_040 "Descarregar" t MSG_041 "Operação cancelada pelo usuário" t MSG_042 "Erro" @@ -12644,8 +12644,8 @@ t MSG_274 "Imagem ISOHybrid detectada" t MSG_275 "A imagem que você selecionou é do tipo 'ISOHybrid'. Isso significa que pode ser escrita em " "modo %s (cópia de arquivo) ou modo %s (imagem de disco).\n" "Rufus recomenda usar o modo %s, para que você sempre tenha acesso total ao drive após a gravação.\n" - "No entanto, se você encontrar algum erro durante o boot, você pode tentar gravar novamente pelo modo %s.\n\n" - "Por favor selecione o modo que deseja usar para gravar esta imagem:" + "No entanto, se você encontrar algum erro durante o boot, tente gravar novamente pelo modo %s.\n\n" + "Por favor, selecione o modo que deseja usar para gravar essa imagem:" t MSG_276 "Gravar no modo %s (Recomendado)" t MSG_277 "Gravar no modo %s" t MSG_278 "Tipo de Boot" @@ -12975,7 +12975,7 @@ t MSG_168 "Tentar mascarar o primeiro dispositivo USB de arranque (normalmente 0 t MSG_169 "Cria uma partição extra oculta e e tenta alinhar limites das partições. " "Isto pode melhorar a deteção do USB inicializável para as BIOS antigas" t MSG_170 "Ativa a deteção de discos rígidos portáteis USB. USE-O POR SEU PRÓPRIO RISCO!!!" -t MSG_171 "Iniciar a operação de formatação.\nTodos os dados no dispositivo serão DESTRUIDOS!" +t MSG_171 "Iniciar a operação de formatação.\nTodos os dados no dispositivo serão DESTRUÍDOS!" t MSG_172 "Informação da licença e créditos" t MSG_173 "Clique para selecionar..." # The following will appear in the about dialog diff --git a/src/rufus.rc b/src/rufus.rc index a4a467a0..de291b58 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.15.1120" +CAPTION "Rufus 2.15.1121" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -334,8 +334,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,15,1120,0 - PRODUCTVERSION 2,15,1120,0 + FILEVERSION 2,15,1121,0 + PRODUCTVERSION 2,15,1121,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -352,13 +352,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.15.1120" + VALUE "FileVersion", "2.15.1121" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.15.1120" + VALUE "ProductVersion", "2.15.1121" END END BLOCK "VarFileInfo" From 92d046e663811fd922262f1f347ad2ebe8e09b97 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 4 Jul 2017 14:51:25 +0100 Subject: [PATCH 02/97] [ui] produce a sound and flash taskbar icon on success/error * Closes #973 --- src/rufus.c | 8 +++++++- src/rufus.h | 1 + src/rufus.rc | 10 +++++----- src/stdlg.c | 15 +++++++++++++++ 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/rufus.c b/src/rufus.c index 32c8116a..16c651e7 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -121,7 +121,7 @@ RUFUS_UPDATE update = { {0,0,0}, {0,0}, NULL, NULL}; StrArray DriveID, DriveLabel; extern char* szStatusMessage; -static HANDLE format_thid = NULL; +static HANDLE format_thid = NULL, dialog_handle = NULL; static HWND hBoot = NULL, hSelectISO = NULL, hStart = NULL; static HICON hIconDisc, hIconDown, hIconUp, hIconLang; static char szTimer[12] = "00:00:00"; @@ -1745,6 +1745,8 @@ static void InitDialog(HWND hDlg) rufus_version[0], rufus_version[1], rufus_version[2]); } SetWindowTextU(hDlg, tmp); + // Now that we have a title, we can find the handle of our Dialog + dialog_handle = FindWindowA(NULL, tmp); uprintf(APPLICATION_NAME " version: %d.%d.%d%s%s", rufus_version[0], rufus_version[1], rufus_version[2], IsAlphaOrBeta(), (ini_file != NULL)?"(Portable)":""); for (i=0; i Date: Thu, 29 Jun 2017 18:16:33 +0200 Subject: [PATCH 03/97] [loc] Fix typos in Italian translation * Closes #975 --- res/localization/rufus.loc | 22 +++++++++++----------- src/rufus.rc | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 9fd64ddf..971bd58c 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -7968,7 +7968,7 @@ t IDCANCEL "Chiudi" # Messages used throughout the application t MSG_001 "Rilevata altra istanza Rufus" t MSG_002 "È in esecuzione un'altra applicazione Rufus.\n" - "Chiudi la prima applicazione prima di eseguirna una seconda." + "Chiudi la prima applicazione prima di eseguirne una seconda." t MSG_003 "ATTENZIONE: TUTTI I DATI SULL'UNITA' '%s' SARANNO CANCELLATI.\n" "Per continuare seleziona 'OK'. Per anullare seleziona 'ANNULLA'." t MSG_004 "Policy aggiornamenti Rufus" @@ -8077,19 +8077,19 @@ t MSG_090 "Formato ISO non supportato" t MSG_091 "Quando usi una destinazione di tipo UEFI, sono supportate solo immagini ISO avviabili EFI. " "Scegli un'immagine avviabile EFI o imposta una destinazione di tipo BIOS." t MSG_092 "Filesystem non supportato" -t MSG_093 "IMPORTANTE: QUESTA UNITA' CONTIENE PARTIZIONI MULTIPLE!!\n\n" +t MSG_093 "IMPORTANTE: QUESTA UNITA' CONTIENE PARTIZIONI MULTIPLE!\n\n" "Questo può includere partizioni/volumi che non sono elencati anche se visibili da Windows." "Se vuoi procedere, sei responsabile per qualsiasi perdita di dati in queste partizioni." t MSG_094 "Rilevate partizioni multiple" t MSG_095 "Immagine DD" t MSG_096 "Il file system attualmente selezionato non può essere usato con questo tipo di file ISO. " - "Seelziona un differente file system o usa un differente file ISO." -t MSG_097 "'%s' può essere applicato soolo se il file system è NTFS." + "Seleziona un differente file system o usa un differente file ISO." +t MSG_097 "'%s' può essere applicato solo se il file system è NTFS." t MSG_098 "IMPORTANTE: stai tentando di installare 'Windows To Go', ma l'unità destinazione non ha " - "l'attributo 'FISSO'. Poichè Windows molto probabilmente si bloccherà durante il boot, " + "l'attributo 'FISSO'. Windows molto probabilmente si bloccherà durante il boot, " "poichè non è stato disegnato per lavorare con unità che hanno invece l'attributo 'RIMUOVIBILE'.\n\n" "Vuoi ancora procedere?\n\n" - "Nota: l'attributo 'FISSO/RIMUOVIBILE' è una proprietà hardware che può essere modificata solo " + "Nota: l'attributo 'FISSO/RIMOVIBILE' è una proprietà hardware che può essere modificata solo " "usando strumenti personalizzati del produttore dell'unità. Comunque questi strumenti non sono QUASI MAI " "forniti all'utente..." t MSG_099 "Limitazione filesystem" @@ -8098,7 +8098,7 @@ t MSG_100 "Questa immagine ISO contiene un file più grande di 4 GB, che è magg t MSG_101 "Supporto WIN mancante" t MSG_102 "Il tuo sistema operativo non può estrarre file dall'archivio WIM. L'estrazione WIM " "è necessaria per creare una unità USB avviabile EFI Windows 7 e Windows Vista. Puoi correggere ciò " - "installando una versione recente di 7-Zip.\nVuoi visitare la pagina di downlaod di 7-zip download page?" + "installando una versione recente di 7-Zip.\nVuoi visitare la pagina di downlaod di 7-zip?" t MSG_103 "Download %s?" t MSG_104 "%s o successivo richiedono l'installazione di un file '%s'.\n" "Poichè questo file è più grande di 100 KB, ed è sempre presente nell'immagine ISO di %s, " @@ -8121,7 +8121,7 @@ t MSG_111 "Dimensione cluster incompatibile" # "%d:%02d" below is a duration (mins:secs) t MSG_112 "La formattazione di un volume UDF di grandi dimensioni può richiedere molto tempo. in modo USB 2.0, il tempo stimato " "per la formattazione sarà di %d:%02d, durante il quale la barra di progresso non verrà aggiornata. Attendi il completamento dell'operazione!" -t MSG_113 "Voume UDF di grandi dimensioni" +t MSG_113 "Volume UDF di grandi dimensioni" t MSG_114 "Questa immagine usa Syslinux %s%s ma questa applicazione include solo i file di installazione per " "Syslinux %s%s.\n\nPoiché le nuove versioni di Syslinux non sono compatibili con le precedenti e " "non sarebbe possibile per Rufus includerle tutte, devono essere scaricati da Internet due file aggiuntivi " @@ -8164,12 +8164,12 @@ t MSG_165 "Seleziona l'immagine..." t MSG_166 "Abilita questa opzione per permettere la visualizzazione delle etichette internazionali " "e impostare una icona dispositivo (creerà un file autorun.inf)" t MSG_167 "Installa un MBR che permette la selezione all'avvio e maschera l'ID unità USB del BIOS" -t MSG_168 "Prova prima a macsherare l'unità avviabile USB (normalmente 0x80) come un dsico differente.\n" +t MSG_168 "Prova prima a mascherare l'unità avviabile USB (normalmente 0x80) come un disco differente.\n" "Questo potrebbe essere necessario solo se installi Windows XP e hai più di un disco" t MSG_169 "Crea una partizione aggiuntiva e nascosta e prova ad allineare le diverse partizioni.\n" "Questo può migliorare il rilevamento all'avvio con vecchi BIOS" t MSG_170 "Abilita il rilevamento per i dischi USB. USALO A TUO RISCHIO!!!" -t MSG_171 "Avvia l'operazione di formattazione.\nQuesta operazione DISTRUGGERA' qualsiasi dato sull'unità di destinazione!" +t MSG_171 "Avvia l'operazione di formattazione.\nQuesta operazione DISTRUGGERÀ qualsiasi dato sull'unità di destinazione!" t MSG_172 "Informazioni licenza e ringraziamenti" t MSG_173 "Fai clic per selezionare..." t MSG_174 "Rufus - Utility affidabile formattazione unità USB" @@ -8210,7 +8210,7 @@ t MSG_199 "Scegli se vuoi installare Windows, su un altro disco, usando il dispo t MSG_200 "Scegli se vuoi installare Windows direttamente dal dispositivo selezionato." # Status messages - these messages will appear on the status bar -t MSG_201 "Annullamneto..." +t MSG_201 "Annullamento..." # Parameter: the name of an obsolete Syslinux .c32 module. eg: "Obsolete vesamenu.c32 detected" t MSG_202 "Analisi immagine..." t MSG_203 "Analisi immagine fallita" diff --git a/src/rufus.rc b/src/rufus.rc index bcda467d..026eceb9 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.15.1122" +CAPTION "Rufus 2.15.1123" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -334,8 +334,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,15,1122,0 - PRODUCTVERSION 2,15,1122,0 + FILEVERSION 2,15,1123,0 + PRODUCTVERSION 2,15,1123,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -352,13 +352,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.15.1122" + VALUE "FileVersion", "2.15.1123" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.15.1122" + VALUE "ProductVersion", "2.15.1123" END END BLOCK "VarFileInfo" From c00557900b5e84ee9b7039a84d358c01e9f251db Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 10 Jul 2017 13:08:42 +0100 Subject: [PATCH 04/97] [misc] drop WDK compilation support --- src/bled/libbb.h | 13 ---- src/getopt/getopt.c | 2 +- src/missing.h | 2 +- src/msapi_utf8.h | 4 - src/rufus.c | 20 +---- src/rufus.h | 6 -- src/rufus.rc | 10 +-- wdk_build.cmd | 178 -------------------------------------------- 8 files changed, 11 insertions(+), 224 deletions(-) delete mode 100644 wdk_build.cmd diff --git a/src/bled/libbb.h b/src/bled/libbb.h index 4673ed67..d6132ab5 100644 --- a/src/bled/libbb.h +++ b/src/bled/libbb.h @@ -20,15 +20,6 @@ #error Only Windows platforms are supported #endif -#if defined(DDKBUILD) -#pragma warning(disable: 4242) // "Conversion from x to y, possible loss of data" -#pragma warning(disable: 4244) -struct timeval { - long tv_sec; - long tv_usec; -}; -#endif - #include "platform.h" #include "msapi_utf8.h" @@ -193,12 +184,8 @@ static inline int full_read(int fd, void *buf, size_t count) { } static inline struct tm *localtime_r(const time_t *timep, struct tm *result) { -#if defined(DDKBUILD) - result = localtime(timep); -#else if (localtime_s(result, timep) != 0) result = NULL; -#endif return result; } diff --git a/src/getopt/getopt.c b/src/getopt/getopt.c index 64416810..85bc4468 100644 --- a/src/getopt/getopt.c +++ b/src/getopt/getopt.c @@ -210,7 +210,7 @@ static char *posixly_correct; #ifndef getenv #ifdef _MSC_VER -// DDK will complain if you don't use the stdlib defined getenv +// MSVC will complain if you don't use the stdlib defined getenv #include #else extern char *getenv (); diff --git a/src/missing.h b/src/missing.h index 6fabe57b..17fd6f23 100644 --- a/src/missing.h +++ b/src/missing.h @@ -108,7 +108,7 @@ static __inline void *_reallocf(void *ptr, size_t size) { #define _RT_RCDATA MAKEINTRESOURCEA(10) #define _RT_GROUP_ICON MAKEINTRESOURCEA((ULONG_PTR)(MAKEINTRESOURCEA(3) + 11)) -/* UI redefinitions for WDK and MinGW */ +/* UI redefinitions for MinGW */ #ifndef PBM_SETSTATE #define PBM_SETSTATE (WM_USER+16) #endif diff --git a/src/msapi_utf8.h b/src/msapi_utf8.h index b9bd8178..f8557b30 100644 --- a/src/msapi_utf8.h +++ b/src/msapi_utf8.h @@ -33,9 +33,7 @@ #include #include #include -#if !defined(DDKBUILD) #include -#endif #pragma once #if defined(_MSC_VER) @@ -584,7 +582,6 @@ static __inline DWORD GetModuleFileNameU(HMODULE hModule, char* lpFilename, DWOR return ret; } -#if !defined(DDKBUILD) static __inline DWORD GetModuleFileNameExU(HANDLE hProcess, HMODULE hModule, char* lpFilename, DWORD nSize) { DWORD ret = 0, err = ERROR_INVALID_DATA; @@ -600,7 +597,6 @@ static __inline DWORD GetModuleFileNameExU(HANDLE hProcess, HMODULE hModule, cha SetLastError(err); return ret; } -#endif static __inline DWORD GetFullPathNameU(const char* lpFileName, DWORD nBufferLength, char* lpBuffer, char** lpFilePart) { diff --git a/src/rufus.c b/src/rufus.c index 16c651e7..072189da 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -47,15 +47,11 @@ #include "../res/grub/grub_version.h" #include "../res/grub2/grub2_version.h" -// MinGW doesn't know these -PF_TYPE(WINAPI, HIMAGELIST, ImageList_Create, (int, int, UINT, int, int)); -PF_TYPE(WINAPI, int, ImageList_AddIcon, (HIMAGELIST, HICON)); -PF_TYPE(WINAPI, int, ImageList_ReplaceIcon, (HIMAGELIST, int, HICON)); +// ImageList calls are unavailable on XP +PF_TYPE_DECL(WINAPI, HIMAGELIST, ImageList_Create, (int, int, UINT, int, int)); +PF_TYPE_DECL(WINAPI, int, ImageList_AddIcon, (HIMAGELIST, HICON)); +PF_TYPE_DECL(WINAPI, int, ImageList_ReplaceIcon, (HIMAGELIST, int, HICON)); -// WDK blows up when trying to using PF_TYPE_DECL() for the ImageList calls... so we don't. -PF_DECL(ImageList_Create); -PF_DECL(ImageList_AddIcon); -PF_DECL(ImageList_ReplaceIcon); PF_TYPE_DECL(WINAPI, BOOL, SHChangeNotifyDeregister, (ULONG)); PF_TYPE_DECL(WINAPI, ULONG, SHChangeNotifyRegister, (HWND, int, LONG, UINT, int, const MY_SHChangeNotifyEntry*)); @@ -3500,11 +3496,3 @@ out: return 0; } - -// The old WDK is showing its age and becoming a pain to support -#if defined(DDKBUILD) -BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) { - uprintf("NOTE: Process search is not implemented on this platform"); - return FALSE; -} -#endif diff --git a/src/rufus.h b/src/rufus.h index 4a9981f8..4aabdf5c 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -24,12 +24,6 @@ #pragma warning(disable: 4996) // Ignore deprecated (eg. GetVersionEx()), as we have to contend with XP #pragma warning(disable: 28159) // We use GetTickCount64() where possible, but it's not available on XP #pragma warning(disable: 6258) // I know what I'm using TerminateThread for -// Burn in HELL Windows XP!!! -#ifdef DDKBUILD -#if (_WIN32_WINNT < _WIN32_WINNT_VISTA) -#error The Windows XP target is no longer supported for WDK compilation. -#endif -#endif #endif #pragma once diff --git a/src/rufus.rc b/src/rufus.rc index 026eceb9..1d163277 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.15.1123" +CAPTION "Rufus 2.15.1124" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -334,8 +334,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,15,1123,0 - PRODUCTVERSION 2,15,1123,0 + FILEVERSION 2,15,1124,0 + PRODUCTVERSION 2,15,1124,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -352,13 +352,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.15.1123" + VALUE "FileVersion", "2.15.1124" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.15.1123" + VALUE "ProductVersion", "2.15.1124" END END BLOCK "VarFileInfo" diff --git a/wdk_build.cmd b/wdk_build.cmd deleted file mode 100644 index e8118fd6..00000000 --- a/wdk_build.cmd +++ /dev/null @@ -1,178 +0,0 @@ -@echo off - -if Test%BUILD_ALT_DIR%==Test goto usage - -::# /M 2 for multiple cores -set BUILD_CMD=build -bcwgZ -M12 -set PWD=%~dp0 - -::# Set target platform type -set ARCH_DIR=%_BUILDARCH% -if /I Test%_BUILDARCH%==Testx86 set ARCH_DIR=i386 - -::# Bled Library -cd src\bled -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\bled_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\bled.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# MS-SYS Library -cd ..\ms-sys -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\ms-sys_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\ms-sys.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# SysLinux libfat Library -cd ..\syslinux\libfat -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\libfat_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\libfat.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# SysLinux libinstaller Library -cd ..\libinstaller -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\libinstaller_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\libinstaller.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# SysLinux win Library -cd ..\win -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\win_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\win.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# libcdio iso9660 Library -cd ..\..\libcdio\iso9660 -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\iso9660_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\iso9660.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# libcdio udf Library -cd ..\udf -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\udf_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\udf.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# libcdio driver Library -cd ..\driver -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\driver_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\driver.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# getopt Library -cd ..\..\getopt -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\getopt_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\getopt.lib . >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -::# Rufus Application -cd .. -if EXIST Makefile ren Makefile Makefile.hide - -copy .msvc\rufus_sources sources >NUL 2>&1 - -@echo on -%BUILD_CMD% -@echo off -if errorlevel 1 goto builderror -copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\rufus.exe .. >NUL 2>&1 - -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 - -goto done - -:builderror -if EXIST Makefile.hide ren Makefile.hide Makefile -if EXIST sources del sources >NUL 2>&1 -echo Build failed -goto done - -:usage -echo This command must be run in a Windows Driver Kit build environment. -echo See: http://msdn.microsoft.com/en-us/windows/hardware/gg487463 -echo: -pause - -:done -cd %PWD% \ No newline at end of file From a528bb3d83491f58685740fbe0d79592bfdb23cc Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 11 Jul 2017 17:43:51 +0100 Subject: [PATCH 05/97] [ui] report process(es) that are preventing access on error * Also revert loc file changes that were introduced in f53b22a077e4bfa7c6eacf9f0dffdaaa7f5ba87b --- README.md | 3 +- res/localization/rufus.loc | 4 +- src/format.c | 2 +- src/process.c | 8 +- src/resource.h | 21 +++++ src/rufus.c | 12 ++- src/rufus.h | 3 +- src/rufus.rc | 84 ++++++++++++------ src/stdlg.c | 173 ++++++++++++++++++++++++++++++++----- 9 files changed, 252 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index b154432a..58fc830e 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,7 @@ Features Compilation ----------- -Use either Visual Studio (2017 or later), WDK 7.1 (Windows Driver Kit) or MinGW and then -invoke the `.sln`, `wdk_build.cmd` or `configure`/`make` respectively. +Use either Visual Studio (2017 or later) or MinGW and then invoke the `.sln` or `configure`/`make` respectively. #### Visual Studio Note that, since Rufus is an OSI compliant Open Source project, you are entitled to diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 971bd58c..b6457cf8 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -251,7 +251,7 @@ t MSG_064 "Read error." t MSG_065 "Write error." t MSG_066 "Installation failure" t MSG_067 "Could not open media. It may be in use by another process. " - "Please check the log for additional details." + "Please re-plug the media and try again." t MSG_068 "Error while partitioning drive." t MSG_069 "Could not copy files to target drive." t MSG_070 "Cancelled by user." @@ -5273,7 +5273,7 @@ t MSG_064 "Erreur de lecture." t MSG_065 "Erreur d'écriture." t MSG_066 "L'installation a échoué" t MSG_067 "Impossible d'accéder au média. Il peut être en cours d'utilisation par une autre application. " - "Veuillez consulter le log pour avoir des détails supplémentaires." + "Essayer de déconnecter le média et essayez à nouveau." t MSG_068 "Erreur de partitionnement." t MSG_069 "Impossible de copier les fichiers sur le périphérique de destination." t MSG_070 "Opération annulée par l'utilisateur." diff --git a/src/format.c b/src/format.c index f9e70a72..c0ba4a1c 100644 --- a/src/format.c +++ b/src/format.c @@ -1325,7 +1325,7 @@ int SetWinToGoIndex(void) (StrArrayAdd(&version_index, get_token_data_file_indexed("IMAGE INDEX", xml_file, i + 1), FALSE) >= 0); i++); if (i > 1) - i = Selection(lmprintf(MSG_291), lmprintf(MSG_292), version_name.String, i); + i = SelectionDialog(lmprintf(MSG_291), lmprintf(MSG_292), version_name.String, i); if (i < 0) { wintogo_index = -2; // Cancelled by the user } else if (i == 0) { diff --git a/src/process.c b/src/process.c index b0fb834c..c13b98cc 100644 --- a/src/process.c +++ b/src/process.c @@ -57,6 +57,7 @@ PF_TYPE_DECL(NTAPI, NTSTATUS, NtAdjustPrivilegesToken, (HANDLE, BOOLEAN, PTOKEN_ PF_TYPE_DECL(NTAPI, NTSTATUS, NtClose, (HANDLE)); static PVOID PhHeapHandle = NULL; +extern StrArray BlockingProcess; /* * Convert an NT Status to an error message @@ -399,6 +400,7 @@ NTSTATUS PhQueryProcessesUsingVolumeOrFile(HANDLE VolumeOrFileHandle, BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) { const char *access_rights_str[8] = { "n", "r", "w", "rw", "x", "rx", "wx", "rwx" }; + char tmp[MAX_PATH]; NTSTATUS status = STATUS_SUCCESS; PSYSTEM_HANDLE_INFORMATION_EX handles = NULL; POBJECT_NAME_INFORMATION buffer = NULL; @@ -426,6 +428,8 @@ BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) PF_INIT_OR_SET_STATUS(RtlInitUnicodeString, NtDll); #endif + StrArrayClear(&BlockingProcess); + if (NT_SUCCESS(status)) status = PhCreateHeap(); @@ -481,7 +485,9 @@ BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) // If we're switching process and found a match, print it if (bFound) { - uprintf("o '%s' (pid: %ld, access: %s)", exe_path, pid[cur_pid], access_rights_str[access_rights & 0x7]); + uprintf("● '%s' (pid: %ld, access: %s)", exe_path, pid[cur_pid], access_rights_str[access_rights & 0x7]); + static_sprintf(tmp, "● %s (pid %ld)", exe_path, pid[cur_pid]); + StrArrayAdd(&BlockingProcess, tmp, TRUE); bFound = FALSE; access_rights = 0; } diff --git a/src/resource.h b/src/resource.h index 4991f722..e9fa0fba 100644 --- a/src/resource.h +++ b/src/resource.h @@ -11,6 +11,7 @@ #define IDD_UPDATE_POLICY 107 #define IDD_NEW_VERSION 108 #define IDD_CHECKSUM 109 +#define IDD_LIST 110 #define IDI_ICON 120 #define IDI_UP 121 #define IDI_DOWN 122 @@ -148,6 +149,26 @@ #define IDC_SELECTION_CHOICE14 1090 #define IDC_SELECTION_CHOICE15 1091 #define IDC_SELECTION_CHOICEMAX 1092 +#define IDC_LIST_ICON 1093 +#define IDC_LIST_TEXT 1094 +#define IDC_LIST_LINE 1095 +#define IDC_LIST_ITEM1 1096 +#define IDC_LIST_ITEM2 1097 +#define IDC_LIST_ITEM3 1098 +#define IDC_LIST_ITEM4 1099 +#define IDC_LIST_ITEM5 1100 +#define IDC_LIST_ITEM6 1101 +#define IDC_LIST_ITEM7 1102 +#define IDC_LIST_ITEM8 1103 +#define IDC_LIST_ITEM9 1104 +#define IDC_LIST_ITEM10 1105 +#define IDC_LIST_ITEM11 1106 +#define IDC_LIST_ITEM12 1107 +#define IDC_LIST_ITEM13 1108 +#define IDC_LIST_ITEM14 1109 +#define IDC_LIST_ITEM15 1110 +#define IDC_LIST_ITEMMAX 1111 +#define IDC_SELECTION_CHOICEMAX 1092 #define IDS_DEVICE_TXT 2000 #define IDS_PARTITION_TYPE_TXT 2001 #define IDS_FILESYSTEM_TXT 2002 diff --git a/src/rufus.c b/src/rufus.c index 072189da..5e9bf2fc 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -114,7 +114,7 @@ uint16_t rufus_version[3], embedded_sl_version[2]; char embedded_sl_version_str[2][12] = { "?.??", "?.??" }; char embedded_sl_version_ext[2][32]; RUFUS_UPDATE update = { {0,0,0}, {0,0}, NULL, NULL}; -StrArray DriveID, DriveLabel; +StrArray DriveID, DriveLabel, BlockingProcess; extern char* szStatusMessage; static HANDLE format_thid = NULL, dialog_handle = NULL; @@ -1802,6 +1802,7 @@ static void InitDialog(HWND hDlg) // Create the string array StrArrayCreate(&DriveID, MAX_DRIVES); StrArrayCreate(&DriveLabel, MAX_DRIVES); + StrArrayCreate(&BlockingProcess, 16); // Set various checkboxes CheckDlgButton(hDlg, IDC_QUICKFORMAT, BST_CHECKED); CheckDlgButton(hDlg, IDC_BOOT, BST_CHECKED); @@ -2240,6 +2241,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA PostQuitMessage(0); StrArrayDestroy(&DriveID); StrArrayDestroy(&DriveLabel); + StrArrayDestroy(&BlockingProcess); DestroyAllTooltips(); DestroyWindow(hLogDlg); GetWindowRect(hDlg, &relaunch_rc); @@ -2455,6 +2457,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA return (INT_PTR)TRUE; } FormatStatus = 0; + StrArrayClear(&BlockingProcess); format_op_in_progress = TRUE; no_confirmation_on_cancel = FALSE; // Reset all progress bars @@ -2493,7 +2496,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA char* iso_image = lmprintf(MSG_036); char* dd_image = lmprintf(MSG_095); char* choices[2] = { lmprintf(MSG_276, iso_image), lmprintf(MSG_277, dd_image) }; - i = Selection(lmprintf(MSG_274), lmprintf(MSG_275, iso_image, dd_image, iso_image, dd_image), + i = SelectionDialog(lmprintf(MSG_274), lmprintf(MSG_275, iso_image, dd_image, iso_image, dd_image), choices, 2); if (i < 0) { // Cancel format_op_in_progress = FALSE; @@ -2826,9 +2829,12 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA SendMessage(hProgress, PBM_SETSTATE, (WPARAM)PBST_ERROR, 0); SetTaskbarProgressState(TASKBAR_ERROR); PrintInfo(0, MSG_212); - Notification(MSG_ERROR, NULL, lmprintf(MSG_042), lmprintf(MSG_043, StrError(FormatStatus, FALSE))); MessageBeep(MB_ICONERROR); FlashTaskbar(dialog_handle); + if (BlockingProcess.Index > 0) + ListDialog(lmprintf(MSG_042), lmprintf(MSG_055), BlockingProcess.String, BlockingProcess.Index); + else + Notification(MSG_ERROR, NULL, lmprintf(MSG_042), lmprintf(MSG_043, StrError(FormatStatus, FALSE))); } FormatStatus = 0; format_op_in_progress = FALSE; diff --git a/src/rufus.h b/src/rufus.h index 4aabdf5c..99a469e5 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -432,7 +432,8 @@ extern BOOL CreateTooltip(HWND hControl, const char* message, int duration); extern void DestroyTooltip(HWND hWnd); extern void DestroyAllTooltips(void); extern BOOL Notification(int type, const notification_info* more_info, char* title, char* format, ...); -extern int Selection(char* title, char* message, char** choices, int size); +extern int SelectionDialog(char* title, char* message, char** choices, int size); +extern void ListDialog(char* title, char* message, char** items, int size); extern SIZE GetTextSize(HWND hCtrl); extern BOOL ExtractDOS(const char* path); extern BOOL ExtractISO(const char* src_iso, const char* dest_dir, BOOL scan); diff --git a/src/rufus.rc b/src/rufus.rc index 1d163277..e6b4f384 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.15.1124" +CAPTION "Rufus 2.15.1125" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -164,6 +164,34 @@ BEGIN CONTROL "Choice 16",IDC_SELECTION_CHOICEMAX,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,35,213,269,10,WS_EX_TRANSPARENT END +IDD_LIST DIALOGEX 0, 0, 312, 59 +STYLE DS_SETFONT | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME +CAPTION "Rufus" +FONT 8, "Segoe UI Symbol", 400, 0, 0x0 +BEGIN + LTEXT "",IDC_LIST_LINE,0,0,312,32 + LTEXT "",IDC_STATIC,0,0,312,31 + ICON IDI_ICON,IDC_LIST_ICON,6,6,20,20,0,WS_EX_TRANSPARENT + LTEXT "Message",IDC_LIST_TEXT,35,5,269,8 + PUSHBUTTON "OK",IDOK,254,39,50,14 + LTEXT "List 1",IDC_LIST_ITEM1,35,17,269,10,SS_PATHELLIPSIS + LTEXT "List 2",IDC_LIST_ITEM2,35,28,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 3",IDC_LIST_ITEM3,35,39,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 4",IDC_LIST_ITEM4,35,50,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 5",IDC_LIST_ITEM5,35,61,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 6",IDC_LIST_ITEM6,35,72,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 7",IDC_LIST_ITEM7,35,73,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 8",IDC_LIST_ITEM8,35,84,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 9",IDC_LIST_ITEM9,35,95,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 10",IDC_LIST_ITEM10,35,106,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 11",IDC_LIST_ITEM11,35,117,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 12",IDC_LIST_ITEM12,35,128,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 13",IDC_LIST_ITEM13,35,139,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 14",IDC_LIST_ITEM14,35,150,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 15",IDC_LIST_ITEM15,35,161,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS + LTEXT "List 16",IDC_LIST_ITEMMAX,35,172,269,10,NOT WS_VISIBLE|SS_PATHELLIPSIS +END + IDD_UPDATE_POLICY DIALOGEX 0, 0, 287, 198 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Update policy and settings" @@ -206,12 +234,12 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#ifndef _USING_V110_SDK71_\r\n" "#define _USING_V110_SDK71_\r\n" @@ -223,7 +251,7 @@ BEGIN "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "#ifdef RUFUS_LOC\r\n" @@ -317,6 +345,10 @@ BEGIN BEGIN END + IDD_LIST, DIALOG + BEGIN + END + IDD_UPDATE_POLICY, DIALOG BEGIN END @@ -334,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,15,1124,0 - PRODUCTVERSION 2,15,1124,0 + FILEVERSION 2,15,1125,0 + PRODUCTVERSION 2,15,1125,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -352,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.15.1124" + VALUE "FileVersion", "2.15.1125" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.15.1124" + VALUE "ProductVersion", "2.15.1125" END END BLOCK "VarFileInfo" @@ -413,24 +445,24 @@ IDR_FD_KB1_SYS RCDATA "../res/freedos/KEYBOARD.SYS" IDR_FD_KB2_SYS RCDATA "../res/freedos/KEYBRD2.SYS" IDR_FD_KB3_SYS RCDATA "../res/freedos/KEYBRD3.SYS" IDR_FD_KB4_SYS RCDATA "../res/freedos/KEYBRD4.SYS" -IDR_FD_EGA1_CPX RCDATA "../res/freedos/ega.cpx" -IDR_FD_EGA2_CPX RCDATA "../res/freedos/ega2.cpx" -IDR_FD_EGA3_CPX RCDATA "../res/freedos/ega3.cpx" -IDR_FD_EGA4_CPX RCDATA "../res/freedos/ega4.cpx" -IDR_FD_EGA5_CPX RCDATA "../res/freedos/ega5.cpx" -IDR_FD_EGA6_CPX RCDATA "../res/freedos/ega6.cpx" -IDR_FD_EGA7_CPX RCDATA "../res/freedos/ega7.cpx" -IDR_FD_EGA8_CPX RCDATA "../res/freedos/ega8.cpx" -IDR_FD_EGA9_CPX RCDATA "../res/freedos/ega9.cpx" -IDR_FD_EGA10_CPX RCDATA "../res/freedos/ega10.cpx" -IDR_FD_EGA11_CPX RCDATA "../res/freedos/ega11.cpx" -IDR_FD_EGA12_CPX RCDATA "../res/freedos/ega12.cpx" -IDR_FD_EGA13_CPX RCDATA "../res/freedos/ega13.cpx" -IDR_FD_EGA14_CPX RCDATA "../res/freedos/ega14.cpx" -IDR_FD_EGA15_CPX RCDATA "../res/freedos/ega15.cpx" -IDR_FD_EGA16_CPX RCDATA "../res/freedos/ega16.cpx" -IDR_FD_EGA17_CPX RCDATA "../res/freedos/ega17.cpx" -IDR_FD_EGA18_CPX RCDATA "../res/freedos/ega18.cpx" +IDR_FD_EGA1_CPX RCDATA "../res/freedos/EGA.CPX" +IDR_FD_EGA2_CPX RCDATA "../res/freedos/EGA2.CPX" +IDR_FD_EGA3_CPX RCDATA "../res/freedos/EGA3.CPX" +IDR_FD_EGA4_CPX RCDATA "../res/freedos/EGA4.CPX" +IDR_FD_EGA5_CPX RCDATA "../res/freedos/EGA5.CPX" +IDR_FD_EGA6_CPX RCDATA "../res/freedos/EGA6.CPX" +IDR_FD_EGA7_CPX RCDATA "../res/freedos/EGA7.CPX" +IDR_FD_EGA8_CPX RCDATA "../res/freedos/EGA8.CPX" +IDR_FD_EGA9_CPX RCDATA "../res/freedos/EGA9.CPX" +IDR_FD_EGA10_CPX RCDATA "../res/freedos/EGA10.CPX" +IDR_FD_EGA11_CPX RCDATA "../res/freedos/EGA11.CPX" +IDR_FD_EGA12_CPX RCDATA "../res/freedos/EGA12.CPX" +IDR_FD_EGA13_CPX RCDATA "../res/freedos/EGA13.CPX" +IDR_FD_EGA14_CPX RCDATA "../res/freedos/EGA14.CPX" +IDR_FD_EGA15_CPX RCDATA "../res/freedos/EGA15.CPX" +IDR_FD_EGA16_CPX RCDATA "../res/freedos/EGA16.CPX" +IDR_FD_EGA17_CPX RCDATA "../res/freedos/EGA17.CPX" +IDR_FD_EGA18_CPX RCDATA "../res/freedos/EGA18.CPX" IDR_XT_HOGGER RCDATA "../res/hogger/hogger.exe" IDR_UEFI_NTFS RCDATA "../res/uefi/uefi-ntfs.img" IDR_TOGO_SAN_POLICY_XML RCDATA "../res/togo/san_policy.xml" diff --git a/src/stdlg.c b/src/stdlg.c index a784a90e..310e2ef9 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -52,8 +52,8 @@ PF_TYPE_DECL(WINAPI, LPITEMIDLIST, SHSimpleIDListFromPath, (PCWSTR pszPath)); static HICON hMessageIcon = (HICON)INVALID_HANDLE_VALUE; static char* szMessageText = NULL; static char* szMessageTitle = NULL; -static char **szSelectionChoice; -static int nSelectionChoices; +static char **szDialogItem; +static int nDialogItems; static HWND hBrowseEdit; extern HWND hUpdatesDlg; static WNDPROC pOrgBrowseWndproc; @@ -846,8 +846,8 @@ BOOL Notification(int type, const notification_info* more_info, char* title, cha } /* -* Custom dialog for radio button selection dialog -*/ + * Custom dialog for radio button selection dialog + */ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { LRESULT loc; @@ -866,10 +866,10 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA switch (message) { case WM_INITDIALOG: // Don't overflow our max radio button - if (nSelectionChoices > (IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1 + 1)) { + if (nDialogItems > (IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1 + 1)) { uprintf("Warning: Too many options requested for Selection (%d vs %d)", - nSelectionChoices, IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1); - nSelectionChoices = IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1; + nDialogItems, IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1); + nDialogItems = IDC_SELECTION_CHOICEMAX - IDC_SELECTION_CHOICE1; } // TODO: This shouldn't be needed when using DS_SHELLFONT // Get the system message box font. See http://stackoverflow.com/a/6057761 @@ -888,7 +888,7 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA // Set the dialog to use the system message box font SendMessage(hDlg, WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); SendMessage(GetDlgItem(hDlg, IDC_SELECTION_TEXT), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - for (i = 0; i < nSelectionChoices; i++) + for (i = 0; i < nDialogItems; i++) SendMessage(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); SendMessage(GetDlgItem(hDlg, IDYES), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); SendMessage(GetDlgItem(hDlg, IDNO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); @@ -903,8 +903,8 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA SetWindowTextU(hDlg, szMessageTitle); SetWindowTextU(GetDlgItem(hDlg, IDCANCEL), lmprintf(MSG_007)); SetWindowTextU(GetDlgItem(hDlg, IDC_SELECTION_TEXT), szMessageText); - for (i = 0; i < nSelectionChoices; i++) { - SetWindowTextU(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i), szSelectionChoice[i]); + for (i = 0; i < nDialogItems; i++) { + SetWindowTextU(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i), szDialogItem[i]); ShowWindow(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i), SW_SHOW); } // Move/Resize the controls as needed to fit our text @@ -918,12 +918,12 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA if (hDC != NULL) ReleaseDC(hCtrl, hDC); ResizeMoveCtrl(hDlg, hCtrl, 0, 0, 0, dh, 1.0f); - for (i = 0; i < nSelectionChoices; i++) + for (i = 0; i < nDialogItems; i++) ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i), 0, dh, 0, 0, 1.0f); - if (nSelectionChoices > 2) { - GetWindowRect(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1), &rect); - GetWindowRect(GetDlgItem(hDlg, IDC_SELECTION_CHOICE2), &rect2); - dh += (nSelectionChoices - 2) * (rect2.top - rect.top) + 5; + if (nDialogItems > 2) { + GetWindowRect(GetDlgItem(hDlg, IDC_SELECTION_CHOICE2), &rect); + GetWindowRect(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + nDialogItems - 1), &rect2); + dh += rect2.top - rect.top; } ResizeMoveCtrl(hDlg, hDlg, 0, 0, 0, dh, 1.0f); ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, -1), 0, 0, 0, dh, 1.0f); // IDC_STATIC = -1 @@ -954,9 +954,9 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: - for (i = 0; (i < nSelectionChoices) && + for (i = 0; (i < nDialogItems) && (Button_GetCheck(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i)) != BST_CHECKED); i++); - if (i < nSelectionChoices) + if (i < nDialogItems) r = i + 1; // Fall through case IDNO: @@ -970,23 +970,152 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA } /* -* Display a selection question -*/ -int Selection(char* title, char* message, char** choices, int size) + * Display an item selection dialog + */ +int SelectionDialog(char* title, char* message, char** choices, int size) { int ret; dialog_showing++; szMessageTitle = title; szMessageText = message; - szSelectionChoice = choices; - nSelectionChoices = size; + szDialogItem = choices; + nDialogItems = size; ret = (int)MyDialogBox(hMainInstance, IDD_SELECTION, hMainDialog, SelectionCallback); dialog_showing--; return ret; } +/* + * Custom dialog for list dialog + */ +INT_PTR CALLBACK ListCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + LRESULT loc; + int i, dh, r = -1; + // Prevent resizing + static LRESULT disabled[9] = { HTLEFT, HTRIGHT, HTTOP, HTBOTTOM, HTSIZE, + HTTOPLEFT, HTTOPRIGHT, HTBOTTOMLEFT, HTBOTTOMRIGHT }; + static HBRUSH background_brush, separator_brush; + // To use the system message font + NONCLIENTMETRICS ncm; + RECT rect, rect2; + HFONT hDlgFont; + HWND hCtrl; + HDC hDC; + + switch (message) { + case WM_INITDIALOG: + // Don't overflow our max radio button + if (nDialogItems > (IDC_LIST_ITEMMAX - IDC_LIST_ITEM1 + 1)) { + uprintf("Warning: Too many items requested for List (%d vs %d)", + nDialogItems, IDC_LIST_ITEMMAX - IDC_LIST_ITEM1); + nDialogItems = IDC_LIST_ITEMMAX - IDC_LIST_ITEM1; + } + // TODO: This shouldn't be needed when using DS_SHELLFONT + // Get the system message box font. See http://stackoverflow.com/a/6057761 + ncm.cbSize = sizeof(ncm); + // If we're compiling with the Vista SDK or later, the NONCLIENTMETRICS struct + // will be the wrong size for previous versions, so we need to adjust it. +#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA) + if (nWindowsVersion >= WINDOWS_VISTA) { + // In versions of Windows prior to Vista, the iPaddedBorderWidth member + // is not present, so we need to subtract its size from cbSize. + ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth); + } +#endif + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0); + hDlgFont = CreateFontIndirect(&(ncm.lfMessageFont)); + // Set the dialog to use the system message box font + SendMessage(hDlg, WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDC_LIST_TEXT), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + for (i = 0; i < nDialogItems; i++) + SendMessage(GetDlgItem(hDlg, IDC_LIST_ITEM1 + i), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDYES), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDNO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + + apply_localization(IDD_LIST, hDlg); + background_brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); + separator_brush = CreateSolidBrush(GetSysColor(COLOR_3DLIGHT)); + SetTitleBarIcon(hDlg); + CenterDialog(hDlg); + // Change the default icon and set the text + Static_SetIcon(GetDlgItem(hDlg, IDC_LIST_ICON), LoadIcon(NULL, IDI_EXCLAMATION)); + SetWindowTextU(hDlg, szMessageTitle); + SetWindowTextU(GetDlgItem(hDlg, IDCANCEL), lmprintf(MSG_007)); + SetWindowTextU(GetDlgItem(hDlg, IDC_LIST_TEXT), szMessageText); + for (i = 0; i < nDialogItems; i++) { + SetWindowTextU(GetDlgItem(hDlg, IDC_LIST_ITEM1 + i), szDialogItem[i]); + ShowWindow(GetDlgItem(hDlg, IDC_LIST_ITEM1 + i), SW_SHOW); + } + // Move/Resize the controls as needed to fit our text + hCtrl = GetDlgItem(hDlg, IDC_LIST_TEXT); + hDC = GetDC(hCtrl); + SelectFont(hDC, hDlgFont); // Yes, you *MUST* reapply the font to the DC, even after SetWindowText! + GetWindowRect(hCtrl, &rect); + dh = rect.bottom - rect.top; + DrawTextU(hDC, szMessageText, -1, &rect, DT_CALCRECT | DT_WORDBREAK); + dh = rect.bottom - rect.top - dh; + if (hDC != NULL) + ReleaseDC(hCtrl, hDC); + ResizeMoveCtrl(hDlg, hCtrl, 0, 0, 0, dh, 1.0f); + for (i = 0; i < nDialogItems; i++) + ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDC_LIST_ITEM1 + i), 0, dh, 0, 0, 1.0f); + if (nDialogItems > 1) { + GetWindowRect(GetDlgItem(hDlg, IDC_LIST_ITEM1), &rect); + GetWindowRect(GetDlgItem(hDlg, IDC_LIST_ITEM1 + nDialogItems - 1), &rect2); + dh += rect2.top - rect.top; + } + ResizeMoveCtrl(hDlg, hDlg, 0, 0, 0, dh, 1.0f); + ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, -1), 0, 0, 0, dh, 1.0f); // IDC_STATIC = -1 + ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDC_LIST_LINE), 0, dh, 0, 0, 1.0f); + ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDOK), 0, dh, 0, 0, 1.0f); + ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDCANCEL), 0, dh, 0, 0, 1.0f); + return (INT_PTR)TRUE; + case WM_CTLCOLORSTATIC: + // Change the background colour for static text and icon + SetBkMode((HDC)wParam, TRANSPARENT); + if ((HWND)lParam == GetDlgItem(hDlg, IDC_NOTIFICATION_LINE)) { + return (INT_PTR)separator_brush; + } + return (INT_PTR)background_brush; + case WM_NCHITTEST: + // Check coordinates to prevent resize actions + loc = DefWindowProc(hDlg, message, wParam, lParam); + for (i = 0; i < 9; i++) { + if (loc == disabled[i]) { + return (INT_PTR)TRUE; + } + } + return (INT_PTR)FALSE; + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + case IDNO: + case IDCANCEL: + EndDialog(hDlg, r); + return (INT_PTR)TRUE; + } + break; + } + return (INT_PTR)FALSE; +} + +/* + * Display a dialog with a list of items + */ +void ListDialog(char* title, char* message, char** items, int size) +{ + dialog_showing++; + szMessageTitle = title; + szMessageText = message; + szDialogItem = items; + nDialogItems = size; + MyDialogBox(hMainInstance, IDD_LIST, hMainDialog, ListCallback); + dialog_showing--; +} + static struct { HWND hTip; // Tooltip handle HWND hCtrl; // Handle of the control the tooltip belongs to From bed889718e2a17b10ca6fac89d33b2699d5faa93 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 13 Jul 2017 21:53:44 +0100 Subject: [PATCH 06/97] [core] attempt to continue if the only conflicting handles we found are for read-only * Also clean-up the process code and update for rufus-next --- configure | 20 +++--- configure.ac | 2 +- res/appstore/AppxManifest.xml | 2 +- res/appstore/packme.cmd | 2 +- src/drive.c | 16 +++-- src/process.c | 127 ++++------------------------------ src/rufus.h | 2 +- src/rufus.rc | 10 +-- 8 files changed, 41 insertions(+), 140 deletions(-) diff --git a/configure b/configure index 0c77fadb..4f721934 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for rufus 2.15. +# Generated by GNU Autoconf 2.69 for rufus 2.16. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='rufus' PACKAGE_TARNAME='rufus' -PACKAGE_VERSION='2.15' -PACKAGE_STRING='rufus 2.15' +PACKAGE_VERSION='2.16' +PACKAGE_STRING='rufus 2.16' PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues' PACKAGE_URL='https://rufus.akeo.ie' @@ -1228,7 +1228,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rufus 2.15 to adapt to many kinds of systems. +\`configure' configures rufus 2.16 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1294,7 +1294,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rufus 2.15:";; + short | recursive ) echo "Configuration of rufus 2.16:";; esac cat <<\_ACEOF @@ -1385,7 +1385,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rufus configure 2.15 +rufus configure 2.16 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1440,7 +1440,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rufus $as_me 2.15, which was +It was created by rufus $as_me 2.16, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2303,7 +2303,7 @@ fi # Define the identity of the package. PACKAGE='rufus' - VERSION='2.15' + VERSION='2.16' cat >>confdefs.h <<_ACEOF @@ -4483,7 +4483,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rufus $as_me 2.15, which was +This file was extended by rufus $as_me 2.16, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4537,7 +4537,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -rufus config.status 2.15 +rufus config.status 2.16 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 265a98df..83399a5b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([rufus], [2.15], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie]) +AC_INIT([rufus], [2.16], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie]) AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies]) AC_CONFIG_SRCDIR([src/rufus.c]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml index d54cbe6a..f86041b0 100644 --- a/res/appstore/AppxManifest.xml +++ b/res/appstore/AppxManifest.xml @@ -8,7 +8,7 @@ for an interesting struggle, when you also happen to have a comma in one of the fields... --> diff --git a/res/appstore/packme.cmd b/res/appstore/packme.cmd index 2dd9bf42..738e3c7a 100644 --- a/res/appstore/packme.cmd +++ b/res/appstore/packme.cmd @@ -1,5 +1,5 @@ @echo off -set VERSION=2.15 +set VERSION=2.16 rem Make sure you don't have anything you don't want included in the package, as anything residing in the rem current directory will be included, including any previous .appx, which makes for nice recursion... diff --git a/src/drive.c b/src/drive.c index d86bf2a5..3fd7b0c6 100644 --- a/src/drive.c +++ b/src/drive.c @@ -120,7 +120,7 @@ BOOL GetAutoMount(BOOL* enabled) static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWriteShare) { int i; - BOOL bSearchProcess = FALSE; + BYTE access_mask = 0; DWORD size, EndTime; HANDLE hDrive = INVALID_HANDLE_VALUE; char DevPath[MAX_PATH]; @@ -152,8 +152,8 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr uprintf("Warning: Could not obtain exclusive rights. Retrying with write sharing enabled..."); bWriteShare = TRUE; // Try to report the process that is locking the drive - SearchProcess(DevPath, TRUE, TRUE); - bSearchProcess = TRUE; + // We also use bit 6 as a flag to indicate that SearchProcess was called. + access_mask = SearchProcess(DevPath, TRUE, TRUE, FALSE) | 0x40; } Sleep(DRIVE_ACCESS_TIMEOUT / DRIVE_ACCESS_RETRIES); } @@ -182,10 +182,12 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr } while (GetTickCount() < EndTime); // If we reached this section, either we didn't manage to get a lock or the user cancelled uprintf("Could not lock access to %s: %s", Path, WindowsErrorString()); - // See if we can tell the user what processes are accessing the drive - if (!IS_ERROR(FormatStatus) && !bSearchProcess) - SearchProcess(DevPath, TRUE, TRUE); - safe_closehandle(hDrive); + // See if we can report the processes are accessing the drive + if (!IS_ERROR(FormatStatus) && (access_mask == 0)) + access_mask = SearchProcess(DevPath, TRUE, TRUE, FALSE); + // Try to continue if the only access rights we saw were for read-only + if ((access_mask & 0x07) != 0x01) + safe_closehandle(hDrive); } out: diff --git a/src/process.c b/src/process.c index c13b98cc..8e6f2ab1 100644 --- a/src/process.c +++ b/src/process.c @@ -34,18 +34,10 @@ #include "missing.h" #include "msapi_utf8.h" -// Process Hacker does some filtering using Object Types, but this doesn't help us. -// Keep this option, just in case. -// #define USE_OBJECT_TYPES - PF_TYPE_DECL(NTAPI, PVOID, RtlCreateHeap, (ULONG, PVOID, SIZE_T, SIZE_T, PVOID, PRTL_HEAP_PARAMETERS)); PF_TYPE_DECL(NTAPI, PVOID, RtlDestroyHeap, (PVOID)); PF_TYPE_DECL(NTAPI, PVOID, RtlAllocateHeap, (PVOID, ULONG, SIZE_T)); PF_TYPE_DECL(NTAPI, BOOLEAN, RtlFreeHeap, (PVOID, ULONG, PVOID)); -#ifdef USE_OBJECT_TYPES -PF_TYPE_DECL(NTAPI, VOID, RtlInitUnicodeString, (PUNICODE_STRING, PCWSTR)); -PF_TYPE_DECL(NTAPI, BOOLEAN, RtlEqualUnicodeString, (PCUNICODE_STRING, PCUNICODE_STRING, BOOLEAN)); -#endif PF_TYPE_DECL(NTAPI, NTSTATUS, NtQuerySystemInformation, (SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG)); PF_TYPE_DECL(NTAPI, NTSTATUS, NtQueryInformationFile, (HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS)); @@ -264,82 +256,6 @@ NTSTATUS PhOpenProcess(PHANDLE ProcessHandle, ACCESS_MASK DesiredAccess, HANDLE return status; } -#ifdef USE_OBJECT_TYPES -NTSTATUS PhEnumObjectTypes(POBJECT_TYPES_INFORMATION *ObjectTypes) -{ - NTSTATUS status = STATUS_SUCCESS; - PVOID buffer; - ULONG bufferSize; - ULONG returnLength; - - PF_INIT_OR_SET_STATUS(NtQueryObject, Ntdll); - if (!NT_SUCCESS(status)) - return status; - - bufferSize = 0x1000; - buffer = PhAllocate(bufferSize); - - while ((status = pfNtQueryObject(NULL, ObjectTypesInformation, buffer, bufferSize, &returnLength)) == STATUS_INFO_LENGTH_MISMATCH) { - PhFree(buffer); - bufferSize *= 2; - - // Fail if we're resizing the buffer to something very large. - if (bufferSize > PH_LARGE_BUFFER_SIZE) - return STATUS_INSUFFICIENT_RESOURCES; - - buffer = PhAllocate(bufferSize); - } - - if (!NT_SUCCESS(status)) { - PhFree(buffer); - return status; - } - - *ObjectTypes = (POBJECT_TYPES_INFORMATION)buffer; - - return status; -} - -ULONG PhGetObjectTypeNumber(PUNICODE_STRING TypeName) -{ - NTSTATUS status = STATUS_SUCCESS; - POBJECT_TYPES_INFORMATION objectTypes; - POBJECT_TYPE_INFORMATION objectType; - ULONG objectIndex = -1; - ULONG i; - - PF_INIT_OR_SET_STATUS(RtlEqualUnicodeString, NtDll); - if (!NT_SUCCESS(status)) - return -1; - - status = PhEnumObjectTypes(&objectTypes); - if (NT_SUCCESS(status)) { - objectType = PH_FIRST_OBJECT_TYPE(objectTypes); - - for (i = 0; i < objectTypes->NumberOfTypes; i++) { - if (pfRtlEqualUnicodeString(&objectType->TypeName, TypeName, TRUE)) { - if (nWindowsVersion >= WINDOWS_8_1) { - objectIndex = objectType->TypeIndex; - break; - } else if (nWindowsVersion >= WINDOWS_7) { - objectIndex = i + 2; - break; - } else { - objectIndex = i + 1; - break; - } - } - - objectType = PH_NEXT_OBJECT_TYPE(objectType); - } - - PhFree(objectTypes); - } - - return objectIndex; -} -#endif - /** * Query processes with open handles to a file, volume or disk. * @@ -394,20 +310,18 @@ NTSTATUS PhQueryProcessesUsingVolumeOrFile(HANDLE VolumeOrFileHandle, * \param HandleName The name of the handle to look for. * \param bPartialMatch Whether partial matches should be allowed. * \param bIgnoreSelf Whether the current process should be listed. + * \param bQuiet Prints minimal output. * - * \return TRUE if matching processes were found, FALSE otherwise. + * \return a byte containing the cummulated access rights (f----xwr) from all the handles found + * with bit 7 ('f') also set if at least one process was found. */ -BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) +BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet) { const char *access_rights_str[8] = { "n", "r", "w", "rw", "x", "rx", "wx", "rwx" }; char tmp[MAX_PATH]; NTSTATUS status = STATUS_SUCCESS; PSYSTEM_HANDLE_INFORMATION_EX handles = NULL; POBJECT_NAME_INFORMATION buffer = NULL; -#ifdef USE_OBJECT_TYPES - UNICODE_STRING fileTypeName; - ULONG fileObjectTypeIndex = -1; -#endif ULONG_PTR i; ULONG_PTR pid[2]; ULONG_PTR last_access_denied_pid = 0; @@ -416,17 +330,15 @@ BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) WCHAR *wHandleName = NULL; HANDLE dupHandle = NULL; HANDLE processHandle = NULL; - BOOLEAN bFound = FALSE; + BOOLEAN bFound = FALSE, verbose = !bQuiet; ULONG access_rights = 0; + BYTE access_mask = 0; char exe_path[MAX_PATH] = { 0 }; int cur_pid; PF_INIT_OR_SET_STATUS(NtQueryObject, Ntdll); PF_INIT_OR_SET_STATUS(NtDuplicateObject, NtDll); PF_INIT_OR_SET_STATUS(NtClose, NtDll); -#ifdef USE_OBJECT_TYPES - PF_INIT_OR_SET_STATUS(RtlInitUnicodeString, NtDll); -#endif StrArrayClear(&BlockingProcess); @@ -452,13 +364,6 @@ BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) if (buffer == NULL) goto out; -#ifdef USE_OBJECT_TYPES - pfRtlInitUnicodeString(&fileTypeName, L"File"); - fileObjectTypeIndex = PhGetObjectTypeNumber(&fileTypeName); - if (fileObjectTypeIndex < 0) - uprintf("Warning: Could not get Object Index for file types"); -#endif - for (i = 0; ; i++) { ULONG attempts = 8; PSYSTEM_HANDLE_TABLE_ENTRY_INFO_EX handleInfo = @@ -469,13 +374,6 @@ BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) dupHandle = NULL; } -#ifdef USE_OBJECT_TYPES - // Only look for File objects type - if ((fileObjectTypeIndex >= 0 ) && (handleInfo != NULL) && - (handleInfo->ObjectTypeIndex != (USHORT)fileObjectTypeIndex)) - continue; -#endif - // Update the current handle's process PID and compare against last // Note: Be careful about not trying to overflow our list! pid[cur_pid] = (handleInfo != NULL) ? handleInfo->UniqueProcessId : -1; @@ -485,7 +383,7 @@ BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) // If we're switching process and found a match, print it if (bFound) { - uprintf("● '%s' (pid: %ld, access: %s)", exe_path, pid[cur_pid], access_rights_str[access_rights & 0x7]); + vuprintf("● '%s' (pid: %ld, access: %s)", exe_path, pid[cur_pid], access_rights_str[access_rights & 0x7]); static_sprintf(tmp, "● %s (pid %ld)", exe_path, pid[cur_pid]); StrArrayAdd(&BlockingProcess, tmp, TRUE); bFound = FALSE; @@ -586,11 +484,12 @@ BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) access_rights |= handleInfo->GrantedAccess; // The Executable bit is in a place we don't like => reposition it if (access_rights & 0x20) - access_rights = (access_rights & 0x3) | 0x4; + access_rights = (access_rights & 0x03) | 0x04; + access_mask |= (BYTE) (access_rights & 0x7) + 0x80; // Bit 7 is always set if a process was found // If this is the very first process we find, print a header if (exe_path[0] == 0) - uprintf("WARNING: The following process(es) or service(s) are accessing %s:", HandleName); + vuprintf("WARNING: The following process(es) or service(s) are accessing %s:", HandleName); if (!GetModuleFileNameExU(processHandle, 0, exe_path, MAX_PATH - 1)) safe_sprintf(exe_path, MAX_PATH, "Unknown_Process_%" PRIu64, @@ -599,15 +498,15 @@ BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf) out: if (exe_path[0] != 0) - uprintf("You should try to close these applications before attempting to reformat the drive."); + vuprintf("You should close these applications before attempting to reformat the drive."); else - uprintf("NOTE: Could not identify the process(es) or service(s) accessing %s", HandleName); + vuprintf("NOTE: Could not identify the process(es) or service(s) accessing %s", HandleName); free(wHandleName); PhFree(buffer); PhFree(handles); PhDestroyHeap(); - return bFound; + return access_mask; } /** diff --git a/src/rufus.h b/src/rufus.h index 99a469e5..1e97e2df 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -495,7 +495,7 @@ extern BOOL IsCurrentProcessElevated(void); extern char* GetCurrentMUI(void); extern BOOL SetFormatPromptHook(void); extern void ClrFormatPromptHook(void); -extern BOOL SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf); +extern BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet); extern BOOL EnablePrivileges(void); extern void FlashTaskbar(HANDLE handle); diff --git a/src/rufus.rc b/src/rufus.rc index e6b4f384..7a25aa59 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.15.1125" +CAPTION "Rufus 2.16.1126" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,15,1125,0 - PRODUCTVERSION 2,15,1125,0 + FILEVERSION 2,16,1126,0 + PRODUCTVERSION 2,16,1126,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.15.1125" + VALUE "FileVersion", "2.16.1126" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.15.1125" + VALUE "ProductVersion", "2.16.1126" END END BLOCK "VarFileInfo" From b4a2c06a2ef36de6245e69ad6162a2698940154c Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sun, 16 Jul 2017 22:42:19 +0100 Subject: [PATCH 07/97] [ui] ask user if they want proceed when conflicting processes are found * Rufus now checks for processes with handles opened on the drives/volumes before starting the format operation and asks the user if they want to continue. * This mimics Windows' behaviour when formatting drives, and actually uses the same message as the one from shell32.dll.mui. * Closes #773 --- src/iso.c | 6 ++--- src/msapi_utf8.h | 14 ++++++++++ src/process.c | 2 +- src/rufus.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++- src/rufus.h | 2 ++ src/rufus.rc | 10 +++---- src/stdfn.c | 32 +++++++++++++++++++++++ src/stdlg.c | 3 +++ 8 files changed, 127 insertions(+), 10 deletions(-) diff --git a/src/iso.c b/src/iso.c index f436cb57..7791a036 100644 --- a/src/iso.c +++ b/src/iso.c @@ -277,7 +277,7 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha if ((iso_label != NULL) && (usb_label != NULL)) { if (replace_in_token_data(src, (props->is_grub_cfg) ? "linuxefi" : "append", iso_label, usb_label, TRUE) != NULL) - uprintf(" Patched %s: '%s' ⇨ '%s'\n", src, iso_label, usb_label); + uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label); } safe_free(iso_label); safe_free(usb_label); @@ -301,7 +301,7 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha safe_sprintf(iso_label, MAX_PATH, "cd9660:/dev/iso9660/%s", img_report.label); safe_sprintf(usb_label, MAX_PATH, "msdosfs:/dev/msdosfs/%s", img_report.usb_label); if (replace_in_token_data(src, "set", iso_label, usb_label, TRUE) != NULL) - uprintf(" Patched %s: '%s' ⇨ '%s'\n", src, iso_label, usb_label); + uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label); } safe_free(iso_label); safe_free(usb_label); @@ -896,7 +896,7 @@ out: fclose(fd); fd = NULL; safe_sprintf(path2, sizeof(path2), "%s\\syslinux.org", dest_dir); - uprintf("Renaming: %s ⇨ %s", path, path2); + uprintf("Renaming: %s ➔ %s", path, path2); IGNORE_RETVAL(rename(path, path2)); } if (fd == NULL) { diff --git a/src/msapi_utf8.h b/src/msapi_utf8.h index f8557b30..a0b2c0e5 100644 --- a/src/msapi_utf8.h +++ b/src/msapi_utf8.h @@ -276,6 +276,11 @@ static __inline int LoadStringU(HINSTANCE hInstance, UINT uID, LPSTR lpBuffer, i { int ret; DWORD err = ERROR_INVALID_DATA; + if (nBufferMax == 0) { + // read-only pointer to resource mode is not supported + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } // coverity[returned_null] walloc(lpBuffer, nBufferMax); ret = LoadStringW(hInstance, uID, wlpBuffer, nBufferMax); @@ -461,6 +466,15 @@ static __inline BOOL DeleteFileU(const char* lpFileName) return ret; } +static __inline BOOL PathFileExistsU(char* szPath) +{ + BOOL ret; + wconvert(szPath); + ret = PathFileExistsW(wszPath); + wfree(szPath); + return ret; +} + static __inline int PathGetDriveNumberU(char* lpPath) { int ret = 0; diff --git a/src/process.c b/src/process.c index 8e6f2ab1..066e8efb 100644 --- a/src/process.c +++ b/src/process.c @@ -384,7 +384,7 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL // If we're switching process and found a match, print it if (bFound) { vuprintf("● '%s' (pid: %ld, access: %s)", exe_path, pid[cur_pid], access_rights_str[access_rights & 0x7]); - static_sprintf(tmp, "● %s (pid %ld)", exe_path, pid[cur_pid]); + static_sprintf(tmp, "● %s (%s)", exe_path, access_rights_str[access_rights & 0x7]); StrArrayAdd(&BlockingProcess, tmp, TRUE); bFound = FALSE; access_rights = 0; diff --git a/src/rufus.c b/src/rufus.c index 5e9bf2fc..bac5b2c0 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2153,6 +2153,65 @@ static void SaveISO(void) } } +// Check for conflicting processes accessing the drive, and if any, +// ask the user whether they want to proceed. +static BOOL CheckDriveAccess(void) +{ + uint32_t i, j; + BOOL bProceed = TRUE; + BYTE access_mask; + char *PhysicalPath, DevPath[MAX_PATH]; + char drive_letter[27], drive_name[] = "?:"; + char *message, title[128]; + + // Get the current selected device + DWORD DeviceNum = (DWORD)ComboBox_GetItemData(hDeviceList, ComboBox_GetCurSel(hDeviceList)); + if ((DeviceNum < 0x80) || (DeviceNum == (DWORD)-1)) + return FALSE; + + // Search for any blocking processes against the physical drive + PhysicalPath = GetPhysicalName(DeviceNum); + QueryDosDeviceA(&PhysicalPath[4], DevPath, sizeof(DevPath)); + access_mask = SearchProcess(DevPath, TRUE, TRUE, TRUE); + if (access_mask != 0) { + bProceed = FALSE; + uprintf("Found potentially blocking process(es) against %s:", &PhysicalPath[4]); + for (j = 0; j < BlockingProcess.Index; j++) + uprintf(BlockingProcess.String[j]); + } + free(PhysicalPath); + + // Search for any blocking processes against the logical volume(s) + GetDriveLetters(DeviceNum, drive_letter); + for (i = 0; drive_letter[i]; i++) { + drive_name[0] = drive_letter[i]; + if (QueryDosDeviceA(drive_name, DevPath, sizeof(DevPath)) != 0) { + StrArrayClear(&BlockingProcess); + access_mask = SearchProcess(DevPath, TRUE, TRUE, TRUE); + // Ignore if all we have is read-only + if ((access_mask & 0x06) || (access_mask == 0x80)) { + bProceed = FALSE; + uprintf("Found potentially blocking process(es) against %s", drive_name); + for (j = 0; j < BlockingProcess.Index; j++) + uprintf(BlockingProcess.String[j]); + } + } + } + + // Prompt the user if we detected blocking processes + if (!bProceed) { + // We'll use a system translated string instead of one from rufus.loc + message = GetMuiString("shell32.dll", 28701); // "This drive is in use (...) Do you want to format it anyway?" + if (message != NULL) { + ComboBox_GetTextU(hDeviceList, title, sizeof(title)); + bProceed = Notification(MSG_WARNING_QUESTION, NULL, title, message); + free(message); + } + } + + return bProceed; +} + #ifdef RUFUS_TEST extern int SelectionDyn(char* title, char* message, char** szChoice, int nChoices); #endif @@ -2189,7 +2248,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA case WM_COMMAND: #ifdef RUFUS_TEST if (LOWORD(wParam) == IDC_TEST) { - SearchProcess("\\Device\\Harddisk5\\DR5", TRUE, TRUE); + uprintf("Proceed = %s", CheckDriveAccess()?"True":"False"); // char* choices[] = { "Choice 1", "Choice 2", "Choice 3" }; // SelectionDyn("Test Choice", "Unused", choices, ARRAYSIZE(choices)); break; @@ -2509,6 +2568,13 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA } } + if (!CheckDriveAccess()) { + format_op_in_progress = FALSE; + zero_drive = FALSE; + PROCESS_QUEUED_EVENTS; + break; + } + GetWindowTextU(hDeviceList, tmp, ARRAYSIZE(tmp)); if (MessageBoxExU(hMainDialog, lmprintf(MSG_003, tmp), APPLICATION_NAME, MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL) { diff --git a/src/rufus.h b/src/rufus.h index 1e97e2df..b5ed9509 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -160,6 +160,7 @@ enum notification_type { MSG_WARNING, MSG_ERROR, MSG_QUESTION, + MSG_WARNING_QUESTION }; typedef INT_PTR (CALLBACK *Callback_t)(HWND, UINT, WPARAM, LPARAM); typedef struct { @@ -493,6 +494,7 @@ extern BOOL IsBufferInDB(const unsigned char* buf, const size_t len); extern char* _printbits(size_t const size, void const * const ptr, int leading_zeroes); extern BOOL IsCurrentProcessElevated(void); extern char* GetCurrentMUI(void); +extern char* GetMuiString(char* szModuleName, UINT uID); extern BOOL SetFormatPromptHook(void); extern void ClrFormatPromptHook(void); extern BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet); diff --git a/src/rufus.rc b/src/rufus.rc index 7a25aa59..831b452d 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1126" +CAPTION "Rufus 2.16.1127" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1126,0 - PRODUCTVERSION 2,16,1126,0 + FILEVERSION 2,16,1127,0 + PRODUCTVERSION 2,16,1127,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1126" + VALUE "FileVersion", "2.16.1127" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1126" + VALUE "ProductVersion", "2.16.1127" END END BLOCK "VarFileInfo" diff --git a/src/stdfn.c b/src/stdfn.c index 9ce754d2..1874574a 100644 --- a/src/stdfn.c +++ b/src/stdfn.c @@ -909,3 +909,35 @@ char* GetCurrentMUI(void) } return mui_str; } + +char* GetMuiString(char* szModuleName, UINT uID) +{ + HMODULE hModule; + char path[MAX_PATH], *str; + wchar_t* wstr; + void* ptr; + int len; + static_sprintf(path, "%s\\%s\\%s.mui", system_dir, GetCurrentMUI(), szModuleName); + // If the file doesn't exist, fall back to en-US + if (!PathFileExistsU(path)) + static_sprintf(path, "%s\\en-US\\%s.mui", system_dir, szModuleName); + hModule = LoadLibraryExA(path, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE); + if (hModule == NULL) { + uprintf("Could not load '%s': %s", path, WindowsErrorString()); + return NULL; + } + // Calling LoadStringW with last parameter 0 returns the length of the string (without NUL terminator) + len = LoadStringW(hModule, uID, (LPWSTR)(&ptr), 0); + if (len <= 0) { + if (GetLastError() == ERROR_SUCCESS) + SetLastError(ERROR_RESOURCE_NAME_NOT_FOUND); + uprintf("Could not find string ID %d in '%s': %s", uID, path, WindowsErrorString()); + return NULL; + } + len += 1; + wstr = calloc(len, sizeof(wchar_t)); + len = LoadStringW(hModule, uID, wstr, len); + str = wchar_to_utf8(wstr); + free(wstr); + return str; +} diff --git a/src/stdlg.c b/src/stdlg.c index 310e2ef9..a96f87f4 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -823,6 +823,9 @@ BOOL Notification(int type, const notification_info* more_info, char* title, cha notification_is_question = FALSE; switch(type) { + case MSG_WARNING_QUESTION: + notification_is_question = TRUE; + // Fall through case MSG_WARNING: hMessageIcon = LoadIcon(NULL, IDI_WARNING); break; From f01043feda1f77ad638be2cabd2dace3f051a02b Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 17 Jul 2017 16:02:47 +0100 Subject: [PATCH 08/97] [misc] fix minor MinGW warnings * Also update localization to version 1.0.22 --- ChangeLog.txt | 7 +++++++ res/localization/ChangeLog.txt | 9 +++++++++ res/localization/embedded.sed | 5 +++-- res/localization/rufus.loc | 13 ++++++++++--- src/rufus.h | 8 ++++---- src/rufus.rc | 10 +++++----- 6 files changed, 38 insertions(+), 14 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 43d34e82..c4c9356f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,10 @@ +o Version 2.16 (2017.07.??) + Add an audiovisual cue on completion/error + Notify user when an ISO is broken or truncated + Notify user if other processes are accessing the drive before format + List processes that are locking a drive, if any, on failure + Improve verbosity of the Windows To Go process + o Version 2.15 (2017.05.17) Fix non-listing of drives that are opened for write access by another process Report external processes that may be preventing disk access (in the log) diff --git a/res/localization/ChangeLog.txt b/res/localization/ChangeLog.txt index fe605895..3016958f 100644 --- a/res/localization/ChangeLog.txt +++ b/res/localization/ChangeLog.txt @@ -15,6 +15,15 @@ content. PLEASE, do not just look at this Changelog when updating your translation, but always use the English section of rufus.loc as your base. For instance, MSG_114, that was introduced in v1.0.8 is MORE than one line! +o Version 1.0.22 (2017.07.17) + - *NEW* MSG_295 "Warning: Unofficial version" + - *NEW* MSG_296 "This version of Rufus was NOT produced by its official developer(s).\n\nAre you sure you want to run it?" + - *NEW* MSG_297 "Truncated ISO detected" + - *NEW* MSG_298 "The ISO file you have selected does not match its declared size: %s of data is missing!\n\nIf you obtained " + "this file from the Internet, you should try to download a new copy and verify that the MD5 or SHA checksums match the " + "official ones.\n\nNote that you can compute the MD5 or SHA in Rufus by clicking the '#' button." + Note: You can test MSG_297/MSG_298 using https://rufus.akeo.ie/testing/arch_trunc.iso (A truncated version of archlinux-2017.07.01-x86_64.iso) + o Version 1.0.21 (2017.01.16) - *NEW* MSG_288 "Missing elevated privileges" - *NEW* MSG_289 "This application can only run with elevated privileges" diff --git a/res/localization/embedded.sed b/res/localization/embedded.sed index 543ddbfa..9d621260 100644 --- a/res/localization/embedded.sed +++ b/res/localization/embedded.sed @@ -1,7 +1,8 @@ # This sed script removes everything we don't need from rufus.loc, for embedding. -# remove comments (aggressively!) -s/#.*$// +# remove comments (but not so aggressively as to drop the end of MSG_298!) +s/^#.*$// +s/[ \t]#.*$// # remove empty lines /^$/d diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index b6457cf8..9a3dc66b 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -93,7 +93,7 @@ # http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/%5BMS-LCID%5D.pdf # for the LCID (0x####) codes you should use l "en-US" "English (English)" 0x0409, 0x0809, 0x0c09, 0x1009, 0x1409, 0x1809, 0x1c09, 0x2009, 0x2409, 0x2809, 0x2c09, 0x3009, 0x3409, 0x3809, 0x3c09, 0x4009, 0x4409, 0x4809 -v 1.0.21 +v 1.0.22 # Main dialog g IDD_DIALOG @@ -558,7 +558,7 @@ t MSG_292 "Please select the version of Windows you want to install:" t MSG_293 "Unsupported Windows version" t MSG_294 "This version of Windows is no longer supported by Rufus." t MSG_295 "Warning: Unofficial version" -t MSG_296 "This version of Rufus was NOT produced by its official developer(s).\n\nAre you sure you want to run it?" +t MSG_296 "This version of Rufus was not produced by its official developer(s).\n\nAre you sure you want to run it?" t MSG_297 "Truncated ISO detected" t MSG_298 "The ISO file you have selected does not match its declared size: %s of data is missing!\n\nIf you obtained " "this file from the Internet, you should try to download a new copy and verify that the MD5 or SHA checksums match " @@ -5119,7 +5119,7 @@ t MSG_294 "Rufus ei enää tue tätä Windows-versiota." ################################################################################ l "fr-FR" "French (Français)" 0x040c, 0x080c, 0x0c0c, 0x100c, 0x140c, 0x180c, 0x1c0c, 0x200c, 0x240c, 0x280c, 0x2c0c, 0x300c, 0x340c, 0x380c, 0xe40c -v 1.0.21 +v 1.0.22 b "en-US" g IDD_DIALOG @@ -5544,6 +5544,13 @@ t MSG_291 "Sélection de version" t MSG_292 "Sélectionnez la version de Windows que vous souhaitez installer :" t MSG_293 "Version de Windows non supportée" t MSG_294 "Cette version de Windows n'est plus supportée par Rufus." +t MSG_295 "Alerte: Version non-officielle" +t MSG_296 "Cette version de Rufus n'a pas produite par ses développeurs officiels.\n\nEtes-vous sur de vouloir la lancer ?" +t MSG_297 "ISO tronquée détectée" +t MSG_298 "Le fichier ISO que vous avez sélectionné ne fait pas la bonne taille : %s de données sont manquantes !\n\n" + "Si vous avez obtenu ce fichier depuis Internet, vous devriez essayer de le télécharger à nouveau et verifier que " + "le MD5 ou SHA correspond aux valeurs officielles.\n\nNotez que vous pouvez calculer le MD5 ou SHA depuis Rufus en " + "cliquant le bouton '#'." ################################################################################ l "de-DE" "German (Deutsch)" 0x0407, 0x0807, 0x0c07, 0x1007, 0x1407 diff --git a/src/rufus.h b/src/rufus.h index b5ed9509..46acbc81 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -116,10 +116,10 @@ #ifdef RUFUS_LOGGING extern void _uprintf(const char *format, ...); #define uprintf(...) _uprintf(__VA_ARGS__) -#define vuprintf(...) if (verbose) _uprintf(__VA_ARGS__) -#define vvuprintf(...) if (verbose > 1) _uprintf(__VA_ARGS__) -#define suprintf(...) if (!bSilent) _uprintf(__VA_ARGS__) -#define uuprintf(...) if (usb_debug) _uprintf(__VA_ARGS__) +#define vuprintf(...) do { if (verbose) _uprintf(__VA_ARGS__); } while(0) +#define vvuprintf(...) do { if (verbose > 1) _uprintf(__VA_ARGS__); } while(0) +#define suprintf(...) do { if (!bSilent) _uprintf(__VA_ARGS__); } while(0) +#define uuprintf(...) do { if (usb_debug) _uprintf(__VA_ARGS__); } while(0) #define ubprintf(...) do { safe_sprintf(&ubuffer[ubuffer_pos], UBUFFER_SIZE - ubuffer_pos - 2, __VA_ARGS__); \ ubuffer_pos = strlen(ubuffer); ubuffer[ubuffer_pos++] = '\r'; ubuffer[ubuffer_pos++] = '\n'; \ ubuffer[ubuffer_pos] = 0; } while(0) diff --git a/src/rufus.rc b/src/rufus.rc index 831b452d..4c0e9471 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1127" +CAPTION "Rufus 2.16.1128" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1127,0 - PRODUCTVERSION 2,16,1127,0 + FILEVERSION 2,16,1128,0 + PRODUCTVERSION 2,16,1128,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1127" + VALUE "FileVersion", "2.16.1128" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1127" + VALUE "ProductVersion", "2.16.1128" END END BLOCK "VarFileInfo" From 6d8da601c7d055ddb9b61ea4401de0da1312fbea Mon Sep 17 00:00:00 2001 From: MaKK Date: Mon, 17 Jul 2017 17:40:17 +0100 Subject: [PATCH 09/97] [loc] update Spanish translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 9a3dc66b..3edd471b 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -15408,7 +15408,7 @@ t MSG_294 "Rufus več ne podpira tega operacijskega sistema." ################################################################################ l "es-ES" "Spanish (Español)" 0x040a, 0x080a, 0x0c0a, 0x100a, 0x140a, 0x180a, 0x1c0a, 0x200a, 0x240a, 0x280a, 0x2c0a, 0x300a, 0x340a, 0x380a, 0x3c0a, 0x400a, 0x440a, 0x480a, 0x4c0a, 0x500a, 0x540a, 0x580a -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -15883,6 +15883,12 @@ t MSG_291 "Selección de versión" t MSG_292 "Por favor seleccione la versión de Windows que desea instalar:" t MSG_293 "Versión de Windows no soportada" t MSG_294 "Esta versión de Windows ya no está soportada por Rufus." +t MSG_295 "Atención: Versión no oficial" +t MSG_296 "Esta versión de Rufus NO ha sido generada por su(s) desarrollador(es) oficial(es).\n\n¿Está seguro de que desea ejecutarlo?" +t MSG_297 "Se ha detectado una ISO truncada" +t MSG_298 "El fichero ISO seleccionado no tiene su tamaño declarado: ¡Falta un %s de los datos!\n\nSi has obtenido este fichero de Internet, " + "deberías intentar una nueva descarga y verificar que los checksum MD5 y SHA coinciden con los originales.\n\nPuedes calcular los valores " + "MD5 o SHA con Rufus, desde el botón '#'." ################################################################################ l "sv-SE" "Swedish (Svenska)" 0x041d, 0x081d diff --git a/src/rufus.rc b/src/rufus.rc index 4c0e9471..be8f92da 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1128" +CAPTION "Rufus 2.16.1129" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1128,0 - PRODUCTVERSION 2,16,1128,0 + FILEVERSION 2,16,1129,0 + PRODUCTVERSION 2,16,1129,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1128" + VALUE "FileVersion", "2.16.1129" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1128" + VALUE "ProductVersion", "2.16.1129" END END BLOCK "VarFileInfo" From bb828fda2bb38bd26ae4aff15b23699407904ed4 Mon Sep 17 00:00:00 2001 From: Roberto Boriotti Date: Mon, 17 Jul 2017 22:07:21 +0100 Subject: [PATCH 10/97] [loc] update Italian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 3edd471b..749fab9e 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -7885,7 +7885,7 @@ t MSG_287 "Deteksi selain perangkat USB yang dapat dilepas" ################################################################################ l "it-IT" "Italian (Italiano)" 0x0410, 0x0810 -v 1.0.21 +v 1.0.22 b "en-US" g IDD_DIALOG @@ -8322,6 +8322,12 @@ t MSG_291 "Selezione versione" t MSG_292 "Seleziona la versione di Windows che vuoi installare:" t MSG_293 "Versione Windows non supportata" t MSG_294 "Questa versione di Windows non è più supportata da Rufus." +t MSG_295 "Attenzione: versione non ufficiale" +t MSG_296 "Questa versione di Rufus non è stata sviluppata dai suoi sviluppatori ufficiali.\n\nSei sicuro di volerla eseguire?" +t MSG_297 "Rilevato file ISO troncato" +t MSG_298 "Il file ISO selezionato non corrisponde alla dimensione dichiarata: %s dei dati mancanti!\n\nSe hai scaricato " + "questo file da internet, prova a scaricarne una nuova copia e verifica che la checksum MD5 o SHA corrisponda alla checksum " + "ufficiale.\n\nNota che puoi calcolare in Rufus la checksum facendo clic sul pulsante '#'." ###################################################################### l "ja-JP" "Japanese (日本語)" 0x0411 diff --git a/src/rufus.rc b/src/rufus.rc index be8f92da..ff499172 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1129" +CAPTION "Rufus 2.16.1130" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1129,0 - PRODUCTVERSION 2,16,1129,0 + FILEVERSION 2,16,1130,0 + PRODUCTVERSION 2,16,1130,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1129" + VALUE "FileVersion", "2.16.1130" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1129" + VALUE "ProductVersion", "2.16.1130" END END BLOCK "VarFileInfo" From ca9cdaf14b36afaf773e78c72e74a74ee6faf611 Mon Sep 17 00:00:00 2001 From: Dinis Medeiros Date: Mon, 17 Jul 2017 22:10:29 +0100 Subject: [PATCH 11/97] [loc] update Portuguese (Standard) translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 749fab9e..96c738ea 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -12682,7 +12682,7 @@ t MSG_294 "Esta versão do Windows não é mais suportada pelo Rufos" ################################################################################ l "pt-PT" "Portuguese Standard (Português)" 0x0816 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -13148,6 +13148,12 @@ t MSG_291 "Seleção de versão" t MSG_292 "Selecione a versão do Windows que deseja instalar:" t MSG_293 "Versão de Windows não suportada" t MSG_294 "Esta versão do Windows já não é suportada por Rufus." +t MSG_295 "Aviso: versão não oficial" +t MSG_296 "Esta versão de Rufus NÃO foi desenvolvida pelo autor oficial.\n\nTem a certeza que pretende executar?" +t MSG_297 "Detetado ISO truncado" +t MSG_298 "O ficheiro ISO que selecionou não corresponde ao tamanho declarado: faltam %s de dados!\n\nSe obteve este ficheiro " + "da Internet, deve tentar baixar uma nova cópia e verificar se os checksums MD5 ou SHA correspondem aos oficiais.\n\n" + "Saiba no Rufus que pode calcular o MD5 ou SHA clicando no botão '#'." ################################################################################ l "ro-RO" "Romanian (Română)" 0x0418, 0x0818 diff --git a/src/rufus.rc b/src/rufus.rc index ff499172..4bcd8bb0 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1130" +CAPTION "Rufus 2.16.1131" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1130,0 - PRODUCTVERSION 2,16,1130,0 + FILEVERSION 2,16,1131,0 + PRODUCTVERSION 2,16,1131,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1130" + VALUE "FileVersion", "2.16.1131" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1130" + VALUE "ProductVersion", "2.16.1131" END END BLOCK "VarFileInfo" From a4cf6aea8f5a945480436c48ecc227f0505cedd1 Mon Sep 17 00:00:00 2001 From: Sopor Date: Tue, 18 Jul 2017 11:50:39 +0100 Subject: [PATCH 12/97] [loc] update Swedish translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 96c738ea..942047c3 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -15904,7 +15904,7 @@ t MSG_298 "El fichero ISO seleccionado no tiene su tamaño declarado: ¡Falta un ################################################################################ l "sv-SE" "Swedish (Svenska)" 0x041d, 0x081d -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -16375,6 +16375,12 @@ t MSG_291 "Välj version" t MSG_292 "Välj den version av Windows du vill installera:" t MSG_293 "Denna version stöds inte" t MSG_294 "Denna version av Windows stöds inte längre av Rufus." +t MSG_295 "Varning: Inofficiell version" +t MSG_296 "Denna version av Rufus producerades inte av original utvecklaren.\n\nÄr du säker på att du vill använda den?" +t MSG_297 "Ej komplett ISO-fil" +t MSG_298 "ISO-filen du har valt matchar inte den angivna storleken: %s av data saknas!\n\nOm du har hämtat den här filen från internet, " + "prova då med att ladda ned filen igen och verifiera att checksumman MD5 eller SHA stämmer överens med den officiella filen.\n\n" + "Tips: Du kan beräkna MD5 eller SHA i Rufus genom att klicka på knappen '#'." ################################################################################ l "th-TH" "Thai (ไทย)" 0x041e diff --git a/src/rufus.rc b/src/rufus.rc index 4bcd8bb0..89554f69 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1131" +CAPTION "Rufus 2.16.1132" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1131,0 - PRODUCTVERSION 2,16,1131,0 + FILEVERSION 2,16,1132,0 + PRODUCTVERSION 2,16,1132,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1131" + VALUE "FileVersion", "2.16.1132" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1131" + VALUE "ProductVersion", "2.16.1132" END END BLOCK "VarFileInfo" From b4800cd2069bc09d5a06e68c7ddf1abd8d905475 Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Tue, 18 Jul 2017 11:30:59 +0800 Subject: [PATCH 13/97] [loc] update Chinese Simplified translation to latest * Closes #982 --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 942047c3..8bb1549e 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -1980,7 +1980,7 @@ t MSG_294 "Тази версия на Windows вече не се подържа ################################################################################ l "zh-CN" "Chinese Simplified (简体中文)" 0x0804, 0x1004 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -2426,6 +2426,12 @@ t MSG_291 "版本选择" t MSG_292 "请选择你要安装的 Windows 版本:" t MSG_293 "不支持的 Windows 版本" t MSG_294 "Rufus 已不再支持此 Windows 版本。" +t MSG_295 "警告:非官方版本" +t MSG_296 "此版本的 Rufus 不是由官方开发者发布的。\n\n您确定要运行它吗?" +t MSG_297 "检测到不完整镜像" +t MSG_298 "您选择的镜像文件大小与其期望大小不符: %s 数据缺失!\n\n" + "如果此镜像文件下载自互联网,请重新下载并校验其 MD5 或 SHA 校验和。\n\n" + "您可在 Rufus 中点击 '#' 键来计算 MD5 或 SHA 校验和。" ################################################################################ l "zh-TW" "Chinese Traditional (正體中文)" 0x0404, 0x0c04, 0x1404, 0x7c04 diff --git a/src/rufus.rc b/src/rufus.rc index 89554f69..6f430aed 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1132" +CAPTION "Rufus 2.16.1133" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1132,0 - PRODUCTVERSION 2,16,1132,0 + FILEVERSION 2,16,1133,0 + PRODUCTVERSION 2,16,1133,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1132" + VALUE "FileVersion", "2.16.1133" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1132" + VALUE "ProductVersion", "2.16.1133" END END BLOCK "VarFileInfo" From b556c4dece1e0c4d50f674e5e6a1a4b3f6cb9682 Mon Sep 17 00:00:00 2001 From: Richard Kahl Date: Tue, 18 Jul 2017 12:01:21 +0100 Subject: [PATCH 14/97] [loc] update Czech translation --- res/localization/rufus.loc | 56 +++++++++++++++++++++----------------- src/rufus.rc | 10 +++---- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 8bb1549e..e86b2d40 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -3302,7 +3302,7 @@ t MSG_294 "Ova verzija Windowsa više nije podržana od strane Rufusa." ################################################################################ l "cs-CZ" "Czech (Čeština)" 0x0405 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -3313,9 +3313,9 @@ s IDC_LOG +35,0 m IDC_LOG +5,0 t IDS_DEVICE_TXT "Zařízení" -t IDS_PARTITION_TYPE_TXT "Schéma oddílu a typ cílového systému" +t IDS_PARTITION_TYPE_TXT "Oddíl a typ cílového systému" t IDS_FILESYSTEM_TXT "Souborový systém" -t IDS_CLUSTERSIZE_TXT "Velikost alokační jednotky" +t IDS_CLUSTERSIZE_TXT "Velikost clusteru" t IDS_LABEL_TXT "Nový název svazku" t IDS_FORMAT_OPTIONS_GRP "Nastavení formátování" t IDC_BADBLOCKS "Zkontrolovat chybné bloky" @@ -3375,8 +3375,8 @@ t IDCANCEL "Zavřít" # Dialog that appears when a new version is available g IDD_NEW_VERSION -t IDD_NEW_VERSION "Kontrola aktualizací - Rufus" -t IDS_NEW_VERSION_AVAIL_TXT "Je dostupná nová verze. Stáhněte si poslední verzi!" +t IDD_NEW_VERSION "Kontrola aktualizace - Rufus" +t IDS_NEW_VERSION_AVAIL_TXT "Je dostupná novější verze. Stáhněte si poslední verzi!" t IDC_WEBSITE "Kliknutím přejdete na webové stránky aplikace" t IDS_NEW_VERSION_NOTES_GRP "Poznámky k vydání" t IDS_NEW_VERSION_DOWNLOAD_GRP "Stažení" @@ -3422,9 +3422,9 @@ t MSG_028 "megabajtů" t MSG_029 "Výchozí" # The following gets appended to the file system, cluster size, etc. t MSG_030 "%s (Výchozí)" -t MSG_031 "%s schéma oddílu pro BIOS nebo %s" -t MSG_032 "%s schéma oddílu pro BIOS" -t MSG_033 "%s schéma oddílu pro UEFI" +t MSG_031 "%s schéma oddílu BIOS nebo %s" +t MSG_032 "%s schéma oddílu BIOS" +t MSG_033 "%s schéma oddílu UEFI" # Number of bad block check passes (singular for 1 pass, plural for 2 or more passes) t MSG_034 "%d pokus" t MSG_035 "%d pokusy" @@ -3437,12 +3437,12 @@ t MSG_041 "Operace byla přerušena uživatelem" t MSG_042 "Chyba" t MSG_043 "Chyba: %s" t MSG_044 "Stažení souboru" -t MSG_045 "Paměťové zařízení USB (Obecné)" +t MSG_045 "Zařízení USB (Obecné)" t MSG_046 "%s (Disk %d) [%s]" # Used when a drive is detected that contains more than one partition t MSG_047 "Více diskových oddílů" -t MSG_048 "Rufus - Vyprazdňování vyrovnávací paměti" -t MSG_049 "Rufus - Ukončování" +t MSG_048 "Rufus - Čištění vyrovnávací paměti" +t MSG_049 "Rufus - Ukončení" # Error messages t MSG_050 "Hotovo." @@ -3453,8 +3453,8 @@ t MSG_054 "Zařízení je chráněno proti zápisu." t MSG_055 "Zařízení je používáno jiným procesem. " "Ukončete prosím všechny procesy, které mohou přistupovat k zařízení." t MSG_056 "Rychlé formátování není pro toto zařízení dostupné." -t MSG_057 "Název svazku je neplatný." -t MSG_058 "Identifikátor zařízení je neplatný." +t MSG_057 "Neplatný název svazku." +t MSG_058 "Neplatný identifikátor zařízení." t MSG_059 "Zvolená velikost alokační jednotky není platná pro toto zařízení." t MSG_060 "Velikost svazku je neplatná." t MSG_061 "Vložte vyměnitelné zařízení." @@ -3463,7 +3463,7 @@ t MSG_063 "Chyba při přidělení paměti." t MSG_064 "Chyba čtení." t MSG_065 "Chyba zápisu." t MSG_066 "Instalace selhala" -t MSG_067 "Není možné otevřít zařízení. Možná je používáno jiným procesem. " +t MSG_067 "Není možné otevřít zařízení. Zřejmě je používáno jiným procesem. " "Odpojte a opět připojte zařízení a zkuste to znovu." t MSG_068 "Chyba při vytváření oddílu." t MSG_069 "Kopírování souborů na cílový disk se nezdařilo." @@ -3478,12 +3478,12 @@ t MSG_076 "Není možné opravit/instalovat soubory pro spouštění počítače t MSG_077 "Není možné přiřadit písmeno jednotky." t MSG_078 "Není možné pripojit GUID svazek." t MSG_079 "Zařízení není připraveno." -t MSG_080 "Program Rufus zjistil, že Windows stále vyprázdňuje interní vyrovnávací paměť na USB zařízení.\n\n" - "Dokončení této operace může trvat dlouho, v závislosti na rychlosti vašeho USB zařízení, " +t MSG_080 "Program Rufus zjistil, že Windows stále čistí interní vyrovnávací paměť na USB zařízení.\n\n" + "Dokončení této operace může trvat dlouho, v závislosti na rychlosti Vašeho USB zařízení, " "zvláště u velkých souborů.\n\nDoporučujeme nechat Windows dokončit akci, zabráníte tak poškození dat." "Pokud už nechcete dále čekat, můžete zařízení odpojit..." t MSG_081 "Nepodporovaný obraz" -t MSG_082 "Tento obraz není bootovací, nebo používá metodu spuštění anebo kompresi, která není podporován Rufusem ..." +t MSG_082 "Obraz není bootovací, nebo používá metodu spuštění nebo kompresi, která není podporován Rufusem ..." t MSG_083 "Nahradit %s?" t MSG_084 "Zdá se, že tento ISO obraz používá zastaralou verzi '%s'.\n" "Nabídka boot systému se proto nemusí zobrazovat správně.\n\n" @@ -3503,7 +3503,7 @@ t MSG_088 "Obraz disku je příliš velký" t MSG_089 "Obraz disku je příliš velký pro zvolený cíl." t MSG_090 "Nepodporovaný ISO obraz" t MSG_091 "Při zvolení cílového systému typu UEFI jsou podporování jen ISO obrazy spustitelné pomocí EFI. " - "Vyberte spustitelný EFI ISO obraz nebo nastavte cílový typ systému na BIOS." + "Vyberte spustitelný EFI ISO obraz nebo nastavte cílový typ systému v BIOSu." t MSG_092 "Nepodporovaný souborový systém" t MSG_093 "DŮLEŽITÉ: TOTO ZAŘÍZENÍ OBSAHUJE NĚKOLIK ODDÍLŮ!!\n\n" "Zařízení může obsahovat oddíly nebo svazky, které nejsou zobrazeny, případně nejsou ani viditelné pro Windows. " @@ -3591,16 +3591,16 @@ t MSG_162 "Odškrtnutím použijete pomalou metodu formátování" t MSG_163 "Odškrtnutím povolíte vytvoření boot USB disku" t MSG_164 "Vyberte metodu, která bude použitá k vytvoření boot zařízení" t MSG_165 "Klikněte pro výběr obrazu..." -t MSG_166 "Označením povolíte v názvu disku zobrazení mezinárodních znaků " +t MSG_166 "Povolíte v názvu disku zobrazení mezinárodních znaků " "a vytvoření ikony zařízení (vytvořením souboru autorun.inf)" t MSG_167 "Instalovat MBR, který umožní výběr při zavádění systému a zamaskování BIOS ID disku USB" t MSG_168 "Pokusit se o zamaskování boot USB jednotky (většinou 0x80) jako jiného disku.\n" "Obvykle nutné pouze pokud chcete instalovat Windows XP a máte více jak jeden disk" -t MSG_169 "Vytvořit další skrytý oddíl a pokusit se o zarovnání hranice oddílů.\n" +t MSG_169 "Vytvořit další skryté oddíly a pokusí se o zarovnání oddílů.\n" "Toto nastavení může zlepšit detekci spustitelného zařízení pro starší BIOS" -t MSG_170 "Povolí zobrazení pevných disků a USB. POUŽITÍ JEN NA VLASTNÍ RIZIKO!!!" -t MSG_171 "Klepnutím spustíte formátování.\nFormátovaním se ODSTRANÍ veškerá data na cílovém zařízení!" -t MSG_172 "Informace o licenci, aktualizaci a zásluhy" +t MSG_170 "Zobrazí pevné disky a USB. !!!POUŽITÍ NA VLASTNÍ RIZIKO!!!" +t MSG_171 "Klepnutím spustíte formátování.\nFORMÁTOVANÍM SE ODSTRANÍ VEŠKERÁ DATA NA CÍLOVÉM ZAŘÍZENÍ!" +t MSG_172 "Informace o licenci a aktualizaci" t MSG_173 "Kliknutím zvolit..." # The following will appear in the about dialog t MSG_174 "Rufus - Spolehlivý program pro formátování USB" @@ -3631,8 +3631,8 @@ t MSG_194 "Nelze stáhnout %s" # eg. "Pomocí integrované verze Grub2 soubor(s)" t MSG_195 "Pomocí integrované verze %s soubor(s)" t MSG_196 "DŮLEŽITÉ: TATO JEDNOTKA POUŽÍVÁ NESTANDARTNÍ VELIKOS SEKTORŮ!\n\n" - "Běžné disky používají 512-byte velikost sektorů tato jednotka používá %d-byte one. " - "V mnoha případech to znamená, že nebudete moci zavádět systém z této jednotky.\n" + "Běžné disky používají 512-byte velikost sektorů jednotka používá %d-byte one. " + "V mnoha případech to znamená, že nebudete moci zavádět systém z jednotky.\n" "Rufus můžete zkusit vytvořit bootovací jednotku, ale neexistuje žádná záruka, že to bude fungovat." t MSG_197 "Zjištěna Nestandartní velikost sektorů" t MSG_198 "'Přenosný Windows' lze nainstalovat pouze na GPT oddíl" @@ -3757,6 +3757,12 @@ t MSG_291 "Výběr verze" t MSG_292 "Vyberte verzi systému Windows kterou chcete nainstalovat:" t MSG_293 "Nepodporovaná verze systému Windows" t MSG_294 "Tuto verze systému Windows nepodporuje Rufus." +t MSG_295 "Upozornění: Neoficiální verze" +t MSG_296 "Tato verze Rufus, nebyl nepochází z oficiálního vývoje.\n\nJsou si jisti, že ji chcete spustit?" +t MSG_297 "Redukované ISO detekováno" +t MSG_298 "U vybraného ISO soubor neodpovídá deklarovaná velikost: %s z údajů chybí!\n\nPokud jste jej získali " + "z internetu, měli by jste stáhnout novou kopii a ověřt, zda odpovídají kontrolní součty MD5 nebo SHA. " + "oficiálně.\n\nPoznámka: Klepnutím na'#'lze vypočítat MD5 nebo SHA v Rufusu." ################################################################################ l "da-DK" "Danish (Dansk)" 0x0406 diff --git a/src/rufus.rc b/src/rufus.rc index 6f430aed..468c0986 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1133" +CAPTION "Rufus 2.16.1134" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1133,0 - PRODUCTVERSION 2,16,1133,0 + FILEVERSION 2,16,1134,0 + PRODUCTVERSION 2,16,1134,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1133" + VALUE "FileVersion", "2.16.1134" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1133" + VALUE "ProductVersion", "2.16.1134" END END BLOCK "VarFileInfo" From 172ba1e79584c38aafc7b85722e7b7d19921bb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Erik=20Drangev=C3=A5g?= Date: Tue, 18 Jul 2017 12:06:59 +0100 Subject: [PATCH 15/97] [loc] update Norwegian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index e86b2d40..97d7ffd5 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -10728,7 +10728,7 @@ t MSG_286 "Mensifarkan pemacu: %0.1f%% selesai" ################################################################################ l "nb-NO" "Norwegian (Norsk)" 0x0414 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -11207,6 +11207,12 @@ t MSG_291 "Versjons valg" t MSG_292 "Vennligst velg den versjonen av Windows du ønsker å installere:" t MSG_293 "Ikke støttet Windows versjon" t MSG_294 "Denne versjonen av Windows er ikke støttet av Rufus lengre." +t MSG_295 "Advarsel: Uoffisiell versjon" +t MSG_296 "Denne versjonen av Rufus er IKKE laget av dens offisielle utvikleren(e).\n\nEr du sikker på at du vil kjøre programmet?" +t MSG_297 "Forkortet ISO oppdaget" +t MSG_298 "ISO-filen du har valgt, stemmer ikke overens med den deklarerte størrelsen: %s av dataene mangler!\n\ nHvis du har lastet ned denne " + "filen fra internett, bør du prøve å laste ned en ny kopi, og verifisere at MD5 eller SHA kontrollsummen samsvarer med de offisielle.\n\n" + "Legg merke til at du kan beregne MD5 eller SHA i Rufus ved å klikke på '#'-knappen." ################################################################################ l "fa-IR" "Persian (فارسی)" 0x0429 diff --git a/src/rufus.rc b/src/rufus.rc index 468c0986..b5620938 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1134" +CAPTION "Rufus 2.16.1135" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1134,0 - PRODUCTVERSION 2,16,1134,0 + FILEVERSION 2,16,1135,0 + PRODUCTVERSION 2,16,1135,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1134" + VALUE "FileVersion", "2.16.1135" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1134" + VALUE "ProductVersion", "2.16.1135" END END BLOCK "VarFileInfo" From 09538a245629ff5556f4927f5fa2a0023a045d56 Mon Sep 17 00:00:00 2001 From: Aldis Tutins Date: Tue, 18 Jul 2017 12:09:56 +0100 Subject: [PATCH 16/97] [loc] update Latvian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 97d7ffd5..5d4610d7 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -9294,7 +9294,7 @@ t MSG_294 "이 Windows 버전은 Rufus에서 더 이상 지원하지 않습니 ################################################################################ l "lv-LV" "Latvian (Latviešu)" 0x0426 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -9774,6 +9774,12 @@ t MSG_291 "Versijas izvēle" t MSG_292 "Izvēlieties Windows versiju, kuru vēlaties instalēt:" t MSG_293 "Neatbalstāma Windows versija" t MSG_294 "Šo Windows versiju Rufus vairs neatbalsta." +t MSG_295 "Uzmanību: Neoficiālā programmas versija!" +t MSG_296 "Šī Rufus versija nav no oficiālā izstrādātāja.\n\nVai tiešām vēlaties to izmantot?" +t MSG_297 "Noteikts samazināts ISO" +t MSG_298 "Izvēlētais ISO fails neatbilst noteiktajam izmēram: %s datu ir kļūdaini!\n\nJa šis fails tika " + "lejuplādēts no Interneta, nepieciešams lejuplādēt no jauna un pārbaudīt MD5 vai SHA kontrolsummu " + "atbilstību.\n\nPiezīme: aprēķināt MD5 vai SHA kontrolsummu programmā Rufus var piespiežot taustiņu '#'." ################################################################################ l "lt-LT" "Lithuanian (Lietuvių)" 0x0427 diff --git a/src/rufus.rc b/src/rufus.rc index b5620938..44889921 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1135" +CAPTION "Rufus 2.16.1136" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1135,0 - PRODUCTVERSION 2,16,1135,0 + FILEVERSION 2,16,1136,0 + PRODUCTVERSION 2,16,1136,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1135" + VALUE "FileVersion", "2.16.1136" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1135" + VALUE "ProductVersion", "2.16.1136" END END BLOCK "VarFileInfo" From 90761165dec2aa5085ed7e338dc6c9babbb6365d Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Tue, 18 Jul 2017 12:12:45 +0100 Subject: [PATCH 17/97] [loc] update Polish translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 5d4610d7..3593bcab 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -11778,7 +11778,7 @@ t MSG_294 "Rufus دیگر این نسخه از ویندوز را پشتیبان ################################################################################ l "pl-PL" "Polish (Polski)" 0x0415 -v 1.0.21 +v 1.0.22 b "en-US" # my info: 6.9.2015,22:39 @@ -12259,6 +12259,12 @@ t MSG_291 "Wybór wersji" t MSG_292 "Proszę wybrać wersję Windowsa którą chcesz zainstalować:" t MSG_293 "Niewspierana wersja Windowsa" t MSG_294 "Ta wersja Windowsa nie jest już wspierana przez Rufusa." +t MSG_295 "Uwaga: Nieoficjalna wersja" +t MSG_296 "Ta wersja Rufusa nie została stworzona przez oficjalnego dewelopera(ów).\n\nCzy na pewno chcesz ją uruchomić?" +t MSG_297 "Wykryto obcięte ISO" +t MSG_298 "Rozmiar pliku ISO który wybrałeś nie zgadza się z jego deklarowanym rozmiarem: brakuje %s danych!\n\nJeżeli uzyskałeś ten plik " + "z internetu, powinieneś spróbować pobrać nową kopię oraz zweryfikować, że sumy kontrolne MD5 lub SHA zgadzają się " + "z oficjalnymi.\n\nZauważ, że możesz obliczyć sumy MD5 lub SHA w Rufusie klikając przycisk '#'." ################################################################################ l "pt-BR" "Portuguese Brazilian (Português do Brasil)" 0x0416 diff --git a/src/rufus.rc b/src/rufus.rc index 44889921..41269d42 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1136" +CAPTION "Rufus 2.16.1137" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1136,0 - PRODUCTVERSION 2,16,1136,0 + FILEVERSION 2,16,1137,0 + PRODUCTVERSION 2,16,1137,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1136" + VALUE "FileVersion", "2.16.1137" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1136" + VALUE "ProductVersion", "2.16.1137" END END BLOCK "VarFileInfo" From ae6fa7af391454570c736c276f51a78c3c7338cd Mon Sep 17 00:00:00 2001 From: Thilo Langbein Date: Tue, 18 Jul 2017 12:16:22 +0100 Subject: [PATCH 18/97] [loc] update German translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 3593bcab..4401c21c 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -5566,7 +5566,7 @@ t MSG_298 "Le fichier ISO que vous avez sélectionné ne fait pas la bonne taill ################################################################################ l "de-DE" "German (Deutsch)" 0x0407, 0x0807, 0x0c07, 0x1007, 0x1407 -v 1.0.21 +v 1.0.22 b "en-US" g IDD_DIALOG @@ -6017,6 +6017,12 @@ t MSG_291 "Versionsauswahl" t MSG_292 "Bitte wählen Sie die Version von Windows aus, die Sie installieren wollen:" t MSG_293 "Nicht unterstützte Windows-Version" t MSG_294 "Diese Version von Windows ist nicht mehr von Rufus unterstützt." +t MSG_295 "Warnung: Inoffizielle Version" +t MSG_296 "Diese Version von Rufus wurde nicht vom offiziellen Entwickler zur Verfügung gestellt.\n\nSind Sie sicher, dass Sie sie ausführen wollen?" +t MSG_297 "Unvollständiges ISO-Abbild erkannt" +t MSG_298 "Das ISO-Abbild, dass Sie gewählt haben, hat nicht die erwartete Größe. %s Daten fehlen!\n\nSollten Sie das Abbild vom " + "Internet heruntergeladen haben, sollten Sie den Download wiederholen und prüfen, ob die MD5- oder SHA-Prüfsummen übereinstimmen." + "\n\nHinweis: Mit der '#' Schaltfläche in der Statuszeile können Sie die Prüfsummen des gewählten Abbilds anzeigen." ################################################################################ l "el-GR" "Greek (Ελληνικά)" 0x0408 diff --git a/src/rufus.rc b/src/rufus.rc index 41269d42..00b0939d 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1137" +CAPTION "Rufus 2.16.1138" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1137,0 - PRODUCTVERSION 2,16,1137,0 + FILEVERSION 2,16,1138,0 + PRODUCTVERSION 2,16,1138,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1137" + VALUE "FileVersion", "2.16.1138" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1137" + VALUE "ProductVersion", "2.16.1138" END END BLOCK "VarFileInfo" From 77e40d1373c39c6eb3a851f8be57a843c64a8f47 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 18 Jul 2017 12:57:22 +0100 Subject: [PATCH 19/97] [syslinux] remove unwanted 'isolinux.tmp' on error * Also use a global 'temp_dir' variable and fix a small issue with Swedish translation --- res/localization/rufus.loc | 2 +- src/iso.c | 5 +++-- src/rufus.c | 12 +++++++----- src/rufus.h | 2 +- src/rufus.rc | 10 +++++----- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 4401c21c..b2ecef1e 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -16412,7 +16412,7 @@ t MSG_292 "Välj den version av Windows du vill installera:" t MSG_293 "Denna version stöds inte" t MSG_294 "Denna version av Windows stöds inte längre av Rufus." t MSG_295 "Varning: Inofficiell version" -t MSG_296 "Denna version av Rufus producerades inte av original utvecklaren.\n\nÄr du säker på att du vill använda den?" +t MSG_296 "Denna version av Rufus producerades inte av originalutvecklaren.\n\nÄr du säker på att du vill använda den?" t MSG_297 "Ej komplett ISO-fil" t MSG_298 "ISO-filen du har valt matchar inte den angivna storleken: %s av data saknas!\n\nOm du har hämtat den här filen från internet, " "prova då med att ladda ned filen igen och verifiera att checksumman MD5 eller SHA stämmer överens med den officiella filen.\n\n" diff --git a/src/iso.c b/src/iso.c index 7791a036..2b468c8c 100644 --- a/src/iso.c +++ b/src/iso.c @@ -82,7 +82,6 @@ static const char* grub_dirname = "/boot/grub/i386-pc"; static const char* grub_cfg = "grub.cfg"; static const char* syslinux_cfg[] = { "isolinux.cfg", "syslinux.cfg", "extlinux.conf" }; static const char* arch_cfg[] = { "archiso_sys32.cfg", "archiso_sys64.cfg" }; -static const char* isolinux_tmp = ".\\isolinux.tmp"; static const char* isolinux_bin[] = { "isolinux.bin", "boot.bin" }; static const char* pe_dirname[] = { "/i386", "/minint" }; static const char* pe_file[] = { "ntdetect.com", "setupldr.bin", "txtsetup.sif" }; @@ -789,6 +788,8 @@ out: uprintf(" Will use '%s' for Syslinux", img_report.cfg_path); // Extract all of the isolinux.bin files we found to identify their versions for (i=0; i Date: Tue, 18 Jul 2017 13:01:09 +0100 Subject: [PATCH 20/97] [loc] update Turkish translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index b2ecef1e..c9b6a6e8 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -16887,7 +16887,7 @@ t MSG_294 "เวอร์ชั่นของ Windows นี้ไม่ได ################################################################################ l "tr-TR" "Turkish (Türkçe)" 0x041F -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -17372,6 +17372,12 @@ t MSG_291 "Sürüm seçimi" t MSG_292 "Lütfen yüklemek istediğiniz Windows sürümünü seçin:" t MSG_293 "Desteklenmeyen Windows sürümü" t MSG_294 "Windows'un bu sürümü artık Rufus tarafından desteklenmiyor." +t MSG_295 "Uyarı: Resmi olmayan sürüm" +t MSG_296 "Rufus'un bu sürümü, resmi geliştirici(ler)i tarafından oluşturulmadı.\n\nÇalıştırmak istediğinize emin misiniz?" +t MSG_297 "Kırpılmış ISO algılandı" +t MSG_298 "Seçtiğiniz ISO dosyası bildirilen boyutla eşleşmiyor: Veri %s eksik!\n\nBu dosyayı İnternet'ten edindiyseniz, " + "yeni bir kopyasını indirip, MD5 veya SHA değerlerinin resmi dosyalarla eşleştiğini doğrulamanız gerekir.\n\n" + "Rufus'daki MD5 veya SHA'yı '#' işaretini tıklayarak hesaplayabileceğinizi unutmayın." ################################################################################ l "uk-UA" "Ukrainian (Українська)" 0x0422 diff --git a/src/rufus.rc b/src/rufus.rc index 9381fe59..4b75c2ae 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1139" +CAPTION "Rufus 2.16.1140" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1139,0 - PRODUCTVERSION 2,16,1139,0 + FILEVERSION 2,16,1140,0 + PRODUCTVERSION 2,16,1140,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1139" + VALUE "FileVersion", "2.16.1140" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1139" + VALUE "ProductVersion", "2.16.1140" END END BLOCK "VarFileInfo" From 476ef267d2d26496b7e5989c224da0f6e1341b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=AErlea=20Alexandru?= Date: Tue, 18 Jul 2017 15:39:29 +0100 Subject: [PATCH 21/97] [loc] update Romanian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index c9b6a6e8..77373faa 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -13193,7 +13193,7 @@ t MSG_298 "O ficheiro ISO que selecionou não corresponde ao tamanho declarado: ################################################################################ l "ro-RO" "Romanian (Română)" 0x0418, 0x0818 -v 1.0.21 +v 1.0.22 b "en-US" g IDD_DIALOG @@ -13614,6 +13614,12 @@ t MSG_291 "Selectare versiune" t MSG_292 "Selectați versiunea de Windows pentru instalare: " t MSG_293 "Versiune Windows neacceptată" t MSG_294 "Această versiune Windows nu mai este suportată de Rufus." +t MSG_295 "Atenție: versiune neoficială" +t MSG_296 "Această versiune de Rufus nu a fost produsă de dezvoltatorul oficial.\n\nSigur doriți să îl rulați?" +t MSG_297 "S-a detectat un ISO trunchiat" +t MSG_298 "Fișierul ISO pe care l-ați selectat nu se potrivește dimensiunii sale declarate: %s de date lipsesc!\n\nDacă ați obținut " + "acest fișier de pe Internet, ar trebui să încercați să descărcați o copie nouă și să verificați dacă sumele de control MD5 sau SHA se potrivesc " + "cu cele oficiale.\n\nRețineți că puteți calcula MD5 sau SHA în Rufus făcând clic pe butonul '#'." ################################################################################ l "ru-RU" "Russian (Русский)" 0x0419, 0x0819 diff --git a/src/rufus.rc b/src/rufus.rc index 4b75c2ae..bbc6eeeb 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1140" +CAPTION "Rufus 2.16.1141" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1140,0 - PRODUCTVERSION 2,16,1140,0 + FILEVERSION 2,16,1141,0 + PRODUCTVERSION 2,16,1141,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1140" + VALUE "FileVersion", "2.16.1141" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1140" + VALUE "ProductVersion", "2.16.1141" END END BLOCK "VarFileInfo" From e34f5ac528066696505c75e0ccd08f71fbb22b86 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 18 Jul 2017 17:01:40 +0100 Subject: [PATCH 22/97] [process] fix executable paths on Windows 7 or earlier --- src/process.c | 30 +++++++++++++++++++++++++++--- src/rufus.rc | 10 +++++----- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/process.c b/src/process.c index 066e8efb..32795d32 100644 --- a/src/process.c +++ b/src/process.c @@ -48,6 +48,9 @@ PF_TYPE_DECL(NTAPI, NTSTATUS, NtOpenProcessToken, (HANDLE, ACCESS_MASK, PHANDLE) PF_TYPE_DECL(NTAPI, NTSTATUS, NtAdjustPrivilegesToken, (HANDLE, BOOLEAN, PTOKEN_PRIVILEGES, ULONG, PTOKEN_PRIVILEGES, PULONG)); PF_TYPE_DECL(NTAPI, NTSTATUS, NtClose, (HANDLE)); +// This one is only available on Vista or later... +PF_TYPE_DECL(WINAPI, BOOL, QueryFullProcessImageNameW, (HANDLE, DWORD, LPWSTR, PDWORD)); + static PVOID PhHeapHandle = NULL; extern StrArray BlockingProcess; @@ -330,10 +333,12 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL WCHAR *wHandleName = NULL; HANDLE dupHandle = NULL; HANDLE processHandle = NULL; - BOOLEAN bFound = FALSE, verbose = !bQuiet; + BOOLEAN bFound = FALSE, bGotExePath, verbose = !bQuiet; ULONG access_rights = 0; BYTE access_mask = 0; + DWORD size; char exe_path[MAX_PATH] = { 0 }; + wchar_t wexe_path[MAX_PATH]; int cur_pid; PF_INIT_OR_SET_STATUS(NtQueryObject, Ntdll); @@ -491,9 +496,28 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL if (exe_path[0] == 0) vuprintf("WARNING: The following process(es) or service(s) are accessing %s:", HandleName); - if (!GetModuleFileNameExU(processHandle, 0, exe_path, MAX_PATH - 1)) + // First, we try to get the executable path using GetModuleFileNameEx + bGotExePath = (GetModuleFileNameExU(processHandle, 0, exe_path, MAX_PATH - 1) != 0); + + // The above may not work on Windows 7, so try QueryFullProcessImageName (Vista or later) + if (!bGotExePath) { + size = MAX_PATH; + PF_INIT(QueryFullProcessImageNameW, kernel32); + if ( (pfQueryFullProcessImageNameW != NULL) && + (bGotExePath = pfQueryFullProcessImageNameW(processHandle, 0, wexe_path, &size)) ) + wchar_to_utf8_no_alloc(wexe_path, exe_path, sizeof(exe_path)); + } + + // Still nothing? Try GetProcessImageFileName (but don't bother about Unicode) + // Note that GetProcessImageFileName uses '\Device\Harddisk#\Partition#' instead drive letters + if (!bGotExePath) + bGotExePath = (GetProcessImageFileNameA(processHandle, exe_path, MAX_PATH) != 0); + + // Complete failure => Just craft a default process name that includes the PID + if (!bGotExePath) { safe_sprintf(exe_path, MAX_PATH, "Unknown_Process_%" PRIu64, - (ULONGLONG) handleInfo->UniqueProcessId); + (ULONGLONG)handleInfo->UniqueProcessId); + } } out: diff --git a/src/rufus.rc b/src/rufus.rc index bbc6eeeb..f0a85c20 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1141" +CAPTION "Rufus 2.16.1142" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1141,0 - PRODUCTVERSION 2,16,1141,0 + FILEVERSION 2,16,1142,0 + PRODUCTVERSION 2,16,1142,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1141" + VALUE "FileVersion", "2.16.1142" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1141" + VALUE "ProductVersion", "2.16.1142" END END BLOCK "VarFileInfo" From 0137de5c3a6932e05063d9f9555c603f38445685 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 19 Jul 2017 17:11:16 +0800 Subject: [PATCH 23/97] [loc] update Chinese Traditional translation to latest * Closes #985 --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 77373faa..991eec6a 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -2435,7 +2435,7 @@ t MSG_298 "您选择的镜像文件大小与其期望大小不符: %s 数据 ################################################################################ l "zh-TW" "Chinese Traditional (正體中文)" 0x0404, 0x0c04, 0x1404, 0x7c04 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -2854,6 +2854,12 @@ t MSG_291 "版本選擇" t MSG_292 "請選擇你要安裝的 Windows 版本:" t MSG_293 "不支援的 Windows 版本" t MSG_294 "Rufus 已不再支援此 Windows 版本。" +t MSG_295 "警告: 非官方版本" +t MSG_296 "此 Rufus 版本不是由官方開發者發布的。\n\n你確定要執行嗎?" +t MSG_297 "偵測到 ISO 映像檔不完整" +t MSG_298 "你選擇的 ISO 映像檔不符合它所宣告的大小: 缺少 %s !\n\n" + "如果此檔案是從網路上下載的,請嘗試再次下載並且校驗 MD5 或 SHA 總和檢查碼是正確的。\n\n" + "提示: 可點選狀態列 '#' 按鈕來計算 MD5 或 SHA 總和檢查碼。" ################################################################################ l "hr-HR" "Croatian (Hrvatski)" 0x041a, 0x081a, 0x101a diff --git a/src/rufus.rc b/src/rufus.rc index f0a85c20..c9585df2 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1142" +CAPTION "Rufus 2.16.1143" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1142,0 - PRODUCTVERSION 2,16,1142,0 + FILEVERSION 2,16,1143,0 + PRODUCTVERSION 2,16,1143,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1142" + VALUE "FileVersion", "2.16.1143" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1142" + VALUE "ProductVersion", "2.16.1143" END END BLOCK "VarFileInfo" From 9f8f5517febf826e1925fbbae0e1368fd1031d5e Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 19 Jul 2017 13:50:35 +0100 Subject: [PATCH 24/97] [loc] update Vietnamese translation to latest --- res/localization/rufus.loc | 7 ++++++- src/rufus.rc | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 991eec6a..16e1e591 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -17857,7 +17857,7 @@ t MSG_294 "Ця версія Windows більше не підтримуєтьс ################################################################################ l "vi-VN" "Vietnamese (Tiếng Việt)" 0x042A -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -18319,3 +18319,8 @@ t MSG_291 "Chọn phiên bản" t MSG_292 "Hãy chọn phiên bản Windows bạn muốn cài đặt:" t MSG_293 "Phiên bản Windows không được hỗ trợ" t MSG_294 "Phiên bản này của Windows không còn được Rufus hỗ trợ nữa." +t MSG_295 "Cảnh báo: Phiên bản không chính thức" +t MSG_296 "Phiên bản Rufus này KHÔNG PHẢI do chính tác giả tạo ra.\n\nBạn chắc muốn tiếp tục chạy chứ?" +t MSG_297 "Đã phát hiện ISO bị cắt xén" +t MSG_298 "Tập tin ISO bạn đã chọn không trùng khớp kích cỡ của nó: thiếu mất %s dữ liệu!\n\nnếu bạn tải tập tin này từ Internet, bạn nên tải lại một bản sao " + "mới và xác nhận rằng mã MD5 hoặc SHA trùng khớp với bản chính thức.\n\nHãy nhớ rằng bạn có thể tính mã MD5 hoặc SHA trong Rufus bằng cách chọn nút '#'." diff --git a/src/rufus.rc b/src/rufus.rc index c9585df2..9d35986f 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1143" +CAPTION "Rufus 2.16.1144" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1143,0 - PRODUCTVERSION 2,16,1143,0 + FILEVERSION 2,16,1144,0 + PRODUCTVERSION 2,16,1144,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1143" + VALUE "FileVersion", "2.16.1144" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1143" + VALUE "ProductVersion", "2.16.1144" END END BLOCK "VarFileInfo" From 5c3437f6de95b15c919d70d158d22ac21a73bbad Mon Sep 17 00:00:00 2001 From: Sippapas Wangsri Date: Wed, 19 Jul 2017 16:54:58 +0100 Subject: [PATCH 25/97] [loc] update Thai translation to latest --- res/localization/rufus.loc | 10 ++++++++-- src/rufus.rc | 10 +++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 16e1e591..ae7637de 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -16432,7 +16432,7 @@ t MSG_298 "ISO-filen du har valt matchar inte den angivna storleken: %s av data ################################################################################ l "th-TH" "Thai (ไทย)" 0x041e -v 1.0.21 +v 1.0.22 # Main dialog g IDD_DIALOG @@ -16785,7 +16785,7 @@ t MSG_207 "New Volume" # Same message, once for singular and plural ("1 device found", "2 devices found") t MSG_208 "พบ %d อุปกรณ์" t MSG_209 "พบ %d อุปกรณ์" -t MSG_210 "พร้อมทำงาน :)" +t MSG_210 "พร้อมทำงาน" t MSG_211 "ยกเลิกแล้ว" t MSG_212 "เกิดข้อผิดพลาด!" # Used when a new update has been downloaded and launched @@ -16896,6 +16896,12 @@ t MSG_291 "การเลือกเวอร์ชั่น" t MSG_292 "กรุณาเลือกเวอร์ชั่นของ Windows ที่ต้องการลง:" t MSG_293 "เวอร์ชั่นของ Windows ไม่รองรับ" t MSG_294 "เวอร์ชั่นของ Windows นี้ไม่ได้รับการสนับสนุนโดย Rufus อีกต่อไป" +t MSG_295 "คำเตือน: เวอร์ชั่นที่ไม่เป็นทางการ" +t MSG_296 "Rufus เวอร์ชั่นนี้ ไม่ได้ถูกพัฒนาขึ้นโดยผู้พัฒนาหลัก\n\nคุณต้องการเริ่มโปรแกรมหรือไม่?" +t MSG_297 "พบอิมเมจ ISO ที่ถูกตัดทอน" +t MSG_298 "อิมเมจ ISO ที่คุณเลือกมีคุณสมบัติไม่ตรงกับที่ได้แจ้งไว้ ดังนี้ ขนาดไฟล์: %s ได้หายไปจากต้นฉบับ!\n\nหากคุณดาวน์โหลดไฟล์นี้มาจาก" + "อินเทอร์เน็ต กรุณาดาวน์โหลดไฟล์อีกครั้ง และตรวจสอบว่าไฟล์นั้นมี MD5 หรือ SHA checksums ตรงกับไฟล์จากผู้ผลิต\n\nโปรดจำไว้ว่า" + "คุณสามารถตรวจสอบ checksum ของไฟล์ดังกล่าวได้จากโปรแกรม Rufus โดยกดปุ่ม '#'" ################################################################################ l "tr-TR" "Turkish (Türkçe)" 0x041F diff --git a/src/rufus.rc b/src/rufus.rc index 9d35986f..e788ef9e 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1144" +CAPTION "Rufus 2.16.1145" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1144,0 - PRODUCTVERSION 2,16,1144,0 + FILEVERSION 2,16,1145,0 + PRODUCTVERSION 2,16,1145,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1144" + VALUE "FileVersion", "2.16.1145" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1144" + VALUE "ProductVersion", "2.16.1145" END END BLOCK "VarFileInfo" From 4617ba786d51dae3fa6364c9d1ff359f06d41097 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 20 Jul 2017 17:42:53 +0100 Subject: [PATCH 26/97] [process] add a timeout for the process search * The process search appears to be blocking on some platform, and we also don't want users to have to wait too long on format startup * Also update the update check for Windows XP SSL errors --- src/drive.c | 4 +-- src/net.c | 6 +++- src/process.c | 81 ++++++++++++++++++++++++++++++++++++--------------- src/rufus.c | 4 +-- src/rufus.h | 2 +- src/rufus.rc | 10 +++---- 6 files changed, 72 insertions(+), 35 deletions(-) diff --git a/src/drive.c b/src/drive.c index 3fd7b0c6..6620b194 100644 --- a/src/drive.c +++ b/src/drive.c @@ -153,7 +153,7 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr bWriteShare = TRUE; // Try to report the process that is locking the drive // We also use bit 6 as a flag to indicate that SearchProcess was called. - access_mask = SearchProcess(DevPath, TRUE, TRUE, FALSE) | 0x40; + access_mask = SearchProcess(DevPath, 5000, TRUE, TRUE, FALSE) | 0x40; } Sleep(DRIVE_ACCESS_TIMEOUT / DRIVE_ACCESS_RETRIES); } @@ -184,7 +184,7 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr uprintf("Could not lock access to %s: %s", Path, WindowsErrorString()); // See if we can report the processes are accessing the drive if (!IS_ERROR(FormatStatus) && (access_mask == 0)) - access_mask = SearchProcess(DevPath, TRUE, TRUE, FALSE); + access_mask = SearchProcess(DevPath, 5000, TRUE, TRUE, FALSE); // Try to continue if the only access rights we saw were for read-only if ((access_mask & 0x07) != 0x01) safe_closehandle(hDrive); diff --git a/src/net.c b/src/net.c index 57a13ff5..418814ba 100644 --- a/src/net.c +++ b/src/net.c @@ -175,6 +175,8 @@ const char* WinInetErrorString(void) return "The header could not be added because it already exists."; case ERROR_HTTP_REDIRECT_FAILED: return "The redirection failed because either the scheme changed or all attempts made to redirect failed."; + case ERROR_INTERNET_SECURITY_CHANNEL_ERROR: + return "This system's SSL library is too old to be able to access this website."; case ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED: return "Client Authentication certificate needed"; case ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT: @@ -512,8 +514,10 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param) 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|INTERNET_FLAG_HYPERLINK| ((UrlParts.nScheme == INTERNET_SCHEME_HTTPS)?INTERNET_FLAG_SECURE:0), (DWORD_PTR)NULL); - if ((hRequest == NULL) || (!HttpSendRequestA(hRequest, NULL, 0, NULL, 0))) + if ((hRequest == NULL) || (!HttpSendRequestA(hRequest, NULL, 0, NULL, 0))) { + uprintf("Unable to send request: %s", WinInetErrorString()); goto out; + } // Ensure that we get a text file dwSize = sizeof(dwStatus); diff --git a/src/process.c b/src/process.c index 32795d32..a20dc191 100644 --- a/src/process.c +++ b/src/process.c @@ -52,6 +52,9 @@ PF_TYPE_DECL(NTAPI, NTSTATUS, NtClose, (HANDLE)); PF_TYPE_DECL(WINAPI, BOOL, QueryFullProcessImageNameW, (HANDLE, DWORD, LPWSTR, PDWORD)); static PVOID PhHeapHandle = NULL; +static char* _HandleName; +static BOOL _bPartialMatch, _bIgnoreSelf, _bQuiet; +static BYTE access_mask; extern StrArray BlockingProcess; /* @@ -307,18 +310,8 @@ NTSTATUS PhQueryProcessesUsingVolumeOrFile(HANDLE VolumeOrFileHandle, return status; } -/** - * Search all the processes and list the ones that have a specific handle open. - * - * \param HandleName The name of the handle to look for. - * \param bPartialMatch Whether partial matches should be allowed. - * \param bIgnoreSelf Whether the current process should be listed. - * \param bQuiet Prints minimal output. - * - * \return a byte containing the cummulated access rights (f----xwr) from all the handles found - * with bit 7 ('f') also set if at least one process was found. - */ -BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet) + +static DWORD WINAPI SearchProcessThread(LPVOID param) { const char *access_rights_str[8] = { "n", "r", "w", "rw", "x", "rx", "wx", "rwx" }; char tmp[MAX_PATH]; @@ -333,9 +326,8 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL WCHAR *wHandleName = NULL; HANDLE dupHandle = NULL; HANDLE processHandle = NULL; - BOOLEAN bFound = FALSE, bGotExePath, verbose = !bQuiet; + BOOLEAN bFound = FALSE, bGotExePath, verbose = !_bQuiet; ULONG access_rights = 0; - BYTE access_mask = 0; DWORD size; char exe_path[MAX_PATH] = { 0 }; wchar_t wexe_path[MAX_PATH]; @@ -361,7 +353,7 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL pid[0] = (ULONG_PTR)0; cur_pid = 1; - wHandleName = utf8_to_wchar(HandleName); + wHandleName = utf8_to_wchar(_HandleName); wHandleNameLen = (USHORT)wcslen(wHandleName); bufferSize = 0x200; @@ -435,7 +427,7 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL // Now duplicate this handle onto our own process, so that we can access its properties if (processHandle == NtCurrentProcess()) { - if (bIgnoreSelf) + if (_bIgnoreSelf) continue; dupHandle = (HANDLE)handleInfo->HandleValue; } else { @@ -471,11 +463,11 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL } // Don't bother comparing if we are looking for full match and the length is different - if ((!bPartialMatch) && (wHandleNameLen != buffer->Name.Length)) + if ((!_bPartialMatch) && (wHandleNameLen != buffer->Name.Length)) continue; // Likewise, if we are looking for a partial match and the current length is smaller - if ((bPartialMatch) && (wHandleNameLen > buffer->Name.Length)) + if ((_bPartialMatch) && (wHandleNameLen > buffer->Name.Length)) continue; // Match against our target string @@ -494,7 +486,7 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL // If this is the very first process we find, print a header if (exe_path[0] == 0) - vuprintf("WARNING: The following process(es) or service(s) are accessing %s:", HandleName); + vuprintf("WARNING: The following process(es) or service(s) are accessing %s:", _HandleName); // First, we try to get the executable path using GetModuleFileNameEx bGotExePath = (GetModuleFileNameExU(processHandle, 0, exe_path, MAX_PATH - 1) != 0); @@ -508,10 +500,12 @@ BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL wchar_to_utf8_no_alloc(wexe_path, exe_path, sizeof(exe_path)); } - // Still nothing? Try GetProcessImageFileName (but don't bother about Unicode) - // Note that GetProcessImageFileName uses '\Device\Harddisk#\Partition#' instead drive letters - if (!bGotExePath) - bGotExePath = (GetProcessImageFileNameA(processHandle, exe_path, MAX_PATH) != 0); + // Still nothing? Try GetProcessImageFileName. Note that GetProcessImageFileName uses + // '\Device\Harddisk#\Partition#\' instead drive letters + if (!bGotExePath) { + if (bGotExePath = (GetProcessImageFileNameW(processHandle, wexe_path, MAX_PATH) != 0)) + wchar_to_utf8_no_alloc(wexe_path, exe_path, sizeof(exe_path)); + } // Complete failure => Just craft a default process name that includes the PID if (!bGotExePath) { @@ -524,12 +518,51 @@ out: if (exe_path[0] != 0) vuprintf("You should close these applications before attempting to reformat the drive."); else - vuprintf("NOTE: Could not identify the process(es) or service(s) accessing %s", HandleName); + vuprintf("NOTE: Could not identify the process(es) or service(s) accessing %s", _HandleName); free(wHandleName); PhFree(buffer); PhFree(handles); PhDestroyHeap(); + ExitThread((DWORD)access_mask); +} + +/** + * Search all the processes and list the ones that have a specific handle open. + * + * \param HandleName The name of the handle to look for. + * \param dwTimeOut The maximum amounf of time (ms) that may be spent searching + * \param bPartialMatch Whether partial matches should be allowed. + * \param bIgnoreSelf Whether the current process should be listed. + * \param bQuiet Prints minimal output. + * + * \return a byte containing the cummulated access rights (f----xwr) from all the handles found + * with bit 7 ('f') also set if at least one process was found. + */ +BYTE SearchProcess(char* HandleName, DWORD dwTimeOut, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet) +{ + HANDLE handle; + DWORD dw = 0; + + _HandleName = HandleName; + _bPartialMatch = bPartialMatch; + _bIgnoreSelf = bIgnoreSelf; + _bQuiet = bQuiet; + access_mask = 0; + + handle = CreateThread(NULL, 0, SearchProcessThread, NULL, 0, NULL); + if (handle == NULL) { + uprintf("Unable to create process search thread"); + return 0x00; + } + dw = WaitForSingleObject(handle, dwTimeOut); + if (dw == WAIT_TIMEOUT) { + // Timeout - kill the thread + TerminateThread(handle, 0); + uprintf("Warning: Killed process search thread"); + } else if (dw != WAIT_OBJECT_0) { + uprintf("Failed to wait for process search thread: %s", WindowsErrorString()); + } return access_mask; } diff --git a/src/rufus.c b/src/rufus.c index 562a76db..6dbff4de 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2172,7 +2172,7 @@ static BOOL CheckDriveAccess(void) // Search for any blocking processes against the physical drive PhysicalPath = GetPhysicalName(DeviceNum); QueryDosDeviceA(&PhysicalPath[4], DevPath, sizeof(DevPath)); - access_mask = SearchProcess(DevPath, TRUE, TRUE, TRUE); + access_mask = SearchProcess(DevPath, 2000, TRUE, TRUE, TRUE); if (access_mask != 0) { bProceed = FALSE; uprintf("Found potentially blocking process(es) against %s:", &PhysicalPath[4]); @@ -2187,7 +2187,7 @@ static BOOL CheckDriveAccess(void) drive_name[0] = drive_letter[i]; if (QueryDosDeviceA(drive_name, DevPath, sizeof(DevPath)) != 0) { StrArrayClear(&BlockingProcess); - access_mask = SearchProcess(DevPath, TRUE, TRUE, TRUE); + access_mask = SearchProcess(DevPath, 2000, TRUE, TRUE, TRUE); // Ignore if all we have is read-only if ((access_mask & 0x06) || (access_mask == 0x80)) { bProceed = FALSE; diff --git a/src/rufus.h b/src/rufus.h index af7465b9..64873f1d 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -497,7 +497,7 @@ extern char* GetCurrentMUI(void); extern char* GetMuiString(char* szModuleName, UINT uID); extern BOOL SetFormatPromptHook(void); extern void ClrFormatPromptHook(void); -extern BYTE SearchProcess(char* HandleName, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet); +extern BYTE SearchProcess(char* HandleName, DWORD dwTimeout, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet); extern BOOL EnablePrivileges(void); extern void FlashTaskbar(HANDLE handle); diff --git a/src/rufus.rc b/src/rufus.rc index e788ef9e..de9f0b13 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1145" +CAPTION "Rufus 2.16.1146" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1145,0 - PRODUCTVERSION 2,16,1145,0 + FILEVERSION 2,16,1146,0 + PRODUCTVERSION 2,16,1146,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1145" + VALUE "FileVersion", "2.16.1146" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1145" + VALUE "ProductVersion", "2.16.1146" END END BLOCK "VarFileInfo" From f1aeb632672022ddc470d22c80049121a921e4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvin=20M=C9=99likov?= Date: Thu, 20 Jul 2017 17:49:20 +0100 Subject: [PATCH 27/97] [loc] update Azerbaijani translation to latest --- res/localization/rufus.loc | 7 ++++++- src/rufus.rc | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index ae7637de..228c9cbb 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -1003,7 +1003,7 @@ t MSG_281 "(فضلا اختر صورة)" ################################################################################ l "az-AZ" "Azerbaijani (Azərbaycanca)" 0x042c, 0x782c -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -1488,6 +1488,11 @@ t MSG_291 "Versiyanı seçin" t MSG_292 "Xahiş edirik yükləmək istədiyiniz Windows versiyasını seçin:" t MSG_293 "Dəstəklənməyən bir Windows versiyası" t MSG_294 "Bu versiya artıq Rufus tərəfindən dəstəklənir." +t MSG_295 "Xəbərdarlıq: Rəsmi olamyan versiya" +t MSG_296 "Bu versiya Rufus tərəfindən təqdim olunmayıb yaradan(lar).\n\nİstifadə etməyinizdən əminsiniz?" +t MSG_297 "Uyğun olmayan ISO aşkarlandı" +t MSG_298 "Seçdiyiniz ISO faylı uyğun deyil ölçü: %s məlumat çatmadı!\n\nBu faylı seçin Siz sürətli yükləmək üçün, İnterneti yoxlamalısınız " + "MD5 və SHA nəzarət cəmləri uyğundur.\n\nBacaracağınıza diqqətinizi yönəldin '#' buttona vuraraq Rufus MD5 or SHA-nı hesablayın." ###################################################################### l "bg-BG" "Bulgarian (Български)" 0x0402 diff --git a/src/rufus.rc b/src/rufus.rc index de9f0b13..74169138 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1146" +CAPTION "Rufus 2.16.1147" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1146,0 - PRODUCTVERSION 2,16,1146,0 + FILEVERSION 2,16,1147,0 + PRODUCTVERSION 2,16,1147,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1146" + VALUE "FileVersion", "2.16.1147" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1146" + VALUE "ProductVersion", "2.16.1147" END END BLOCK "VarFileInfo" From 39e418fbe96926cac7392e066b7bd0a2a3dd3181 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 21 Jul 2017 13:11:44 +0100 Subject: [PATCH 28/97] [iso] add work around for ISOs that use nonstandard Rock Ridge extensions * Looking at you Kali Linux! * Also silence the annoying 'from_733: broken byte order' warning --- src/libcdio/cdio/bytesex.h | 5 +++-- src/libcdio/iso9660/rock.c | 4 +++- src/rufus.rc | 10 +++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/libcdio/cdio/bytesex.h b/src/libcdio/cdio/bytesex.h index 0ec92463..c124d0f0 100644 --- a/src/libcdio/cdio/bytesex.h +++ b/src/libcdio/cdio/bytesex.h @@ -200,8 +200,9 @@ to_733(uint32_t i) static CDIO_INLINE uint32_t from_733 (uint64_t p) { - if (uint64_swap_le_be (p) != p) - cdio_warn ("from_733: broken byte order"); +// Commented out for Rufus +// if (uint64_swap_le_be (p) != p) +// cdio_warn ("from_733: broken byte order"); return (UINT32_C(0xFFFFFFFF) & p); } diff --git a/src/libcdio/iso9660/rock.c b/src/libcdio/iso9660/rock.c index 00a22e89..39ae5696 100644 --- a/src/libcdio/iso9660/rock.c +++ b/src/libcdio/iso9660/rock.c @@ -182,9 +182,11 @@ get_rock_ridge_filename(iso9660_dir_t * p_iso9660_dir, case SIG('P','L'): case SIG('T','F'): case SIG('Z','F'): + case SIG('A','L'): // Kali Linux *NONSTANDARD* extension break; default: - /* Something got screwed up here */ + /* Warn about other nonstandard Rock Ridge extensions */ + cdio_warn("Invalid Rock Ridge extension detected: '%c%c'\n", *chr, *(chr+1)); goto out; } diff --git a/src/rufus.rc b/src/rufus.rc index 74169138..a1f88753 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1147" +CAPTION "Rufus 2.16.1148" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1147,0 - PRODUCTVERSION 2,16,1147,0 + FILEVERSION 2,16,1148,0 + PRODUCTVERSION 2,16,1148,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1147" + VALUE "FileVersion", "2.16.1148" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1147" + VALUE "ProductVersion", "2.16.1148" END END BLOCK "VarFileInfo" From d5babb5e7240f0a5188a953c28bef48e44e8a1b4 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 22 Jul 2017 15:17:24 +0100 Subject: [PATCH 29/97] [ui] disable controls prior to format checks * Also send Unicode strings to the debug output facility, since Windows 10 *FINALLY* added Unicode processing support there... --- src/rufus.c | 71 ++++++++++++++++++++-------------------------------- src/rufus.rc | 10 ++++---- src/stdio.c | 9 +++++-- 3 files changed, 39 insertions(+), 51 deletions(-) diff --git a/src/rufus.c b/src/rufus.c index 6dbff4de..421e6d31 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2515,6 +2515,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA if (format_thid != NULL) { return (INT_PTR)TRUE; } + // Disable all controls except Cancel + EnableControls(FALSE); FormatStatus = 0; StrArrayClear(&BlockingProcess); format_op_in_progress = TRUE; @@ -2528,11 +2530,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA nDeviceIndex = ComboBox_GetCurSel(hDeviceList); if (nDeviceIndex != CB_ERR) { if (!zero_drive) { - if ((IsChecked(IDC_BOOT)) && (!BootCheck())) { - format_op_in_progress = FALSE; - PROCESS_QUEUED_EVENTS; - break; - } + if ((IsChecked(IDC_BOOT)) && (!BootCheck())) + goto aborted_start; // Display a warning about UDF formatting times fs = (int)ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem)); @@ -2558,9 +2557,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA i = SelectionDialog(lmprintf(MSG_274), lmprintf(MSG_275, iso_image, dd_image, iso_image, dd_image), choices, 2); if (i < 0) { // Cancel - format_op_in_progress = FALSE; - PROCESS_QUEUED_EVENTS; - break; + goto aborted_start; } else if (i == 2) { selection_default = BT_IMG; SetComboEntry(hBootType, selection_default); @@ -2568,38 +2565,21 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA } } - if (!CheckDriveAccess()) { - format_op_in_progress = FALSE; - zero_drive = FALSE; - PROCESS_QUEUED_EVENTS; - break; - } + if (!CheckDriveAccess()) + goto aborted_start; GetWindowTextU(hDeviceList, tmp, ARRAYSIZE(tmp)); if (MessageBoxExU(hMainDialog, lmprintf(MSG_003, tmp), - APPLICATION_NAME, MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL) { - format_op_in_progress = FALSE; - zero_drive = FALSE; - PROCESS_QUEUED_EVENTS; - break; - } + APPLICATION_NAME, MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL) + goto aborted_start; if ((SelectedDrive.nPartitions > 1) && (MessageBoxExU(hMainDialog, lmprintf(MSG_093), - lmprintf(MSG_094), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL)) { - format_op_in_progress = FALSE; - zero_drive = FALSE; - PROCESS_QUEUED_EVENTS; - break; - } + lmprintf(MSG_094), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL)) + goto aborted_start; if ((!zero_drive) && (IsChecked(IDC_BOOT)) && (SelectedDrive.SectorSize != 512) && (MessageBoxExU(hMainDialog, lmprintf(MSG_196, SelectedDrive.SectorSize), - lmprintf(MSG_197), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL)) { - format_op_in_progress = FALSE; - PROCESS_QUEUED_EVENTS; - break; - } + lmprintf(MSG_197), MB_OKCANCEL|MB_ICONWARNING|MB_IS_RTL, selected_langid) == IDCANCEL)) + goto aborted_start; - // Disable all controls except Cancel - EnableControls(FALSE); DeviceNum = (DWORD)ComboBox_GetItemData(hDeviceList, nDeviceIndex); InitProgress(zero_drive); format_thid = CreateThread(NULL, 0, FormatThread, (LPVOID)(uintptr_t)DeviceNum, 0, NULL); @@ -2607,19 +2587,22 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA uprintf("Unable to start formatting thread"); FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_CANT_START_THREAD); PostMessage(hMainDialog, UM_FORMAT_COMPLETED, (WPARAM)FALSE, 0); + } else { + uprintf("\r\nFormat operation started"); + PrintInfo(0, -1); + timer = 0; + safe_sprintf(szTimer, sizeof(szTimer), "00:00:00"); + SendMessageA(hStatus, SB_SETTEXTA, SBT_OWNERDRAW | SB_SECTION_RIGHT, (LPARAM)szTimer); + SetTimer(hMainDialog, TID_APP_TIMER, 1000, ClockTimer); } - uprintf("\r\nFormat operation started"); - PrintInfo(0, -1); - timer = 0; - safe_sprintf(szTimer, sizeof(szTimer), "00:00:00"); - SendMessageA(hStatus, SB_SETTEXTA, SBT_OWNERDRAW | SB_SECTION_RIGHT, (LPARAM)szTimer); - SetTimer(hMainDialog, TID_APP_TIMER, 1000, ClockTimer); - } - if (format_thid == NULL) { - format_op_in_progress = FALSE; - zero_drive = FALSE; - PROCESS_QUEUED_EVENTS; } + if (format_thid != NULL) + break; + aborted_start: + format_op_in_progress = FALSE; + EnableControls(TRUE); + zero_drive = FALSE; + PROCESS_QUEUED_EVENTS; break; case IDC_HASH: if ((format_thid == NULL) && (image_path != NULL)) { diff --git a/src/rufus.rc b/src/rufus.rc index a1f88753..ca95207d 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1148" +CAPTION "Rufus 2.16.1149" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1148,0 - PRODUCTVERSION 2,16,1148,0 + FILEVERSION 2,16,1149,0 + PRODUCTVERSION 2,16,1149,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1148" + VALUE "FileVersion", "2.16.1149" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1148" + VALUE "ProductVersion", "2.16.1149" END END BLOCK "VarFileInfo" diff --git a/src/stdio.c b/src/stdio.c index 8b900edf..629f26f4 100644 --- a/src/stdio.c +++ b/src/stdio.c @@ -42,10 +42,12 @@ size_t ubuffer_pos = 0; char ubuffer[UBUFFER_SIZE]; // Buffer for ubpushf() messages we don't log right away #ifdef RUFUS_LOGGING +#define Edit_ReplaceSelW(hCtrl, wstr) ((void)SendMessageW(hCtrl, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)wstr)) void _uprintf(const char *format, ...) { static char buf[4096]; char* p = buf; + wchar_t* wbuf; va_list args; int n; @@ -62,16 +64,19 @@ void _uprintf(const char *format, ...) *p++ = '\n'; *p = '\0'; + // Yay, Windows 10 *FINALLY* added actual Unicode support for OutputDebugStringW()! + wbuf = utf8_to_wchar(buf); // Send output to Windows debug facility - OutputDebugStringA(buf); + OutputDebugStringW(wbuf); if ((hLog != NULL) && (hLog != INVALID_HANDLE_VALUE)) { // Send output to our log Window Edit_SetSel(hLog, MAX_LOG_SIZE, MAX_LOG_SIZE); - Edit_ReplaceSelU(hLog, buf); + Edit_ReplaceSelW(hLog, wbuf); // Make sure the message scrolls into view // (Or see code commented in LogProc:WM_SHOWWINDOW for a less forceful scroll) SendMessage(hLog, EM_LINESCROLL, 0, SendMessage(hLog, EM_GETLINECOUNT, 0, 0)); } + free(wbuf); } #endif From 5e609f022fdf2b4003d654c17d137b60daebd0ba Mon Sep 17 00:00:00 2001 From: Riku Brander Date: Sat, 22 Jul 2017 19:12:11 +0100 Subject: [PATCH 30/97] [loc] update Finnish translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 228c9cbb..ee0d2a01 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -4684,7 +4684,7 @@ t MSG_294 "Deze Windows versie wordt niet langer ondersteund door Rufus." ################################################################################ l "fi-FI" "Finnish (Suomi)" 0x040B -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -5139,6 +5139,12 @@ t MSG_291 "Version valinta" t MSG_292 "Valitse Windows-versio, jonka haluat asentaa:" t MSG_293 "Tätä Windows-versiota ei tueta" t MSG_294 "Rufus ei enää tue tätä Windows-versiota." +t MSG_295 "Varoitus: Epävirallinen versio" +t MSG_296 "Tämä versio ei ole Rufuksen virallisen kehittäjän tekemä.\n\nHaluatko varmasti suorittaa ohjelman?" +t MSG_297 "Vajaakokoinen ISO-levykuva havaittu" +t MSG_298 "Valitsemasi ISO-levykuva ei vastaa sen ilmoittamaa tiedostokokoa: %s ohjelmatiedosta puuttuu!\n\nJos latasit " + "tämän tiedoston internetistä, yritä ladata tiedosto uudelleen ja varmista, että MD5- tai SHA-tarkistussumma täsmää " + "alkuperäisen summan kanssa.\n\nVoit laskea MD5- tai SHA-tarkistussumman Rufuksessa painamalla '#'-painiketta." ################################################################################ l "fr-FR" "French (Français)" 0x040c, 0x080c, 0x0c0c, 0x100c, 0x140c, 0x180c, 0x1c0c, 0x200c, 0x240c, 0x280c, 0x2c0c, 0x300c, 0x340c, 0x380c, 0xe40c diff --git a/src/rufus.rc b/src/rufus.rc index ca95207d..b6df942d 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1149" +CAPTION "Rufus 2.16.1150" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1149,0 - PRODUCTVERSION 2,16,1149,0 + FILEVERSION 2,16,1150,0 + PRODUCTVERSION 2,16,1150,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1149" + VALUE "FileVersion", "2.16.1150" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1149" + VALUE "ProductVersion", "2.16.1150" END END BLOCK "VarFileInfo" From 369a392af09d4157722464c621f356966ce608b7 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 24 Jul 2017 11:36:06 +0100 Subject: [PATCH 31/97] [process] improve the search for conflicting processes check * Add a WaitForSingleObjectWithMessages() call so that we can process Windows messages while waiting on events (prevents lockup while issuing log messages) * Limit the total duration of CheckDriveAccess() to 2 seconds * Allow for user cancellation * Also update code to use the Edit_####() predefined macros for Edit controls instead of EM_### messages --- src/process.c | 20 +++++++++++--------- src/rufus.c | 41 +++++++++++++++++++++++++++++++---------- src/rufus.h | 1 + src/rufus.rc | 10 +++++----- src/stdio.c | 40 +++++++++++++++++++++++++++++++++++++--- 5 files changed, 85 insertions(+), 27 deletions(-) diff --git a/src/process.c b/src/process.c index a20dc191..33c3a851 100644 --- a/src/process.c +++ b/src/process.c @@ -503,7 +503,8 @@ static DWORD WINAPI SearchProcessThread(LPVOID param) // Still nothing? Try GetProcessImageFileName. Note that GetProcessImageFileName uses // '\Device\Harddisk#\Partition#\' instead drive letters if (!bGotExePath) { - if (bGotExePath = (GetProcessImageFileNameW(processHandle, wexe_path, MAX_PATH) != 0)) + bGotExePath = (GetProcessImageFileNameW(processHandle, wexe_path, MAX_PATH) != 0); + if (bGotExePath) wchar_to_utf8_no_alloc(wexe_path, exe_path, sizeof(exe_path)); } @@ -524,7 +525,7 @@ out: PhFree(buffer); PhFree(handles); PhDestroyHeap(); - ExitThread((DWORD)access_mask); + ExitThread(0); } /** @@ -542,7 +543,7 @@ out: BYTE SearchProcess(char* HandleName, DWORD dwTimeOut, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet) { HANDLE handle; - DWORD dw = 0; + DWORD res = 0; _HandleName = HandleName; _bPartialMatch = bPartialMatch; @@ -552,16 +553,17 @@ BYTE SearchProcess(char* HandleName, DWORD dwTimeOut, BOOL bPartialMatch, BOOL b handle = CreateThread(NULL, 0, SearchProcessThread, NULL, 0, NULL); if (handle == NULL) { - uprintf("Unable to create process search thread"); + uprintf("Warning: Unable to create conflicting process search thread"); return 0x00; } - dw = WaitForSingleObject(handle, dwTimeOut); - if (dw == WAIT_TIMEOUT) { + res = WaitForSingleObjectWithMessages(handle, dwTimeOut); + if (res == WAIT_TIMEOUT) { // Timeout - kill the thread TerminateThread(handle, 0); - uprintf("Warning: Killed process search thread"); - } else if (dw != WAIT_OBJECT_0) { - uprintf("Failed to wait for process search thread: %s", WindowsErrorString()); + uprintf("Warning: Conflicting process search failed to complete due to timeout"); + } else if (res != WAIT_OBJECT_0) { + TerminateThread(handle, 0); + uprintf("Warning: Failed to wait for conflicting process search thread: %s", WindowsErrorString()); } return access_mask; } diff --git a/src/rufus.c b/src/rufus.c index 421e6d31..f9760d74 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -1159,7 +1159,7 @@ static void ToggleAdvanced(BOOL enable) point.y = (rect.bottom - rect.top) + (int)(fScale*dialog_shift); SetWindowPos(hLog, NULL, 0, 0, point.x, point.y, SWP_NOZORDER); // Don't forget to scroll the edit to the bottom after resize - SendMessage(hLog, EM_LINESCROLL, 0, SendMessage(hLog, EM_GETLINECOUNT, 0, 0)); + Edit_Scroll(hLog, 0, Edit_GetLineCount(hLog)); // Hide or show the various advanced options toggle = enable?SW_SHOW:SW_HIDE; @@ -1249,7 +1249,7 @@ static void ToggleToGo(void) point.y = (rect.bottom - rect.top) + (int)(fScale*dialog_shift); SetWindowPos(hLog, NULL, 0, 0, point.x, point.y, SWP_NOZORDER); // Don't forget to scroll the edit to the bottom after resize - SendMessage(hLog, EM_LINESCROLL, 0, SendMessage(hLog, EM_GETLINECOUNT, 0, 0)); + Edit_Scroll(hLog, 0, Edit_GetLineCount(hLog)); // Hide or show the various advanced options toggle = togo_mode?SW_SHOW:SW_HIDE; @@ -2155,7 +2155,8 @@ static void SaveISO(void) // Check for conflicting processes accessing the drive, and if any, // ask the user whether they want to proceed. -static BOOL CheckDriveAccess(void) +// Parameter is the maximum amount of time we allow for this call to execute (in ms) +static BOOL CheckDriveAccess(DWORD dwTimeOut) { uint32_t i, j; BOOL bProceed = TRUE; @@ -2163,16 +2164,22 @@ static BOOL CheckDriveAccess(void) char *PhysicalPath, DevPath[MAX_PATH]; char drive_letter[27], drive_name[] = "?:"; char *message, title[128]; + DWORD cur_time, end_time = GetTickCount() + dwTimeOut; // Get the current selected device DWORD DeviceNum = (DWORD)ComboBox_GetItemData(hDeviceList, ComboBox_GetCurSel(hDeviceList)); if ((DeviceNum < 0x80) || (DeviceNum == (DWORD)-1)) return FALSE; + // TODO: "Checking for conflicting processes..." would be better but + // but "Requesting disk access..." will have to do for now. + PrintInfo(0, MSG_225); + // Search for any blocking processes against the physical drive PhysicalPath = GetPhysicalName(DeviceNum); QueryDosDeviceA(&PhysicalPath[4], DevPath, sizeof(DevPath)); - access_mask = SearchProcess(DevPath, 2000, TRUE, TRUE, TRUE); + access_mask = SearchProcess(DevPath, dwTimeOut, TRUE, TRUE, TRUE); + CHECK_FOR_USER_CANCEL; if (access_mask != 0) { bProceed = FALSE; uprintf("Found potentially blocking process(es) against %s:", &PhysicalPath[4]); @@ -2187,7 +2194,11 @@ static BOOL CheckDriveAccess(void) drive_name[0] = drive_letter[i]; if (QueryDosDeviceA(drive_name, DevPath, sizeof(DevPath)) != 0) { StrArrayClear(&BlockingProcess); - access_mask = SearchProcess(DevPath, 2000, TRUE, TRUE, TRUE); + cur_time = GetTickCount(); + if (cur_time >= end_time) + break; + access_mask = SearchProcess(DevPath, end_time - cur_time, TRUE, TRUE, TRUE); + CHECK_FOR_USER_CANCEL; // Ignore if all we have is read-only if ((access_mask & 0x06) || (access_mask == 0x80)) { bProceed = FALSE; @@ -2209,7 +2220,11 @@ static BOOL CheckDriveAccess(void) } } + PrintInfo(0, MSG_210); return bProceed; +out: + PrintInfo(0, MSG_210); + return FALSE; } #ifdef RUFUS_TEST @@ -2219,7 +2234,6 @@ static BOOL CheckDriveAccess(void) /* * Main dialog callback */ -#define PROCESS_QUEUED_EVENTS if (queued_hotplug_event) SendMessage(hDlg, UM_MEDIA_CHANGE, 0, 0) static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { static DWORD DeviceNum = 0; @@ -2248,7 +2262,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA case WM_COMMAND: #ifdef RUFUS_TEST if (LOWORD(wParam) == IDC_TEST) { - uprintf("Proceed = %s", CheckDriveAccess()?"True":"False"); + uprintf("Proceed = %s", CheckDriveAccess(2000)?"True":"False"); // char* choices[] = { "Choice 1", "Choice 2", "Choice 3" }; // SelectionDyn("Test Choice", "Unused", choices, ARRAYSIZE(choices)); break; @@ -2294,6 +2308,11 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA } no_confirmation_on_cancel = FALSE; return (INT_PTR)TRUE; + } else if (format_op_in_progress) { + // User might be trying to cancel during preliminary checks + FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|ERROR_CANCELLED; + PrintInfo(0, MSG_201); + return (INT_PTR)TRUE; } if ((pfSHChangeNotifyDeregister != NULL) && (ulRegister != 0)) pfSHChangeNotifyDeregister(ulRegister); @@ -2565,7 +2584,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA } } - if (!CheckDriveAccess()) + if (!CheckDriveAccess(2000)) goto aborted_start; GetWindowTextU(hDeviceList, tmp, ARRAYSIZE(tmp)); @@ -2602,7 +2621,9 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA format_op_in_progress = FALSE; EnableControls(TRUE); zero_drive = FALSE; - PROCESS_QUEUED_EVENTS; + if (queued_hotplug_event) + SendMessage(hDlg, UM_MEDIA_CHANGE, 0, 0); + EnableWindow(GetDlgItem(hDlg, IDCANCEL), TRUE); break; case IDC_HASH: if ((format_thid == NULL) && (image_path != NULL)) { @@ -3305,7 +3326,7 @@ relaunch: if ( (IsWindowVisible(hLogDlg)) && (GetKeyState(VK_CONTROL) & 0x8000) && (msg.message == WM_KEYDOWN) && (msg.wParam == 'A') ) { // Might also need ES_NOHIDESEL property if you want to select when not active - SendMessage(hLog, EM_SETSEL, 0, -1); + Edit_SetSel(hLog, 0, -1); } // Alt-. => Enable USB enumeration debug if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == VK_OEM_PERIOD)) { diff --git a/src/rufus.h b/src/rufus.h index 64873f1d..bbbae95c 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -500,6 +500,7 @@ extern void ClrFormatPromptHook(void); extern BYTE SearchProcess(char* HandleName, DWORD dwTimeout, BOOL bPartialMatch, BOOL bIgnoreSelf, BOOL bQuiet); extern BOOL EnablePrivileges(void); extern void FlashTaskbar(HANDLE handle); +extern DWORD WaitForSingleObjectWithMessages(HANDLE hHandle, DWORD dwMilliseconds); DWORD WINAPI FormatThread(void* param); DWORD WINAPI SaveImageThread(void* param); diff --git a/src/rufus.rc b/src/rufus.rc index b6df942d..17674040 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1150" +CAPTION "Rufus 2.16.1151" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1150,0 - PRODUCTVERSION 2,16,1150,0 + FILEVERSION 2,16,1151,0 + PRODUCTVERSION 2,16,1151,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1150" + VALUE "FileVersion", "2.16.1151" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1150" + VALUE "ProductVersion", "2.16.1151" END END BLOCK "VarFileInfo" diff --git a/src/stdio.c b/src/stdio.c index 629f26f4..c3975f36 100644 --- a/src/stdio.c +++ b/src/stdio.c @@ -42,7 +42,6 @@ size_t ubuffer_pos = 0; char ubuffer[UBUFFER_SIZE]; // Buffer for ubpushf() messages we don't log right away #ifdef RUFUS_LOGGING -#define Edit_ReplaceSelW(hCtrl, wstr) ((void)SendMessageW(hCtrl, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)wstr)) void _uprintf(const char *format, ...) { static char buf[4096]; @@ -71,10 +70,10 @@ void _uprintf(const char *format, ...) if ((hLog != NULL) && (hLog != INVALID_HANDLE_VALUE)) { // Send output to our log Window Edit_SetSel(hLog, MAX_LOG_SIZE, MAX_LOG_SIZE); - Edit_ReplaceSelW(hLog, wbuf); + Edit_ReplaceSel(hLog, wbuf); // Make sure the message scrolls into view // (Or see code commented in LogProc:WM_SHOWWINDOW for a less forceful scroll) - SendMessage(hLog, EM_LINESCROLL, 0, SendMessage(hLog, EM_GETLINECOUNT, 0, 0)); + Edit_Scroll(hLog, 0, Edit_GetLineCount(hLog)); } free(wbuf); } @@ -360,3 +359,38 @@ BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWr SetLastError(ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|ERROR_WRITE_FAULT); return FALSE; } + +// A WaitForSingleObject() equivalent that doesn't block Windows messages +// This is needed, for instance, if you are waiting for a thread that may issue uprintf's +DWORD WaitForSingleObjectWithMessages(HANDLE hHandle, DWORD dwMilliseconds) +{ + DWORD res, dwCurTime, dwEndTime = GetTickCount() + dwMilliseconds; + MSG msg; + + do { + // Read all of the messages in this next loop, removing each message as we read it. + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { + if ((msg.message == WM_QUIT) || (msg.message == WM_CLOSE)) { + SetLastError(ERROR_CANCELLED); + return WAIT_FAILED; + } else { + DispatchMessage(&msg); + } + } + + // Wait for any message sent or posted to this queue or for the handle to signaled. + res = MsgWaitForMultipleObjects(1, &hHandle, FALSE, dwMilliseconds, QS_ALLINPUT); + + if (dwMilliseconds != INFINITE) { + dwCurTime = GetTickCount(); + // Account for the case where we may reach the timeout condition while + // processing timestamps + if (dwCurTime < dwEndTime) + dwMilliseconds = dwEndTime - dwCurTime; + else + res = WAIT_TIMEOUT; + } + } while (res == (WAIT_OBJECT_0 + 1)); + + return res; +} From 7a929b36b474cf006bb4d1d2813056db718d35b0 Mon Sep 17 00:00:00 2001 From: Dario Komar Date: Mon, 24 Jul 2017 11:49:59 +0100 Subject: [PATCH 32/97] [loc] update Croatian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index ee0d2a01..9799e254 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -2868,7 +2868,7 @@ t MSG_298 "你選擇的 ISO 映像檔不符合它所宣告的大小: 缺少 %s ! ################################################################################ l "hr-HR" "Croatian (Hrvatski)" 0x041a, 0x081a, 0x101a -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -3310,6 +3310,12 @@ t MSG_291 "Odabir verzije" t MSG_292 "Molimo odaberite verziju Windowsa koju želite instalirati:" t MSG_293 "Nepodržana verzija Windowsa" t MSG_294 "Ova verzija Windowsa više nije podržana od strane Rufusa." +t MSG_295 "Upozorenje: Neslužbena verzija" +t MSG_296 "Ova verzija Rufusa NIJE proizvod službenog razvojnog programera.\n\nSvejedno pokrenuti program?" +t MSG_297 "Otkrivena skraćena ISO datoteka" +t MSG_298 "ISO datoteka koju ste odabrali ne odgovara deklariranoj veličini: %s podataka nedostaje!\n\n" + "Ako ste ovu datoteku preuzeli na internetu, pokušajte preuzeti novu kopiju i proverite da su MD5 ili SHA " + "kontrolni zbrojevi identični kao u originalu.\n\nRufus može provjeriti MD5 ili SHA pritiskom na '#' tipku." ################################################################################ l "cs-CZ" "Czech (Čeština)" 0x0405 diff --git a/src/rufus.rc b/src/rufus.rc index 17674040..7ed6cd04 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1151" +CAPTION "Rufus 2.16.1152" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1151,0 - PRODUCTVERSION 2,16,1151,0 + FILEVERSION 2,16,1152,0 + PRODUCTVERSION 2,16,1152,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1151" + VALUE "FileVersion", "2.16.1152" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1151" + VALUE "ProductVersion", "2.16.1152" END END BLOCK "VarFileInfo" From 4fe6ffb9d4b8852de0f328e1a46ead7397273a9e Mon Sep 17 00:00:00 2001 From: Tiryoh Date: Mon, 24 Jul 2017 11:52:42 +0100 Subject: [PATCH 33/97] [loc] update Japanese translation to latest --- res/localization/rufus.loc | 7 ++++++- src/rufus.rc | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 9799e254..c5e66036 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -8372,7 +8372,7 @@ t MSG_298 "Il file ISO selezionato non corrisponde alla dimensione dichiarata: % ###################################################################### l "ja-JP" "Japanese (日本語)" 0x0411 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -8873,6 +8873,11 @@ t MSG_291 "バージョン選択" t MSG_292 "インストールしたいWindowsのバージョンを選択してください" t MSG_293 "サポートされていないWindowsのバージョンです" t MSG_294 "このバージョンのWindowsはRufusのサポート対象外となりました” +t MSG_295 "警告:非公式版" +t MSG_296 "このバージョンのRufusは公式の開発者によって提供されたものではありません。\n\n非公式版Rufusを実行しますか?" +t MSG_297 "切り詰められたISOファイルが検出されました" +t MSG_298 "選択されたISOファイルは定義されているファイルサイズと一致しません。%sのデータが不足しています。\n\nこのファイルがインターネットからダウンロード" + "されたものならば、再ダウンロードし、MD5かSHAのチェックサムが公式のものと一致しているか確認してください。\n\nMD5とSHAは「#」ボタンをクリックすればRufusで確認できます。" ################################################################################ l "ko-KR" "Korean (한국어)" 0x0412 diff --git a/src/rufus.rc b/src/rufus.rc index 7ed6cd04..c05e49f1 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1152" +CAPTION "Rufus 2.16.1153" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1152,0 - PRODUCTVERSION 2,16,1152,0 + FILEVERSION 2,16,1153,0 + PRODUCTVERSION 2,16,1153,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1152" + VALUE "FileVersion", "2.16.1153" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1152" + VALUE "ProductVersion", "2.16.1153" END END BLOCK "VarFileInfo" From 2b3f1be78cbc4806bcfa4797c040a06a9a4dc4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D0=B8?= =?UTF-8?q?=D0=BD=20=D0=92?= Date: Mon, 24 Jul 2017 11:57:30 +0100 Subject: [PATCH 34/97] [loc] update Ukrainian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index c5e66036..937ab417 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -17421,7 +17421,7 @@ t MSG_298 "Seçtiğiniz ISO dosyası bildirilen boyutla eşleşmiyor: Veri %s ek ################################################################################ l "uk-UA" "Ukrainian (Українська)" 0x0422 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -17882,6 +17882,12 @@ t MSG_291 "Вибір версії" t MSG_292 "Будь ласка, виберіть версію Windows, яку ви хочете встановити:" t MSG_293 "Непідтримувана версія Windows" t MSG_294 "Ця версія Windows більше не підтримується Rufus." +t MSG_295 "Увага: Неофіційна версія" +t MSG_296 "Ця версія Rufus НЕ була підготована її офіційним розробником.\n\nВи впевнені, що хочете запустити її?" +t MSG_297 "Виявлено усічений ISO" +t MSG_298 "Розмір обраного файла ISO не співпадає з оголошеним розміром: %s даних відсутньо!\n\nЯкщо ви завантажили цей файл з " + "Інтернету, вам слід завантажити нову копію файла або перевірити співпадіння контрольних сум MD5 чи SHA з офіційним файлом.\n\n" + "Пам'ятайте, що ви можете порівняти MD5 чи SHA в Rufus, натиснувши кнопку '#'." ################################################################################ l "vi-VN" "Vietnamese (Tiếng Việt)" 0x042A diff --git a/src/rufus.rc b/src/rufus.rc index c05e49f1..929b6745 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1153" +CAPTION "Rufus 2.16.1154" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1153,0 - PRODUCTVERSION 2,16,1153,0 + FILEVERSION 2,16,1154,0 + PRODUCTVERSION 2,16,1154,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1153" + VALUE "FileVersion", "2.16.1154" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1153" + VALUE "ProductVersion", "2.16.1154" END END BLOCK "VarFileInfo" From 811f3cc1bc8e42f4dabdca65601733b54e2a1abc Mon Sep 17 00:00:00 2001 From: Noam Sarusi Date: Mon, 24 Jul 2017 12:11:13 +0100 Subject: [PATCH 35/97] [loc] update Hebrew translation to latest --- res/localization/rufus.loc | 150 +++++++++++++++++++------------------ src/rufus.rc | 10 +-- 2 files changed, 83 insertions(+), 77 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 937ab417..5ff4bcce 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -6540,14 +6540,14 @@ t MSG_294 "Το Rufus δεν υποστηρίζει αυτή την έκδοση ################################################################################ l "he-IL" "Hebrew (עברית)" 0x040d a "r" -v 1.0.21 +v 1.0.22 b "en-US" g IDD_DIALOG t IDS_DEVICE_TXT "התקן" t IDS_PARTITION_TYPE_TXT "תוכנית המחיצות וסוג מערכת היעד" t IDS_FILESYSTEM_TXT "מערכת קבצים" -t IDS_CLUSTERSIZE_TXT "גודל מקטע" +t IDS_CLUSTERSIZE_TXT "גודל אשכול" t IDS_LABEL_TXT "תווית חדשה לאמצעי האחסון" t IDS_FORMAT_OPTIONS_GRP "אפשרויות אתחול" t IDC_BADBLOCKS "בדוק את ההתקן לאיזורים פגומים" @@ -6580,7 +6580,7 @@ t IDCANCEL "סגור" # Notifications. You can trigger one of these by using Alt-R and re-launching Rufus g IDD_NOTIFICATION -t IDC_MORE_INFO "עוד מידע" +t IDC_MORE_INFO "מידע נוסף" t IDYES "כן" t IDNO "לא" @@ -6604,7 +6604,7 @@ t IDCANCEL "סגור" g IDD_NEW_VERSION t IDD_NEW_VERSION "חפש עדכונים - רופוס" t IDS_NEW_VERSION_AVAIL_TXT "גרסה חדשה זמינה להורדה. בבקשה תוריד את הגרסה האחרונה" -t IDC_WEBSITE "לחץ כאן כדי ללכת לאתר" +t IDC_WEBSITE "לחץ/י כאן כדי ללכת לאתר" t IDS_NEW_VERSION_NOTES_GRP "מה חדש?" t IDS_NEW_VERSION_DOWNLOAD_GRP "הורד" t IDC_DOWNLOAD "הורד" @@ -6615,7 +6615,7 @@ t MSG_001 "מופע אחר זוהה" t MSG_002 "תוכנת רופוס אחרת פועלת ברקע.\n" "נא סגור את התוכנה הפעילה לפני ההפעלה הנוכחית." t MSG_003 "אזהרה: כל המידע בהתקן '%s' יושמד\n" - "כדי להמשיך בפעולה, לחץ אישור. כדי לבטל לחץ ביטול" + "כדי להמשיך בפעולה, לחץ/י אישור. כדי לבטל לחץ/י ביטול" t MSG_004 "מדיניות העדכונים של רופוס" t MSG_005 "האם לאפשר לרופוס לבדוק עדכונים לעצמו באינטרנט?" # Must be the same as IDD_DIALOG:IDCANCEL (i.e. "Close" - I know it's confusing) @@ -6655,7 +6655,7 @@ t MSG_033 "מערכת מחיצות %s ל UEFI" # Number of bad block check passes (singular for 1 pass, plural for 2 or more passes) t MSG_034 "מעבר %d" t MSG_035 "%d מעברים" -t MSG_036 "תמונת ISO" +t MSG_036 "קובץ ISO" t MSG_037 "תוכנה" t MSG_038 "ביטול" t MSG_039 "פתח" @@ -6680,11 +6680,11 @@ t MSG_054 "ההתקן מוגן מכתיבה." t MSG_055 "ההתקן הזה בשימוש על ידי תוכנה אחרת " "בבקשה לסגור כל תוכנה אחרת שאולי משתמשת בהתקן" t MSG_056 "אתחול מהיר לא זמין להתקן הזה." -t MSG_057 "תווית השם של האחסון שגויה." +t MSG_057 "תווית השם של הכונן שגוי" t MSG_058 "תחזוק המכשיר שגוי." -t MSG_059 "גודל המקטע שנבחר לא זמין להתקן הזה." +t MSG_059 "גודל האשכול שנבחר אינו זמין להתקן זה." t MSG_060 "גודל ההתקן שגוי." -t MSG_061 "בבקשה להכניס התקן שניתן להסרה." +t MSG_061 "יש להכניס התקן נייד לכונן." t MSG_062 "פקודה לא נתמכת התקבלה." t MSG_063 "שגיאה בהקצאת זיכרון." t MSG_064 "שגיאת קריאה." @@ -6696,55 +6696,55 @@ t MSG_068 "שגיאה בחלוקת ההתקן למחיצות." t MSG_069 "אי אפשר להעתיק קבצים להתקן היעד." t MSG_070 "בוטל על ידי המשתמש." # See http://en.wikipedia.org/wiki/Thread_%28computing%29 -t MSG_071 "לא יכול לפתוח תהליך." +t MSG_071 "לא יכול להתחיל תהליך." t MSG_072 "בדיקת איזורים פגומים לא הושלמה." t MSG_073 "קריאת קובץ ה ISO נכשלה." t MSG_074 "חילוץ קובץ ה ISO נכשל." -t MSG_075 "לא יכול להעלות את ההתקן." +t MSG_075 "לא יכול להציב את ההתקן." t MSG_076 "לא יכול להכין קבצים לאתחול." t MSG_077 "לא יכול להקצות אות לכונן." -t MSG_078 "לא יכול להעלות את התקן ה GUID." +t MSG_078 "לא יכול להציב כונן GUID." t MSG_079 "ההתקן לא מוכן." t MSG_080 "רופוס זיהה ש Windows עדיין מרוקן את המאגרים הפנימיים שלו לתוך התקן ה USB.\n\n" "הפעולה הזאת יכולה לקחת הרבה זמן, תלוי במהירות התקן ה USB שלך, " "במיוחד הבקבצים גדולים.\n\n אנחנו ממליצים שתיתן ל Windows לסיים, כדי להימנע מיצירת שגיאות במידע. " - "אבל אם נמאס לך לחכות, אתה יכול פשוט לנתק את ההתקן..." + "אבל אם נמאס לך לחכות, אפשר פשוט לנתק את ההתקן..." t MSG_081 "קובץ לא נתמך." t MSG_082 "הקובץ הזה לא ניתן לאתחול, או שהוא משתמש בכיווץ או צורת אתחול שלא נתמכת על ידי רופוס." t MSG_083 "להחליף %s?" t MSG_084 "נראה שקובץ ה ISO הזה משתמש בגרסה מיושנת של '%s'.\n" "בגלל זה יכול להיות שתפריטי האתחול לא יוצגו נכון.\n\n" "רופוס יכול להוריד גרסה חדשה כדי לתקן את הבעיה:\n" - "- בחר 'כן' כדי להתחבר לאינטרנט ולהוריד את הקובץ\n" - "- בחר 'לא' כדי להשאיר את קובץ ה ISO ללא שינויים\n" - "אם אתה לא יודע מה לעשות, כדאי שתבחר 'כן'.\n\n" + "- בחר/י 'כן' כדי להתחבר לאינטרנט ולהוריד את הקובץ\n" + "- בחר/י 'לא' כדי להשאיר את קובץ ה ISO ללא שינויים\n" + "אם אינך יודע/ת מה לעשות, כדאי לבחור 'כן'.\n\n" "שים לב: הקובץ החדש ירד לתיקייה בה ממוקמת התוכנה וברגע ש " "'%s' יהיה שם, רופוס ישתמש בו אוטומטית." t MSG_085 "מוריד %s" t MSG_086 "לא נבחר שום קובץ." # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text -t MSG_087 "בבקשה לחץ על הסמל של הדיסק כדי לבחור קובץ בר אתחול, " +t MSG_087 "בבקשה לחץ/י על הסמל של הדיסק כדי לבחור קובץ בר אתחול, " "או בטל את האפשרות \"צור דיסק בר אתחול עם\"" t MSG_088 "הקובץ גדול מדי." t MSG_089 "הקובץ גדול מדי בשביל ההתקן שנבחר." t MSG_090 "קובץ ISO לא נתמך." t MSG_091 "כשבוחרים ב UEFI כסוג מערכת היעד, רק קבצי ISO שניתנים לאתחול EFI נתמכים. " - "בבקשה בחר קובץ ISO שניתן לאתחול EFI או שנה את סוג מערכת היעד ל BIOS." + "בבקשה בחר/י קובץ ISO שניתן לאתחול EFI או שנה את סוג מערכת היעד ל BIOS." t MSG_092 "מערכת קבצים לא נתמכת." t MSG_093 "חשוב: ההתקן הזה מכיל מחיצות כפולות!!\n\n" "זה יכול לכלול כוננים/מחיצות שלא מפורטות או אולי אפילו בלתי נראות ב Windows." - "אם תחליט להמשיך, אתה אחראי לכל אובדן מידע במחיצות האלה." + "אם תחליט/י להמשיך, את/ה אחראי/ת לכל אובדן מידע במחיצות האלה." t MSG_094 "נבחרו מחיצות כפולות" t MSG_095 "קובץ DD" t MSG_096 "מערכת הקבצים שנבחרה לא יכולה לעבוד עם ISO מהסוג הזה. " - "בבקשה השתמש במערכת קבצים אחרת או בחר ISO אחר." + "בבקשה השתמש במערכת קבצים אחרת או בחר/י ISO אחר." t MSG_097 "'%s' יכול לעבוד רק אם מערכת הקבצים היא NTFS." -t MSG_098 "חשוב: אתה מנסה להתקין 'Windows To Go', אבל להתקן שלך אין " +t MSG_098 "חשוב: את/ה מנסה להתקין 'Windows To Go', אבל להתקן שלך אין " "תכונה 'FIXED'. בגלל זה רוב הסיכויים הם ש Windows ייקפא בזמן האתחול כי microsoft " "לא יצרה את windows to go בצורה שיכולה לעבוד עם התקנים שיש להם תכונה 'REMOVABLE'\n\n" - "האם אתה עדיין רוצה להמשיך?\n\n" + "האם את/ה עדיין רוצה להמשיך?\n\n" "שים לב: התכונות FIXED/REMOVABLE הם תכונות בחומרה שניתנות לשינוי רק בעזרת כלים מיוחדים של היצרן של ההתקן." "למרות זאת, הכלים האלה כמעט אף פעם לא " "משוחררים לציבור..." @@ -6753,28 +6753,28 @@ t MSG_100 "קובץ ה ISO הזה מכיל קובץ שגדול מ 4G, " "וזה יותר מהגודל המקסימלי שמערכות קבצים FAT או FAT32 יכולות לאחסן." t MSG_101 "אין תמיכה של WIM." t MSG_102 "מערכת ההפעלה שלך לא יכולה לחלץ קבצים מארכיוני WIM. חילוץ מ WIM " - "דרוש ליצירת דיסק של windows 7/vista שניתנים לאתחול EFI. אתה יכול לתקן את זה " + "דרוש ליצירת דיסק של windows 7/vista שניתנים לאתחול EFI. את/ה יכול לתקן את זה " "אם תוריד את הגרסה האחרונה של 7zip.\nאתה רוצה ללכת לאתר ההורדה של 7zip?" t MSG_103 "להוריד %s?" t MSG_104 "%s או חדש יותר דורש ש %s יהיה מותקן.\n" "בגלל שהקובץ הזה גדול יותר מ 100 KB, ותמיד קיים בקבצי ISO של %s, " "הוא לא קיים ברופוס.\n\n רופוס יכול להוריד את הקובץ החסר בשבילך:\n" - "- בחר 'כן' כדי להתחבר לאינטרנט ולהוריד את הקובץ\n" - "- בחר 'לא' אם אתה רוצה להעתיק את הקובץ הזה בצורה ידנית אחר כך\n\n" + "- בחר/י 'כן' כדי להתחבר לאינטרנט ולהוריד את הקובץ\n" + "- בחר/י 'לא' אם את/ה רוצה להעתיק את הקובץ הזה בצורה ידנית אחר כך\n\n" "שים לב: הקובץ יירד לספרייה בה ממוקמת התוכנה וברגע ש " "יהיה שם '%s', רופוס ישתמש בו אוטומטית.\n" t MSG_105 "ביטול יכול להשאיר את ההתקן במצב בלתי ניתן לשימוש.\n" - "אם אתה בטוח שאתה רוצה לבטל, תלחץ כן. אחרת, תלחץ לא." -t MSG_106 "בבקשה בחר תיקייה" + "אם את/ה בטוח שאתה רוצה לבטל, תלחץ כן. אחרת, תלחץ לא." +t MSG_106 "בבקשה בחר/י תיקייה" t MSG_107 "כל הקבצים" t MSG_108 "יומן Rufus" # LTR & RTL before and after "0x%02X" t MSG_109 "‎0x%02X‏ (דיסק %d)" # "Cluster size" below should be the same as the label for IDS_CLUSTERSIZE_TXT # "kilobytes" should be the same as in MSG_027 -t MSG_110 "MS-DOS לא יכול לאתחל מהתקן שמשתמש בגודל מקטע של 64 קילו בתים.\n" +t MSG_110 "MS-DOS לא יכול לאתחל מהתקן שמשתמש בגודל אשכול של 64 קילו בתים.\n" "בבקשה שנה את גודל המקטע או השתמש ב FreeDOS." -t MSG_111 "גודל מקטע לא מתאים" +t MSG_111 "גודל אשכול לא מתאים" # "%d:%02d" below is a duration (mins:secs) t MSG_112 "אתחול התקן UDF גדול יכול לקחת הרבה זמן. במהירות של USB 2.0, זמן האתחול " "המשוער הוא: %d:%02d, בזמן הזה מד ההתקדמות ייראה קפוא. בבקשה היה סבלני!" @@ -6783,8 +6783,8 @@ t MSG_114 "הקובץ הזה משתמש ב Syslinux %s%s אבל התוכנה ה "Syslinux %s%s. \n\nבגלל שגרסאות חדשות של Syslinux לא מתאימות לאחרות, וזה " "בלתי אפשרי לרופוס לכלול את כולם, שני קבצים נוספים חייבים לרדת " "מהאינטרנט('ldlinux.sys' و 'ldlinux.bss'):\n" - "- בחר כן כדי להתחבר לאינטרנט ולהוריד את הקבצים\n" - "- בחר לא כדי לבטל את הפעולה\n\n" + "- בחר/י כן כדי להתחבר לאינטרנט ולהוריד את הקבצים\n" + "- בחר/י לא כדי לבטל את הפעולה\n\n" "שים לב: הקבצים האלה יירדו אל הספרייה הנוכחית ורופוס ישתמש בהם " "אוטומטית אם הם קיימים.\n" t MSG_115 "נדרשת הורדה" @@ -6792,16 +6792,16 @@ t MSG_116 "הקובץ הזה משתמש ב Grub %s אבל התוכנה כולל "Grub %s.\n\nבגלל שגרסאות שונות של Grub לא מתאימות לאחרות, וזה " "בלתי אפשרי לכלול את כולם, רופוס ינסה למצוא גרסה של קובץ ההתקנה של Grub " "('core.img') שמתאימה לזה שבקובץ שלך:\n" - "- בחר 'כן' כדי להתחבר לאינטרנט ולנסות להוריד אותו\n" - "- בחר 'לא' כדי להשתמש בגרסת ברירת המחדל מרופוס\n" - "- בחר 'בטל' כדי לבטל את הפעולה\n\n" + "- בחר/י 'כן' כדי להתחבר לאינטרנט ולנסות להוריד אותו\n" + "- בחר/י 'לא' כדי להשתמש בגרסת ברירת המחדל מרופוס\n" + "- בחר/י 'בטל' כדי לבטל את הפעולה\n\n" "שים לב: הקובץ יירד לספרייה הנוכחית ורופוס " "ישתמש בו אוטומטית. אם לא יימצא קובץ מתאים, רופוס ישתמש בגרסת ברירת המחדל." # Tooltips # Partition Scheme and Target Type t MSG_150 "בדרך כלל הבחירה הכי בטוחה. אבל אם יש לך מחשב UEFI ואתה רוצה להתקין " "מערכת הפעלה במצב EFI טבעי, כדאי שתבחר באחד מהאפשרויות האחרות" -t MSG_151 "תבחר בזה אם אתה רוצה להתקין מערכת הפעלה במצב טבעי של EFI, אבל צריך " +t MSG_151 "תבחר בזה אם את/ה רוצה להתקין מערכת הפעלה במצב טבעי של EFI, אבל צריך " "גישה לתוכן של התקן ה USB מ Windows XP" t MSG_152 "הבחירה המועדפת להתקנת מערכת הפעלה במצב טבעי של EFI, כשלא צריך " "גישה להתקן ה USB מ Windows XP." @@ -6815,20 +6815,20 @@ t MSG_159 "השתמש בשדה הזה כדי להזין תווית שם לאמצ t MSG_160 "הראה אפשרויות מתקדמות" t MSG_161 "בדוק את ההתקן לאיזורים פגומים באמצעות תבנית בדיקה" t MSG_162 "בטל את התיבה הזו כדי להשתמש בשיטת האתחול ה \"איטית\"" -t MSG_163 "בחר בתיבה הזו כדי להפוך את התקן ה USB שלך לבר-אתחול" +t MSG_163 "בחר/י בתיבה הזו כדי להפוך את התקן ה USB שלך לבר-אתחול" t MSG_164 "השיטה שתהיה בשימוש כדי להפוך את ההתקן שלך לבר-אתחול." -t MSG_165 "לחץ כדי לבחור קובץ." -t MSG_166 "בחר בתיבה הזו כדי לאפשר הצגת תוויות שם בינלאומיות. " +t MSG_165 "לחץ/י כדי לבחור קובץ." +t MSG_166 "בחר/י בתיבה הזו כדי לאפשר הצגת תוויות שם בינלאומיות. " "ולקבוע תמונה להתקן (יוצר קובץ autorun.inf)" t MSG_167 "מתקין MBR שמאפשר בחירת אתחול ויכול להשתמש ב BIOS USB drive ID" t MSG_168 "לגרום להתקן ה - USB בר-האתחול הראשון )בדרך כלל 0x80( להזדהות כדיסק אחר.\n" - "זה אמור להיות הכרחי אם אתה מתקין Windows XP ויש לך יותר מדיסק אחד" + "זה אמור להיות הכרחי אם את/ה מתקין Windows XP ויש לך יותר מדיסק אחד" t MSG_169 "צור מחיצה נסתרת ונסה ליישר את הגבולות של המחיצות.\n" "זה ייכול לשפר את קליטת האתחול ל BIOS ישן" t MSG_170 "להראות כוננים קשיחים של USB. השימוש באחריותך בלבד!!!" t MSG_171 "התחל את פעולת האתחול.\nזה ישמיד את כל המידע על ההתקן!" t MSG_172 "פרטי רישיון וקרדיט" -t MSG_173 "לחץ כדי לבחור..." +t MSG_173 "לחץ/י כדי לבחור..." # The following will appear in the about dialog # NOTE: Because it starts with English text, the line below requires an invisible # RIGHT-TO-LEFT EMBEDDING (UTF-8: 0xE2 0x80 0xAB) at the beginning and a @@ -6840,7 +6840,7 @@ t MSG_177 "דווח על באגים או הצע שיפורים:" t MSG_178 "זכויות יוצרים נוספות:" t MSG_179 "מדיניות העדכונים:" t MSG_180 "אם תבחר לאפשר לתוכנה הזאת לבדוק עדכונים, " - "אתה מסכים שהמידע הזה יישמר בשרתים שלנו:" + "את/ה מסכים שהמידע הזה יישמר בשרתים שלנו:" t MSG_181 "סוג וגרסת מערכת ההפעלה שלך" t MSG_182 "הגרסה של התוכנה שאתה משתמש בה" t MSG_183 "כתובת ה - IP שלך" @@ -6850,7 +6850,7 @@ t MSG_185 "תהליך עדכון:" t MSG_186 "רופוס לא מתקין או מפעיל שום תהליכי רקע, לכן חיפוש עדכונים יתבצע רק כשהתוכנה תופעל. \\line\n" "כמובן שנדרשת גישה לאינטרנט כדי לחפש עדכונים." t MSG_187 "הקובץ לא תקין עם אפשרות האתחול שנבחרה" -t MSG_188 "הקובץ הנוכחי לא מתאים לאפשרות האתחול שנבחרה. בבקשה בחר קובץ אחר או השתמש באפשרות אתחול אחרת." +t MSG_188 "הקובץ הנוכחי לא מתאים לאפשרות האתחול שנבחרה. בבקשה בחר/י קובץ אחר או השתמש באפשרות אתחול אחרת." t MSG_189 "קובץ ה ISO הזה לא מתאים למערכת הקבצים שנבחרה" t MSG_190 "התקן לא מתאים" t MSG_191 "בדיקת כתיבה" @@ -6858,15 +6858,15 @@ t MSG_192 "בדיקת קריאה" t MSG_193 "ירד %s" t MSG_194 "לא יכול להוריד את %s" t MSG_195 "משתמש בגרסה מוטבעת של קובץ(קבצים) %s" -t MSG_196 "חשוב: ההתקן הזה משתמש בגרסה לא סטנדרטית של גודל מקטע!\n\n" - "התקנים רגילים משתמשים בגודל מקטע של 512 בתים אבל ההתקן הזה משתמש באחד של %d. " +t MSG_196 "חשוב: ההתקן הזה משתמש בגרסה לא סטנדרטית של גודל אשכול!\n\n" + "התקנים רגילים משתמשים בגודל אשכול של 512 בתים אבל ההתקן הזה משתמש באחד של %d. " "בהרבה מקרים, זה אומר שלא תוכל לאתחל מההתקן הזה.\n" "רופוס יכול לנסות ליצור התקן בר-אתחול, אבל אין שום אחריות או הבטחה שזה יעבוד." -t MSG_197 "גודל מקטע לא סטנדרטי זוהה" +t MSG_197 "גודל אשכול לא סטנדרטי זוהה" t MSG_198 "'Windows To Go' יכול להיות מותקן על התקן שמאותחל ב GPT רק אם יש לו" "תכונה של FIXED מותקנת. להתקן הנוכחי אין תכונה FIXED." -t MSG_199 "בחר בזה אם אתה מתכנן להתקין Windows על דיסק אחר, ולהשתמש בהתקן הזה בשביל ההתקנה." -t MSG_200 "בחר בזה אם אתה רוצה להריץ את Windows ישר מתוך ההתקן הנוכחי." +t MSG_199 "בחר/י בזה אם את/ה מתכנן להתקין Windows על דיסק אחר, ולהשתמש בהתקן הזה בשביל ההתקנה." +t MSG_200 "בחר/י בזה אם את/ה רוצה להריץ את Windows ישר מתוך ההתקן הנוכחי." # Status messages - these messages will appear on the status bar t MSG_201 "מבטל - המתן בבקשה..." @@ -6938,37 +6938,37 @@ t MSG_249 "נכשל במחיקת מפתחות הרישום של התוכנה" # eg. "Fixed disk detection enabled" "ISO size check disabled" t MSG_250 "%s מופעל" t MSG_251 "%s מושבת" -t MSG_252 "בדיקת גודל" -t MSG_253 "זיהוי דיסקים קשיחים" -t MSG_254 "כפה אתחול FAT32 גדול" +t MSG_252 "מצב בדיקת גודל" +t MSG_253 "מצב זיהוי כוננים קשיחים" +t MSG_254 "מצב אתחול כפוי של FAT32 גדול" t MSG_255 "אי הרצה אוטומטית יימחק בעת היציאה" -t MSG_256 "כונן מזוייף זוהה" -t MSG_257 "תמיכה ב Joliet" -t MSG_258 "תמיכה ב Rock Ridge" -t MSG_259 "עדכון כפוי" -t MSG_260 "דוחס NTFS" -t MSG_261 "כותב תמונה: %0.1f%% הושלמו" +t MSG_256 "מצב זיהוי כוננים מזוייפים" +t MSG_257 "מצב תמיכה ב Joliet לקבצי ISO9660" +t MSG_258 "מצב תמיכה ב Rock Ridge לקבצי ISO9660" +t MSG_259 "מצב עדכון כפוי" +t MSG_260 "מצב דחיסת NTFS" +t MSG_261 "כותב קובץ: %0.1f%% הושלמו" # Cheat mode message to disable ISO Support so that only DD images can be opened -t MSG_262 "תמיכה ב ISO" +t MSG_262 "מצב תמיכה בקבצי ISO" # Cheat mode to force legacy size units, where 1 KB is 1024 bytes and NOT that fake 1000 bytes abomination! -t MSG_263 "השתמש בגודל יחידות תקין" +t MSG_263 "מצב שימוש ביחידות מידה תקינות לגודל ההתקן" t MSG_264 "מחיקת ספרייה '%s'" -t MSG_265 "דיסק VMWare זוהה" -t MSG_266 "מצב UEFI/BIOS כפול" +t MSG_265 "מצב זיהוי כונני VMware" +t MSG_266 "מצב UEFI/BIOS משולב" t MSG_267 "מחיל תמונת Windows: %0.1f%% הושלמו" t MSG_268 "מחיל תמונת Windows..." t MSG_269 "שמור רישומי זמן" -t MSG_270 "USB איתור באגים" +t MSG_270 "מצב איתור באגים של USB" t MSG_271 "מחשב בדיקת סיכום תמונה: %0.1f%% הושלמו" -t MSG_272 "חשב את בדיקות הסיכום MD5, SHA1 ו SHA256 עבור התמונה הנבחרת." +t MSG_272 "חשב את בדיקות הסיכום MD5, SHA1 ו SHA256 עבור הקובץ הנבחר." t MSG_273 "שנה את שפת התוכנה" -t MSG_274 "תמונת ISOHybrid זוהתה" +t MSG_274 "זוהה ISOHybrid קובץ" # '%s' below will be replaced with your translations for MSG_036 ("ISO Image") and MSG_095 ("DD Image") -t MSG_275 "התמונה שבחרת היא תמונת ISOHybrid. זה אומר, שזה יכול להיכתב גם במצב " - "%s (העתקת קבצים) או במצב %s (תמונת דיסק).\n" +t MSG_275 "הקובץ שבחרת הוא קובץ ISOHybrid. זה אומר, שהוא יכול להיכתב גם במצב " + "%s (העתקת קבצים) או במצב %s (קובץ דיסק).\n" "רופוס ממליצה על מצב %s , כדי שתהיה לך גישה מלאה לכונן אחרי זה..\n" - "עם זאת, אם אתה נתקל בבעיות עם האחול, אתה יכול לנסות לצרוב את התמונה שוב במצב %s.\n\n" - "נא בחר את המצב איתו תרצה להשתמש בצריבת תמונה זו:" + "עם זאת, אם את/ה נתקל בבעיות עם האתחול, את/ה יכול לנסות לכתוב את התמונה שוב במצב %s.\n\n" + "נא לבחור את המצב הרצוי בכתיבת קובץ זה: " # '%s' below will be replaced with your translation for MSG_036 ("ISO Image") t MSG_276 "כתוב במצב %s (מומלץ)" # '%s' below will be replaced with your translation for MSG_095 ("DD Image") @@ -6980,21 +6980,27 @@ t MSG_277 "כתוב במצב %s" t MSG_278 "סוג אתחול" t MSG_279 "לא בר אתחול" t MSG_280 "בחירת תמונה" -t MSG_281 "(בבקשה בחר תמונה)" -t MSG_282 "נעילת כונן USB" +t MSG_281 "(בבקשה בחר/י תמונה)" +t MSG_282 "מצב נעילת כונן USB" t MSG_283 "חתימה לא חוקית" t MSG_284 "הקובץ שהורד לא מכיל חתימה דיגיטלית." t MSG_285 "הקובץ שהורד חתום על ידי '%s'.\nזה לא חתימה שאנחנו מכירים וכנראה " - "זה מראה על פעילות זדונית...\nאתה בטוח שברצונך להפעיל את הקובץ הזה?" + "זה מראה על פעילות זדונית...\nהאם את/ה בטוח שברצונך להפעיל את הקובץ הזה?" t MSG_286 "איפוס כונן: %0.1f%% הושלמו" t MSG_287 "איתור כוננים נשלפים שאינם USB" t MSG_288 "חסר הרשאות גבוהות" t MSG_289 "תוכנה זו יכולה לפעול רק עם הרשאות גבוהות" -t MSG_290 "קובץ אינדקס" -t MSG_291 "בחר גירסה" +t MSG_290 "מצב מיון קבצים באינדקס" +t MSG_291 "בחר/י/י גרסה" t MSG_292 "נא לבחור גרסת windows להתקנה:" t MSG_293 "גירסת Windows לא נתמכת" t MSG_294 "גרסת ה windows הזו לא נתמכת יותר ע"י רופוס." +t MSG_295 "אזהרה: גרסה לא רשמית" +t MSG_296 "גרסה זו של רופוס לא נוצרה ע"י מפתחה הרשמי. \n\nהאם את/ה בטוח/ה שברצונך להריץ אותה?" +t MSG_297 "קובץ ISO קטוע זוהה" +t MSG_298 "קובץ ה ISO שבחרת לא מתאים לגודלו המוצהר: מידע בגודל של כ %s חסר!\n\nאםהורדת " + "את הקובץ הזה מהאינטרנט, את/ה צריכ/ה להוריד אותו שוב ולוודא שה checksum שלו ולוודאשביקורת ה MD5 או SHA מתאימים " + "לקובץ החדש.\n\nקח/י בחשבון שניתן לחשב את ה MD5 או SHA בתוך רופוס עי לחיצה על הכפתור '#'." ################################################################################ l "hu-HU" "Hungarian (Magyar)" 0x040e diff --git a/src/rufus.rc b/src/rufus.rc index 929b6745..7425e904 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1154" +CAPTION "Rufus 2.16.1155" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1154,0 - PRODUCTVERSION 2,16,1154,0 + FILEVERSION 2,16,1155,0 + PRODUCTVERSION 2,16,1155,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1154" + VALUE "FileVersion", "2.16.1155" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1154" + VALUE "ProductVersion", "2.16.1155" END END BLOCK "VarFileInfo" From 7ef65b551ac47fa1ae3646f19d2c69d5ee0f4850 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 24 Jul 2017 16:25:18 +0100 Subject: [PATCH 36/97] [misc] yay, more XP fixes... * Since I half expect 2.16 to be the last version of Rufus to support Windows XP --- ChangeLog.txt | 2 ++ src/net.c | 2 +- src/rufus.h | 1 + src/rufus.rc | 10 +++++----- src/stdlg.c | 32 +++++++++++++++----------------- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index c4c9356f..f9334595 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,9 +1,11 @@ o Version 2.16 (2017.07.??) Add an audiovisual cue on completion/error + Add a workaround for ISOs using nonstantard Rock Ridge extensions (looking at you Kali Linux!) Notify user when an ISO is broken or truncated Notify user if other processes are accessing the drive before format List processes that are locking a drive, if any, on failure Improve verbosity of the Windows To Go process + Other fixes and improvements o Version 2.15 (2017.05.17) Fix non-listing of drives that are opened for write access by another process diff --git a/src/net.c b/src/net.c index 418814ba..1904ef3f 100644 --- a/src/net.c +++ b/src/net.c @@ -404,7 +404,7 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param) { BOOL releases_only, found_new_version = FALSE; int status = 0; - const char* server_url = RUFUS_URL "/"; + const char* server_url = UPDATE_URL "/"; int i, j, k, max_channel, verbose = 0, verpos[4]; static const char* archname[] = {"win_x86", "win_x64"}; static const char* channel[] = {"release", "beta", "test"}; // release channel diff --git a/src/rufus.h b/src/rufus.h index bbbae95c..70094dac 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -73,6 +73,7 @@ #define DD_BUFFER_SIZE 65536 // Minimum size of the buffer we use for DD operations #define UBUFFER_SIZE 2048 #define RUFUS_URL "https://rufus.akeo.ie" +#define UPDATE_URL "http://rufus.akeo.ie" // Stupid XP can't handle a recent SSL implementation... #define DOWNLOAD_URL RUFUS_URL "/downloads" #define FILES_URL RUFUS_URL "/files" #define SEVENZIP_URL "http://www.7-zip.org" diff --git a/src/rufus.rc b/src/rufus.rc index 7425e904..77ea22d8 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1155" +CAPTION "Rufus 2.16.1156" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1155,0 - PRODUCTVERSION 2,16,1155,0 + FILEVERSION 2,16,1156,0 + PRODUCTVERSION 2,16,1156,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1155" + VALUE "FileVersion", "2.16.1156" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1155" + VALUE "ProductVersion", "2.16.1156" END END BLOCK "VarFileInfo" diff --git a/src/stdlg.c b/src/stdlg.c index a96f87f4..d2524bbc 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -721,25 +721,23 @@ INT_PTR CALLBACK NotificationCallback(HWND hDlg, UINT message, WPARAM wParam, LP switch (message) { case WM_INITDIALOG: - // Get the system message box font. See http://stackoverflow.com/a/6057761 - ncm.cbSize = sizeof(ncm); - // If we're compiling with the Vista SDK or later, the NONCLIENTMETRICS struct - // will be the wrong size for previous versions, so we need to adjust it. - #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA) - if (nWindowsVersion >= WINDOWS_VISTA) { - // In versions of Windows prior to Vista, the iPaddedBorderWidth member - // is not present, so we need to subtract its size from cbSize. + if (nWindowsVersion >= WINDOWS_VISTA) { // of course, this stuff doesn't work on XP! + // Get the system message box font. See http://stackoverflow.com/a/6057761 + ncm.cbSize = sizeof(ncm); + // If we're compiling with the Vista SDK or later, the NONCLIENTMETRICS struct + // will be the wrong size for previous versions, so we need to adjust it. + #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA) ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth); + #endif + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0); + hDlgFont = CreateFontIndirect(&(ncm.lfMessageFont)); + // Set the dialog to use the system message box font + SendMessage(hDlg, WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDC_NOTIFICATION_TEXT), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDC_MORE_INFO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDYES), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDNO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); } - #endif - SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0); - hDlgFont = CreateFontIndirect(&(ncm.lfMessageFont)); - // Set the dialog to use the system message box font - SendMessage(hDlg, WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - SendMessage(GetDlgItem(hDlg, IDC_NOTIFICATION_TEXT), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - SendMessage(GetDlgItem(hDlg, IDC_MORE_INFO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - SendMessage(GetDlgItem(hDlg, IDYES), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - SendMessage(GetDlgItem(hDlg, IDNO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); apply_localization(IDD_NOTIFICATION, hDlg); background_brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); From 93c2d7851e1f7e2542409850f51a6bee6b373701 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 24 Jul 2017 17:20:17 +0100 Subject: [PATCH 37/97] [ui] fix info box when downloading Syslinux/GRUB files * Don't duplicate the PrintInfo() from DownloadFile() * Make sure caret is disabled and displayed text will not appear selected * Also update MSG_085 and remove unneeded MSG_240 --- res/localization/rufus.loc | 125 +++++++++++++------------------------ src/localization.c | 2 + src/net.c | 2 +- src/rufus.c | 9 +-- src/rufus.rc | 10 +-- 5 files changed, 51 insertions(+), 97 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 5ff4bcce..3606ab53 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -281,7 +281,7 @@ t MSG_084 "This ISO image seems to use an obsolete version of '%s'.\n" "If you don't know what to do, you should select 'Yes'.\n\n" "Note: The new file will be downloaded in the current directory and once a " "'%s' exists there, it will be reused automatically." -t MSG_085 "Downloading %s" +t MSG_085 "Downloading '%s'" t MSG_086 "No image selected" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -487,7 +487,6 @@ t MSG_237 "Bad Blocks: Testing with pattern 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Partitioning (%s)..." t MSG_239 "Deleting partitions..." -t MSG_240 "Downloading %s: Connecting..." t MSG_241 "Downloading: %0.1f%%" t MSG_242 "Failed to download file." t MSG_243 "Checking for Rufus updates..." @@ -751,7 +750,7 @@ t MSG_084 "صورة الـISO يبدو استخدامها لإصدار قديم "إذا كنت لا تعرف ما عليك فعله, عليك اختيار ‘نعم’.\n\n" "ملاحظة: سيتم تحميل ملف جديد في الدليل الحالي وبعد " "العثور على ‘%s’ هناك, سوف يتم إعادة إستخدامه تلقائياً." -t MSG_085 "تحميل %s" +t MSG_085 "تحميل '%s'" t MSG_086 "لم يتم إختيار الصورة" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -953,7 +952,6 @@ t MSG_237 "الأجزاء التالفة: إختبار بواسطة نمط 0x%02 # eg. "Partitioning (MBR)..." t MSG_238 "تقسيم (%s)..." t MSG_239 "حذف الأقسام..." -t MSG_240 "تحميل %s: جاري الإتصال..." t MSG_241 "تحميل: %0.1f%%..." t MSG_242 "فشل في تحميل الملف." t MSG_243 "التحقّق من تحديثات روفوس..." @@ -1226,7 +1224,7 @@ t MSG_084 "Bu ISO faylı '%s'in köhnə bir versiyanı istifadə edir kimi gör "Nə edəcəyinizi bilmirsinizsə, 'Bəli'i seçməlisiniz.\n\n" "Qeyd: Yeni Fayl mövcud göstəriciyə yüklənəcək və " "'%s' Orda mövcud olduqda, avtomatik olaraq istifadə ediləcək." -t MSG_085 "%s yüklənir" +t MSG_085 "'%s' yüklənir" t MSG_086 "Fayl seçilmədi" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -1427,7 +1425,6 @@ t MSG_237 "Səhvli Bloklar: 0x%02X qəlibiylə yoxlanılır" # eg. "Formatting (MBR)..." t MSG_238 "Hissələnir (%s)..." t MSG_239 "Hissələr Silinir..." -t MSG_240 "%s Yüklənir: Bağlanır..." t MSG_241 "Yüklənir: %0.1f%%" t MSG_242 "Fayl yüklənmədi." t MSG_243 "Rufus yeniləmələri yoxlayır..." @@ -1721,7 +1718,7 @@ t MSG_084 "Изглежда че този ISO образ използва ст "Ако не знаете какво да правите, е препоръчително да изберете 'Yes'.\n\n" "Бележка: Новият файл ще бъде изтеглен в настоящата директория и щом бъде изтеглен " "'%s',ще бъде използван автоматично." -t MSG_085 "Изтегляне %s" +t MSG_085 "Изтегляне '%s'" t MSG_086 "Не е избран образ" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -1921,7 +1918,6 @@ t MSG_237 "Лоши блокове: Тестване с модел 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Създаване на дял(ове) (%s)..." t MSG_239 "Изтриване на дял(ове)..." -t MSG_240 "Изтегляне %s: Свързване..." t MSG_241 "Изтегляне: %0.1f%%" t MSG_242 "Неуспешно изтегляне на файл." t MSG_243 "Проверка за Rufus Актуализации..." @@ -2179,7 +2175,7 @@ t MSG_084 "这个 ISO 镜像似乎使用一个过时的 '%s' 版本。\n" "- 选择【否】保留现有的 ISO 文件不变\n" "如果不知道如何选择,请选择【是】。\n\n" "注意:新文件将会下载到当前目录,一旦 '%s' 存在则会被自动选用。" -t MSG_085 "下载 %s 中" +t MSG_085 "下载 '%s' 中" t MSG_086 "未选择镜像" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -2369,7 +2365,6 @@ t MSG_237 "检查坏块:正在使用模式 0x%02X 测试" # eg. "Partitioning (MBR)..." t MSG_238 "正在分区 (%s)..." t MSG_239 "正在删除分区..." -t MSG_240 "正在下载 %s:连接中..." t MSG_241 "正在下载:%0.1f%%" t MSG_242 "未能下载文件。" t MSG_243 "正在检查 Rufus 更新..." @@ -2634,7 +2629,7 @@ t MSG_084 "此 ISO 映像檔似乎使用較舊版本的 '%s',\n開機選單可 "- 選「否」,保留原始 ISO 內容\n" "如果你看不懂或不知該如何抉擇,強烈建議選「是」\n\n" "注意: 一經下載後,Rufus 未來會自動套用新版 '%s'" -t MSG_085 "下載中: %s" +t MSG_085 "下載中 '%s'" t MSG_086 "未選取任何映像檔" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -2800,7 +2795,6 @@ t MSG_237 "損毀磁區: 掃描中 (0x%02X 模式)" # eg. "Partitioning (MBR)..." t MSG_238 "磁區分割中 (%s)..." t MSG_239 "刪除磁區分割..." -t MSG_240 "下載 %s: 連線中..." t MSG_241 "下載中: %0.1f%%" t MSG_242 "檔案下載失敗" t MSG_243 "線上更新: 檢查更新版本中..." @@ -3050,7 +3044,7 @@ t MSG_084 "Ova ISO slika koristi staru verziju '%s'.\n" "- Odaberite 'Ne' da nastavite bez preuzimanja\n" "Preporučamo da odabarete 'Da'.\n\n" "Nova datoteka preuzet će se u isti direktorij." -t MSG_085 "Preuzimam %s" +t MSG_085 "Preuzimam '%s'" t MSG_086 "Nema odabira" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -3249,7 +3243,6 @@ t MSG_237 "Loši blokovi: Testiram s uzorkom 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Particioniram (%s)..." t MSG_239 "Brišem particije..." -t MSG_240 "Preuzimam %s: povezivanje..." t MSG_241 "Preuzimam: %0.1f%%" t MSG_242 "Neuspjelo preuzimanje." t MSG_243 "Provjera Rufus ažuriranja..." @@ -3510,7 +3503,7 @@ t MSG_084 "Zdá se, že tento ISO obraz používá zastaralou verzi '%s'.\n" "Pokud nevíte, co máte udělat, zvolte 'Ano'.\n\n" "Poznámka: Nový soubor %s bude stažen do aktuální složky " "pro opětovné automatické použití." -t MSG_085 "Stahuji: %s" +t MSG_085 "Stahuji '%s'" t MSG_086 "Nebyl zvolen žádný obraz disku" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -3713,7 +3706,6 @@ t MSG_237 "Chybné bloky: Testovaní se vzorkem 0x%02X" # eg. "Vytváření oddílu (MBR)..." t MSG_238 "Vytváření oddílů (%s)..." t MSG_239 "Odstraňování oddílů..." -t MSG_240 "Stahování %s - Probíhá připojení..." t MSG_241 "Stahování: %0.1f%% dokončeno" t MSG_242 "Stažení souboru se nezdařilo." t MSG_243 "Kontrola aktualizací programu Rufus..." @@ -3982,7 +3974,7 @@ t MSG_084 "Dette ISO-image lader til at bruge en forældet version af '%s'.\n" "Hvis du er i tvivl om, hvad du skal vælge, bør du vælge 'Ja'.\n\n" "Bemærk: '%s' bliver gemt i den nuværende mappe og " "bliver efterfølgende automatisk genanvendt, hvis den er der." -t MSG_085 "Downloader %s" +t MSG_085 "Downloader '%s'" t MSG_086 "Ingen image-fil er valgt" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -4169,7 +4161,6 @@ t MSG_236 "Disktest: Tester med tilfældigt mønster" t MSG_237 "Disktest: Tester med mønsteret 0x%02X" t MSG_238 "Partitionerer (%s)..." t MSG_239 "Sletter partitioner..." -t MSG_240 "Henter %s: Tilslutter..." t MSG_241 "Henter: %0.1f%%" t MSG_242 "Kunne ikke hente fil." t MSG_243 "Søger efter Rufus opdateringer..." @@ -4441,7 +4432,7 @@ t MSG_084 "Deze ISO image lijkt een verouderde versie te gebruiken van '%s'.\n" "Als u niet weet wat u moet doen, selecteer dan 'Ja'.\n\n" "Opmerking: Het nieuwe bestand wordt naar de huidige map gedownload en als er al een" "'%s' bestaat, zal deze automatisch hergebruiktworden." -t MSG_085 "Bezig met downloaden van %s" +t MSG_085 "Bezig met downloaden van '%s'" t MSG_086 "Geen image geselecteerd." # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -4626,7 +4617,6 @@ t MSG_237 "Slechte Blokken: Testen met patroon 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Partitioneren (%s)..." t MSG_239 "Partities worden verwijderd..." -t MSG_240 "Downloaden %s: Bezig met connectie..." t MSG_241 "Downloaden: %0.1f%%" t MSG_242 "Downloaden van bestand mislukt." t MSG_243 "Controleren op Rufus updates..." @@ -4885,7 +4875,7 @@ t MSG_084 "Tämä ISO-levykuva vaikuttaisi käyttävän vanhentunutta '%s'-versi "Jos et ole varma, sinun kannattaa valita 'Kyllä'.\n\n" "Huomio: Uusi tiedosto ladataan nykyiseen sijaintiin ja kun " "'%s' löytyy sijainnista, sitä käytetään automaattisesti." -t MSG_085 "Ladataan %s" +t MSG_085 "Ladataan '%s'" t MSG_086 "ISO-levykuvaa ei valittu" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -5084,7 +5074,6 @@ t MSG_237 "Lohkot: Testataan kuviolla 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Osioidaan (%s)..." t MSG_239 "Poistetaan osioita..." -t MSG_240 "Ladataan %s: Yhdistetään..." t MSG_241 "Ladataan: %0.1f%%" t MSG_242 "Tiedoston lataaminen epäonnistui." t MSG_243 "Tarkistetaan Rufus-päivityksiä..." @@ -5339,7 +5328,7 @@ t MSG_084 "Cette image ISO utilise une version obsolète du fichier '%s'.\n" "Si vous ne savez pas quoi faire, sélectionnez 'Oui'.\n\n" "Note : Le nouveau fichier sera téléchargé dans le répertoire courant. " "Si un '%s' existe à cet endroit, il sera réutilisé automatiquement." -t MSG_085 "Téléchargement de %s" +t MSG_085 "Téléchargement de '%s'" t MSG_086 "Aucune image sélectionnée" t MSG_087 "Veuillez cliquer sur le bouton avec un disque pour sélectionner une image démarrable " "ou décochez l'option \"Créer un disque de démarrage\"." @@ -5518,7 +5507,6 @@ t MSG_236 "Test de défauts : Test avec motif aléatoire" t MSG_237 "Test de défauts : Test avec motif 0x%02X" t MSG_238 "Partitionage (%s)..." t MSG_239 "Effacement des partitions..." -t MSG_240 "Téléchargement de %s : Connexion..." t MSG_241 "Téléchargement : %0.1f%%" t MSG_242 "Echec de téléchargement du fichier" t MSG_243 "Recherche des mises à jour..." @@ -5795,7 +5783,7 @@ t MSG_084 "Diese ISO-Abbild-Datei verwendet eine veraltete Version von '%s'.\n" "Wenn Sie unsicher sind, wählen Sie 'Ja'.\n\n" "Hinweis: Die neue Datei wird in das aktuelle Verzeichnis heruntergeladen und falls " "'%s' bereits vorhanden ist, wird sie automatisch wiederverwendet." -t MSG_085 "Download %s" +t MSG_085 "Download '%s'" t MSG_086 "Keine Abbild-Datei gewählt" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -5979,7 +5967,6 @@ t MSG_237 "Fehlerhafte Blöcke: Prüfe mit Muster 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Partitioniere (%s)..." t MSG_239 "Lösche Partitionen..." -t MSG_240 "Download %s: Verbinde..." t MSG_241 "Download: %0.1f%%" t MSG_242 "Fehler beim Dateidownload." t MSG_243 "Prüfe auf neue Rufus-Version..." @@ -6278,7 +6265,7 @@ t MSG_084 "Αυτό το είδωλο ISO φαίνεται να χρησιμοπ "Σε περίπτωση που δεν γνωρίζετε τι να κάνετε, θα ήταν καλό να επιλέξετε το 'Ναι'.\n\n" "Σημείωση: Η λήψη του νέου αρχείου θα γίνει στον τρέχοντα κατάλογο και εφόσον το" "'%s' υπάρχει εκεί, θα επαναχρησιμοποιηθεί αυτόματα." -t MSG_085 "Λήψη %s" +t MSG_085 "Λήψη '%s'" t MSG_086 "Δεν έχει επιλεχθεί κάποιο είδωλο" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -6474,7 +6461,6 @@ t MSG_236 "Κατεστραμμένοι τομείς: Έλεγχος με τυχ t MSG_237 "Κατεστραμμένοι τομείς: Έλεγχος με διάταξη 0x%02X" t MSG_238 "Διαμερισμός (%s)..." t MSG_239 "Διαγραφή διαμερισμάτων..." -t MSG_240 "Λήψη %s: Γίνετε σύνδεση..." t MSG_241 "Γίνετε λήψη: %0.1f%%" t MSG_242 "Η λήψη του αρχείου απέτυχε." t MSG_243 "Έλεγχος για ενημερώσεις του Rufus..." @@ -6721,7 +6707,7 @@ t MSG_084 "נראה שקובץ ה ISO הזה משתמש בגרסה מיושנת "אם אינך יודע/ת מה לעשות, כדאי לבחור 'כן'.\n\n" "שים לב: הקובץ החדש ירד לתיקייה בה ממוקמת התוכנה וברגע ש " "'%s' יהיה שם, רופוס ישתמש בו אוטומטית." -t MSG_085 "מוריד %s" +t MSG_085 "מוריד '%s'" t MSG_086 "לא נבחר שום קובץ." # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -6925,7 +6911,6 @@ t MSG_237 "איזורים פגומים: בדיקה באמצעות 0x%02X" # eg. "יוצר מחיצות (MBR)..." t MSG_238 "יוצר מחיצות (%s)..." t MSG_239 "מוחק מחיצות..." -t MSG_240 "מוריד %s: מתחבר..." t MSG_241 "מוריד: %0.1f%%" t MSG_242 "נכשל בהורדת הקובץ." t MSG_243 "בודק עבור עדכוני רופוס..." @@ -7188,7 +7173,7 @@ t MSG_084 "Ez az ISO fájl valószínűleg a(z) '%s' elavult verzióját haszná "Ha nem tudod, hogy mit csinálj, nyomj 'Igen' gombot.\n\n" "Megjegyzés: Az új fájl a jelenlegi mappába lesz letöltve, és ha egy " "'%s' létezik, akkor az automatikusan újra lesz használva." -t MSG_085 "Letöltés: %s" +t MSG_085 "Letöltés: '%s'" t MSG_086 "Nincs ISO fájl kiválasztva" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -7388,7 +7373,6 @@ t MSG_237 "Hibás blokkok: Tesztelés 0x%02X mintával" # eg. "Partitioning (MBR)..." t MSG_238 "Particionálás (%s)..." t MSG_239 "Partíciók törlése..." -t MSG_240 "Letöltés %s: Kapcsolódás..." t MSG_241 "Letöltés: %0.1f%%" t MSG_242 "A fájl letöltése sikertelen." t MSG_243 "Rufus frissítések keresése..." @@ -7669,7 +7653,7 @@ t MSG_084 "ISO image ini tampaknya menggunakan versi lawas dari '%s'.\n" "Jika Anda tidak mengetahui apa yang harus dilakukan, sebaiknya pilih 'Ya'.\n\n" "Catatan: Berkas baru akan diunduh di direktori saat ini dan karena " "'%s' sudah ada disana, berkas tersebut akan digunakan kembali secara otomatis." -t MSG_085 "Mengunduh %s" +t MSG_085 "Mengunduh '%s'" t MSG_086 "Tidak ada image terpilih" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -7875,7 +7859,6 @@ t MSG_237 "Blok Buruk: Mencoba dengan pola 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Mempartisi (%s)..." t MSG_239 "Menghapus partisi..." -t MSG_240 "Mengunduh %s: Menyambungkan..." t MSG_241 "Mengunduh: %0.1f%%" t MSG_242 "gagal mengunduh berkas." t MSG_243 "Memeriksa pembaruan Rufus..." @@ -8121,7 +8104,7 @@ t MSG_084 "Questa immagine sembra che usi una versione obsoleta di '%s'.\n" "Se non sai cosa fare, è preferibile selezionare 'Sì'.\n\n" "Nota: il nuovo file verrà scaricato nella cartella attuale e una volta " "scaricato '%s', verrà riusato automaticamente." -t MSG_085 "Download %s" +t MSG_085 "Download '%s'" t MSG_086 "Nessuna immagine selezionata" t MSG_087 "Fai clic sul pulsante disco per selezionare una immagine avviabile, " "o deseleziona \"Crea un disco avviabile usando\"." @@ -8309,7 +8292,6 @@ t MSG_236 "Blocchi danneggiati: test con pattern casuali" t MSG_237 "Blocchi danneggiati: testing con pattern 0x%02X" t MSG_238 "Partitionamento (%s)..." t MSG_239 "Eliminazione partizioni..." -t MSG_240 "Download di %s: connessione..." t MSG_241 "Download: %0.1f%%" t MSG_242 "Impossibile scaricare il file." t MSG_243 "Verifica disponibilità aggiornamenti Rufus..." @@ -8615,7 +8597,7 @@ t MSG_084 "このISOは '%s' の古いバージョンを使うようです。\n" "どうしたらよいかわからない場合は「Yes」をクリックすることを推奨します。\n\n" "注意: 新しいファイルは現在のディレクトリにダウンロードされます。" "すでに'%s'のファイルが存在している場合は自動で再利用します。" -t MSG_085 "%s をダウンロード中" +t MSG_085 "「%s」 をダウンロード中" t MSG_086 "イメージが選択されていません。" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -8819,7 +8801,6 @@ t MSG_236 "不良ブロック:ランダムパターンでテスト" t MSG_237 "不良ブロック:パターン 0x%02X でテスト" t MSG_238 "パーティション分割中 (%s)..." t MSG_239 "パーティション削除中..." -t MSG_240 "ダウンロード中 %s: 接続中..." t MSG_241 "ダウンロード中: %0.1f%%" t MSG_242 "ファイルのダウンロードは失敗しました。" t MSG_243 "Rufusのアップデートを探しています..." @@ -9074,7 +9055,7 @@ t MSG_084 "이 ISO 이미지는 '%s'의 구 버전이기에\n" "잘 모르는 경우, '예'를 선택하십시오.\n\n" "알림: 새 파일은 현재 디렉토리에 다운로드가 되며 이미 " "'%s'가 있다면, 자동으로 다시 사용됩니다." -t MSG_085 "%s 다운로드 중..." +t MSG_085 "'%s' 다운로드 중..." t MSG_086 "선택된 ISO 이미지가 없습니다" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -9096,12 +9077,9 @@ t MSG_096 "현재 선택된 파일 시스템은 이 타입의 ISO 파일은 사 t MSG_097 "'%s'는 파일 시스템이 NTFS일 경우에만 적용할 수 있습니다." t MSG_098 "중요: 'Windows To Go'를 설치하려면 대상 드라이브가 'FIXED' 속성이어야만 합니다. " "Microsoft가 'REMOVABLE' 속성의 디스크로도 잘 작동되도록 설계를 하지 않았으므로 " - "부팅하는 도중에 시스템이 얼어버릴 수도 있습니다.\n\n" - "그래도 계속 하시겠습니까?\n\n" + "부팅하는 도중에 시스템이 얼어버릴 수도 있습니다.\n\n그래도 계속 하시겠습니까?\n\n" "알림: '고정/이동식'속성은 드라이브 제조업체에서 사용자 정의 도구를 사용하여 " - "변경할 수있는 하드웨어 속성입니다. 그러나 이런 도구는 거의 일반 유저에게는 제공되지 " - "않습니다." - + "변경할 수있는 하드웨어 속성입니다. 그러나 이런 도구는 거의 일반 유저에게는 제공되지 않습니다." t MSG_099 "파일 시스템 제한" t MSG_100 "이 ISO 이미지는 FAT 또는 FAT32 파일 시스템에 허용되는 최대 크기 4GB보다 " "더 큰 파일이 포함되어 있습니다." @@ -9271,7 +9249,6 @@ t MSG_236 "배드 섹터: 랜덤 패턴 테스트" t MSG_237 "배드 섹터: 0x%02X 패턴으로 테스트" t MSG_238 "파티션 작업 (%s)..." t MSG_239 "파티션 삭제..." -t MSG_240 "%s 다운로드: 연결..." t MSG_241 "다운로드: %0.1f%%" t MSG_242 "파일을 다운로드하지 못했습니다." t MSG_243 "업데이트를 확인하고 있습니다..." @@ -9554,7 +9531,7 @@ t MSG_084 "Šis ISO imidžs izmanto novecojušas versijas '%s'.\n" "Ja nezināt ko darīt, izvēlieties 'Jā'.\n\n" "Piezīme: Jaunais fails tiks lejupielādēts tekošajā mapē, un eksistējošais " "'%s' automātiski tiks samainīts." -t MSG_085 "Lejuplādēts %s" +t MSG_085 "Lejuplādēts '%s'" t MSG_086 "Nav izvēlēts imidžs" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -9753,7 +9730,6 @@ t MSG_237 "Bojātie sektori: Testēšana ar 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Sadaļas izveide (%s)..." t MSG_239 "Sadaļas dzēšana..." -t MSG_240 "Lejuplādē %s: Savienojums..." t MSG_241 "Ielādējas: %0.1f%%" t MSG_242 "Kļūda lejuplādējot failu." t MSG_243 "Tiek pārbaudīti Rufus jauninājumi..." @@ -10021,7 +9997,7 @@ t MSG_084 "Atrodo, šis ISO atvaizdas naudoja pasenusią '%s' versiją.\n" "Jei nežinote ką daryti, reikėtų pasirinkti 'Taip'.\n\n" "Pastaba: naujas failas bus atsiųstas į dabartinį katalogą ir jei " "'%s' ten jau yra, jis bus panaudotas iš naujo automatiškai." -t MSG_085 "Siunčiu %s" +t MSG_085 "Siunčiu '%s'" t MSG_086 "Nepasirinktas atvaizdas" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -10222,7 +10198,6 @@ t MSG_237 "Blogi blokai: tikrinama su šablonu 0x%02X" # eg. "Skaidoma (MBR)..." t MSG_238 "Skaidoma (%s)..." t MSG_239 "Trinami skaidiniai..." -t MSG_240 "Atsiunčiamas %s: Jungiamasi..." t MSG_241 "Atsiunčiama: %0.1f%%" t MSG_242 "Nepavyko atsiųsti failo." t MSG_243 "Tikrinama, ar yra Rufus naujinių..." @@ -10507,7 +10482,7 @@ t MSG_084 "Imej ISO ini menggunakan versi '%s' yang telah lapuk.\n" "Jika anda tidak pasti apa yang perlu dilakukan, pilih 'Ya'.\n\n" "Perhatian: Fail yang dimuat turun akan disimpan di dalam direktori bersamaan dengan Rufus dan apabila terdapat " "'%s' , ia akan digunakan secara automatik." -t MSG_085 "Muat turun %s" +t MSG_085 "Muat turun '%s'" t MSG_086 "Tiada imej yang dipilih" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -10711,7 +10686,6 @@ t MSG_237 "Blok rosak: Menguji dengan corak 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Mempartisyenkan (%s)..." t MSG_239 "Memadam partisyen..." -t MSG_240 "Memuat turun %s: menyambung ke internet..." t MSG_241 "memuat turun: %0.1f%%" t MSG_242 "Gagal memuat turun fail." t MSG_243 "Memeriksa untuk kemas kini Rufus..." @@ -10986,7 +10960,7 @@ t MSG_084 "Dette ISO bildet ser ut til å inneholde en foreldet versjon av '%s'. "Hvis du ikke vet hva du skal gjøre, bør du velge 'Ja'.\n\n" "OBS: Den nye filen vil bli lastet ned i den gjeldende mappen, og når" "'%s' er der, vil den bli brukt automatisk." -t MSG_085 "Laster ned %s" +t MSG_085 "Laster ned '%s'" t MSG_086 "Intet bilde valgt" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -11190,7 +11164,6 @@ t MSG_237 "Dårlige blokker: Tester med mønster 0x%02X" # eg. "Partisjonerer (MBR)..." t MSG_238 "Partisjonerer (%s)..." t MSG_239 "Sletter partisjoner..." -t MSG_240 "Laster ned %s: Kobler til..." t MSG_241 "Laster ned: %0.1f%%" t MSG_242 "Nedlasting av fil feilet." t MSG_243 "Sjekker for Rufus oppdateringer..." @@ -11515,7 +11488,7 @@ t MSG_084 "انگار این فایل ISO از نسخه قدیمی «%s» است "-برای اتصال به اینترنت و دانلود این فایل «بله» را انتخاب کنید\n" "-اگر نمی‌خواهید این فایل را دانلود کنید، «خیر» را انتخاب کنید.\n\n" "نکته: این فایل در پوشه نرم‌افزار دانلود می‌شود و در دفعات بعد به‌صورت خودکار از آن استفاده خواهد شد." -t MSG_085 "در حال دانلود کردن %s" +t MSG_085 "در حال دانلود کردن '%s'" t MSG_086 "فایل ایمیج انتخاب نشده است" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -11739,7 +11712,6 @@ t MSG_237 "‫بررسی بدسکتور: آزمایش با استفاده از # eg. "Partitioning (MBR)..." t MSG_238 "‫در حال پارتیشن‌بندی (%s)...‬" t MSG_239 "‫در حال حذف پارتیشن‌ها...‬" -t MSG_240 "‫دانلود %s: در حال اتصال...‬" t MSG_241 "‫در حال دانلود: %0.1f%%‬" t MSG_242 "دانلود فایل ناموفق بود" # Translator Note: In the line below invisible RLE (at the beginning) and PDF (at the end) are used @@ -12035,7 +12007,7 @@ t MSG_084 "Ten plik ISO wydaje się być przestarzałą wersją '%s'.\n" "Jeśli nie wiesz co zrobić, powinieneś wybrać 'Tak'.\n\n" "Informacja: Nowy plik będzie pobrany do aktualnej lokalizacji i gdy " "'%s' jest tutaj, zostanie użyte automatycznie." -t MSG_085 "Pobieranie %s" +t MSG_085 "Pobieranie '%s'" t MSG_086 "Nie wybrano obrazu" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -12238,7 +12210,6 @@ t MSG_237 "Błędne Sektory: Testowanie z wzorem 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Partycjonowanie (%s)..." t MSG_239 "Usuwanie partycji..." -t MSG_240 "Pobieranie %s: Łączenie..." t MSG_241 "Pobieranie: %0.1f%%" t MSG_242 "Niepowodzenie pobierania pliku." t MSG_243 "Sprawdzanie aktualizacji Rufusa..." @@ -12508,7 +12479,7 @@ t MSG_084 "Esta imagem ISO usa uma versão obtida do arquivo '%s'.\n" "Se não sabe o que fazer, é recomendado selecionar 'Sim'.\n\n" "Nota: O novo arquivo será baixado na pasta atual, uma vez que " "o arquivo\n '%s' existente aí, será substituído automaticamente." -t MSG_085 "Baixando %s" +t MSG_085 "Baixando '%s'" t MSG_086 "Não existe nenhuma imagem ISO selecionada" t MSG_087 "Pressione o botão de disco para selecionar uma ISO bootável, " "ou desmarque a opção \"Criar um disco de arranque...\"." @@ -12689,7 +12660,6 @@ t MSG_236 "Blocos com erro: Verificando com teste padrão" t MSG_237 "Blocos com erro: Verificando com teste padrão 0x%02X" t MSG_238 "Criar partições (%s)..." t MSG_239 "Apagar partições..." -t MSG_240 "Baixando %s: Conectando..." t MSG_241 "Baixando: %0.1f%%" t MSG_242 "Erro ao baixar arquivo." t MSG_243 "Procurando atualizações de Rufus..." @@ -12951,7 +12921,7 @@ t MSG_084 "Esta imagem ISO usa uma versão obsoleta do ficheiro '%s'.\n" "Se não sabe o que fazer, é recomendado selecionar 'Sim'.\n\n" "Nota: O novo ficheiro será transferido para a pasta atual, e se " "o ficheiro\n '%s' já existir, será substituído automaticamente." -t MSG_085 "A transferir %s" +t MSG_085 "A transferir '%s'" t MSG_086 "Nenhuma imagem selecionada" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -13157,7 +13127,6 @@ t MSG_237 "Blocos com erro: A verificar com padrão 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "A criar partições (%s)..." t MSG_239 "A apagar partições..." -t MSG_240 "Transferir %s: A ligar..." t MSG_241 "Transferência: %0.1f%%" t MSG_242 "Erro ao transferir o ficheiro." t MSG_243 "Procurar atualizações de Rufus" @@ -13413,7 +13382,7 @@ t MSG_084 "Acest lucru arată ca utilizați o versiune învechită a '%s'.\n" "Dacă nu știi ce să faci, este recomandat să alegi 'Da'.\n\n" "Notă: Noul fișier va fi descărcat în folderul curent și odată " "descărcat '%s', va fi reutilizat automat." -t MSG_085 "Descărcare %s" +t MSG_085 "Descărcare '%s'" t MSG_086 "Nici o imagine selectată" t MSG_087 "Faceți clic pe butonul Disk pentru a selecta un fișier, imagine boot-abilă, " "sau debifează \"A crea un disc boot-abil cu ajutorul\"." @@ -13588,7 +13557,6 @@ t MSG_236 "Blocuri defecte: testarea cu modele aleatoare" t MSG_237 "Blocuri defecte: testarea cu model 0x%02X" t MSG_238 "Partiționare (%s)..." t MSG_239 "Eliminare partiții..." -t MSG_240 "Descărcare de %s: conexiune..." t MSG_241 "Descărcare: %0.1f%%" t MSG_242 "Imposibilitatea de a descărca fișierul." t MSG_243 "Verificare actualizări Rufus..." @@ -13855,7 +13823,7 @@ t MSG_084 "Выбранный ISO-образ использует устарев "- Выберите 'Нет', чтобы не модифицировать ISO-образ\n" "Если вы не знаете что делать, то выберите 'Да'.\n\n" "Файл будет загружен в текущую директорию, а в случае наличия '%s' - заменен автоматически." -t MSG_085 "Загружено %s" +t MSG_085 "Загружено '%s'" t MSG_086 "Не выбран образ" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -14040,7 +14008,6 @@ t MSG_237 "Плохие блоки: Тестирование 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Разметка раздела (%s)..." t MSG_239 "Удаление разделов..." -t MSG_240 "Загружено %s: Соединение..." t MSG_241 "Загружено: %0.1f%%" t MSG_242 "Не удалось скачать файл." t MSG_243 "Проверка наличия обновлений..." @@ -14313,7 +14280,7 @@ t MSG_084 "Ova ISO datoteka koristi zastarjelu verziju '%s'.\n" "Ukoliko niste sigurni šta da odaberete, odaberite 'Da'.\n\n" "Napomena: Nova datoteka će biti sačuvana u istom direktorijumu kao i Rufus, i kad " "datoteka '%s' postoji tamo, automatski će biti korišćena.\n" -t MSG_085 "Preuzimam %s" +t MSG_085 "Preuzimam '%s'" t MSG_086 "Nije odabrana datoteka" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -14519,7 +14486,6 @@ t MSG_237 "Neispravni blokovi: Testiranje sa uzorkom 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Particionisanje (%s)..." t MSG_239 "Brisanje particija..." -t MSG_240 "Preuzimanje %s: Povezivanje..." t MSG_241 "Preuzimanje: %0.1f%%" t MSG_242 "Neuspjelo preuzimanje datoteka." t MSG_243 "Provjera ažuriranja Rufusa..." @@ -14783,7 +14749,7 @@ t MSG_084 "Zdá sa, že tento ISO obraz používa zastaralú verziu modulu %s.\n "Ak neviete, čo máte robiť, vyberte tlačidlo \"Áno\".\n\n" "Poznámka: Nový súbor %s bude stiahnutý " "do aktuálneho priečinka programu a potom bude automaticky použitý." -t MSG_085 "Sťahovanie: %s" +t MSG_085 "Sťahovanie '%s'" t MSG_086 "Nie je vybraný žiadny obraz disku" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -14982,7 +14948,6 @@ t MSG_237 "Chybné bloky: Testovanie s vzorkou 0x%02X" # eg. "Vytváranie oddielov (MBR)..." t MSG_238 "Vytváranie oddielov (%s)..." t MSG_239 "Vymazávanie oddielov..." -t MSG_240 "Sťahovanie: %s - pripájanie..." t MSG_241 "Sťahovanie: %0.1f%% dokonených" t MSG_242 "Neúspešné sťahovanie súboru." t MSG_243 "Kontrola aktualizácií programu Rufus..." @@ -15248,7 +15213,7 @@ t MSG_084 "Zdi se, da ta ISO slika uporablja zastarelo verzijo \"%s\".\n" "Če ne veste, kaj storiti, izberite \"Da\".\n\n" "Opomba: nova datoteka bo prenesena v trenutni imenik in ko datoteka " "\"%s\" tam enkrat obstaja, bo samodejno uporabljena tudi v bodoče." -t MSG_085 "Prenašam %s" +t MSG_085 "Prenašam '%s'" t MSG_086 "Izbrana ni nobena slika" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -15433,7 +15398,6 @@ t MSG_236 "Slabi bloki: testiram z naključnim vzorcem" t MSG_237 "Slabi bloki: testiram z vzorcem 0x%02X" t MSG_238 "Ustvarjam particije (%s)…" t MSG_239 "Brišem particije…" -t MSG_240 "Prenos %s: povezovanje…" t MSG_241 "Prenos: %0.1f%%" t MSG_242 "Ni mogoče prenesti datoteke." t MSG_243 "Preverjam za posodobitve Rufusa…" @@ -15706,7 +15670,7 @@ t MSG_084 "Esta imagen ISO parece que usa una versión obsoleta del archivo '%s' "Si no sabe qué hacer, se recomienda seleccionar 'Sí'.\n\n" "Nota: El nuevo archivo se descargará en el directorio actual, en el momento que " "un archivo\n '%s' exista ahí, será usado automáticamente." -t MSG_085 "Descargando %s" +t MSG_085 "Descargando '%s'" t MSG_086 "No hay imagen ISO seleccionada" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -15910,7 +15874,7 @@ t MSG_237 "Bloques dañados: Probando con el patrón 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Particionando (%s)..." t MSG_239 "Borrando particiones..." -t MSG_240 "Descargando %s: Conectando..." + t MSG_241 "Descargando: %0.1f%%" t MSG_242 "Error al descargar el archivo." t MSG_243 "Buscando actualizaciones de Rufus..." @@ -16191,7 +16155,7 @@ t MSG_084 "Denna ISO-avbild verkar använda en gammal version av '%s'.\n" "Vet du inte vad du ska välja, så ska du välja 'Ja'.\n\n" "Obs: Filen kommer att laddas ned i nuvarande katalog och när " "'%s' sedan finns där, kommer den automatiskt att återanvändas." -t MSG_085 "Laddar ned %s" +t MSG_085 "Laddar ned '%s'" t MSG_086 "Ingen avbild vald" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -16390,7 +16354,6 @@ t MSG_237 "Trasiga block: Testar med mönster 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Partitionerar (%s)..." t MSG_239 "Raderar partitioner..." -t MSG_240 "Laddar ned %s: Ansluter..." t MSG_241 "Laddar ned: %0.1f%%" t MSG_242 "Kunde inte ladda ned filen." t MSG_243 "Kontrollerar efter Rufus uppdateringar..." @@ -16648,7 +16611,7 @@ t MSG_084 "ISO อิมเมจนี้อาจเป็นเวอร์ "หากไม่รู้จะเลือกวิธีใด ให้เลือก 'ใช่'\n\n" "หมายเหตุ: ไฟล์ใหม่จะถูกจัดเก็บในโฟลเดอร์ปัจจุบัน และเมื่อไฟล์ " "'%s มีแล้ว ไฟล์จะถูกเลือกใช้โดยอัตโนมัติ" -t MSG_085 "กำลังดาวน์โหลด %s" +t MSG_085 "กำลังดาวน์โหลด '%s'" t MSG_086 "ยังไม่ได้เลือกอิมเมจไฟล์" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -16854,7 +16817,6 @@ t MSG_237 "พบข้อบกพร่อง: กำลังทดสอบ # eg. "Partitioning (MBR)..." t MSG_238 "กำลังแบ่งพาร์ทิชั่น (%s)..." t MSG_239 "กำลังลบพาร์ทิชั่น..." -t MSG_240 "กำลังดาวน์โหลด %s: กำลังเชื่อมต่อ..." t MSG_241 "ดาวน์โหลดแล้ว: %0.1f%%" t MSG_242 "ไม่สามารถดาวน์โหลดไฟล์ได้" t MSG_243 "กำลังตรวจหาการปรับรุ่น Rufus..." @@ -17156,7 +17118,7 @@ t MSG_084 "Bu ISO yansıması '%s'in eski bir sürümünü kullanıyor gibi gör "Ne yapacağınızı bilmiyorsanız, 'Evet'i seçmelisiniz.\n\n" "Not: Yeni dosya mevcut dizine indirilecek ve " "'%s' orda varolunca, otomatik olarak kullanılacak." -t MSG_085 "%s indiriliyor" +t MSG_085 "'%s' indiriliyor" t MSG_086 "Yansıma seçilmedi" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -17357,7 +17319,6 @@ t MSG_237 "Hatalı Bloklar: 0x%02X kalıbıyla deneniyor" # eg. "Formatting (MBR)..." t MSG_238 "Bölümlendiriliyor (%s)..." t MSG_239 "Bölümler Siliniyor..." -t MSG_240 "%s İndiriliyor: Bağlanıyor..." t MSG_241 "İndiriliyor: %0.1f%%" t MSG_242 "Dosya indirilemedi." t MSG_243 "Rufus güncellemeleri denetleniyor..." @@ -17641,7 +17602,7 @@ t MSG_084 "Обраний ISO-образ використовує застарі "- Оберіть 'Ні', щоб не модифікувати ISO-образ\n" "Якщо ви не знаєте що робити, то оберіть 'Так'.\n\n" "Файл буде завантажений в поточну директорію, а в разі наявності '%s' - замінений автоматично." -t MSG_085 "Завантажено %s" +t MSG_085 "Завантажено '%s'" t MSG_086 "Образ не обрано" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -17827,7 +17788,6 @@ t MSG_237 "Погані блоки: Тестування 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Розмітка розділу (%s)..." t MSG_239 "Видалення розділів..." -t MSG_240 "Завантаження %s: З'єднання..." t MSG_241 "Завантажено: %0.1f%%" t MSG_242 "Не вдалося завантажити файл." t MSG_243 "Перевірка наявності оновлень..." @@ -18094,7 +18054,7 @@ t MSG_084 "Ảnh ISO này là phiên bản cũ của '%s'.\n" "Nếu bạn không biết phải làm gì, bạn nên chọn 'Có'.\n\n" "Ghi chú: Tập tin mới sẽ được tải xuống vào thư mục hiện tại và một khi '%s' có " "trong đó, nó sẽ được tự động tái sử dụng." -t MSG_085 "Đang tải xuống %s" +t MSG_085 "Đang tải xuống '%s'" t MSG_086 "Chưa chọn ảnh" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text @@ -18299,7 +18259,6 @@ t MSG_236 "Khối hỏng: Kiểm tra với mẫu ngẫu nhiên" t MSG_237 "Khối hỏng: Kiểm tra với mẫu 0x%02X" t MSG_238 "Đang phân vùng (%s)..." t MSG_239 "Đang xoá phân vùng..." -t MSG_240 "Đang tải xuống %s: Đang kết nối..." t MSG_241 "Đang tải xuống: %0.1f%%" t MSG_242 "Không thể tải xuống tập tin." t MSG_243 "Đang kiểm tra cập nhật Rufus..." diff --git a/src/localization.c b/src/localization.c index e4941ff7..256ad849 100644 --- a/src/localization.c +++ b/src/localization.c @@ -24,6 +24,7 @@ #endif #include +#include #include #include #include @@ -426,6 +427,7 @@ static uint64_t last_msg_time[2] = { 0, 0 }; static void PrintInfoMessage(char* msg) { SetWindowTextU(hInfo, msg); + Edit_SetSel(hInfo, -1, 0); } static void PrintStatusMessage(char* msg) { SendMessageLU(hStatus, SB_SETTEXTW, SBT_OWNERDRAW | SB_SECTION_LEFT, msg); diff --git a/src/net.c b/src/net.c index 1904ef3f..2e77d589 100644 --- a/src/net.c +++ b/src/net.c @@ -255,7 +255,7 @@ DWORD DownloadFile(const char* url, const char* file, HWND hProgressDialog) } } - PrintInfo(0, MSG_240, &file[last_slash]); + PrintInfo(0, MSG_085, &file[last_slash]); uprintf("Downloading '%s' from %s\n", &file[last_slash], url); if ( (!InternetCrackUrlA(url, (DWORD)safe_strlen(url), 0, &UrlParts)) diff --git a/src/rufus.c b/src/rufus.c index f9760d74..8dda3329 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -1393,7 +1393,6 @@ static BOOL BootCheck(void) IGNORE_RETVAL(_mkdir(tmp)); IGNORE_RETVAL(_chdir(tmp)); static_sprintf(tmp, "%s/%s-%s/%s", FILES_URL, grub, img_report.grub2_version, core_img); - PrintInfoDebug(0, MSG_085, tmp); PromptOnError = FALSE; grub2_len = (long)DownloadFile(tmp, core_img, hMainDialog); PromptOnError = TRUE; @@ -1405,7 +1404,6 @@ static BOOL BootCheck(void) for (i = 0; ((tmp2[i] >= '0') && (tmp2[i] <= '9')) || (tmp2[i] == '.'); i++); tmp2[i] = 0; static_sprintf(tmp, "%s/%s-%s/%s", FILES_URL, grub, tmp2, core_img); - PrintInfoDebug(0, MSG_085, tmp); PromptOnError = FALSE; grub2_len = (long)DownloadFile(tmp, core_img, hMainDialog); PromptOnError = TRUE; @@ -1453,7 +1451,6 @@ static BOOL BootCheck(void) static_sprintf(tmp, "%s-%s", syslinux, embedded_sl_version_str[0]); IGNORE_RETVAL(_mkdir(tmp)); static_sprintf(tmp, "%s/%s-%s/%s", FILES_URL, syslinux, embedded_sl_version_str[0], old_c32_name[i]); - PrintInfo(0, MSG_085, old_c32_name[i]); len = DownloadFile(tmp, &tmp[sizeof(FILES_URL)], hMainDialog); if (len == 0) { uprintf("Could not download file - cancelling"); @@ -1501,7 +1498,6 @@ static BOOL BootCheck(void) } static_sprintf(tmp, "%s/%s-%s%s/%s.%s", FILES_URL, syslinux, img_report.sl_version_str, img_report.sl_version_ext, ldlinux, ldlinux_ext[i]); - PrintInfo(0, MSG_085, tmp); PromptOnError = (*img_report.sl_version_ext == 0); syslinux_ldlinux_len[i] = DownloadFile(tmp, &tmp[sizeof(FILES_URL)], hMainDialog); PromptOnError = TRUE; @@ -1510,7 +1506,6 @@ static BOOL BootCheck(void) uprintf("Extended version was not found, trying main version..."); static_sprintf(tmp, "%s/%s-%s/%s.%s", FILES_URL, syslinux, img_report.sl_version_str, ldlinux, ldlinux_ext[i]); - PrintInfo(0, MSG_085, tmp); syslinux_ldlinux_len[i] = DownloadFile(tmp, &tmp[sizeof(FILES_URL)], hMainDialog); if (syslinux_ldlinux_len[i] != 0) { // Duplicate the file so that the user won't be prompted to download again @@ -1554,7 +1549,6 @@ static BOOL BootCheck(void) static_sprintf(tmp, "%s-%s", syslinux, embedded_sl_version_str[1]); IGNORE_RETVAL(_mkdir(tmp)); static_sprintf(tmp, "%s/%s-%s/%s.%s", FILES_URL, syslinux, embedded_sl_version_str[1], ldlinux, ldlinux_ext[2]); - PrintInfo(0, MSG_085, tmp); if (DownloadFile(tmp, &tmp[sizeof(FILES_URL)], hMainDialog) == 0) return FALSE; } @@ -1585,8 +1579,6 @@ static BOOL BootCheck(void) static_sprintf(tmp, "grub4dos-%s", GRUB4DOS_VERSION); IGNORE_RETVAL(_mkdir(tmp)); static_sprintf(tmp, "%s/grub4dos-%s/grldr", FILES_URL, GRUB4DOS_VERSION); - PrintInfo(0, MSG_085, tmp); - uprintf("URL = %s", tmp); if (DownloadFile(tmp, &tmp[sizeof(FILES_URL)], hMainDialog) == 0) return FALSE; } @@ -1722,6 +1714,7 @@ static void InitDialog(HWND hDlg) 0, 0, PROOF_QUALITY, 0, (nWindowsVersion >= WINDOWS_VISTA)?"Segoe UI":"Arial Unicode MS"); SendDlgItemMessageA(hDlg, IDC_INFO, WM_SETFONT, (WPARAM)hInfoFont, TRUE); hInfoBrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE)); + HideCaret(hInfo); // Create the title bar icon SetTitleBarIcon(hDlg); diff --git a/src/rufus.rc b/src/rufus.rc index 77ea22d8..552cad1e 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1156" +CAPTION "Rufus 2.16.1157" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1156,0 - PRODUCTVERSION 2,16,1156,0 + FILEVERSION 2,16,1157,0 + PRODUCTVERSION 2,16,1157,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1156" + VALUE "FileVersion", "2.16.1157" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1156" + VALUE "ProductVersion", "2.16.1157" END END BLOCK "VarFileInfo" From 32b8b5b23217b19593777c26e3c851a21fd147e7 Mon Sep 17 00:00:00 2001 From: Tiago Rinaldi Date: Mon, 17 Jul 2017 18:37:23 -0300 Subject: [PATCH 38/97] [loc] update Portuguese (Brazilian) translation to latest * Closes #981 --- res/localization/rufus.loc | 12 ++++++++++-- src/rufus.rc | 10 +++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 3606ab53..434dad0b 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -12279,7 +12279,7 @@ t MSG_298 "Rozmiar pliku ISO który wybrałeś nie zgadza się z jego deklarowan ################################################################################ l "pt-BR" "Portuguese Brazilian (Português do Brasil)" 0x0416 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -12718,7 +12718,15 @@ t MSG_290 "Indexação de arquivo" t MSG_291 "Seleção de versão" t MSG_292 "Por favor, selecione a versão do Windows que deseja instalar:" t MSG_293 "Versão do Windows não suportada" -t MSG_294 "Esta versão do Windows não é mais suportada pelo Rufos" +t MSG_294 "Esta versão do Windows não é mais suportada pelo Rufus" +t MSG_295 "Atenção: versão não oficial" +t MSG_296 "Esta versão do Rufus não foi desenvolvida pelo(s) desenvolvedor(es) oficiais.\n\n" + "Tem certeza que deseja continuar?" +t MSG_297 "ISO reduzida detectada" +t MSG_298 "O arquivo ISO selecionado não corresponde ao tamanho declarado: %s restantes!\n\n" + "Se você obteve este arquivo da Internet, faça o download de uma nova cópia e verifique que o " + "MD5 ou SHA checksums correspondem aos oficiais.\n\nVocê pode calcular o MD5 ou SHA no Rufus " + "clicando no botão '#'." ################################################################################ l "pt-PT" "Portuguese Standard (Português)" 0x0816 diff --git a/src/rufus.rc b/src/rufus.rc index 552cad1e..43f18bc6 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1157" +CAPTION "Rufus 2.16.1158" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1157,0 - PRODUCTVERSION 2,16,1157,0 + FILEVERSION 2,16,1158,0 + PRODUCTVERSION 2,16,1158,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1157" + VALUE "FileVersion", "2.16.1158" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1157" + VALUE "ProductVersion", "2.16.1158" END END BLOCK "VarFileInfo" From 3622b441edeadaf4a4d8b5d3e4475484fd3c3ab9 Mon Sep 17 00:00:00 2001 From: Ivan Strugar Date: Tue, 25 Jul 2017 00:19:35 +0100 Subject: [PATCH 39/97] [loc] update Serbian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 434dad0b..2a9ea0d6 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -14077,7 +14077,7 @@ t MSG_294 "Эта версия Windows больше не поддерживае ################################################################################ l "sr-SP" "Serbian (Srpski)" 0x241a, 0x081a, 0x181a, 0x2c1a, 0x701a, 0x7c1a -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -14563,6 +14563,12 @@ t MSG_291 "Odabir verzije" t MSG_292 "Odaberite verziju Windows-a koju želite da instalirate:" t MSG_293 "Nepodržana verzija Windows-a" t MSG_294 "Rufus više ne podržava ovu verziju Windows-a." +t MSG_295 "Upozorenje: Nezvanična verzija" +t MSG_296 "Ovu verziju Rufus-a nije proizveo zvanični programer(i).\n\nDa li ste sigurni da želite da je pokrenete?" +t MSG_297 "ISO datoteka nije validna" +t MSG_298 "ISO datoteka koju ste odabrali ne podudara se sa njenom zvaničnom veličinom: %s nedostaje!\n\nUkoliko ste preuzeli " + "ovu datoteka sa Interneta, pokušajte da ponovo preuzmete kopiju ove datoteke i provjerite da li se podudara za zvaničnom datotekom pomoću " + "MD5 ili SHA kontrolne sume.\n\nNapomena, možete izračunati kontrolnu sumu pomoću Rufus-a klikom na '#' dugme." ################################################################################ l "sk-SK" "Slovak (Slovensky)" 0x041B diff --git a/src/rufus.rc b/src/rufus.rc index 43f18bc6..65203137 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1158" +CAPTION "Rufus 2.16.1159" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1158,0 - PRODUCTVERSION 2,16,1158,0 + FILEVERSION 2,16,1159,0 + PRODUCTVERSION 2,16,1159,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1158" + VALUE "FileVersion", "2.16.1159" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1158" + VALUE "ProductVersion", "2.16.1159" END END BLOCK "VarFileInfo" From 0a3c04379b51363c5623b3c5da85e0b83100c59f Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 25 Jul 2017 12:19:50 +0100 Subject: [PATCH 40/97] [misc] fix Coverity warnings --- _coverity.cmd | 2 +- src/badblocks.c | 1 + src/rufus.c | 34 +++++++++++++++++----------------- src/rufus.rc | 10 +++++----- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/_coverity.cmd b/_coverity.cmd index 5c7c412b..80c2c6fa 100644 --- a/_coverity.cmd +++ b/_coverity.cmd @@ -1,7 +1,7 @@ @rem *** Internal developer script to run Coverity *** @echo off call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -set COV_DIR=D:\cov-analysis-win64-8.7.0 +set COV_DIR=D:\cov-analysis-win64-2017.07 set PATH=%PATH%;%COV_DIR%\bin set PWD=%~dp0 set TARGET=x86_32 diff --git a/src/badblocks.c b/src/badblocks.c index 94a8d731..02318a05 100644 --- a/src/badblocks.c +++ b/src/badblocks.c @@ -124,6 +124,7 @@ static errcode_t bb_u64_list_add(bb_u64_list bb, uint64_t blk) bb->size -= 100; return BB_ET_NO_MEMORY; } + // coverity[suspicious_sizeof] memset(&bb->list[bb->size-100], 0, 100 * sizeof(uint64_t)); } diff --git a/src/rufus.c b/src/rufus.c index 8dda3329..6cb773da 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2152,9 +2152,9 @@ static void SaveISO(void) static BOOL CheckDriveAccess(DWORD dwTimeOut) { uint32_t i, j; - BOOL bProceed = TRUE; + BOOL ret = FALSE, proceed = TRUE; BYTE access_mask; - char *PhysicalPath, DevPath[MAX_PATH]; + char *PhysicalPath = NULL, DevPath[MAX_PATH]; char drive_letter[27], drive_name[] = "?:"; char *message, title[128]; DWORD cur_time, end_time = GetTickCount() + dwTimeOut; @@ -2170,16 +2170,16 @@ static BOOL CheckDriveAccess(DWORD dwTimeOut) // Search for any blocking processes against the physical drive PhysicalPath = GetPhysicalName(DeviceNum); - QueryDosDeviceA(&PhysicalPath[4], DevPath, sizeof(DevPath)); - access_mask = SearchProcess(DevPath, dwTimeOut, TRUE, TRUE, TRUE); - CHECK_FOR_USER_CANCEL; - if (access_mask != 0) { - bProceed = FALSE; - uprintf("Found potentially blocking process(es) against %s:", &PhysicalPath[4]); - for (j = 0; j < BlockingProcess.Index; j++) - uprintf(BlockingProcess.String[j]); + if (QueryDosDeviceA(&PhysicalPath[4], DevPath, sizeof(DevPath)) != 0) { + access_mask = SearchProcess(DevPath, dwTimeOut, TRUE, TRUE, TRUE); + CHECK_FOR_USER_CANCEL; + if (access_mask != 0) { + proceed = FALSE; + uprintf("Found potentially blocking process(es) against %s:", &PhysicalPath[4]); + for (j = 0; j < BlockingProcess.Index; j++) + uprintf(BlockingProcess.String[j]); + } } - free(PhysicalPath); // Search for any blocking processes against the logical volume(s) GetDriveLetters(DeviceNum, drive_letter); @@ -2194,7 +2194,7 @@ static BOOL CheckDriveAccess(DWORD dwTimeOut) CHECK_FOR_USER_CANCEL; // Ignore if all we have is read-only if ((access_mask & 0x06) || (access_mask == 0x80)) { - bProceed = FALSE; + proceed = FALSE; uprintf("Found potentially blocking process(es) against %s", drive_name); for (j = 0; j < BlockingProcess.Index; j++) uprintf(BlockingProcess.String[j]); @@ -2203,21 +2203,21 @@ static BOOL CheckDriveAccess(DWORD dwTimeOut) } // Prompt the user if we detected blocking processes - if (!bProceed) { + if (!proceed) { // We'll use a system translated string instead of one from rufus.loc message = GetMuiString("shell32.dll", 28701); // "This drive is in use (...) Do you want to format it anyway?" if (message != NULL) { ComboBox_GetTextU(hDeviceList, title, sizeof(title)); - bProceed = Notification(MSG_WARNING_QUESTION, NULL, title, message); + proceed = Notification(MSG_WARNING_QUESTION, NULL, title, message); free(message); } } + ret = proceed; - PrintInfo(0, MSG_210); - return bProceed; out: PrintInfo(0, MSG_210); - return FALSE; + free(PhysicalPath); + return ret; } #ifdef RUFUS_TEST diff --git a/src/rufus.rc b/src/rufus.rc index 65203137..b9444533 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1159" +CAPTION "Rufus 2.16.1160" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1159,0 - PRODUCTVERSION 2,16,1159,0 + FILEVERSION 2,16,1160,0 + PRODUCTVERSION 2,16,1160,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1159" + VALUE "FileVersion", "2.16.1160" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1159" + VALUE "ProductVersion", "2.16.1160" END END BLOCK "VarFileInfo" From bb00e220acf808c5912bed559831f72b68b0cb5b Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 26 Jul 2017 11:47:02 +0100 Subject: [PATCH 41/97] [ui] more info field fixes * Prevent text selection and try to force a redraw, to ensure the text is centered on update * Also update the libcdio 'AL' workaround --- src/libcdio/iso9660/rock.c | 8 ++++---- src/localization.c | 3 ++- src/rufus.c | 4 ++++ src/rufus.rc | 10 +++++----- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/libcdio/iso9660/rock.c b/src/libcdio/iso9660/rock.c index 39ae5696..9e6cdd47 100644 --- a/src/libcdio/iso9660/rock.c +++ b/src/libcdio/iso9660/rock.c @@ -182,12 +182,12 @@ get_rock_ridge_filename(iso9660_dir_t * p_iso9660_dir, case SIG('P','L'): case SIG('T','F'): case SIG('Z','F'): - case SIG('A','L'): // Kali Linux *NONSTANDARD* extension + case SIG('A','L'): // libburnia's AAIP extension (used by Kali Linux) break; default: - /* Warn about other nonstandard Rock Ridge extensions */ - cdio_warn("Invalid Rock Ridge extension detected: '%c%c'\n", *chr, *(chr+1)); - goto out; + /* Warn about other Rock Ridge extensions */ + cdio_warn("Unsupported Rock Ridge extension detected: '%c%c'\n", *chr, *(chr+1)); + break; } if (rr->len == 0) goto out; /* Something got screwed up here */ diff --git a/src/localization.c b/src/localization.c index 256ad849..350443cf 100644 --- a/src/localization.c +++ b/src/localization.c @@ -427,7 +427,8 @@ static uint64_t last_msg_time[2] = { 0, 0 }; static void PrintInfoMessage(char* msg) { SetWindowTextU(hInfo, msg); - Edit_SetSel(hInfo, -1, 0); + // Make sure our field gets redrawn + SendMessage(hInfo, WM_PAINT, 0, 0); } static void PrintStatusMessage(char* msg) { SendMessageLU(hStatus, SB_SETTEXTW, SBT_OWNERDRAW | SB_SECTION_LEFT, msg); diff --git a/src/rufus.c b/src/rufus.c index 6cb773da..063f7ba9 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -1622,6 +1622,10 @@ static INT_PTR CALLBACK InfoCallback(HWND hCtrl, UINT message, WPARAM wParam, LP switch (message) { + // Prevent text selection (wich Windows seems keen on doing on its own) + case EM_SETSEL: + return (INT_PTR)TRUE; + // Prevent select (which screws up our display as it redraws the font using different settings) case WM_LBUTTONDOWN: return (INT_PTR)FALSE; diff --git a/src/rufus.rc b/src/rufus.rc index b9444533..77ea5ebb 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1160" +CAPTION "Rufus 2.16.1161" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1160,0 - PRODUCTVERSION 2,16,1160,0 + FILEVERSION 2,16,1161,0 + PRODUCTVERSION 2,16,1161,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1160" + VALUE "FileVersion", "2.16.1161" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1160" + VALUE "ProductVersion", "2.16.1161" END END BLOCK "VarFileInfo" From 1baf1b7d1a5e99a60259d45e6d1fe6ca58a2cc59 Mon Sep 17 00:00:00 2001 From: Gintaras Venslovas Date: Wed, 26 Jul 2017 11:48:56 +0100 Subject: [PATCH 42/97] [loc] update Lithuanian translation to latest --- res/localization/rufus.loc | 9 ++++++++- src/rufus.rc | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 2a9ea0d6..b1a4e3e8 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -9799,7 +9799,7 @@ t MSG_298 "Izvēlētais ISO fails neatbilst noteiktajam izmēram: %s datu ir kļ ################################################################################ l "lt-LT" "Lithuanian (Lietuvių)" 0x0427 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -10265,6 +10265,13 @@ t MSG_291 "Versijos parinktis" t MSG_292 "Prašome pasirinkti Windows versiją, kurią norite įdiegti:" t MSG_293 "Nepalaikoma Windows versija" t MSG_294 "Šios Windows versijos Rufus nebepalaiko." +t MSG_295 "Įspėjimas: Neoficiali versija" +t MSG_296 "Ši Rufus versija NĖRA išleista jos oficialaus kūrėjo(ų).\n\nAr jūs tikrai norite ją vykdyti?" +t MSG_297 "Aptiktas nepilnas ISO" +t MSG_298 "Jūsų pasirinktas ISO failas neatitinka deklaruojamo dydžio: %s duomenų trūksta!\n\n" + "Jei jūs gavote šį failą iš interneto, pabandykite atsisiųsti jį iš naujo ir patikrinkite, " + "ar MD5 or SHA kontrolinės sumos atitinka oficialiąsias.\n\nBeje, jūs galite apskaičiuoti " + "MD5 arba SHA per Rufus, paspaudę '#' mygtuką." ################################################################################ l "ms-MY" "Malay (Bahasa Malaysia)" 0x043e, 0x083e diff --git a/src/rufus.rc b/src/rufus.rc index 77ea5ebb..cabe8aa9 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1161" +CAPTION "Rufus 2.16.1162" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1161,0 - PRODUCTVERSION 2,16,1161,0 + FILEVERSION 2,16,1162,0 + PRODUCTVERSION 2,16,1162,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1161" + VALUE "FileVersion", "2.16.1162" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1161" + VALUE "ProductVersion", "2.16.1162" END END BLOCK "VarFileInfo" From a96a615a66d85caf8112ee9d9d8f3463292df6a6 Mon Sep 17 00:00:00 2001 From: Arif Budiman Date: Fri, 28 Jul 2017 13:08:15 +0100 Subject: [PATCH 43/97] [loc] update Indonesian translation to latest --- res/localization/rufus.loc | 15 ++++++++++++++- src/rufus.rc | 10 +++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index b1a4e3e8..0e8d674a 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -7429,7 +7429,7 @@ t MSG_287 "Nem-USB eltávolítható eszközök észlelése" ################################################################################ l "id-ID" "Indonesian (Bahasa Indonesia)" 0x0421 -v 1.0.20 +v 1.0.22 b "en-US" # Main dialog @@ -7912,6 +7912,19 @@ t MSG_285 "Berkas exe yang diunduh ditandatangani oleh '%s'.\nTanda tangan ini " "Apakah Anda yakin ingin menjalankan berkas ini?" t MSG_286 "Mengosongkan perangkat: %0.1f%% selesai" t MSG_287 "Deteksi selain perangkat USB yang dapat dilepas" +t MSG_288 "Hak akses yang tinggi tidak ada" +t MSG_289 "Aplikasi ini hanya dapat dijalankan dengan hak akses yang tinggi" +t MSG_290 "Pengindeksan Berkas" +t MSG_291 "Pilihan versi" +t MSG_292 "Silakan pilih versi Windows yang ingin dipasang:" +t MSG_293 "Versi Windows Tidak didukung" +t MSG_294 "Windows versi ini tidak lagi didukung oleh Rufus." +t MSG_295 "Peringatan: Versi tidak resmi" +t MSG_296 "Rufus versi ini TIDAK diproduksi oleh pengembang resminya.\n\nApakah Anda yakin ingin menjalankannya?" +t MSG_297 "Terdeteksi ISO Terpotong" +t MSG_298 "Berkas ISO yang Anda pilih tidak sesuai dengan ukuran yang dideklarasikan: %s data hilang!\n\n" + "Jika Anda mendapatkan berkas ini dari Internet, Anda sebaiknya mengunduh salinan yang baru dan pastikan ceksum MD5 atau SHA " + "cocok dengan yang asli.\n\nPerhatikan bahwa Anda dapat menghitung MD5 atau SHA dalam Rufus dengan mengklik tombol '#'." ################################################################################ l "it-IT" "Italian (Italiano)" 0x0410, 0x0810 diff --git a/src/rufus.rc b/src/rufus.rc index cabe8aa9..09da9216 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1162" +CAPTION "Rufus 2.16.1163" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1162,0 - PRODUCTVERSION 2,16,1162,0 + FILEVERSION 2,16,1163,0 + PRODUCTVERSION 2,16,1163,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1162" + VALUE "FileVersion", "2.16.1163" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1162" + VALUE "ProductVersion", "2.16.1163" END END BLOCK "VarFileInfo" From 08873689884ee11554dae5c9b1e21354265e775b Mon Sep 17 00:00:00 2001 From: Matej Horvat Date: Fri, 28 Jul 2017 13:10:51 +0100 Subject: [PATCH 44/97] [loc] update Slovenian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 0e8d674a..1ecf9760 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -15045,7 +15045,7 @@ t MSG_294 "Táto verzia systému Windows už nie je podporovaná programom Rufus ################################################################################ l "sl-SI" "Slovenian (Slovenščina)" 0x0424 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -15491,6 +15491,12 @@ t MSG_291 "Izbira verzije" t MSG_292 "Izberite, katero verzijo operacijskega sistema Windows želite namestiti:" t MSG_293 "Operacijski sistem ni podprt" t MSG_294 "Rufus več ne podpira tega operacijskega sistema." +t MSG_295 "Opozorilo: neuradna verzija" +t MSG_296 "Te verzije Rufusa ni izdelal njegov uradni razvijalec.\n\nAli ste prepričani, da jo želite uporabljati?" +t MSG_297 "Odrezana datoteka ISO" +t MSG_298 "Datoteka ISO, ki ste jo izbrali, ni pričakovane velikosti: %s njenih podatkov manjka.\n\n" + "Če ste jo prenesli z interneta, jo prenesite še enkrat in preverite, ali se vrednosti MD5 in SHA " + "ujemata z uradnima.\n\nV Rufusu ju lahko izračunate z gumbom '#'." ################################################################################ l "es-ES" "Spanish (Español)" 0x040a, 0x080a, 0x0c0a, 0x100a, 0x140a, 0x180a, 0x1c0a, 0x200a, 0x240a, 0x280a, 0x2c0a, 0x300a, 0x340a, 0x380a, 0x3c0a, 0x400a, 0x440a, 0x480a, 0x4c0a, 0x500a, 0x540a, 0x580a diff --git a/src/rufus.rc b/src/rufus.rc index 09da9216..87816116 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1163" +CAPTION "Rufus 2.16.1164" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1163,0 - PRODUCTVERSION 2,16,1163,0 + FILEVERSION 2,16,1164,0 + PRODUCTVERSION 2,16,1164,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1163" + VALUE "FileVersion", "2.16.1164" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1163" + VALUE "ProductVersion", "2.16.1164" END END BLOCK "VarFileInfo" From 6db159be9ee376598aa375fd589dfb70315213e0 Mon Sep 17 00:00:00 2001 From: Krasimir Newenow Date: Fri, 28 Jul 2017 15:33:23 +0100 Subject: [PATCH 45/97] [loc] update Bulgarian translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 1ecf9760..a358cb35 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -1493,7 +1493,7 @@ t MSG_298 "Seçdiyiniz ISO faylı uyğun deyil ölçü: %s məlumat çatmadı!\n ###################################################################### l "bg-BG" "Bulgarian (Български)" 0x0402 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -1978,6 +1978,12 @@ t MSG_291 "Избор на версия" t MSG_292 "Моля изберете версията на Windows която желаете да инсталирате:" t MSG_293 "Неподържана версия на Windows" t MSG_294 "Тази версия на Windows вече не се подържа от Rufus" +t MSG_295 "Внимание: Не официална версия" +t MSG_296 "Тази версия на Rufus не е създадена от официалния разработчик.\n\nСигорни ли сте че желаете да я използвате?" +t MSG_297 "Открито е съкратено ISO" +t MSG_298 "ISO файлът който сте избрали не съвпада с обявения си размер: %s от информацията липсва.\n\n" + "Ако сте сездобили с този файл от интернет, опитайте се да изтеглите ново копие и се уверете че контролните стойности на MD5 или " + "SHA съвпадат с официялните.\n\nОтбележете че можете да изчислите MD5 или SHA изпозвайки Rufus като натиснете бутона '#'." ################################################################################ l "zh-CN" "Chinese Simplified (简体中文)" 0x0804, 0x1004 diff --git a/src/rufus.rc b/src/rufus.rc index 87816116..f5d102e1 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1164" +CAPTION "Rufus 2.16.1165" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1164,0 - PRODUCTVERSION 2,16,1164,0 + FILEVERSION 2,16,1165,0 + PRODUCTVERSION 2,16,1165,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1164" + VALUE "FileVersion", "2.16.1165" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1164" + VALUE "ProductVersion", "2.16.1165" END END BLOCK "VarFileInfo" From e68df21a1632c466934cd53c689053e4cc7880ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kub=C3=A1nik?= Date: Sat, 29 Jul 2017 15:42:32 +0100 Subject: [PATCH 46/97] [loc] update Slovak translation to latest --- res/localization/rufus.loc | 21 ++++++++++++++------- src/rufus.rc | 10 +++++----- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index a358cb35..1573073a 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -14598,7 +14598,7 @@ t MSG_298 "ISO datoteka koju ste odabrali ne podudara se sa njenom zvaničnom ve ################################################################################ l "sk-SK" "Slovak (Slovensky)" 0x041B -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -14683,8 +14683,8 @@ t IDCANCEL "Zatvoriť" t MSG_001 "Zistený spustený program" t MSG_002 "Program Rufus je už spustený.\n" "Pred spustením ďalšieho programu musíte zavrieť spustený program." -t MSG_003 "VAROVANIE: PO SPUSTENÍ FORMÁTOVANIA BUDÚ VYMAZANÉ VŠETKY ÚDAJE NA CIEĽOVOM DISKU: %s.\n" - "Ak chcete spustiť formátovanie disku stlačte tlačidlo OK.\nAk chcete operáciu ukončiť, stlačte tlačidlo ZRUŠIŤ." +t MSG_003 "VAROVANIE: PO SPUSTENÍ FORMÁTOVANIA BUDÚ VYMAZANÉ VŠETKY ÚDAJE NA CIEĽOVOM DISKU: %s\n" + "Ak chcete spustiť formátovanie disku stlačte tlačidlo OK.\nAk chcete túto operáciu ukončiť, stlačte tlačidlo ZRUŠIŤ." t MSG_004 "Nastavenie automatických aktualizácií programu Rufus" t MSG_005 "Chcete povoliť kontrolu aktualizácií programu Rufus?" # Must be the same as IDD_DIALOG:IDCANCEL (i.e. "Close" - I know it's confusing) @@ -14973,7 +14973,7 @@ t MSG_224 "Vymazávanie MBR/PBR/GPT štruktúr..." t MSG_225 "Požiadavka na prístup na disk..." t MSG_226 "Analyzovanie existujúcich boot zápisov..." t MSG_227 "Uzatváranie existujúceho zväzku..." -t MSG_228 "Zapisovanie hlavné boot záznamu..." +t MSG_228 "Zapisovanie hlavného boot záznamu..." t MSG_229 "Zapisovanie boot záznamu oddielu..." t MSG_230 "Kopírovanie DOS súborov..." t MSG_231 "Kopírovanie ISO súborov..." @@ -14988,7 +14988,7 @@ t MSG_237 "Chybné bloky: Testovanie s vzorkou 0x%02X" # eg. "Vytváranie oddielov (MBR)..." t MSG_238 "Vytváranie oddielov (%s)..." t MSG_239 "Vymazávanie oddielov..." -t MSG_241 "Sťahovanie: %0.1f%% dokonených" +t MSG_241 "Sťahovanie: %0.1f%% dokončených" t MSG_242 "Neúspešné sťahovanie súboru." t MSG_243 "Kontrola aktualizácií programu Rufus..." t MSG_244 "Aktualizácia: Chyba pripojenia" @@ -15015,11 +15015,11 @@ t MSG_263 "Použiť PROPER veľkosť jednotiek" t MSG_264 "Vymazávanie priečinku: %s" t MSG_265 "Vyhľadávanie VMWare disku" t MSG_266 "Duálny UEFI/BIOS mód" -t MSG_267 "Používanie Windows obrazu: %0.1f%% hotových" +t MSG_267 "Používanie Windows obrazu: %0.1f%% dokončených" t MSG_268 "Používanie Windows obrazu..." t MSG_269 "Zachovať časové značky" t MSG_270 "USB ladenie" -t MSG_271 "Prebieha výpočet kontrolného súčtu: %0.1f%% hotových" +t MSG_271 "Prebieha výpočet kontrolného súčtu: %0.1f%% dokončených" t MSG_272 "Vypočítať MD5, SHA1 a SHA256 kontrolný súčet pre vybraný obraz" t MSG_273 "Zmeniť jazyk programu" t MSG_274 "Bol zistený hybridný ISO obraz" @@ -15048,6 +15048,13 @@ t MSG_291 "Výber verzie" t MSG_292 "Vyberte verziu systému Windows, ktorú chcete nainštalovať:" t MSG_293 "Nepodporovaná veria systému Windows" t MSG_294 "Táto verzia systému Windows už nie je podporovaná programom Rufus." +t MSG_295 "Upozornenie: Neoficiálna verzia" +t MSG_296 "Táto verzia programu Rufus NIE JE vydaná oficiálnymi vývojármi.\n\nSte si istý, že ju chcete spustiť?" +t MSG_297 "Bol zistený skrátený ISO súbor" +t MSG_298 "Veľkosť vybraného ISO súboru sa nezhoduje s jeho deklarovanou veľkosťou (chýba %s)!\n\n" + "Ak ste získali tento súbor z internetu, pokúste sa znova stiahnuť novú kópiu tohto súboru a overiť ju " + "MD5 alebo SHA kontrolným súčtom s originálnym súborom.\n\nAk chcete vypočítať kontrólny súčet MD5 alebo " + "SHA pre vybraný súbor v programe Rufus, stlačte tlačidlo '#'." ################################################################################ l "sl-SI" "Slovenian (Slovenščina)" 0x0424 diff --git a/src/rufus.rc b/src/rufus.rc index f5d102e1..20eef21f 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1165" +CAPTION "Rufus 2.16.1166" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1165,0 - PRODUCTVERSION 2,16,1165,0 + FILEVERSION 2,16,1166,0 + PRODUCTVERSION 2,16,1166,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1165" + VALUE "FileVersion", "2.16.1166" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1165" + VALUE "ProductVersion", "2.16.1166" END END BLOCK "VarFileInfo" From d7d6caebe1d7d906134a72900933007c4e1fc5c7 Mon Sep 17 00:00:00 2001 From: Nikolaos Margaritis Date: Sat, 29 Jul 2017 15:45:55 +0100 Subject: [PATCH 47/97] [loc] update Greek translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 1573073a..580145c1 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -6042,7 +6042,7 @@ t MSG_298 "Das ISO-Abbild, dass Sie gewählt haben, hat nicht die erwartete Grö ################################################################################ l "el-GR" "Greek (Ελληνικά)" 0x0408 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -6528,6 +6528,12 @@ t MSG_291 "Επιλέξτε έκδοση" t MSG_292 "Παρακαλώ επιλέξτε την έκδοση των Windows που θέλετε να εγκαταστήσετε:" t MSG_293 "Μη υποστηριζόμενη έκδοση Windows." t MSG_294 "Το Rufus δεν υποστηρίζει αυτή την έκδοση των Windows." +t MSG_295 "Προσοχή: Ανεπίσημη έκδοση!" +t MSG_296 "Αυτή η έκδοση του Rufus δεν έχει δημιουργηθεί απο τους επίσημους προγραμματιστές.\n\n Είστε σίγουροι οτι θέλετε να εκτελέσετε το πρόγραμμα?" +t MSG_297 "Το αρχείο ISO δεν είναι έγκυρο/ολόκληρο." +t MSG_298 "Το αρχείο ISO που επιλέξατε δεν ειναι έγκυρο/ολόκληρο. %s από τα δεδομένα του αρχείου λείπουν.\n\nΆν κατεβάσατε αυτό το αρχείο απο το διαδίκτυο, " + "προσπαθήστε να επαναλάβετε την λήψη του αρχείου. Βεβαιωθείτε ότι οι MD5 ή SHA σφραγίδες του αρχείου που κατεβάσατε είναι ίδιες με αυτες του αρχειου " + "που θέλατε να κατεβάσετε.\n\nΜπορείτε να ελέγξετε τις σφραγίδες MD5 ή SHA μέσω του Rufus πατώντας το κουμπί '#'." ################################################################################ l "he-IL" "Hebrew (עברית)" 0x040d diff --git a/src/rufus.rc b/src/rufus.rc index 20eef21f..24f07425 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1166" +CAPTION "Rufus 2.16.1167" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1166,0 - PRODUCTVERSION 2,16,1166,0 + FILEVERSION 2,16,1167,0 + PRODUCTVERSION 2,16,1167,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1166" + VALUE "FileVersion", "2.16.1167" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1166" + VALUE "ProductVersion", "2.16.1167" END END BLOCK "VarFileInfo" From d620d8848d16c545e0d7b326f494e1edf24d5f0b Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 29 Jul 2017 17:34:11 +0100 Subject: [PATCH 48/97] [loc] fix RTL display of ISO truncation notification * Also don't use MessageBoxU where unneeded --- src/rufus.c | 6 +++--- src/rufus.rc | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rufus.c b/src/rufus.c index 063f7ba9..2a8def1c 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -972,8 +972,8 @@ static void DisplayISOProps(void) if (img_report.mismatch_size > 0) { uprintf(" ERROR: Detected that file on disk has been truncated by %s!", SizeToHumanReadable(img_report.mismatch_size, FALSE, FALSE)); - MessageBoxU(hMainDialog, lmprintf(MSG_298, SizeToHumanReadable(img_report.mismatch_size, FALSE, FALSE)), - lmprintf(MSG_297), MB_ICONWARNING); + MessageBoxExU(hMainDialog, lmprintf(MSG_298, SizeToHumanReadable(img_report.mismatch_size, FALSE, FALSE)), + lmprintf(MSG_297), MB_ICONWARNING | MB_IS_RTL, selected_langid); } else if (img_report.mismatch_size < 0) { // Not an error (ISOHybrid?), but we report it just in case uprintf(" Note: File on disk is larger than reported ISO size by %s...", @@ -3197,7 +3197,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine if ( (!get_supported_locales(loc_file)) || ((selected_locale = ((locale_name == NULL)?get_locale_from_lcid(lcid, TRUE):get_locale_from_name(locale_name, TRUE))) == NULL) ) { uprintf("FATAL: Could not access locale!"); - MessageBoxU(NULL, "The locale data is missing or invalid. This application will now exit.", + MessageBoxA(NULL, "The locale data is missing or invalid. This application will now exit.", "Fatal error", MB_ICONSTOP|MB_SYSTEMMODAL); goto out; } diff --git a/src/rufus.rc b/src/rufus.rc index 24f07425..c47eac89 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1167" +CAPTION "Rufus 2.16.1168" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1167,0 - PRODUCTVERSION 2,16,1167,0 + FILEVERSION 2,16,1168,0 + PRODUCTVERSION 2,16,1168,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1167" + VALUE "FileVersion", "2.16.1168" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1167" + VALUE "ProductVersion", "2.16.1168" END END BLOCK "VarFileInfo" From 9740e948763ac8738db933ef2d9fc73f90270b0a Mon Sep 17 00:00:00 2001 From: Zia Azimi Date: Sat, 29 Jul 2017 17:40:10 +0100 Subject: [PATCH 49/97] [loc] update Persian translation to latest --- res/localization/rufus.loc | 10 +++++++++- src/rufus.rc | 10 +++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 580145c1..dac86fe6 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -11268,7 +11268,7 @@ t MSG_298 "ISO-filen du har valgt, stemmer ikke overens med den deklarerte stør ################################################################################ l "fa-IR" "Persian (فارسی)" 0x0429 a "r" -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -11819,6 +11819,14 @@ t MSG_291 "انتخاب نسخه (ورژن)" t MSG_292 "لطفاً نسخه ویندوزی را که می‌خواهید نصب کنید؛ انتخاب کنید:" t MSG_293 "نسخه ویندوز پشتیبانی نمی‌شود" t MSG_294 "Rufus دیگر این نسخه از ویندوز را پشتیبانی نمی‌کند" +t MSG_295 "هشدار: نسخه غیررسمی" +t MSG_296 "این نسخه از Rufus توسط توسعه‌دهندگان اصلی و رسمی آن تهیه نشده است.\n\nآیا برای اجرای آن مطمئن هستید؟" +# Translator Note: In the line below invisible RLE (at the beginning) and PDF (at the end) are used +t MSG_297 "‫فایل ISO ناقص شناسایی شده است‬" +# Translator Note: In the lines below invisible RLE (at the beginning) and PDF (at the end) are used +t MSG_298 "‫این فایل ISO که انتخاب کرده‌اید با اندازه تعیین شده در آن هماهنگی ندارد.‬ ‬‫%s از داده‌ها موجود نیست!‬\n\n" + "‫اگر این فایل را از اینترنت دانلود کرده‌اید، لطفا نسخه‌ای جدید از آن را دانلود کرده و مطمئن شوید که مقادیر کنترلی MD5 یا SHA آن عینا برابر با مقادیر رسمی آن‌هاست.‬\n\n" + "‫توجه داشته باشید که در Rufus می‌توانید با انتخاب دکمه '#' مقادیر MD5 یا SHA را محاسبه کنید.‬" ################################################################################ l "pl-PL" "Polish (Polski)" 0x0415 diff --git a/src/rufus.rc b/src/rufus.rc index c47eac89..7e3a22bb 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1168" +CAPTION "Rufus 2.16.1169" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1168,0 - PRODUCTVERSION 2,16,1168,0 + FILEVERSION 2,16,1169,0 + PRODUCTVERSION 2,16,1169,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1168" + VALUE "FileVersion", "2.16.1169" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1168" + VALUE "ProductVersion", "2.16.1169" END END BLOCK "VarFileInfo" From 925837e4d30c1f4a5aea7a676f6259464f80d2fd Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 31 Jul 2017 10:48:17 +0100 Subject: [PATCH 50/97] v2.16 (build 1170) --- ChangeLog.txt | 4 ++-- README.md | 6 +++--- res/appstore/AppxManifest.xml | 2 +- res/localization/rufus.loc | 8 ++++---- src/rufus.rc | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index f9334595..7fc4e9bd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,9 +1,9 @@ -o Version 2.16 (2017.07.??) +o Version 2.16 (2017.07.31) Add an audiovisual cue on completion/error Add a workaround for ISOs using nonstantard Rock Ridge extensions (looking at you Kali Linux!) Notify user when an ISO is broken or truncated Notify user if other processes are accessing the drive before format - List processes that are locking a drive, if any, on failure + List processes that are locking a drive on failure Improve verbosity of the Windows To Go process Other fixes and improvements diff --git a/README.md b/README.md index 58fc830e..b5f1f1e5 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,15 @@ Features -------- * Format USB, flash card and virtual drives to FAT/FAT32/NTFS/UDF/exFAT/ReFS -* Create DOS bootable USB drives, using [FreeDOS](http://www.freedos.org/) or MS-DOS +* Create DOS bootable USB drives, using [FreeDOS](http://www.freedos.org/) or MS-DOS (Windows 8.1 or earlier) * Create BIOS or UEFI bootable drives, including [UEFI bootable NTFS](https://github.com/pbatard/uefi-ntfs) * Create bootable drives from bootable ISOs (Windows, Linux, etc.) * Create bootable drives from bootable disk images, including compressed ones * Create [Windows To Go](https://en.wikipedia.org/wiki/Windows_To_Go) drives +* Compute MD5, SHA-1 and SHA-256 checksums of the selected image * Twice as fast as Microsoft's USB/DVD tool or UNetbootin, on ISO -> USB creation (1) * Perform bad blocks checks, including detection of "fake" flash drives -* Compute MD5, SHA-1 and SHA-256 checksums of the selected image -* Modern and familiar UI, with more than [35 languages natively supported](https://rufus.akeo.ie/translations) +* Modern and familiar UI, with [39 languages natively supported](https://rufus.akeo.ie/translations) * Small footprint. No installation required. * Portable * 100% [Free Software](http://www.gnu.org/philosophy/free-sw.en.html) ([GPL v3](http://www.gnu.org/licenses/gpl-3.0.en.html)) diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml index f86041b0..2aeb1e97 100644 --- a/res/appstore/AppxManifest.xml +++ b/res/appstore/AppxManifest.xml @@ -8,7 +8,7 @@ for an interesting struggle, when you also happen to have a comma in one of the fields... --> diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index dac86fe6..018340e4 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -13238,7 +13238,7 @@ t MSG_294 "Esta versão do Windows já não é suportada por Rufus." t MSG_295 "Aviso: versão não oficial" t MSG_296 "Esta versão de Rufus NÃO foi desenvolvida pelo autor oficial.\n\nTem a certeza que pretende executar?" t MSG_297 "Detetado ISO truncado" -t MSG_298 "O ficheiro ISO que selecionou não corresponde ao tamanho declarado: faltam %s de dados!\n\nSe obteve este ficheiro " +t MSG_298 "O ficheiro ISO que selecionou não corresponde ao tamanho declarado: faltam %s de dados!\n\nSe obteve este ficheiro " "da Internet, deve tentar baixar uma nova cópia e verificar se os checksums MD5 ou SHA correspondem aos oficiais.\n\n" "Saiba no Rufus que pode calcular o MD5 ou SHA clicando no botão '#'." @@ -14698,7 +14698,7 @@ t MSG_001 "Zistený spustený program" t MSG_002 "Program Rufus je už spustený.\n" "Pred spustením ďalšieho programu musíte zavrieť spustený program." t MSG_003 "VAROVANIE: PO SPUSTENÍ FORMÁTOVANIA BUDÚ VYMAZANÉ VŠETKY ÚDAJE NA CIEĽOVOM DISKU: %s\n" - "Ak chcete spustiť formátovanie disku stlačte tlačidlo OK.\nAk chcete túto operáciu ukončiť, stlačte tlačidlo ZRUŠIŤ." + "Ak chcete spustiť formátovanie disku stlačte tlačidlo OK.\nAk chcete túto operáciu ukončiť, stlačte tlačidlo ZRUŠIŤ." t MSG_004 "Nastavenie automatických aktualizácií programu Rufus" t MSG_005 "Chcete povoliť kontrolu aktualizácií programu Rufus?" # Must be the same as IDD_DIALOG:IDCANCEL (i.e. "Close" - I know it's confusing) @@ -15068,7 +15068,7 @@ t MSG_297 "Bol zistený skrátený ISO súbor" t MSG_298 "Veľkosť vybraného ISO súboru sa nezhoduje s jeho deklarovanou veľkosťou (chýba %s)!\n\n" "Ak ste získali tento súbor z internetu, pokúste sa znova stiahnuť novú kópiu tohto súboru a overiť ju " "MD5 alebo SHA kontrolným súčtom s originálnym súborom.\n\nAk chcete vypočítať kontrólny súčet MD5 alebo " - "SHA pre vybraný súbor v programe Rufus, stlačte tlačidlo '#'." + "SHA pre vybraný súbor v programe Rufus, stlačte tlačidlo '#'." ################################################################################ l "sl-SI" "Slovenian (Slovenščina)" 0x0424 @@ -15523,7 +15523,7 @@ t MSG_296 "Te verzije Rufusa ni izdelal njegov uradni razvijalec.\n\nAli ste pre t MSG_297 "Odrezana datoteka ISO" t MSG_298 "Datoteka ISO, ki ste jo izbrali, ni pričakovane velikosti: %s njenih podatkov manjka.\n\n" "Če ste jo prenesli z interneta, jo prenesite še enkrat in preverite, ali se vrednosti MD5 in SHA " - "ujemata z uradnima.\n\nV Rufusu ju lahko izračunate z gumbom '#'." + "ujemata z uradnima.\n\nV Rufusu ju lahko izračunate z gumbom '#'." ################################################################################ l "es-ES" "Spanish (Español)" 0x040a, 0x080a, 0x0c0a, 0x100a, 0x140a, 0x180a, 0x1c0a, 0x200a, 0x240a, 0x280a, 0x2c0a, 0x300a, 0x340a, 0x380a, 0x3c0a, 0x400a, 0x440a, 0x480a, 0x4c0a, 0x500a, 0x540a, 0x580a diff --git a/src/rufus.rc b/src/rufus.rc index 7e3a22bb..3e02c147 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1169" +CAPTION "Rufus 2.16.1170" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1169,0 - PRODUCTVERSION 2,16,1169,0 + FILEVERSION 2,16,1170,0 + PRODUCTVERSION 2,16,1170,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1169" + VALUE "FileVersion", "2.16.1170" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1169" + VALUE "ProductVersion", "2.16.1170" END END BLOCK "VarFileInfo" From 65fd9770cb9750336983cc72091ca73077a14c39 Mon Sep 17 00:00:00 2001 From: Jeroen Sack Date: Mon, 31 Jul 2017 13:28:18 +0200 Subject: [PATCH 51/97] [misc] fix typo in Changelog * Closes #990 --- ChangeLog.txt | 2 +- src/rufus.rc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 7fc4e9bd..dc743db8 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,6 @@ o Version 2.16 (2017.07.31) Add an audiovisual cue on completion/error - Add a workaround for ISOs using nonstantard Rock Ridge extensions (looking at you Kali Linux!) + Add a workaround for ISOs using nonstandard Rock Ridge extensions (looking at you Kali Linux!) Notify user when an ISO is broken or truncated Notify user if other processes are accessing the drive before format List processes that are locking a drive on failure diff --git a/src/rufus.rc b/src/rufus.rc index 3e02c147..ee67705f 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1170" +CAPTION "Rufus 2.16.1171" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1170,0 - PRODUCTVERSION 2,16,1170,0 + FILEVERSION 2,16,1171,0 + PRODUCTVERSION 2,16,1171,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1170" + VALUE "FileVersion", "2.16.1171" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1170" + VALUE "ProductVersion", "2.16.1171" END END BLOCK "VarFileInfo" From eb5087d504aaf08aa1dc2aa92bfcc2490da42c3a Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 2 Aug 2017 18:58:27 +0100 Subject: [PATCH 52/97] [togo] fix a typo in index selection and add support for nonofficial ISOs * Closes #991 --- src/format.c | 25 +++++++++++++++++++++---- src/rufus.rc | 10 +++++----- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/format.c b/src/format.c index c0ba4a1c..475bc05f 100644 --- a/src/format.c +++ b/src/format.c @@ -1288,6 +1288,7 @@ int SetWinToGoIndex(void) char tmp_path[MAX_PATH] = "", xml_file[MAX_PATH] = ""; StrArray version_name, version_index; int i, build_nr = 0; + BOOL bNonStandard = FALSE; // Sanity checks wintogo_index = -1; @@ -1307,7 +1308,7 @@ int SetWinToGoIndex(void) if ((GetTempPathU(sizeof(tmp_path), tmp_path) == 0) || (GetTempFileNameU(tmp_path, APPLICATION_NAME, 0, xml_file) == 0) || (xml_file[0] == 0)) { - // Last ditch effort to get a loc file - just extract it to the current directory + // Last ditch effort to get a tmp file - just extract it to the current directory safe_strcpy(xml_file, sizeof(xml_file), ".\\RufVXml.tmp"); } // GetTempFileName() may leave a file behind @@ -1321,8 +1322,24 @@ int SetWinToGoIndex(void) StrArrayCreate(&version_name, 16); StrArrayCreate(&version_index, 16); - for (i = 0; (StrArrayAdd(&version_name, get_token_data_file_indexed("DISPLAYNAME", xml_file, i + 1), FALSE) >= 0) && - (StrArrayAdd(&version_index, get_token_data_file_indexed("IMAGE INDEX", xml_file, i + 1), FALSE) >= 0); i++); + for (i = 0; StrArrayAdd(&version_index, get_token_data_file_indexed("IMAGE INDEX", xml_file, i + 1), FALSE) >= 0; i++) { + // Some people are apparently creating *unofficial* Windows ISOs that don't have DISPLAYNAME elements. + // If we are parsing such an ISO, try to fall back to using DESCRIPTION. Of course, since we don't use + // a formal XML parser, if an ISO mixes entries with both DISPLAYNAME and DESCRIPTION and others with + // only DESCRIPTION, the version names we report will be wrong. + // But hey, there's only so far I'm willing to go to help people who, not content to have demonstrated + // their utter ignorance on development matters, are also trying to lecture experienced developers + // about specific "noob mistakes"... that don't exist in the code they are trying to criticize. + if (StrArrayAdd(&version_name, get_token_data_file_indexed("DISPLAYNAME", xml_file, i + 1), FALSE) < 0) { + bNonStandard = TRUE; + if (StrArrayAdd(&version_name, get_token_data_file_indexed("DESCRIPTION", xml_file, i + 1), FALSE) < 0) { + uprintf("Warning: Could not find a description for image index %d", i + 1); + StrArrayAdd(&version_name, "Unknown Windows Version", TRUE); + } + } + } + if (bNonStandard) + uprintf("Warning: Nonstandard Windows image (missing entries)"); if (i > 1) i = SelectionDialog(lmprintf(MSG_291), lmprintf(MSG_292), version_name.String, i); @@ -1333,7 +1350,7 @@ int SetWinToGoIndex(void) } else { wintogo_index = atoi(version_index.String[i - 1]); } - if (i >= 0) { + if (i > 0) { // Get the build version build = get_token_data_file_indexed("BUILD", xml_file, i); if (build != NULL) diff --git a/src/rufus.rc b/src/rufus.rc index ee67705f..6c496308 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1171" +CAPTION "Rufus 2.16.1172" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1171,0 - PRODUCTVERSION 2,16,1171,0 + FILEVERSION 2,16,1172,0 + PRODUCTVERSION 2,16,1172,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1171" + VALUE "FileVersion", "2.16.1172" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1171" + VALUE "ProductVersion", "2.16.1172" END END BLOCK "VarFileInfo" From 3d33493c6f333181a4dc3dd616c05649e114e3ac Mon Sep 17 00:00:00 2001 From: Na Jiyoun Date: Mon, 7 Aug 2017 18:11:04 +0100 Subject: [PATCH 53/97] [loc] update Korean translation to latest --- res/localization/rufus.loc | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 018340e4..142af720 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -8893,7 +8893,7 @@ t MSG_298 "選択されたISOファイルは定義されているファイルサ ################################################################################ l "ko-KR" "Korean (한국어)" 0x0412 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -9333,6 +9333,12 @@ t MSG_291 "버전 선택" t MSG_292 "설치할 Windows 버전을 선택하십시오.:" t MSG_293 "지원되지 않는 Windows 버전" t MSG_294 "이 Windows 버전은 Rufus에서 더 이상 지원하지 않습니다." +t MSG_295 "비공식 버전" +t MSG_296 "이 버전의 Rufus는 개발자의 공식 버전이 아닙니다.\n\n그래도 실행하시겠습니까?" +t MSG_297 "깨진 ISO가 감지 됨." +t MSG_298 "선택한 ISO파일이 선언된 것과 일치하지 않습니다. 크기 데이터 %s이(가) 없습니다!\n\n만약 이 파일을 인터넷에서 가져왔다면 " + "새로운 사본을 다운로드 하고 MD5 또는 SHA Checksum이 공식 버전과 일치하는지 확인하십시오.\n\nRufus에서 MD5 또는 SHA를 계산하려면 " + "'#' 버튼을 클릭하십시오." ################################################################################ l "lv-LV" "Latvian (Latviešu)" 0x0426 diff --git a/src/rufus.rc b/src/rufus.rc index 6c496308..ef7e0799 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1172" +CAPTION "Rufus 2.16.1173" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1172,0 - PRODUCTVERSION 2,16,1172,0 + FILEVERSION 2,16,1173,0 + PRODUCTVERSION 2,16,1173,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1172" + VALUE "FileVersion", "2.16.1173" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1172" + VALUE "ProductVersion", "2.16.1173" END END BLOCK "VarFileInfo" From 5d371088cb00d34e1193ad64dc34b6dc0ece2304 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 9 Aug 2017 16:27:11 +0100 Subject: [PATCH 54/97] [iso] add EFI boot support from 'efi.img' FAT images * Required to support Debian Live 9.1 in ISO mode * Note that this only works if the efi.img boot files do not require additional content besides the one extracted from the ISO. --- src/format.c | 2 +- src/iso.c | 276 +++++++++++++++++++++++++++++++++++++++-------- src/msapi_utf8.h | 21 ++-- src/rufus.c | 9 +- src/rufus.h | 5 +- src/rufus.rc | 10 +- 6 files changed, 263 insertions(+), 60 deletions(-) diff --git a/src/format.c b/src/format.c index 475bc05f..731f1408 100644 --- a/src/format.c +++ b/src/format.c @@ -2042,7 +2042,7 @@ DWORD WINAPI FormatThread(void* param) efi_dst[0] = drive_name[0]; efi_dst[sizeof(efi_dst) - sizeof("\\bootx64.efi")] = 0; if (!CreateDirectoryA(efi_dst, 0)) { - uprintf("Could not create directory '%s': %s\n", WindowsErrorString()); + uprintf("Could not create directory '%s': %s\n", efi_dst, WindowsErrorString()); FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_CANT_PATCH); } else { efi_dst[sizeof(efi_dst) - sizeof("\\bootx64.efi")] = '\\'; diff --git a/src/iso.c b/src/iso.c index 2b468c8c..bf4bb340 100644 --- a/src/iso.c +++ b/src/iso.c @@ -39,6 +39,7 @@ #include #include "rufus.h" +#include "libfat.h" #include "missing.h" #include "resource.h" #include "msapi_utf8.h" @@ -73,6 +74,7 @@ static const char* grldr_name = "grldr"; static const char* ldlinux_name = "ldlinux.sys"; static const char* ldlinux_c32 = "ldlinux.c32"; static const char* efi_dirname = "/efi/boot"; +static const char* efi_img_name = "efi.img"; // Used by Debian Live ISOHybrids static const char* efi_bootname[] = { "bootia32.efi", "bootia64.efi", "bootx64.efi", "bootarm.efi", "bootaa64.efi", "bootebc.efi" }; static const char* install_wim_path = "/sources"; static const char* install_wim_name[] = { "install.wim", "install.swm" }; @@ -202,6 +204,10 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t i_file_length, cons if ((img_report.reactos_path[0] == 0) && (safe_stricmp(psz_basename, reactos_name) == 0)) safe_strcpy(img_report.reactos_path, sizeof(img_report.reactos_path), psz_fullpath); + // Check for the first 'efi.img' we can find (that hopefully contains EFI boot files) + if (!HAS_EFI_IMG(img_report) && (safe_stricmp(psz_basename, efi_img_name) == 0)) + safe_strcpy(img_report.efi_img_path, sizeof(img_report.efi_img_path), psz_fullpath); + // Check for the EFI boot entries if (safe_stricmp(psz_dirname, efi_dirname) == 0) { for (i=0; i create a new one - if (fd == NULL) { - uprintf("Unable to create %s - booting from USB will not work", path); - r = 1; - } else { - fprintf(fd, "DEFAULT loadconfig\n\nLABEL loadconfig\n CONFIG %s\n", img_report.cfg_path); - for (i=safe_strlen(img_report.cfg_path); (i>0)&&(img_report.cfg_path[i]!='/'); i--); - if (i>0) { - img_report.cfg_path[i] = 0; - fprintf(fd, " APPEND %s/\n", img_report.cfg_path); - img_report.cfg_path[i] = '/'; - } - uprintf("Created: %s", path); + } else { + // For Debian live ISOs, that only provide EFI boot files in a FAT efi.img + if (img_report.has_efi == 0x80) + ExtractEfiImgFiles(dest_dir); + if (HAS_SYSLINUX(img_report)) { + safe_sprintf(path, sizeof(path), "%s\\syslinux.cfg", dest_dir); + // Create a /syslinux.cfg (if none exists) that points to the existing isolinux cfg + fd = fopen(path, "r"); + if (fd != NULL && img_report.needs_syslinux_overwrite) { + fclose(fd); + fd = NULL; + safe_sprintf(path2, sizeof(path2), "%s\\syslinux.org", dest_dir); + uprintf("Renaming: %s ➔ %s", path, path2); + IGNORE_RETVAL(rename(path, path2)); } + if (fd == NULL) { + fd = fopen(path, "w"); // No "/syslinux.cfg" => create a new one + if (fd == NULL) { + uprintf("Unable to create %s - booting from USB will not work", path); + r = 1; + } else { + fprintf(fd, "DEFAULT loadconfig\n\nLABEL loadconfig\n CONFIG %s\n", img_report.cfg_path); + for (i = safe_strlen(img_report.cfg_path); (i > 0) && (img_report.cfg_path[i] != '/'); i--); + if (i > 0) { + img_report.cfg_path[i] = 0; + fprintf(fd, " APPEND %s/\n", img_report.cfg_path); + img_report.cfg_path[i] = '/'; + } + uprintf("Created: %s", path); + } + } + if (fd != NULL) + fclose(fd); } - if (fd != NULL) - fclose(fd); } if (p_iso != NULL) iso9660_close(p_iso); @@ -945,7 +959,7 @@ int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_f file_handle = CreateFileU(dest_file, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, attributes, NULL); if (file_handle == INVALID_HANDLE_VALUE) { - uprintf(" Unable to create file %s: %s\n", dest_file, WindowsErrorString()); + uprintf(" Could not create file %s: %s", dest_file, WindowsErrorString()); goto out; } @@ -956,12 +970,12 @@ int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_f p_udf_root = udf_get_root(p_udf, true, 0); if (p_udf_root == NULL) { - uprintf("Could not locate UDF root directory\n"); + uprintf("Could not locate UDF root directory"); goto out; } p_udf_file = udf_fopen(p_udf_root, iso_file); if (!p_udf_file) { - uprintf("Could not locate file %s in ISO image\n", iso_file); + uprintf("Could not locate file %s in ISO image", iso_file); goto out; } file_length = udf_get_file_length(p_udf_file); @@ -969,12 +983,12 @@ int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_f memset(buf, 0, UDF_BLOCKSIZE); read_size = udf_read_block(p_udf_file, buf, 1); if (read_size < 0) { - uprintf("Error reading UDF file %s\n", iso_file); + uprintf("Error reading UDF file %s", iso_file); goto out; } buf_size = (DWORD)MIN(file_length, read_size); if (!WriteFileWithRetry(file_handle, buf, buf_size, &wr_size, WRITE_RETRIES)) { - uprintf(" Error writing file %s: %s\n", dest_file, WindowsErrorString()); + uprintf(" Error writing file %s: %s", dest_file, WindowsErrorString()); goto out; } file_length -= read_size; @@ -985,13 +999,13 @@ int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_f try_iso: p_iso = iso9660_open(iso); if (p_iso == NULL) { - uprintf("Unable to open image '%s'.\n", iso); + uprintf("Unable to open image '%s'", iso); goto out; } p_statbuf = iso9660_ifs_stat_translate(p_iso, iso_file); if (p_statbuf == NULL) { - uprintf("Could not get ISO-9660 file information for file %s\n", iso_file); + uprintf("Could not get ISO-9660 file information for file %s", iso_file); goto out; } @@ -1000,12 +1014,12 @@ try_iso: memset(buf, 0, ISO_BLOCKSIZE); lsn = p_statbuf->lsn + (lsn_t)i; if (iso9660_iso_seek_read(p_iso, buf, lsn, 1) != ISO_BLOCKSIZE) { - uprintf(" Error reading ISO9660 file %s at LSN %lu\n", iso_file, (long unsigned int)lsn); + uprintf(" Error reading ISO9660 file %s at LSN %lu", iso_file, (long unsigned int)lsn); goto out; } buf_size = (DWORD)MIN(file_length, ISO_BLOCKSIZE); if (!WriteFileWithRetry(file_handle, buf, buf_size, &wr_size, WRITE_RETRIES)) { - uprintf(" Error writing file %s: %s\n", dest_file, WindowsErrorString()); + uprintf(" Error writing file %s: %s", dest_file, WindowsErrorString()); goto out; } file_length -= ISO_BLOCKSIZE; @@ -1052,16 +1066,16 @@ uint32_t GetInstallWimVersion(const char* iso) p_udf_root = udf_get_root(p_udf, true, 0); if (p_udf_root == NULL) { - uprintf("Could not locate UDF root directory\n"); + uprintf("Could not locate UDF root directory"); goto out; } p_udf_file = udf_fopen(p_udf_root, wim_path); if (!p_udf_file) { - uprintf("Could not locate file %s in ISO image\n", wim_path); + uprintf("Could not locate file %s in ISO image", wim_path); goto out; } if (udf_read_block(p_udf_file, buf, 1) != UDF_BLOCKSIZE) { - uprintf("Error reading UDF file %s\n", wim_path); + uprintf("Error reading UDF file %s", wim_path); goto out; } r = wim_header[3]; @@ -1070,16 +1084,16 @@ uint32_t GetInstallWimVersion(const char* iso) try_iso: p_iso = iso9660_open(iso); if (p_iso == NULL) { - uprintf("Unable to open image '%s'.\n", iso); + uprintf("Could not open image '%s'", iso); goto out; } p_statbuf = iso9660_ifs_stat_translate(p_iso, wim_path); if (p_statbuf == NULL) { - uprintf("Could not get ISO-9660 file information for file %s\n", wim_path); + uprintf("Could not get ISO-9660 file information for file %s", wim_path); goto out; } if (iso9660_iso_seek_read(p_iso, buf, p_statbuf->lsn, 1) != ISO_BLOCKSIZE) { - uprintf("Error reading ISO9660 file %s at LSN %lu\n", wim_path, (long unsigned int)p_statbuf->lsn); + uprintf("Error reading ISO-9660 file %s at LSN %lu", wim_path, (long unsigned int)p_statbuf->lsn); goto out; } r = wim_header[3]; @@ -1100,6 +1114,184 @@ out: return bswap_uint32(r); } +#define ISO_NB_BLOCKS 16 +typedef struct { + iso9660_t* p_iso; + lsn_t lsn; + libfat_sector_t sec_start; + // Use a multi block buffer, to improve sector reads + uint8_t buf[ISO_BLOCKSIZE * ISO_NB_BLOCKS]; +} iso9660_readfat_private; + +/* + * Read sectors from a FAT img file residing on an ISO-9660 filesystem. + * NB: This assumes that the img file sectors are contiguous on the ISO. + */ +int iso9660_readfat(intptr_t pp, void *buf, size_t secsize, libfat_sector_t sec) +{ + iso9660_readfat_private* p_private = (iso9660_readfat_private*)pp; + + if (sizeof(p_private->buf) % secsize != 0) { + uprintf("iso9660_readfat: Sector size %d is not a divisor of %d", secsize, sizeof(p_private->buf)); + return 0; + } + + if ((sec < p_private->sec_start) || (sec >= p_private->sec_start + sizeof(p_private->buf) / secsize)) { + // Sector being queried is not in our multi block buffer -> Update it + p_private->sec_start = (((sec * secsize) / ISO_BLOCKSIZE) * ISO_BLOCKSIZE) / secsize; + if (iso9660_iso_seek_read(p_private->p_iso, p_private->buf, + p_private->lsn + (lsn_t)((p_private->sec_start * secsize) / ISO_BLOCKSIZE), ISO_NB_BLOCKS) + != ISO_NB_BLOCKS * ISO_BLOCKSIZE) { + uprintf("Error reading ISO-9660 file %s at LSN %lu\n", img_report.efi_img_path, + (long unsigned int)(p_private->lsn + (p_private->sec_start * secsize) / ISO_BLOCKSIZE)); + return 0; + } + } + memcpy(buf, &p_private->buf[(sec - p_private->sec_start)*secsize], secsize); + return (int)secsize; +} + +/* + * Extract EFI bootloaders files from an ISO-9660 FAT img file into directory . + * If is NULL, returns TRUE if an EFI bootloader exists in the img. + * If is not NULL, returns TRUE if any if the bootloaders was properly written. + */ +BOOL ExtractEfiImgFiles(const char* dir) +{ + BOOL ret = FALSE; + HANDLE handle; + DWORD size, file_size, written; + iso9660_t* p_iso = NULL; + iso9660_stat_t* p_statbuf = NULL; + iso9660_readfat_private* p_private = NULL; + libfat_sector_t s; + int32_t dc, c; + struct libfat_filesystem *fs; + struct libfat_direntry direntry; + char name[12] = { 0 }; + char path[64]; + int i, j, k; + void* buf; + + if ((image_path == NULL) || !HAS_EFI_IMG(img_report)) + return FALSE; + + p_iso = iso9660_open(image_path); + if (p_iso == NULL) { + uprintf("Could not open image '%s' as an ISO-9660 file system", image_path); + goto out; + } + p_statbuf = iso9660_ifs_stat_translate(p_iso, img_report.efi_img_path); + if (p_statbuf == NULL) { + uprintf("Could not get ISO-9660 file information for file %s\n", img_report.efi_img_path); + goto out; + } + p_private = malloc(sizeof(iso9660_readfat_private)); + if (p_private == NULL) + goto out; + p_private->p_iso = p_iso; + p_private->lsn = p_statbuf->lsn; + p_private->sec_start = 0; + // Populate our intial buffer + if (iso9660_iso_seek_read(p_private->p_iso, p_private->buf, p_private->lsn, ISO_NB_BLOCKS) != ISO_NB_BLOCKS * ISO_BLOCKSIZE) { + uprintf("Error reading ISO-9660 file %s at LSN %lu\n", img_report.efi_img_path, (long unsigned int)p_private->lsn); + goto out; + } + fs = libfat_open(iso9660_readfat, (intptr_t)p_private); + if (fs == NULL) { + uprintf("FAT access error"); + goto out; + } + + // Navigate to /EFI/BOOT + if (libfat_searchdir(fs, 0, "EFI ", &direntry) < 0) + goto out; + dc = direntry.entry[26] + (direntry.entry[27] << 8); + if (libfat_searchdir(fs, dc, "BOOT ", &direntry) < 0) + goto out; + dc = direntry.entry[26] + (direntry.entry[27] << 8); + + for (i = 0; i < ARRAYSIZE(efi_bootname); i++) { + // Sanity check in case the EFI forum comes up with a 'bootmips64.efi' or something... + if (strlen(efi_bootname[i]) > 12) { + uprintf("Internal error: FAT 8.3"); + continue; + } + for (j = 0, k = 0; efi_bootname[i][j] != 0; j++) { + if (efi_bootname[i][j] == '.') { + while (k < 8) + name[k++] = ' '; + } else + name[k++] = toupper(efi_bootname[i][j]); + } + c = libfat_searchdir(fs, dc, name, &direntry); + if (c > 0) { + if (dir == NULL) { + if (!ret) + uprintf(" Detected EFI bootloader(s) (from '%s'):", img_report.efi_img_path); + uprintf(" ● '%s'", efi_bootname[i]); + ret = TRUE; + } else { + file_size = direntry.entry[28] + (direntry.entry[29] << 8) + (direntry.entry[30] << 16) + + (direntry.entry[31] << 24); + // Sanity check + if (file_size > 64 * MB) { + uprintf("Warning: File size is larger than 64 MB => not extracted"); + continue; + } + static_sprintf(path, "%s\\efi", dir); + if (!CreateDirectoryA(path, 0) && (GetLastError() != ERROR_ALREADY_EXISTS)) { + uprintf("Could not create directory '%s': %s\n", path, WindowsErrorString()); + continue; + } + safe_strcat(path, sizeof(path), "\\boot"); + if (!CreateDirectoryA(path, 0) && (GetLastError() != ERROR_ALREADY_EXISTS)) { + uprintf("Could not create directory '%s': %s\n", path, WindowsErrorString()); + continue; + } + safe_strcat(path, sizeof(path), "\\"); + safe_strcat(path, sizeof(path), efi_bootname[i]); + uprintf("Extracting: %s (from '%s', %s)", path, img_report.efi_img_path, + SizeToHumanReadable(file_size, FALSE, FALSE)); + handle = CreateFileA(path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (handle == INVALID_HANDLE_VALUE) { + uprintf("Unable to create '%s': %s", path, WindowsErrorString()); + continue; + } + + written = 0; + s = libfat_clustertosector(fs, c); + while ((s != 0) && (s < 0xFFFFFFFFULL) && (written < file_size)) { + buf = libfat_get_sector(fs, s); + size = MIN(LIBFAT_SECTOR_SIZE, file_size - written); + if (!WriteFileWithRetry(handle, buf, size, &size, WRITE_RETRIES) || + (size != MIN(LIBFAT_SECTOR_SIZE, file_size - written))) { + uprintf("Error writing '%s': %s", path, WindowsErrorString()); + CloseHandle(handle); + continue; + } + written += size; + s = libfat_nextsector(fs, s); + } + CloseHandle(handle); + ret = TRUE; + } + } + } + +out: + if (fs != NULL) + libfat_close(fs); + if (p_statbuf != NULL) + safe_free(p_statbuf->rr.psz_symlink); + safe_free(p_statbuf); + safe_free(p_private); + if (p_iso != NULL) + iso9660_close(p_iso); + return ret; +} + // VirtDisk API Prototypes - Only available for Windows 8 or later PF_TYPE_DECL(WINAPI, DWORD, OpenVirtualDisk, (PVIRTUAL_STORAGE_TYPE, PCWSTR, VIRTUAL_DISK_ACCESS_MASK, OPEN_VIRTUAL_DISK_FLAG, POPEN_VIRTUAL_DISK_PARAMETERS, PHANDLE)); diff --git a/src/msapi_utf8.h b/src/msapi_utf8.h index a0b2c0e5..d220fc2e 100644 --- a/src/msapi_utf8.h +++ b/src/msapi_utf8.h @@ -293,6 +293,18 @@ static __inline int LoadStringU(HINSTANCE hInstance, UINT uID, LPSTR lpBuffer, i return ret; } +static __inline HMODULE LoadLibraryU(LPCSTR lpFileName) +{ + HMODULE ret; + DWORD err = ERROR_INVALID_DATA; + wconvert(lpFileName); + ret = LoadLibraryW(wlpFileName); + err = GetLastError(); + wfree(lpFileName); + SetLastError(err); + return ret; +} + static __inline int DrawTextU(HDC hDC, LPCSTR lpText, int nCount, LPRECT lpRect, UINT uFormat) { int ret; @@ -1027,15 +1039,6 @@ static __inline BOOL GetVolumeInformationU(LPCSTR lpRootPathName, LPSTR lpVolume return ret; } -static __inline HMODULE LoadLibraryU(LPCSTR lpFileName) -{ - HMODULE h; - wconvert(lpFileName); - h = LoadLibraryW(wlpFileName); - wfree(lpFileName); - return h; -} - #ifdef __cplusplus } #endif diff --git a/src/rufus.c b/src/rufus.c index 2a8def1c..844751c1 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -992,7 +992,10 @@ static void DisplayISOProps(void) PRINT_ISO_PROP(HAS_REACTOS(img_report), " Uses: ReactOS"); PRINT_ISO_PROP(img_report.has_grub4dos, " Uses: Grub4DOS"); PRINT_ISO_PROP(img_report.has_grub2, " Uses: GRUB2"); - PRINT_ISO_PROP(img_report.has_efi, " Uses: EFI %s", HAS_WIN7_EFI(img_report) ? "(win7_x64)" : ""); + if (img_report.has_efi == 0x80) + uprintf(" Uses: EFI (through '%s')", img_report.efi_img_path); + else + PRINT_ISO_PROP(img_report.has_efi, " Uses: EFI %s", HAS_WIN7_EFI(img_report) ? "(win7_x64)" : ""); PRINT_ISO_PROP(HAS_BOOTMGR(img_report), " Uses: Bootmgr"); PRINT_ISO_PROP(HAS_WINPE(img_report), " Uses: WinPE %s", (img_report.uses_minint) ? "(with /minint)" : ""); if (HAS_INSTALL_WIM(img_report)) { @@ -2259,7 +2262,9 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA case WM_COMMAND: #ifdef RUFUS_TEST if (LOWORD(wParam) == IDC_TEST) { - uprintf("Proceed = %s", CheckDriveAccess(2000)?"True":"False"); + ExtractEfiImgFiles("C:\\rufus"); +// ExtractEFI("C:\\rufus\\efi.img", "C:\\rufus\\efi"); +// uprintf("Proceed = %s", CheckDriveAccess(2000)?"True":"False"); // char* choices[] = { "Choice 1", "Choice 2", "Choice 3" }; // SelectionDyn("Test Choice", "Unused", choices, ARRAYSIZE(choices)); break; diff --git a/src/rufus.h b/src/rufus.h index 70094dac..d2cfa677 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -261,8 +261,9 @@ enum checksum_type { #define HAS_WINPE(r) (((r.winpe & WINPE_MININT) == WINPE_MININT)||((r.winpe & WINPE_I386) == WINPE_I386)) #define HAS_WINDOWS(r) (HAS_BOOTMGR(r) || (r.uses_minint) || HAS_WINPE(r)) #define HAS_WIN7_EFI(r) ((r.has_efi == 1) && HAS_INSTALL_WIM(r)) +#define HAS_EFI_IMG(r) (r.efi_img_path[0] != 0) #define IS_DD_BOOTABLE(r) (r.is_bootable_img) -#define IS_EFI_BOOTABLE(r) (r.has_efi) +#define IS_EFI_BOOTABLE(r) (r.has_efi != 0) #define IS_BIOS_BOOTABLE(r) (HAS_BOOTMGR(r) || HAS_SYSLINUX(r) || HAS_WINPE(r) || HAS_GRUB(r) || HAS_REACTOS(r) || HAS_KOLIBRIOS(r)) #define HAS_WINTOGO(r) (HAS_BOOTMGR(r) && IS_EFI_BOOTABLE(r) && HAS_INSTALL_WIM(r) && (r.install_wim_version < MAX_WIM_VERSION)) #define IS_FAT(fs) ((fs == FS_FAT16) || (fs == FS_FAT32)) @@ -273,6 +274,7 @@ typedef struct { char cfg_path[128]; /* path to the ISO's isolinux.cfg */ char reactos_path[128]; /* path to the ISO's freeldr.sys or setupldr.sys */ char install_wim_path[64]; /* path to install.wim or install.swm */ + char efi_img_path[128]; /* path to an efi.img file */ uint64_t image_size; uint64_t projected_size; int64_t mismatch_size; @@ -440,6 +442,7 @@ extern SIZE GetTextSize(HWND hCtrl); extern BOOL ExtractDOS(const char* path); extern BOOL ExtractISO(const char* src_iso, const char* dest_dir, BOOL scan); extern int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_file, DWORD attributes); +extern BOOL ExtractEfiImgFiles(const char* dir); extern char* MountISO(const char* path); extern void UnMountISO(void); extern BOOL InstallSyslinux(DWORD drive_index, char drive_letter, int fs); diff --git a/src/rufus.rc b/src/rufus.rc index ef7e0799..8389569c 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1173" +CAPTION "Rufus 2.16.1174" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1173,0 - PRODUCTVERSION 2,16,1173,0 + FILEVERSION 2,16,1174,0 + PRODUCTVERSION 2,16,1174,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1173" + VALUE "FileVersion", "2.16.1174" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1173" + VALUE "ProductVersion", "2.16.1174" END END BLOCK "VarFileInfo" From 90dc847e24b693c90e1dcd44077901bca0f2ea66 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 10 Aug 2017 19:43:04 +0100 Subject: [PATCH 55/97] [misc] add static_strcat & static_strcpy and use static_ calls wherever possible * Also set Rufus next to 2.17 and fix a warning --- configure | 20 ++++++++--------- configure.ac | 2 +- res/appstore/AppxManifest.xml | 2 +- res/appstore/packme.cmd | 2 +- src/dev.c | 16 +++++++------- src/dos.c | 14 ++++++------ src/dos_locale.c | 12 +++++----- src/drive.c | 6 ++--- src/format.c | 24 ++++++++++---------- src/icon.c | 2 +- src/iso.c | 30 ++++++++++++------------- src/net.c | 8 +++---- src/process.c | 4 ++-- src/registry.h | 8 +++---- src/rufus.c | 41 +++++++++++++++++------------------ src/rufus.h | 2 ++ src/rufus.rc | 10 ++++----- src/settings.h | 2 +- src/smart.c | 2 +- src/stdfn.c | 10 ++++----- src/stdio.c | 8 +++---- src/stdlg.c | 6 ++--- src/vhd.c | 10 ++++----- 23 files changed, 121 insertions(+), 120 deletions(-) diff --git a/configure b/configure index 4f721934..535b2d0a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for rufus 2.16. +# Generated by GNU Autoconf 2.69 for rufus 2.17. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='rufus' PACKAGE_TARNAME='rufus' -PACKAGE_VERSION='2.16' -PACKAGE_STRING='rufus 2.16' +PACKAGE_VERSION='2.17' +PACKAGE_STRING='rufus 2.17' PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues' PACKAGE_URL='https://rufus.akeo.ie' @@ -1228,7 +1228,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rufus 2.16 to adapt to many kinds of systems. +\`configure' configures rufus 2.17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1294,7 +1294,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rufus 2.16:";; + short | recursive ) echo "Configuration of rufus 2.17:";; esac cat <<\_ACEOF @@ -1385,7 +1385,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rufus configure 2.16 +rufus configure 2.17 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1440,7 +1440,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rufus $as_me 2.16, which was +It was created by rufus $as_me 2.17, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2303,7 +2303,7 @@ fi # Define the identity of the package. PACKAGE='rufus' - VERSION='2.16' + VERSION='2.17' cat >>confdefs.h <<_ACEOF @@ -4483,7 +4483,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rufus $as_me 2.16, which was +This file was extended by rufus $as_me 2.17, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4537,7 +4537,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -rufus config.status 2.16 +rufus config.status 2.17 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 83399a5b..339ab2aa 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([rufus], [2.16], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie]) +AC_INIT([rufus], [2.17], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie]) AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies]) AC_CONFIG_SRCDIR([src/rufus.c]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml index 2aeb1e97..88e18572 100644 --- a/res/appstore/AppxManifest.xml +++ b/res/appstore/AppxManifest.xml @@ -8,7 +8,7 @@ for an interesting struggle, when you also happen to have a comma in one of the fields... --> diff --git a/res/appstore/packme.cmd b/res/appstore/packme.cmd index 738e3c7a..11e33f84 100644 --- a/res/appstore/packme.cmd +++ b/res/appstore/packme.cmd @@ -1,5 +1,5 @@ @echo off -set VERSION=2.16 +set VERSION=2.17 rem Make sure you don't have anything you don't want included in the package, as anything residing in the rem current directory will be included, including any previous .appx, which makes for nice recursion... diff --git a/src/dev.c b/src/dev.c index 3297c8c6..c4568677 100644 --- a/src/dev.c +++ b/src/dev.c @@ -184,7 +184,7 @@ BOOL GetOpticalMedia(IMG_SAVE* img_save) if (!SetupDiGetDeviceRegistryPropertyU(dev_info, &dev_info_data, SPDRP_FRIENDLYNAME, &datatype, (LPBYTE)str, sizeof(str), &size)) { uprintf("SetupDiGetDeviceRegistryProperty (Friendly Name) failed: %s\n", WindowsErrorString()); - safe_strcpy(str, sizeof(str), "Generic Optical Drive"); + static_strcpy(str, "Generic Optical Drive"); } uprintf("Found '%s' optical device", str); devint_data.cbSize = sizeof(devint_data); @@ -245,7 +245,7 @@ BOOL GetOpticalMedia(IMG_SAVE* img_save) label[k] = 0; img_save->Label = label; } - safe_strcpy(str, sizeof(str), devint_detail_data->DevicePath); + static_strcpy(str, devint_detail_data->DevicePath); img_save->DevicePath = str; img_save->DeviceSize = DiskGeometry->DiskSize.QuadPart; safe_closehandle(hDrive); @@ -507,7 +507,7 @@ BOOL GetDevices(DWORD devnum) &datatype, (LPBYTE)buffer, sizeof(buffer), &size)) { uprintf("SetupDiGetDeviceRegistryProperty (Friendly Name) failed: %s\n", WindowsErrorString()); // We can afford a failure on this call - just replace the name with "USB Storage Device (Generic)" - safe_strcpy(buffer, sizeof(buffer), lmprintf(MSG_045)); + static_strcpy(buffer, lmprintf(MSG_045)); } else if ((!props.is_VHD) && (devid_list != NULL)) { // Get the properties of the device. We could avoid doing this lookup every time by keeping // a lookup table, but there shouldn't be that many USB storage devices connected... @@ -580,7 +580,7 @@ BOOL GetDevices(DWORD devnum) #ifdef FORCED_DEVICE props.vid = FORCED_VID; props.pid = FORCED_PID; - safe_strcpy(buffer, sizeof(buffer), FORCED_NAME); + static_strcpy(buffer, FORCED_NAME); #endif } break; @@ -605,7 +605,7 @@ BOOL GetDevices(DWORD devnum) uuprintf("Found non-USB non-removable device '%s' => Eliminated", buffer); continue; } - safe_strcpy(str, sizeof(str), "????:????"); // Couldn't figure VID:PID + static_strcpy(str, "????:????"); // Couldn't figure VID:PID } else { static_sprintf(str, "%04X:%04X", props.vid, props.pid); } @@ -731,14 +731,14 @@ BOOL GetDevices(DWORD devnum) } // We have multiple volumes assigned to the same device (multiple partitions) // If that is the case, use "Multiple Volumes" instead of the label - safe_strcpy(entry_msg, sizeof(entry_msg), (((drive_letters[0] != 0) && (drive_letters[1] != 0))? + static_strcpy(entry_msg, (((drive_letters[0] != 0) && (drive_letters[1] != 0))? lmprintf(MSG_047):label)); for (k=0, remove_drive=0; drive_letters[k] && (!remove_drive); k++) { // Append all the drive letters we detected letter_name[2] = drive_letters[k]; if (right_to_left_mode) - safe_strcat(entry_msg, sizeof(entry_msg), RIGHT_TO_LEFT_MARK); - safe_strcat(entry_msg, sizeof(entry_msg), letter_name); + static_strcat(entry_msg, RIGHT_TO_LEFT_MARK); + static_strcat(entry_msg, letter_name); if (drive_letters[k] == (PathGetDriveNumberU(app_dir) + 'A')) remove_drive = 1; if (drive_letters[k] == (PathGetDriveNumberU(system_dir) + 'A')) diff --git a/src/dos.c b/src/dos.c index 220a28ed..c73b17ce 100644 --- a/src/dos.c +++ b/src/dos.c @@ -301,8 +301,8 @@ static BOOL ExtractMSDOS(const char* path) return FALSE; // Reduce the visible mess by placing all the locale files into a subdir - safe_strcpy(locale_path, sizeof(locale_path), path); - safe_strcat(locale_path, sizeof(locale_path), "LOCALE\\"); + static_strcpy(locale_path, path); + static_strcat(locale_path, "LOCALE\\"); CreateDirectoryA(locale_path, NULL); len = GetSystemDirectoryA(dllname, sizeof(dllname)); @@ -310,7 +310,7 @@ static BOOL ExtractMSDOS(const char* path) uprintf("Unable to get system directory: %s\n", WindowsErrorString()); goto out; } - safe_strcat(dllname, sizeof(dllname), "\\diskcopy.dll"); + static_strcat(dllname, "\\diskcopy.dll"); hDLL = LoadLibraryA(dllname); if (hDLL == NULL) { uprintf("Unable to open %s: %s\n", dllname, WindowsErrorString()); @@ -375,15 +375,15 @@ BOOL ExtractFreeDOS(const char* path) } // Reduce the visible mess by placing all the locale files into a subdir - safe_strcpy(locale_path, sizeof(locale_path), path); - safe_strcat(locale_path, sizeof(locale_path), "LOCALE\\"); + static_strcpy(locale_path, path); + static_strcat(locale_path, "LOCALE\\"); CreateDirectoryA(locale_path, NULL); for (i=0; i= safe_strlen(config_path.String[i])) - safe_strcpy(img_report.cfg_path, sizeof(img_report.cfg_path), config_path.String[i]); + static_strcpy(img_report.cfg_path, config_path.String[i]); } uprintf(" Will use '%s' for Syslinux", img_report.cfg_path); // Extract all of the isolinux.bin files we found to identify their versions @@ -811,7 +811,7 @@ out: fclose(fd); sl_version = GetSyslinuxVersion(buf, size, &ext); if (img_report.sl_version == 0) { - safe_strcpy(img_report.sl_version_ext, sizeof(img_report.sl_version_ext), ext); + static_strcpy(img_report.sl_version_ext, ext); img_report.sl_version = sl_version; sl_index = i; } else if ((img_report.sl_version != sl_version) || (safe_strcmp(img_report.sl_version_ext, ext) != 0)) { @@ -822,7 +822,7 @@ out: // Where possible, prefer to the one that resides in the same directory as the config file. for (j=safe_strlen(img_report.cfg_path); (j>0) && (img_report.cfg_path[j]!='/'); j--); if (safe_strnicmp(img_report.cfg_path, isolinux_path.String[i], j) == 0) { - safe_strcpy(img_report.sl_version_ext, sizeof(img_report.sl_version_ext), ext); + static_strcpy(img_report.sl_version_ext, ext); img_report.sl_version = sl_version; sl_index = i; } @@ -855,7 +855,7 @@ out: // In case we have a WinPE 1.x based iso, we extract and parse txtsetup.sif // during scan, to see if /minint was provided for OsLoadOptions, as it decides // whether we should use 0x80 or 0x81 as the disk ID in the MBR - safe_sprintf(path, sizeof(path), "/%s/txtsetup.sif", + static_sprintf(path, "/%s/txtsetup.sif", basedir[((img_report.winpe&WINPE_I386) == WINPE_I386)?0:1]); ExtractISOFile(src_iso, path, tmp_sif, FILE_ATTRIBUTE_NORMAL); tmp = get_token_data_file("OsLoadOptions", tmp_sif); @@ -903,13 +903,13 @@ out: if (img_report.has_efi == 0x80) ExtractEfiImgFiles(dest_dir); if (HAS_SYSLINUX(img_report)) { - safe_sprintf(path, sizeof(path), "%s\\syslinux.cfg", dest_dir); + static_sprintf(path, "%s\\syslinux.cfg", dest_dir); // Create a /syslinux.cfg (if none exists) that points to the existing isolinux cfg fd = fopen(path, "r"); if (fd != NULL && img_report.needs_syslinux_overwrite) { fclose(fd); fd = NULL; - safe_sprintf(path2, sizeof(path2), "%s\\syslinux.org", dest_dir); + static_sprintf(path2, "%s\\syslinux.org", dest_dir); uprintf("Renaming: %s ➔ %s", path, path2); IGNORE_RETVAL(rename(path, path2)); } @@ -1166,7 +1166,7 @@ BOOL ExtractEfiImgFiles(const char* dir) iso9660_readfat_private* p_private = NULL; libfat_sector_t s; int32_t dc, c; - struct libfat_filesystem *fs; + struct libfat_filesystem *fs = NULL; struct libfat_direntry direntry; char name[12] = { 0 }; char path[64]; @@ -1244,13 +1244,13 @@ BOOL ExtractEfiImgFiles(const char* dir) uprintf("Could not create directory '%s': %s\n", path, WindowsErrorString()); continue; } - safe_strcat(path, sizeof(path), "\\boot"); + static_strcat(path, "\\boot"); if (!CreateDirectoryA(path, 0) && (GetLastError() != ERROR_ALREADY_EXISTS)) { uprintf("Could not create directory '%s': %s\n", path, WindowsErrorString()); continue; } - safe_strcat(path, sizeof(path), "\\"); - safe_strcat(path, sizeof(path), efi_bootname[i]); + static_strcat(path, "\\"); + static_strcat(path, efi_bootname[i]); uprintf("Extracting: %s (from '%s', %s)", path, img_report.efi_img_path, SizeToHumanReadable(file_size, FALSE, FALSE)); handle = CreateFileA(path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, diff --git a/src/net.c b/src/net.c index 2e77d589..00d3e3ce 100644 --- a/src/net.c +++ b/src/net.c @@ -205,7 +205,7 @@ const char* WinInetErrorString(void) InternetGetLastResponseInfoA(&error_code, error_string, &size); return error_string; default: - safe_sprintf(error_string, sizeof(error_string), "Unknown internet error 0x%08lX", error_code); + static_sprintf(error_string, "Unknown internet error 0x%08lX", error_code); return error_string; } } @@ -275,7 +275,7 @@ DWORD DownloadFile(const char* url, const char* file, HWND hProgressDialog) uprintf("Network is unavailable: %s\n", WinInetErrorString()); goto out; } - safe_sprintf(agent, ARRAYSIZE(agent), APPLICATION_NAME "/%d.%d.%d (Windows NT %d.%d%s)", + static_sprintf(agent, APPLICATION_NAME "/%d.%d.%d (Windows NT %d.%d%s)", rufus_version[0], rufus_version[1], rufus_version[2], nWindowsVersion>>4, nWindowsVersion&0x0F, is_x64()?"; WOW64":""); hSession = InternetOpenA(agent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); @@ -467,7 +467,7 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param) goto out; hostname[sizeof(hostname)-1] = 0; - safe_sprintf(agent, ARRAYSIZE(agent), APPLICATION_NAME "/%d.%d.%d (Windows NT %d.%d%s)", + static_sprintf(agent, APPLICATION_NAME "/%d.%d.%d (Windows NT %d.%d%s)", rufus_version[0], rufus_version[1], rufus_version[2], nWindowsVersion >> 4, nWindowsVersion & 0x0F, is_x64() ? "; WOW64" : ""); hSession = InternetOpenA(agent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); @@ -493,7 +493,7 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param) // and then remove each each of the components until we find our match. For instance, we may first // look for rufus_win_x64_6.2.ver (Win8 x64) but only get a match for rufus_win_x64_6.ver (Vista x64 or later) // This allows sunsetting OS versions (eg XP) or providing different downloads for different archs/groups. - safe_sprintf(urlpath, sizeof(urlpath), "%s%s%s_%s_%lu.%lu.ver", APPLICATION_NAME, (k==0)?"":"_", + static_sprintf(urlpath, "%s%s%s_%s_%lu.%lu.ver", APPLICATION_NAME, (k==0)?"":"_", (k==0)?"":channel[k], archname[is_x64()?1:0], os_version.dwMajorVersion, os_version.dwMinorVersion); vuprintf("Base update check: %s\n", urlpath); for (i=0, j=(int)safe_strlen(urlpath)-5; (j>0)&&(i Just craft a default process name that includes the PID if (!bGotExePath) { - safe_sprintf(exe_path, MAX_PATH, "Unknown_Process_%" PRIu64, + static_sprintf(exe_path, "Unknown_Process_%" PRIu64, (ULONGLONG)handleInfo->UniqueProcessId); } } diff --git a/src/registry.h b/src/registry.h index 151ca751..81eb6803 100644 --- a/src/registry.h +++ b/src/registry.h @@ -89,12 +89,12 @@ static __inline BOOL _GetRegistryKey(HKEY key_root, const char* key_name, DWORD if (i + sizeof(software_prefix) >= sizeof(long_key_name)) return FALSE; strcpy(long_key_name, software_prefix); - safe_strcat(long_key_name, sizeof(long_key_name), key_name); + static_strcat(long_key_name, key_name); long_key_name[sizeof(software_prefix) + i - 1] = 0; } else { if (i >= sizeof(long_key_name)) return FALSE; - safe_strcpy(long_key_name, sizeof(long_key_name), key_name); + static_strcpy(long_key_name, key_name); long_key_name[i] = 0; } i++; @@ -164,12 +164,12 @@ static __inline BOOL _SetRegistryKey(HKEY key_root, const char* key_name, DWORD if (i + sizeof(software_prefix) >= sizeof(long_key_name)) goto out; strcpy(long_key_name, software_prefix); - safe_strcat(long_key_name, sizeof(long_key_name), key_name); + static_strcat(long_key_name, key_name); long_key_name[sizeof(software_prefix) + i - 1] = 0; } else { if (i >= sizeof(long_key_name)) goto out; - safe_strcpy(long_key_name, sizeof(long_key_name), key_name); + static_strcpy(long_key_name, key_name); long_key_name[i] = 0; } i++; diff --git a/src/rufus.c b/src/rufus.c index 844751c1..8219b41e 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -305,8 +305,8 @@ static BOOL DefineClusterSizes(void) tmp[0] = 0; // Tell the user if we're going to use Large FAT32 or regular if ((fs == FS_FAT32) && ((SelectedDrive.DiskSize > LARGE_FAT32_SIZE) || (force_large_fat32))) - safe_strcat(tmp, sizeof(tmp), "Large "); - safe_strcat(tmp, sizeof(tmp), FileSystemLabel[fs]); + static_strcat(tmp, "Large "); + static_strcat(tmp, FileSystemLabel[fs]); if (default_fs == FS_UNKNOWN) { entry = lmprintf(MSG_030, tmp); default_fs = fs; @@ -665,7 +665,7 @@ static BOOL PopulateProperties(int ComboIndex) EnableBootOptions(TRUE, TRUE); // Set a proposed label according to the size (eg: "256MB", "8GB") - safe_sprintf(SelectedDrive.proposed_label, sizeof(SelectedDrive.proposed_label), + static_sprintf(SelectedDrive.proposed_label, SizeToHumanReadable(SelectedDrive.DiskSize, FALSE, use_fake_units)); // Add a tooltip (with the size of the device in parenthesis) @@ -925,8 +925,7 @@ BOOL CALLBACK LogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) static void CALLBACK ClockTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { timer++; - safe_sprintf(szTimer, sizeof(szTimer), "%02d:%02d:%02d", - timer/3600, (timer%3600)/60, timer%60); + static_sprintf(szTimer, "%02d:%02d:%02d", timer/3600, (timer%3600)/60, timer%60); SendMessageA(hStatus, SB_SETTEXTA, SBT_OWNERDRAW | SB_SECTION_RIGHT, (LPARAM)szTimer); } @@ -1402,7 +1401,7 @@ static BOOL BootCheck(void) if ((grub2_len == 0) && (DownloadStatus == 404)) { // Couldn't locate the file on the server => try to download without the version extra uprintf("Extended version was not found, trying main version..."); - safe_strcpy(tmp2, sizeof(tmp2), img_report.grub2_version); + static_strcpy(tmp2, img_report.grub2_version); // Isolate the #.### part for (i = 0; ((tmp2[i] >= '0') && (tmp2[i] <= '9')) || (tmp2[i] == '.'); i++); tmp2[i] = 0; @@ -1752,7 +1751,7 @@ static void InitDialog(HWND hDlg) } else { embedded_sl_version[i] = GetSyslinuxVersion(buf, len, &ext); static_sprintf(embedded_sl_version_str[i], "%d.%02d", SL_MAJOR(embedded_sl_version[i]), SL_MINOR(embedded_sl_version[i])); - safe_strcpy(embedded_sl_version_ext[i], sizeof(embedded_sl_version_ext[i]), ext); + static_strcpy(embedded_sl_version_ext[i], ext); free(buf); } } @@ -1972,7 +1971,7 @@ static void ShowLanguageMenu(RECT rcExclude) static_sprintf(lang, LEFT_TO_RIGHT_EMBEDDING "(%s) " POP_DIRECTIONAL_FORMATTING "%s", r, l); safe_free(str); } else { - safe_strcpy(lang, sizeof(lang), lcmd->txt[1]); + static_strcpy(lang, lcmd->txt[1]); } InsertMenuU(menu, -1, MF_BYPOSITION|((selected_locale == lcmd)?MF_CHECKED:0), UM_LANGUAGE_MENU_MAX++, lang); } @@ -2047,7 +2046,7 @@ static void SaveVHD(void) ULARGE_INTEGER free_space; if (DriveIndex >= 0) - safe_sprintf(filename, sizeof(filename), "%s.vhd", DriveLabel.String[DriveIndex]); + static_sprintf(filename, "%s.vhd", DriveLabel.String[DriveIndex]); if ((DriveIndex != CB_ERR) && (!format_op_in_progress) && (format_thid == NULL)) { img_save.Type = IMG_SAVE_TYPE_VHD; img_save.DeviceNum = (DWORD)ComboBox_GetItemData(hDeviceList, DriveIndex); @@ -2075,7 +2074,7 @@ static void SaveVHD(void) uprintf("\r\nSave to VHD operation started"); PrintInfo(0, -1); timer = 0; - safe_sprintf(szTimer, sizeof(szTimer), "00:00:00"); + static_sprintf(szTimer, "00:00:00"); SendMessageA(hStatus, SB_SETTEXTA, SBT_OWNERDRAW | SB_SECTION_RIGHT, (LPARAM)szTimer); SetTimer(hMainDialog, TID_APP_TIMER, 1000, ClockTimer); } else { @@ -2120,7 +2119,7 @@ static void SaveISO(void) (img_save.BufSize > 8 * MB) && (img_save.DeviceSize <= img_save.BufSize * 64); img_save.BufSize /= 2); if ((img_save.Label != NULL) && (img_save.Label[0] != 0)) - safe_sprintf(filename, sizeof(filename), "%s.iso", img_save.Label); + static_sprintf(filename, "%s.iso", img_save.Label); uprintf("ISO media size %s", SizeToHumanReadable(img_save.DeviceSize, FALSE, FALSE)); img_save.ImagePath = FileDialog(TRUE, NULL, &img_ext, 0); @@ -2141,7 +2140,7 @@ static void SaveISO(void) uprintf("\r\nSave to ISO operation started"); PrintInfo(0, -1); timer = 0; - safe_sprintf(szTimer, sizeof(szTimer), "00:00:00"); + static_sprintf(szTimer, "00:00:00"); SendMessageA(hStatus, SB_SETTEXTA, SBT_OWNERDRAW | SB_SECTION_RIGHT, (LPARAM)szTimer); SetTimer(hMainDialog, TID_APP_TIMER, 1000, ClockTimer); } else { @@ -2612,7 +2611,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA uprintf("\r\nFormat operation started"); PrintInfo(0, -1); timer = 0; - safe_sprintf(szTimer, sizeof(szTimer), "00:00:00"); + static_sprintf(szTimer, "00:00:00"); SendMessageA(hStatus, SB_SETTEXTA, SBT_OWNERDRAW | SB_SECTION_RIGHT, (LPARAM)szTimer); SetTimer(hMainDialog, TID_APP_TIMER, 1000, ClockTimer); } @@ -2645,7 +2644,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA if (format_thid != NULL) { PrintInfo(0, -1); timer = 0; - safe_sprintf(szTimer, sizeof(szTimer), "00:00:00"); + static_sprintf(szTimer, "00:00:00"); SendMessageA(hStatus, SB_SETTEXTA, SBT_OWNERDRAW | SB_SECTION_RIGHT, (LPARAM)szTimer); SetTimer(hMainDialog, TID_APP_TIMER, 1000, ClockTimer); } else { @@ -3116,24 +3115,24 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } if (GetSystemDirectoryU(system_dir, sizeof(system_dir)) == 0) { uprintf("Could not get system directory: %s", WindowsErrorString()); - safe_strcpy(system_dir, sizeof(system_dir), "C:\\Windows\\System32"); + static_strcpy(system_dir, "C:\\Windows\\System32"); } if (GetTempPathU(sizeof(temp_dir), temp_dir) == 0) { uprintf("Could not get temp directory: %s", WindowsErrorString()); - safe_strcpy(temp_dir, sizeof(temp_dir), ".\\"); + static_strcpy(temp_dir, ".\\"); } // Construct Sysnative ourselves as there is no GetSysnativeDirectory() call // By default (64bit app running on 64 bit OS or 32 bit app running on 32 bit OS) // Sysnative and System32 are the same - safe_strcpy(sysnative_dir, sizeof(sysnative_dir), system_dir); + static_strcpy(sysnative_dir, system_dir); // But if the app is 32 bit and the OS is 64 bit, Sysnative must differ from System32 #if (!defined(_WIN64) && !defined(BUILD64)) if (is_x64()) { if (GetSystemWindowsDirectoryU(sysnative_dir, sizeof(sysnative_dir)) == 0) { uprintf("Could not get Windows directory: %s", WindowsErrorString()); - safe_strcpy(sysnative_dir, sizeof(sysnative_dir), "C:\\Windows"); + static_strcpy(sysnative_dir, "C:\\Windows"); } - safe_strcat(sysnative_dir, sizeof(sysnative_dir), "\\Sysnative"); + static_strcat(sysnative_dir, "\\Sysnative"); } #endif @@ -3181,7 +3180,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine loc_data = (BYTE*)GetResource(hMainInstance, MAKEINTRESOURCEA(IDR_LC_RUFUS_LOC), _RT_RCDATA, "embedded.loc", &loc_size, FALSE); if ( (GetTempFileNameU(temp_dir, APPLICATION_NAME, 0, loc_file) == 0) || (loc_file[0] == 0) ) { // Last ditch effort to get a loc file - just extract it to the current directory - safe_strcpy(loc_file, sizeof(loc_file), rufus_loc); + static_strcpy(loc_file, rufus_loc); } hFile = CreateFileU(loc_file, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, @@ -3194,7 +3193,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine uprintf("localization: extracted data to '%s'", loc_file); safe_closehandle(hFile); } else { - safe_sprintf(loc_file, sizeof(loc_file), "%s\\%s", app_dir, rufus_loc); + static_sprintf(loc_file, "%s\\%s", app_dir, rufus_loc); external_loc_file = TRUE; uprintf("using external loc file '%s'", loc_file); } diff --git a/src/rufus.h b/src/rufus.h index d2cfa677..5d4bf008 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -95,8 +95,10 @@ #define safe_strcp(dst, dst_max, src, count) do {memcpy(dst, src, safe_min(count, dst_max)); \ ((char*)dst)[safe_min(count, dst_max)-1] = 0;} while(0) #define safe_strcpy(dst, dst_max, src) safe_strcp(dst, dst_max, src, safe_strlen(src)+1) +#define static_strcpy(dst, src) safe_strcpy(dst, sizeof(dst), src) #define safe_strncat(dst, dst_max, src, count) strncat(dst, src, safe_min(count, dst_max - safe_strlen(dst) - 1)) #define safe_strcat(dst, dst_max, src) safe_strncat(dst, dst_max, src, safe_strlen(src)+1) +#define static_strcat(dst, src) safe_strcat(dst, sizeof(dst), src) #define safe_strcmp(str1, str2) strcmp(((str1==NULL)?"":str1), ((str2==NULL)?"":str2)) #define safe_strstr(str1, str2) strstr(((str1==NULL)?"":str1), ((str2==NULL)?"":str2)) #define safe_stricmp(str1, str2) _stricmp(((str1==NULL)?"":str1), ((str2==NULL)?"":str2)) diff --git a/src/rufus.rc b/src/rufus.rc index 8389569c..15c14e25 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.16.1174" +CAPTION "Rufus 2.17.1175" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,16,1174,0 - PRODUCTVERSION 2,16,1174,0 + FILEVERSION 2,17,1175,0 + PRODUCTVERSION 2,17,1175,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.16.1174" + VALUE "FileVersion", "2.17.1175" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.16.1174" + VALUE "ProductVersion", "2.17.1175" END END BLOCK "VarFileInfo" diff --git a/src/settings.h b/src/settings.h index 9b2a57c5..39364c87 100644 --- a/src/settings.h +++ b/src/settings.h @@ -94,7 +94,7 @@ static __inline char* ReadIniKeyStr(const char* key) { str[0] = 0; val = get_token_data_file(key, ini_file); if (val != NULL) { - safe_strcpy(str, sizeof(str), val); + static_strcpy(str, val); free(val); } return str; diff --git a/src/smart.c b/src/smart.c index 72b60149..7b32e328 100644 --- a/src/smart.c +++ b/src/smart.c @@ -68,7 +68,7 @@ const char* SptStrerr(int errcode) static char scsi_err[64]; if ((errcode > 0) && (errcode <= 0xff)) { - safe_sprintf(scsi_err, sizeof(scsi_err), "SCSI status: 0x%02X", (uint8_t)errcode); + static_sprintf(scsi_err, "SCSI status: 0x%02X", (uint8_t)errcode); return (const char*)scsi_err; } diff --git a/src/stdfn.c b/src/stdfn.c index 1874574a..90ef4b8c 100644 --- a/src/stdfn.c +++ b/src/stdfn.c @@ -235,7 +235,7 @@ void GetWindowsVersion(void) BOOL ws; nWindowsVersion = WINDOWS_UNDEFINED; - safe_strcpy(WindowsVersionStr, sizeof(WindowsVersionStr), "Windows Undefined"); + static_strcpy(WindowsVersionStr, "Windows Undefined"); memset(&vi, 0, sizeof(vi)); vi.dwOSVersionInfoSize = sizeof(vi); @@ -329,9 +329,9 @@ void GetWindowsVersion(void) GetRegistryKeyStr(REGKEY_HKLM, "Microsoft\\Windows NT\\CurrentVersion\\CurrentBuildNumber", build_number, sizeof(build_number)); if (build_number[0] != 0) { nWindowsBuildNumber = atoi(build_number); // Keep a global copy - safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), " (Build "); - safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), build_number); - safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), ")"); + static_strcat(WindowsVersionStr, " (Build "); + static_strcat(WindowsVersionStr, build_number); + static_strcat(WindowsVersionStr, ")"); } } @@ -905,7 +905,7 @@ char* GetCurrentMUI(void) (pfLCIDToLocaleName(GetUserDefaultUILanguage(), wmui_str, LOCALE_NAME_MAX_LENGTH, 0) > 0) ) { wchar_to_utf8_no_alloc(wmui_str, mui_str, LOCALE_NAME_MAX_LENGTH); } else { - safe_strcpy(mui_str, LOCALE_NAME_MAX_LENGTH, "en-US"); + static_strcpy(mui_str, "en-US"); } return mui_str; } diff --git a/src/stdio.c b/src/stdio.c index c3975f36..c783554e 100644 --- a/src/stdio.c +++ b/src/stdio.c @@ -151,7 +151,7 @@ static char err_string[256] = {0}; error_code = GetLastError(); - safe_sprintf(err_string, sizeof(err_string), "[0x%08lX] ", error_code); + static_sprintf(err_string, "[0x%08lX] ", error_code); size = FormatMessageU(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, HRESULT_CODE(error_code), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &err_string[strlen(err_string)], @@ -159,10 +159,10 @@ static char err_string[256] = {0}; if (size == 0) { format_error = GetLastError(); if ((format_error) && (format_error != 0x13D)) // 0x13D, decode error, is returned for unknown codes - safe_sprintf(err_string, sizeof(err_string), - "Windows error code 0x%08lX (FormatMessage error code 0x%08lX)", error_code, format_error); + static_sprintf(err_string, "Windows error code 0x%08lX (FormatMessage error code 0x%08lX)", + error_code, format_error); else - safe_sprintf(err_string, sizeof(err_string), "Unknown error 0x%08lX", error_code); + static_sprintf(err_string, "Unknown error 0x%08lX", error_code); } SetLastError(error_code); // Make sure we don't change the errorcode on exit diff --git a/src/stdlg.c b/src/stdlg.c index d2524bbc..29eccaef 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -202,7 +202,7 @@ void BrowseForFolder(void) { if (tmp_path == NULL) { uprintf("Could not convert path\n"); } else { - safe_strcpy(szFolderPath, MAX_PATH, tmp_path); + static_strcpy(szFolderPath, tmp_path); safe_free(tmp_path); } } else { @@ -630,7 +630,7 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP CenterDialog(hDlg); if (settings_commcheck) ShowWindow(GetDlgItem(hDlg, IDC_ABOUT_UPDATES), SW_SHOW); - safe_sprintf(about_blurb, sizeof(about_blurb), about_blurb_format, lmprintf(MSG_174|MSG_RTF), + static_sprintf(about_blurb, about_blurb_format, lmprintf(MSG_174|MSG_RTF), lmprintf(MSG_175|MSG_RTF, rufus_version[0], rufus_version[1], rufus_version[2]), right_to_left_mode?"Akeo \\\\ Pete Batard 2011-2017 © Copyright":"Copyright © 2011-2017 Pete Batard / Akeo", lmprintf(MSG_176|MSG_RTF), lmprintf(MSG_177|MSG_RTF), lmprintf(MSG_178|MSG_RTF)); @@ -1459,7 +1459,7 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l IGNORE_RETVAL(ComboBox_SetCurSel(hBeta, ReadSettingBool(SETTING_INCLUDE_BETAS)?0:1)); hPolicy = GetDlgItem(hDlg, IDC_POLICY); SendMessage(hPolicy, EM_AUTOURLDETECT, 1, 0); - safe_sprintf(update_policy_text, sizeof(update_policy_text), update_policy, lmprintf(MSG_179|MSG_RTF), + static_sprintf(update_policy_text, update_policy, lmprintf(MSG_179|MSG_RTF), lmprintf(MSG_180|MSG_RTF), lmprintf(MSG_181|MSG_RTF), lmprintf(MSG_182|MSG_RTF), lmprintf(MSG_183|MSG_RTF), lmprintf(MSG_184|MSG_RTF), lmprintf(MSG_185|MSG_RTF), lmprintf(MSG_186|MSG_RTF)); SendMessageA(hPolicy, EM_SETTEXTEX, (WPARAM)&friggin_microsoft_unicode_amateurs, (LPARAM)update_policy_text); diff --git a/src/vhd.c b/src/vhd.c index c1972989..31042602 100644 --- a/src/vhd.c +++ b/src/vhd.c @@ -110,7 +110,7 @@ static BOOL Get7ZipPath(void) { if ( (GetRegistryKeyStr(REGKEY_HKCU, "7-Zip\\Path", sevenzip_path, sizeof(sevenzip_path))) || (GetRegistryKeyStr(REGKEY_HKLM, "7-Zip\\Path", sevenzip_path, sizeof(sevenzip_path))) ) { - safe_strcat(sevenzip_path, sizeof(sevenzip_path), "\\7z.exe"); + static_strcat(sevenzip_path, "\\7z.exe"); return (_access(sevenzip_path, 0) != -1); } return FALSE; @@ -471,11 +471,11 @@ BOOL WimExtractFile_7z(const char* image, int index, const char* src, const char // return an error code if it can't extract the file), we need // to issue 2 passes. See github issue #680. for (n = 0; n < 2; n++) { - safe_strcpy(tmpdst, sizeof(tmpdst), dst); + static_strcpy(tmpdst, dst); for (i = strlen(tmpdst) - 1; (i > 0) && (tmpdst[i] != '\\') && (tmpdst[i] != '/'); i--); tmpdst[i] = 0; - safe_sprintf(cmdline, sizeof(cmdline), "\"%s\" -y e \"%s\" %s%s", sevenzip_path, + static_sprintf(cmdline, "\"%s\" -y e \"%s\" %s%s", sevenzip_path, image, (n == 0) ? index_prefix : "", src); if (RunCommand(cmdline, tmpdst, FALSE) != 0) { uprintf(" Could not launch 7z.exe: %s", WindowsErrorString()); @@ -484,8 +484,8 @@ BOOL WimExtractFile_7z(const char* image, int index, const char* src, const char for (i = safe_strlen(src); (i > 0) && (src[i] != '\\') && (src[i] != '/'); i--); if (i == 0) - safe_strcat(tmpdst, sizeof(tmpdst), "\\"); - safe_strcat(tmpdst, sizeof(tmpdst), &src[i]); + static_strcat(tmpdst, "\\"); + static_strcat(tmpdst, &src[i]); if (_access(tmpdst, 0) == 0) // File was extracted => move on break; From 3a150ddeda60be4282ac77e2c06cf0e82736900c Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 11 Aug 2017 11:43:37 +0100 Subject: [PATCH 56/97] [core] add support for more non-USB card readers * Closes #994 --- src/dev.c | 11 ++++++++++- src/rufus.rc | 10 +++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/dev.c b/src/dev.c index c4568677..7ad8802e 100644 --- a/src/dev.c +++ b/src/dev.c @@ -305,6 +305,7 @@ BOOL GetDevices(DWORD devnum) char letter_name[] = " (?:)"; char drive_name[] = "?:\\"; char uefi_togo_check[] = "?:\\EFI\\Rufus\\ntfs_x64.efi"; + char scsi_card_name_copy[16]; BOOL r = FALSE, found = FALSE, post_backslash; HDEVINFO dev_info = NULL; SP_DEVINFO_DATA dev_info_data; @@ -490,7 +491,15 @@ BOOL GetDevices(DWORD devnum) // Additional detection for SCSI card readers if ((!props.is_CARD) && (safe_strnicmp(buffer, scsi_disk_prefix, sizeof(scsi_disk_prefix)-1) == 0)) { for (j = 0; j < ARRAYSIZE(scsi_card_name); j++) { - if (safe_strstr(buffer, scsi_card_name[j]) != NULL) { + static_strcpy(scsi_card_name_copy, scsi_card_name[j]); + if (safe_strstr(buffer, scsi_card_name_copy) != NULL) { + props.is_CARD = TRUE; + break; + } + // Also test for "_SD&" instead of "_SD_" and so on to allow for devices like + // "SCSI\DiskRicoh_Storage_SD&REV_3.0" to be detected. + scsi_card_name_copy[strlen(scsi_card_name_copy) - 1] = '&'; + if (safe_strstr(buffer, scsi_card_name_copy) != NULL) { props.is_CARD = TRUE; break; } diff --git a/src/rufus.rc b/src/rufus.rc index 15c14e25..7235ef20 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1175" +CAPTION "Rufus 2.17.1176" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1175,0 - PRODUCTVERSION 2,17,1175,0 + FILEVERSION 2,17,1176,0 + PRODUCTVERSION 2,17,1176,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1175" + VALUE "FileVersion", "2.17.1176" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1175" + VALUE "ProductVersion", "2.17.1176" END END BLOCK "VarFileInfo" From 65f5ccd28b932f8450876a3e93ba038d37ae023e Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 11 Aug 2017 11:47:27 +0100 Subject: [PATCH 57/97] [ui] fix log no longer automatically scrolling to the last line * Introduced in 369a392af09d4157722464c621f356966ce608b7 because, of course when Microsoft has a call that goes (###, param1, param2) they define a macro for it that goes (param2, param1)... --- src/rufus.rc | 10 +++++----- src/stdio.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rufus.rc b/src/rufus.rc index 7235ef20..767e9540 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1176" +CAPTION "Rufus 2.17.1177" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1176,0 - PRODUCTVERSION 2,17,1176,0 + FILEVERSION 2,17,1177,0 + PRODUCTVERSION 2,17,1177,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1176" + VALUE "FileVersion", "2.17.1177" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1176" + VALUE "ProductVersion", "2.17.1177" END END BLOCK "VarFileInfo" diff --git a/src/stdio.c b/src/stdio.c index c783554e..c5b0707f 100644 --- a/src/stdio.c +++ b/src/stdio.c @@ -73,7 +73,7 @@ void _uprintf(const char *format, ...) Edit_ReplaceSel(hLog, wbuf); // Make sure the message scrolls into view // (Or see code commented in LogProc:WM_SHOWWINDOW for a less forceful scroll) - Edit_Scroll(hLog, 0, Edit_GetLineCount(hLog)); + Edit_Scroll(hLog, Edit_GetLineCount(hLog), 0); } free(wbuf); } From c82842ce2a9a1f0ff3a4fc58cc6d646d6c2d5196 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 12 Aug 2017 15:12:00 +0100 Subject: [PATCH 58/97] [core] add Super Floppy Disk support --- src/drive.c | 14 +++++++++----- src/rufus.c | 45 +++++++++++++++++++++++++++++++++++---------- src/rufus.h | 1 + src/rufus.rc | 10 +++++----- 4 files changed, 50 insertions(+), 20 deletions(-) diff --git a/src/drive.c b/src/drive.c index 2481c8b6..7d4512fe 100644 --- a/src/drive.c +++ b/src/drive.c @@ -703,7 +703,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys PDRIVE_LAYOUT_INFORMATION_EX DriveLayout = (PDRIVE_LAYOUT_INFORMATION_EX)(void*)layout; char* volume_name; char tmp[256]; - DWORD i, j, big_floppy = FALSE; + DWORD i, j, super_floppy_disk = FALSE; if (FileSystemName == NULL) return FALSE; @@ -768,7 +768,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys if ((DriveLayout->PartitionEntry[0].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) && (DriveLayout->PartitionEntry[0].StartingOffset.QuadPart == 0LL)) { suprintf("Partition type: SFD (Super Floppy Disk) or Unpartitioned"); - big_floppy = TRUE; + super_floppy_disk = TRUE; } else { suprintf("Partition type: MBR, NB Partitions: %d\n", SelectedDrive.nPartitions); SelectedDrive.has_mbr_uefi_marker = (DriveLayout->Mbr.Signature == MBR_UEFI_MARKER); @@ -780,7 +780,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys part_type = DriveLayout->PartitionEntry[i].Mbr.PartitionType; isUefiNtfs = (i == 1) && (part_type == 0xef) && (DriveLayout->PartitionEntry[i].PartitionLength.QuadPart <= 1*MB); - suprintf("Partition %d%s:\n", i+(big_floppy?0:1), isUefiNtfs?" (UEFI:NTFS)":""); + suprintf("Partition %d%s:\n", i+(super_floppy_disk?0:1), isUefiNtfs?" (UEFI:NTFS)":""); for (j=0; jPartitionEntry[i].PartitionLength.QuadPart, TRUE, FALSE), DriveLayout->PartitionEntry[i].PartitionLength.QuadPart, DriveLayout->PartitionEntry[i].StartingOffset.QuadPart / SelectedDrive.SectorSize, @@ -1078,7 +1078,7 @@ typedef struct _DRIVE_LAYOUT_INFORMATION_EX4 { */ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL mbr_uefi_marker, uint8_t extra_partitions) { - const char* PartitionTypeName[2] = { "MBR", "GPT" }; + const char* PartitionTypeName[] = { "MBR", "GPT", "SFD" }; unsigned char* buffer; size_t uefi_ntfs_size = 0; CREATE_DISK CreateDisk = {PARTITION_STYLE_RAW, {{0}}}; @@ -1090,6 +1090,10 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m PrintInfoDebug(0, MSG_238, PartitionTypeName[partition_style]); + if (partition_style == PARTITION_STYLE_SFD) + // Nothing to do + return TRUE; + if (extra_partitions & XP_UEFI_NTFS) { uefi_ntfs_size = GetResourceSize(hMainInstance, MAKEINTRESOURCEA(IDR_UEFI_NTFS), _RT_RCDATA, "uefi-ntfs.img"); if (uefi_ntfs_size == 0) diff --git a/src/rufus.c b/src/rufus.c index 8219b41e..3254bf58 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -456,6 +456,10 @@ static BOOL SetDriveInfo(int ComboIndex) lmprintf(MSG_033, PartitionTypeLabel[pt])), (TT_UEFI<<16)|pt)); } } + if (advanced_mode) { + IGNORE_RETVAL(ComboBox_SetItemData(hPartitionScheme, + ComboBox_AddStringU(hPartitionScheme, "Super Floppy Disk"), PARTITION_STYLE_SFD)); + } // At least one filesystem is go => enable formatting EnableWindow(hStart, TRUE); @@ -578,13 +582,17 @@ static void SetPartitionSchemeTooltip(void) int tt = GETTARGETTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme))); int pt = GETPARTTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme))); if (tt == TT_BIOS) { - CreateTooltip(hPartitionScheme, lmprintf(MSG_150), 15000); + if (pt != PARTITION_STYLE_SFD) + CreateTooltip(hPartitionScheme, lmprintf(MSG_150), 15000); + else + DestroyTooltip(hPartitionScheme); } else { - if (pt == PARTITION_STYLE_MBR) { + if (pt == PARTITION_STYLE_MBR) CreateTooltip(hPartitionScheme, lmprintf(MSG_151), 15000); - } else { + else if (pt == PARTITION_STYLE_GPT) CreateTooltip(hPartitionScheme, lmprintf(MSG_152), 15000); - } + else + DestroyTooltip(hPartitionScheme); } } @@ -1122,7 +1130,8 @@ static void ToggleAdvanced(BOOL enable) float dialog_shift = -3.22807f*fScale*fScale*fScale + 6.69173f*fScale*fScale + 15.8822f*fScale + 62.9737f; RECT rect; POINT point; - int toggle; + BOOL needs_resel = FALSE; + int i, toggle; if (!enable) dialog_shift = -dialog_shift; @@ -1171,6 +1180,21 @@ static void ToggleAdvanced(BOOL enable) ShowWindow(GetDlgItem(hMainDialog, IDC_DISK_ID), toggle); ShowWindow(GetDlgItem(hMainDialog, IDS_ADVANCED_OPTIONS_GRP), toggle); + if (enable) { + IGNORE_RETVAL(ComboBox_SetItemData(hPartitionScheme, + ComboBox_AddStringU(hPartitionScheme, "Super Floppy Disk"), PARTITION_STYLE_SFD)); + } else { + for (i = 0; i < ComboBox_GetCount(hPartitionScheme); i++) { + if (ComboBox_GetItemData(hPartitionScheme, i) == PARTITION_STYLE_SFD) { + if (ComboBox_GetCurSel(hPartitionScheme) == i) + needs_resel = TRUE; + ComboBox_DeleteString(hPartitionScheme, i); + } + } + if (needs_resel) + SetTargetSystem(); + } + // Toggle the up/down icon SendMessage(GetDlgItem(hMainDialog, IDC_ADVANCED), BCM_SETIMAGELIST, 0, (LPARAM)(enable?&bi_up:&bi_down)); @@ -1986,7 +2010,7 @@ static void ShowLanguageMenu(RECT rcExclude) DestroyMenu(menu); } -static void SetBoot(int fs, int tt) +static void SetBoot(int fs, int tt, int pt) { int i; char tmp[32]; @@ -2026,7 +2050,7 @@ static void SetBoot(int fs, int tt) if (i == ComboBox_GetCount(hBootType)) IGNORE_RETVAL(ComboBox_SetCurSel(hBootType, 0)); - if (!IsWindowEnabled(hBoot)) { + if ((pt != PARTITION_STYLE_SFD) && !IsWindowEnabled(hBoot)) { EnableWindow(hBoot, TRUE); EnableWindow(hBootType, TRUE); EnableWindow(hSelectISO, TRUE); @@ -2411,10 +2435,11 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA break; fs = (int)ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem)); tt = GETTARGETTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme))); + pt = GETPARTTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme))); if ((selection_default == BT_IMG) && IsChecked(IDC_BOOT)) { ToggleImage(FALSE); EnableAdvancedBootOptions(FALSE, TRUE); - SetBoot(fs, tt); + SetBoot(fs, tt, pt); SetToGo(); break; } @@ -2443,7 +2468,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA } break; } - if ((fs == FS_EXFAT) || (fs == FS_UDF) || (fs == FS_REFS)) { + if ((fs == FS_EXFAT) || (fs == FS_UDF) || (fs == FS_REFS) || (pt == PARTITION_STYLE_SFD)) { if (IsWindowEnabled(hBoot)) { // unlikely to be supported by BIOSes => don't bother IGNORE_RETVAL(ComboBox_SetCurSel(hBootType, 0)); @@ -2458,7 +2483,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA break; } EnableAdvancedBootOptions(TRUE, TRUE); - SetBoot(fs, tt); + SetBoot(fs, tt, pt); SetMBRProps(); SetToGo(); break; diff --git a/src/rufus.h b/src/rufus.h index 5d4bf008..ed2f87d1 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -235,6 +235,7 @@ enum target_type { TT_MAX }; // For the partition types we'll use Microsoft's PARTITION_STYLE_### constants +#define PARTITION_STYLE_SFD PARTITION_STYLE_RAW #define GETTARGETTYPE(x) (((x)>0)?(((x) >> 16) & 0xFFFF):0) #define GETPARTTYPE(x) (((x)>0)?((x) & 0xFFFF):0); diff --git a/src/rufus.rc b/src/rufus.rc index 767e9540..a26ae8d9 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1177" +CAPTION "Rufus 2.17.1178" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1177,0 - PRODUCTVERSION 2,17,1177,0 + FILEVERSION 2,17,1178,0 + PRODUCTVERSION 2,17,1178,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1177" + VALUE "FileVersion", "2.17.1178" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1177" + VALUE "ProductVersion", "2.17.1178" END END BLOCK "VarFileInfo" From 534859172932ee83be44d73e57ccc55b00dcb82e Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sun, 13 Aug 2017 21:03:01 +0100 Subject: [PATCH 59/97] [core] add support for more non-USB card readers * Closes #998 --- src/dev.c | 2 +- src/rufus.rc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dev.c b/src/dev.c index 7ad8802e..04fe943f 100644 --- a/src/dev.c +++ b/src/dev.c @@ -296,7 +296,7 @@ BOOL GetDevices(DWORD devnum) // Oh, and we also have card devices (e.g. 'SCSI\DiskO2Micro_SD_...') under the SCSI enumerator... const char* scsi_disk_prefix = "SCSI\\Disk"; const char* scsi_card_name[] = { - "_SD_", "_MMC_", "_MS_", "_MSPro_", "_xDPicture_", "_O2Media_" + "_SD_", "_SDHC_", "_MMC_", "_MS_", "_MSPro_", "_xDPicture_", "_O2Media_" }; const char* usb_speed_name[USB_SPEED_MAX] = { "USB", "USB 1.0", "USB 1.1", "USB 2.0", "USB 3.0" }; // Hash table and String Array used to match a Device ID with the parent hub's Device Interface Path diff --git a/src/rufus.rc b/src/rufus.rc index a26ae8d9..7ee30925 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1178" +CAPTION "Rufus 2.17.1179" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1178,0 - PRODUCTVERSION 2,17,1178,0 + FILEVERSION 2,17,1179,0 + PRODUCTVERSION 2,17,1179,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1178" + VALUE "FileVersion", "2.17.1179" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1178" + VALUE "ProductVersion", "2.17.1179" END END BLOCK "VarFileInfo" From 58a38145b7f5a21f507708a9e1e18468ca6ad01d Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 14 Aug 2017 21:40:56 +0100 Subject: [PATCH 60/97] [misc] finally, set .editorconfig to use UTF-8 *without* BOM * The new VS2017 15.3 appears to have fixed this annoying bug at long last: https://developercommunity.visualstudio.com/content/problem/22922/editorconfig-support-interprets-charset-utf-8-as-u.html --- src/.editorconfig | 6 ++---- src/rufus.rc | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/.editorconfig b/src/.editorconfig index dadc965c..13d6cf4a 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -4,7 +4,5 @@ root = true [*] trim_trailing_whitespace = true insert_final_newline = true -# Of course the following is broken in VS2017 release. -# Hopefully will be fixed with next update: -# https://developercommunity.visualstudio.com/content/problem/22922/editorconfig-support-interprets-charset-utf-8-as-u.html -#charset = utf-8 +# Finally, having a default of UTF-8 *without* BOM got fixed in VS2017 15.3 +charset = utf-8 diff --git a/src/rufus.rc b/src/rufus.rc index 7ee30925..5895af35 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1179" +CAPTION "Rufus 2.17.1180" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1179,0 - PRODUCTVERSION 2,17,1179,0 + FILEVERSION 2,17,1180,0 + PRODUCTVERSION 2,17,1180,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1179" + VALUE "FileVersion", "2.17.1180" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1179" + VALUE "ProductVersion", "2.17.1180" END END BLOCK "VarFileInfo" From 9de244c10e259c0c89f1caca3dbacd5a76de2d0c Mon Sep 17 00:00:00 2001 From: Feras n Date: Wed, 16 Aug 2017 16:39:20 +0100 Subject: [PATCH 61/97] [loc] update Arabic translation to latest --- res/localization/rufus.loc | 24 ++++++++++++++++++++++-- src/rufus.rc | 10 +++++----- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 142af720..00bca720 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -569,7 +569,7 @@ t MSG_298 "The ISO file you have selected does not match its declared size: %s o l "ar-SA" "Arabic (العربية)" 0x0401, 0x0801, 0x0c01, 0x1001, 0x1401, 0x1801, 0x1c01, 0x2001, 0x2401, 0x2801, 0x2c01, 0x3001, 0x3401, 0x3801, 0x3c01, 0x4001 a "r" -v 1.0.18 +v 1.0.22 b "en-US" g IDD_DIALOG @@ -864,7 +864,7 @@ t MSG_173 "إضغط لاختيار..." # POP DIRECTIONAL FORMATTING (UTF-8: 0xE2 0x80 0xAC) at the end. t MSG_174 "‫Rufus - أداة فرمتة الـ USB جديرة بالثقة‬" t MSG_175 "إصدار %d.%d (بناء %d)" -t MSG_176 "الترجمة العربية: عمر الصمد، تحديث: جلال شفرور (mailto:ch_djalel@yahoo.com)" +t MSG_176 "الترجمة العربية: عمر الصمد، تحديث: فراس الشيخ" t MSG_177 "إخبار عن مشكلة أو طلب تعديلات على:" t MSG_178 "حقوق الطبع والنشر الإضافية:" t MSG_179 "تحديث البوليصة:" @@ -998,6 +998,26 @@ t MSG_278 "نوع الإقلاع" t MSG_279 "لا يمكن الإقلاع منه" t MSG_280 "اختيار الصورة" t MSG_281 "(فضلا اختر صورة)" +t MSG_282 "القفل الحصري للUSB" +t MSG_283 "التوفيع الرقمي غير صالح" +t MSG_284 "الملف التنفيذي المحمل ينقصه توقيع رقمي معين" +t MSG_285 "الملف التنفيذي المحمل موقع من قبل '%s'.\nهذا ليس بتوقيع رقمي موثوق من قبلنا وقد يسبب" + "نشاطات تخريبية...\nهل أنت متأكد من الأستمرار؟" +t MSG_286 "تصفير القرص: %0.01%% أكتمل" +t MSG_287 "الكشف عن أقراص الUSB القابلة للإزالة" +t MSG_288 "صلاحيات رفيعة مفقوده" +t MSG_289 "هذا التطبيق يمكنه العمل فقط عند وجود صلاحيات رفيعة" +t MSG_290 "فهرسة الملفات" +t MSG_291 "إختيار الإصدار" +t MSG_292 "الرجاء إختيار إصدار الويندوز المراد تنصيبه:" +t MSG_293 "إصدار ويندوز غير مدعوم" +t MSG_294 "هذا الإصدار من الويندوز لم يعد مدعوماً من قبل روفوس" +t MSG_295 "تحذير: إصدار غير رسمي" +t MSG_296 "هذا الإصدار من روفوس لم يتم إنتاجه من قبل المطورين الرسميين.\n\n؟هل أنت متأكد من الأستمرار" +t MSG_297 "إكتشاف ISO مقطوعة" +t MSG_298 "ملف الISO المحدد لا يطابق حجمه المعلن من قبله: %s من البيانات مفقود!\n\nإذا قمت بالحصول " + "على هذا الملف من الإنترنت, يجب عليك تحميل نسخة جديدة و التحقق من أن المجموع الإختباري لMD5 و SHA مطابق " + "للنسخ(ة) الأصلية.\n\nعلماُ بانه يمكنك مقارنة الMD5 و SHA في روفوس عن طريق الضغط على زر '#'" ################################################################################ l "az-AZ" "Azerbaijani (Azərbaycanca)" 0x042c, 0x782c diff --git a/src/rufus.rc b/src/rufus.rc index 5895af35..2e04c030 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1180" +CAPTION "Rufus 2.17.1181" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1180,0 - PRODUCTVERSION 2,17,1180,0 + FILEVERSION 2,17,1181,0 + PRODUCTVERSION 2,17,1181,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1180" + VALUE "FileVersion", "2.17.1181" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1180" + VALUE "ProductVersion", "2.17.1181" END END BLOCK "VarFileInfo" From 8b094e840b8e630ff6692381eafc4d286df7ba22 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 17 Aug 2017 13:33:20 +0100 Subject: [PATCH 62/97] [net] use http instead of https for downloads * Since 2.17 will be the last version to support XP, and the native XP SSL implementation is too old to access our downloads though https. --- src/license.h | 2 +- src/net.c | 2 +- src/rufus.h | 6 +++--- src/rufus.rc | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/license.h b/src/license.h index dfc83094..f2ad6031 100644 --- a/src/license.h +++ b/src/license.h @@ -762,4 +762,4 @@ const char* gplv3 = "Program, unless a warranty or assumption of liability accompanies a\r\n" "copy of the Program in return for a fee.\r\n" "\r\n" -" END OF TERMS AND CONDITIONS"; \ No newline at end of file +" END OF TERMS AND CONDITIONS"; diff --git a/src/net.c b/src/net.c index 00d3e3ce..453851a2 100644 --- a/src/net.c +++ b/src/net.c @@ -404,7 +404,7 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param) { BOOL releases_only, found_new_version = FALSE; int status = 0; - const char* server_url = UPDATE_URL "/"; + const char* server_url = RUFUS_NO_SSL_URL "/"; int i, j, k, max_channel, verbose = 0, verpos[4]; static const char* archname[] = {"win_x86", "win_x64"}; static const char* channel[] = {"release", "beta", "test"}; // release channel diff --git a/src/rufus.h b/src/rufus.h index ed2f87d1..2edfb86d 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -73,9 +73,9 @@ #define DD_BUFFER_SIZE 65536 // Minimum size of the buffer we use for DD operations #define UBUFFER_SIZE 2048 #define RUFUS_URL "https://rufus.akeo.ie" -#define UPDATE_URL "http://rufus.akeo.ie" // Stupid XP can't handle a recent SSL implementation... -#define DOWNLOAD_URL RUFUS_URL "/downloads" -#define FILES_URL RUFUS_URL "/files" +#define RUFUS_NO_SSL_URL "http://rufus.akeo.ie" // Stupid XP can't handle a recent SSL implementation... +#define DOWNLOAD_URL RUFUS_NO_SSL_URL "/downloads" +#define FILES_URL RUFUS_NO_SSL_URL "/files" #define SEVENZIP_URL "http://www.7-zip.org" #define FILES_DIR "rufus_files" #define IGNORE_RETVAL(expr) do { (void)(expr); } while(0) diff --git a/src/rufus.rc b/src/rufus.rc index 2e04c030..d42dfb35 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1181" +CAPTION "Rufus 2.17.1182" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1181,0 - PRODUCTVERSION 2,17,1181,0 + FILEVERSION 2,17,1182,0 + PRODUCTVERSION 2,17,1182,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1181" + VALUE "FileVersion", "2.17.1182" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1181" + VALUE "ProductVersion", "2.17.1182" END END BLOCK "VarFileInfo" From 868eea50697c2b617015c687ff374ed33e7e5693 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 26 Aug 2017 11:32:40 +0100 Subject: [PATCH 63/97] [loc] fix Spanish translation --- res/localization/rufus.loc | 14 +++++++------- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 00bca720..0d14eece 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -15821,16 +15821,16 @@ t MSG_112 "Dar formato a un volumen UDF de gran tamaño puede tomar mucho tiempo "el tiempo estimado de formateo es %d:%02d, durante el cual la barra de progreso parecerá no moverse. " "¡Por favor, sea paciente!" t MSG_113 "Volumen UDF de gran tamaño" -t MSG_114 "Esta imagen usa Syslinux %s%s pero este programa sólo incluye los ficheros de instalación para" -"Syslinux %s%s. \n\n Debido a que las nuevas versiones de Syslinux no son compatibles entre si, y no es posible" -"para Rufus incluirlas todas, se deben descargar dos ficheros adicionales de internet ('ldlinux.sys' y 'ldlinux.bss'):\n"7 +t MSG_114 "Esta imagen usa Syslinux %s%s pero este programa sólo incluye los ficheros de instalación para " + "Syslinux %s%s.\n\nDebido a que las nuevas versiones de Syslinux no son compatibles entre si, y no es posible " + "para Rufus incluirlas todas, se deben descargar dos ficheros adicionales de internet ('ldlinux.sys' y 'ldlinux.bss'):\n" "- Elije 'Si' para conectarse a internet y descargar estos ficheros\n" "- Elije 'No' para cancelar la operación\n\n" - "Nota: Los ficheros se descargarán en la carpeta actual y volverán a usarse automáticamente si se encuentran. \n" + "Nota: Los ficheros se descargarán en la carpeta actual y volverán a usarse automáticamente si se encuentran." t MSG_115 "Descarga requerida" -t MSG_116 "Esta imagen hace uso de Grub %s pero este programa sólo incluye los ficheros de instalación para" - "Grub %s.\n\n Debido a que las diferentes versiones de Grub no son compatibles entre sí, y no es posible" - "incluir todas, Rufus intentará encontrar una versión del fichero de instalación de Grub 'core.img' que" +t MSG_116 "Esta imagen hace uso de Grub %s pero este programa sólo incluye los ficheros de instalación para " + "Grub %s.\n\nDebido a que las diferentes versiones de Grub no son compatibles entre sí, y no es posible " + "incluir todas, Rufus intentará encontrar una versión del fichero de instalación de Grub 'core.img' que " "se adecue con el de su imagen ISO:\n" "- Elija 'Si' para conectarse a internet e intentar descargarlo\n" "- Elija 'No' para usar la versión por defecto de Rufus\n" diff --git a/src/rufus.rc b/src/rufus.rc index d42dfb35..977856aa 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1182" +CAPTION "Rufus 2.17.1183" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1182,0 - PRODUCTVERSION 2,17,1182,0 + FILEVERSION 2,17,1183,0 + PRODUCTVERSION 2,17,1183,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1182" + VALUE "FileVersion", "2.17.1183" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1182" + VALUE "ProductVersion", "2.17.1183" END END BLOCK "VarFileInfo" From 36cadcfcca1e3a0bcfa5428e3e71eefe1cc618d4 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sun, 27 Aug 2017 15:07:35 +0100 Subject: [PATCH 64/97] [pki] improve error handling * FormatMessage() does not handle PKI errors * Also fix an issue with non-official version detection when the language is not English --- src/pki.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++---- src/rufus.c | 15 ++++---- src/rufus.rc | 10 ++--- 3 files changed, 109 insertions(+), 21 deletions(-) diff --git a/src/pki.c b/src/pki.c index 36d0d119..25de1259 100644 --- a/src/pki.c +++ b/src/pki.c @@ -44,29 +44,117 @@ typedef struct { LPWSTR lpszMoreInfoLink; } SPROG_PUBLISHERINFO, *PSPROG_PUBLISHERINFO; + +/* + * FormatMessage does not handle PKI errors + */ +const char* WinPKIErrorString(void) +{ + static char error_string[64]; + DWORD error_code = GetLastError(); + + if ((error_code >> 16) != 0x8009) + return WindowsErrorString(); + + switch (error_code) { + case NTE_BAD_UID: + return "Bad UID."; + case CRYPT_E_MSG_ERROR: + return "An error occurred while performing an operation on a cryptographic message."; + case CRYPT_E_UNKNOWN_ALGO: + return "Unknown cryptographic algorithm."; + case CRYPT_E_INVALID_MSG_TYPE: + return "Invalid cryptographic message type."; + case CRYPT_E_HASH_VALUE: + return "The hash value is not correct"; + case CRYPT_E_ISSUER_SERIALNUMBER: + return "Invalid issuer and/or serial number."; + case CRYPT_E_BAD_LEN: + return "The length specified for the output data was insufficient."; + case CRYPT_E_BAD_ENCODE: + return "An error occurred during encode or decode operation."; + case CRYPT_E_FILE_ERROR: + return "An error occurred while reading or writing to a file."; + case CRYPT_E_NOT_FOUND: + return "Cannot find object or property."; + case CRYPT_E_EXISTS: + return "The object or property already exists."; + case CRYPT_E_NO_PROVIDER: + return "No provider was specified for the store or object."; + case CRYPT_E_DELETED_PREV: + return "The previous certificate or CRL context was deleted."; + case CRYPT_E_NO_MATCH: + return "Cannot find the requested object."; + case CRYPT_E_UNEXPECTED_MSG_TYPE: + case CRYPT_E_NO_KEY_PROPERTY: + case CRYPT_E_NO_DECRYPT_CERT: + return "Private key or certificate issue"; + case CRYPT_E_BAD_MSG: + return "Not a cryptographic message."; + case CRYPT_E_NO_SIGNER: + return "The signed cryptographic message does not have a signer for the specified signer index."; + case CRYPT_E_REVOKED: + return "The certificate is revoked."; + case CRYPT_E_NO_REVOCATION_DLL: + case CRYPT_E_NO_REVOCATION_CHECK: + case CRYPT_E_REVOCATION_OFFLINE: + case CRYPT_E_NOT_IN_REVOCATION_DATABASE: + return "Cannot check certificate revocation."; + case CRYPT_E_INVALID_NUMERIC_STRING: + case CRYPT_E_INVALID_PRINTABLE_STRING: + case CRYPT_E_INVALID_IA5_STRING: + case CRYPT_E_INVALID_X500_STRING: + case CRYPT_E_NOT_CHAR_STRING: + return "Invalid string."; + case CRYPT_E_SECURITY_SETTINGS: + return "The cryptographic operation failed due to a local security option setting."; + case CRYPT_E_NO_VERIFY_USAGE_CHECK: + case CRYPT_E_VERIFY_USAGE_OFFLINE: + return "Cannot complete usage check."; + case CRYPT_E_NO_TRUSTED_SIGNER: + return "None of the signers of the cryptographic message or certificate trust list is trusted."; + default: + static_sprintf(error_string, "Unknown PKI error 0x%08lX", error_code); + return error_string; + } +} + // Mostly from https://support.microsoft.com/en-us/kb/323809 char* GetSignatureName(const char* path) { static char szSubjectName[128]; - char* p = NULL; + char *p = NULL, *mpath = NULL; BOOL r; + HMODULE hm; HCERTSTORE hStore = NULL; HCRYPTMSG hMsg = NULL; PCCERT_CONTEXT pCertContext = NULL; - DWORD dwEncoding, dwContentType, dwFormatType, dwSubjectSize; + DWORD dwSize, dwEncoding, dwContentType, dwFormatType, dwSubjectSize; PCMSG_SIGNER_INFO pSignerInfo = NULL; PCMSG_SIGNER_INFO pCounterSignerInfo = NULL; DWORD dwSignerInfo = 0; CERT_INFO CertInfo = { 0 }; SPROG_PUBLISHERINFO ProgPubInfo = { 0 }; - wchar_t *szFileName = utf8_to_wchar(path); + wchar_t *szFileName; // If the path is NULL, get the signature of the current runtime if (path == NULL) { szFileName = calloc(MAX_PATH, sizeof(wchar_t)); if (szFileName == NULL) return NULL; - GetModuleFileNameW(GetModuleHandle(NULL), szFileName, MAX_PATH); + hm = GetModuleHandle(NULL); + if (hm == NULL) { + uprintf("PKI: Could not get current executable handle: %s", WinPKIErrorString()); + return NULL; + } + dwSize = GetModuleFileNameW(hm, szFileName, MAX_PATH); + if ((dwSize == 0) || ((dwSize == MAX_PATH) && (GetLastError() == ERROR_INSUFFICIENT_BUFFER))) { + uprintf("PKI: Could not get module filename: %s", WinPKIErrorString()); + return NULL; + } + mpath = wchar_to_utf8(szFileName); + } else { + szFileName = utf8_to_wchar(path); } // Get message handle and store handle from the signed file. @@ -74,14 +162,14 @@ char* GetSignatureName(const char* path) CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED, CERT_QUERY_FORMAT_FLAG_BINARY, 0, &dwEncoding, &dwContentType, &dwFormatType, &hStore, &hMsg, NULL); if (!r) { - uprintf("PKI: Failed to get store handle for '%s': %s", path, WindowsErrorString()); + uprintf("PKI: Failed to get signature for '%s': %s", (path==NULL)?mpath:path, WinPKIErrorString()); goto out; } // Get signer information size. r = CryptMsgGetParam(hMsg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &dwSignerInfo); if (!r) { - uprintf("PKI: Failed to get signer size: %s", WindowsErrorString); + uprintf("PKI: Failed to get signer size: %s", WinPKIErrorString()); goto out; } @@ -95,7 +183,7 @@ char* GetSignatureName(const char* path) // Get Signer Information. r = CryptMsgGetParam(hMsg, CMSG_SIGNER_INFO_PARAM, 0, (PVOID)pSignerInfo, &dwSignerInfo); if (!r) { - uprintf("PKI: Failed to get signer information: %s", WindowsErrorString()); + uprintf("PKI: Failed to get signer information: %s", WinPKIErrorString()); goto out; } @@ -105,7 +193,7 @@ char* GetSignatureName(const char* path) pCertContext = CertFindCertificateInStore(hStore, ENCODING, 0, CERT_FIND_SUBJECT_CERT, (PVOID)&CertInfo, NULL); if (!pCertContext) { - uprintf("PKI: Failed to locate signer certificate in temporary store: %s", WindowsErrorString()); + uprintf("PKI: Failed to locate signer certificate in temporary store: %s", WinPKIErrorString()); goto out; } @@ -121,6 +209,7 @@ char* GetSignatureName(const char* path) p = szSubjectName; out: + safe_free(mpath); safe_free(szFileName); safe_free(ProgPubInfo.lpszProgramName); safe_free(ProgPubInfo.lpszPublisherLink); diff --git a/src/rufus.c b/src/rufus.c index 3254bf58..272cac92 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -3232,14 +3232,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } selected_langid = get_language_id(selected_locale); - if (!vc) { - get_loc_data_file(loc_file, selected_locale); - right_to_left_mode = ((selected_locale->ctrl_id) & LOC_RIGHT_TO_LEFT); - if (MessageBoxExU(NULL, lmprintf(MSG_296), lmprintf(MSG_295), - MB_YESNO | MB_ICONWARNING | MB_IS_RTL | MB_SYSTEMMODAL, selected_langid) != IDYES) - goto out; - } - // This is needed as there appears to be a *FLAW* in Windows allowing the app to run unelevated with some // weirdly configured user accounts, even as we explicitly set 'requireAdministrator' in the manifest... if (!IsCurrentProcessElevated()) { @@ -3311,6 +3303,13 @@ relaunch: if (get_loc_data_file(loc_file, selected_locale)) WriteSettingStr(SETTING_LOCALE, selected_locale->txt[0]); + if (!vc) { + if (MessageBoxExU(NULL, lmprintf(MSG_296), lmprintf(MSG_295), + MB_YESNO | MB_ICONWARNING | MB_IS_RTL | MB_SYSTEMMODAL, selected_langid) != IDYES) + goto out; + vc = TRUE; + } + /* * Create the main Window */ diff --git a/src/rufus.rc b/src/rufus.rc index 977856aa..b20af4d1 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1183" +CAPTION "Rufus 2.17.1184" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1183,0 - PRODUCTVERSION 2,17,1183,0 + FILEVERSION 2,17,1184,0 + PRODUCTVERSION 2,17,1184,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1183" + VALUE "FileVersion", "2.17.1184" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1183" + VALUE "ProductVersion", "2.17.1184" END END BLOCK "VarFileInfo" From bf09842fd2ac7ef074320ce9105c42d1c9eba82f Mon Sep 17 00:00:00 2001 From: Ino-Bagaric Date: Tue, 29 Aug 2017 00:11:45 +0200 Subject: [PATCH 65/97] [misc] remove duplicate definition * Closes #1011 --- src/resource.h | 1 - src/rufus.rc | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/resource.h b/src/resource.h index e9fa0fba..cb9bcef1 100644 --- a/src/resource.h +++ b/src/resource.h @@ -168,7 +168,6 @@ #define IDC_LIST_ITEM14 1109 #define IDC_LIST_ITEM15 1110 #define IDC_LIST_ITEMMAX 1111 -#define IDC_SELECTION_CHOICEMAX 1092 #define IDS_DEVICE_TXT 2000 #define IDS_PARTITION_TYPE_TXT 2001 #define IDS_FILESYSTEM_TXT 2002 diff --git a/src/rufus.rc b/src/rufus.rc index b20af4d1..149353e8 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1184" +CAPTION "Rufus 2.17.1185" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1184,0 - PRODUCTVERSION 2,17,1184,0 + FILEVERSION 2,17,1185,0 + PRODUCTVERSION 2,17,1185,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1184" + VALUE "FileVersion", "2.17.1185" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1184" + VALUE "ProductVersion", "2.17.1185" END END BLOCK "VarFileInfo" From fe3004d17f6085b4f8e03acaa3e6f0b643c06cb1 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 30 Aug 2017 11:24:47 +0100 Subject: [PATCH 66/97] [misc] use UTF-8 compatible _unlinkU() when deleting files --- src/format.c | 4 ++-- src/iso.c | 6 +++--- src/msapi_utf8.h | 9 +++++++++ src/net.c | 2 +- src/rufus.rc | 10 +++++----- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/format.c b/src/format.c index 7c6d559e..5d1e9353 100644 --- a/src/format.c +++ b/src/format.c @@ -1793,7 +1793,7 @@ DWORD WINAPI FormatThread(void* param) FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_BADBLOCKS_FAILURE); ClearMBRGPT(hPhysicalDrive, SelectedDrive.DiskSize, SelectedDrive.SectorSize, FALSE); fclose(log_fd); - _unlink(logfile); + _unlinkU(logfile); goto out; } uprintf("Bad Blocks: Check completed, %d bad block%s found. (%d/%d/%d errors)\n", @@ -1820,7 +1820,7 @@ DWORD WINAPI FormatThread(void* param) } else { // We didn't get any errors => delete the log file fclose(log_fd); - _unlink(logfile); + _unlinkU(logfile); } } while (r == IDRETRY); if (r == IDABORT) { diff --git a/src/iso.c b/src/iso.c index 4f49538e..c2f03874 100644 --- a/src/iso.c +++ b/src/iso.c @@ -829,7 +829,7 @@ out: } free(buf); } - _unlink(isolinux_tmp); + _unlinkU(isolinux_tmp); } if (img_report.sl_version != 0) { static_sprintf(img_report.sl_version_str, "%d.%02d", @@ -865,7 +865,7 @@ out: uprintf(" Checking txtsetup.sif:\n OsLoadOptions = %s", tmp); img_report.uses_minint = (strstr(tmp, "/minint") != NULL); } - _unlink(tmp_sif); + _unlinkU(tmp_sif); safe_free(tmp); } if (HAS_INSTALL_WIM(img_report)) { @@ -886,7 +886,7 @@ out: GetGrubVersion(buf, size); } free(buf); - _unlink(path); + _unlinkU(path); } if (img_report.grub2_version[0] != 0) uprintf(" Detected Grub version: %s", img_report.grub2_version); diff --git a/src/msapi_utf8.h b/src/msapi_utf8.h index d220fc2e..457d8039 100644 --- a/src/msapi_utf8.h +++ b/src/msapi_utf8.h @@ -948,6 +948,15 @@ static __inline int _openU(const char *filename, int oflag , int pmode) } #endif +static __inline int _unlinkU(const char *path) +{ + int ret; + wconvert(path); + ret = _wunlink(wpath); + wfree(path); + return ret; +} + static __inline int _stat64U(const char *path, struct __stat64 *buffer) { int ret; diff --git a/src/net.c b/src/net.c index 453851a2..29a2da93 100644 --- a/src/net.c +++ b/src/net.c @@ -358,7 +358,7 @@ out: if (fd != NULL) fclose(fd); if (!r) { if (file != NULL) - _unlink(file); + _unlinkU(file); if (PromptOnError) { PrintInfo(0, MSG_242); SetLastError(error_code); diff --git a/src/rufus.rc b/src/rufus.rc index 149353e8..3f553eea 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1185" +CAPTION "Rufus 2.17.1186" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1185,0 - PRODUCTVERSION 2,17,1185,0 + FILEVERSION 2,17,1186,0 + PRODUCTVERSION 2,17,1186,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1185" + VALUE "FileVersion", "2.17.1186" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1185" + VALUE "ProductVersion", "2.17.1186" END END BLOCK "VarFileInfo" From c3c39f7f8a11f612c4ebf7affce25ec6928eb1cb Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 31 Aug 2017 12:13:51 +0100 Subject: [PATCH 67/97] [pki] fix https://www.kb.cert.org/vuls/id/403768 * This commit effectively fixes https://www.kb.cert.org/vuls/id/403768 (CVE-2017-13083) as it is described per its revision 11, which is the latest revision at the time of this commit, by disabling Windows prompts, enacted during signature validation, that allow the user to bypass the intended signature verification checks. * It needs to be pointed out that the vulnerability ("allow(ing) the use of a self-signed certificate"), which relies on the end-user actively ignoring a Windows prompt that tells them that the update failed the signature validation whilst also advising against running it, is being fully addressed, even as the update protocol remains HTTP. * It also need to be pointed out that the extended delay (48 hours) between the time the vulnerability was reported and the moment it is fixed in our codebase has to do with the fact that the reporter chose to deviate from standard security practices by not disclosing the details of the vulnerability with us, be it publicly or privately, before creating the cert.org report. The only advance notification we received was a generic note about the use of HTTP vs HTTPS, which, as have established, is not immediately relevant to addressing the reported vulnerability. * Closes #1009 * Note: The other vulnerability scenario described towards the end of #1009, which doesn't have to do with the "lack of CA checking", will be addressed separately. --- res/localization/rufus.loc | 3 +++ src/pki.c | 29 +++++++++++++++++++++++++++-- src/rufus.rc | 10 +++++----- src/stdlg.c | 6 +++++- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 0d14eece..625566fc 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -487,6 +487,9 @@ t MSG_237 "Bad Blocks: Testing with pattern 0x%02X" # eg. "Partitioning (MBR)..." t MSG_238 "Partitioning (%s)..." t MSG_239 "Deleting partitions..." +t MSG_240 "The signature for the downloaded update can not be validated. This could mean that your " + "system is improperly configured for signature validation or indicate a malicious download.\n\n" + "The download will be deleted. Please check the log for more details." t MSG_241 "Downloading: %0.1f%%" t MSG_242 "Failed to download file." t MSG_243 "Checking for Rufus updates..." diff --git a/src/pki.c b/src/pki.c index 25de1259..00d01418 100644 --- a/src/pki.c +++ b/src/pki.c @@ -53,7 +53,7 @@ const char* WinPKIErrorString(void) static char error_string[64]; DWORD error_code = GetLastError(); - if ((error_code >> 16) != 0x8009) + if (((error_code >> 16) != 0x8009) && ((error_code >> 16) != 0x800B)) return WindowsErrorString(); switch (error_code) { @@ -113,6 +113,12 @@ const char* WinPKIErrorString(void) return "Cannot complete usage check."; case CRYPT_E_NO_TRUSTED_SIGNER: return "None of the signers of the cryptographic message or certificate trust list is trusted."; + case CERT_E_UNTRUSTEDROOT: + return "The root certificate is not trusted."; + case TRUST_E_NOSIGNATURE: + return "Not digitally signed."; + case TRUST_E_EXPLICIT_DISTRUST: + return "One of the certificates used was marked as untrusted by the user."; default: static_sprintf(error_string, "Unknown PKI error 0x%08lX", error_code); return error_string; @@ -268,7 +274,13 @@ LONG ValidateSignature(HWND hDlg, const char* path) } trust_data.cbStruct = sizeof(trust_data); - trust_data.dwUIChoice = WTD_UI_ALL; + // NB: WTD_UI_ALL can result in ERROR_SUCCESS even if the signature validation fails, + // because it still prompts the user to run untrusted software, even after explicitly + // notifying them that the signature invalid (and of course Microsoft had to make + // that UI prompt a bit too similar to the other benign prompt you get when running + // trusted software, which, as per cert.org's assessment, may confuse non-security + // conscious-users who decide to gloss over these kind of notifications). + trust_data.dwUIChoice = WTD_UI_NONE; // We just downloaded from the Internet, so we should be able to check revocation trust_data.fdwRevocationChecks = WTD_REVOKE_WHOLECHAIN; // 0x400 = WTD_MOTW for Windows 8.1 or later @@ -278,6 +290,19 @@ LONG ValidateSignature(HWND hDlg, const char* path) r = WinVerifyTrust(NULL, &guid_generic_verify, &trust_data); safe_free(trust_file.pcwszFilePath); + switch (r) { + case ERROR_SUCCESS: + break; + case TRUST_E_NOSIGNATURE: + // Should already have been reported, but since we have a custom message for it... + uprintf("PKI: File does not appear to be signed: %s", WinPKIErrorString()); + MessageBoxExU(hDlg, lmprintf(MSG_284), lmprintf(MSG_283), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid); + break; + default: + uprintf("PKI: Failed to validate signature: %s", WinPKIErrorString()); + MessageBoxExU(hDlg, lmprintf(MSG_240), lmprintf(MSG_283), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid); + break; + } return r; } diff --git a/src/rufus.rc b/src/rufus.rc index 3f553eea..0d0c2a73 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1186" +CAPTION "Rufus 2.17.1187" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1186,0 - PRODUCTVERSION 2,17,1186,0 + FILEVERSION 2,17,1187,0 + PRODUCTVERSION 2,17,1187,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1186" + VALUE "FileVersion", "2.17.1187" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1186" + VALUE "ProductVersion", "2.17.1187" END END BLOCK "VarFileInfo" diff --git a/src/stdlg.c b/src/stdlg.c index 29eccaef..bdec209f 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -1674,8 +1674,12 @@ INT_PTR CALLBACK NewVersionCallback(HWND hDlg, UINT message, WPARAM wParam, LPAR case 2: // Launch newer version and close this one Sleep(1000); // Add a delay on account of antivirus scanners - if (ValidateSignature(hDlg, filepath) != NO_ERROR) + if (ValidateSignature(hDlg, filepath) != NO_ERROR) { + // Unconditionally delete the download and disable the "Launch" control + _unlinkU(filepath); + EnableWindow(GetDlgItem(hDlg, IDC_DOWNLOAD), FALSE); break; + } memset(&si, 0, sizeof(si)); memset(&pi, 0, sizeof(pi)); From 35da381a117a007b5c071833cf40a340d12e250a Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 1 Sep 2017 18:27:34 +0100 Subject: [PATCH 68/97] [pki] check timestamp chronology during update validation * Done to address the second "vulnerability" proposed in #1009, independently of the protocol used. --- res/localization/rufus.loc | 4 + src/parser.c | 73 ++++++++++++++++ src/pki.c | 168 ++++++++++++++++++++++++++++++++++++- src/resource.h | 3 +- src/rufus.h | 3 + src/rufus.rc | 10 +-- 6 files changed, 253 insertions(+), 8 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 625566fc..c09ea44e 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -565,6 +565,10 @@ t MSG_297 "Truncated ISO detected" t MSG_298 "The ISO file you have selected does not match its declared size: %s of data is missing!\n\nIf you obtained " "this file from the Internet, you should try to download a new copy and verify that the MD5 or SHA checksums match " "the official ones.\n\nNote that you can compute the MD5 or SHA in Rufus by clicking the '#' button." +t MSG_299 "Timestamp validation error" +t MSG_300 "Rufus could not validate that the timestamp of the downloaded update is more recent than the one for the " + "current executable.\n\nIn order to prevent potential attack scenarios, the update process has been aborted and " + "the download will be deleted. Please check the log for more details." ################################################################################ ############################# TRANSLATOR END COPY ############################## diff --git a/src/parser.c b/src/parser.c index dc61e1f1..d53cc22e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1265,3 +1265,76 @@ char* replace_char(const char* src, const char c, const char* rep) res[j] = 0; return res; } + +static void* get_oid_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, const void* oid, + size_t oid_len, uint8_t asn1_type, size_t* data_len, BOOL* matched) +{ + void* ret; + size_t pos = 0, len, len_len, i; + uint8_t tag; + BOOL is_sequence; + + while (pos < buf_len) { + is_sequence = buf[pos] & 0x20; // Only need to handle the sequence attribute + tag = buf[pos++] & 0x1F; + + // Compute the length + len = 0; + len_len = 1; + if (tag == 0x05) { // ignore "NULL" tag + pos++; + } else { + if (buf[pos] & 0x80) { + len_len = buf[pos++] & 0x7F; + // The data we're dealing with is not expected to ever be larger than 64K + if (len_len > 2) { + uprintf("get_oid_data_from_asn1: Length fields larger than 2 bytes are unsupported"); + return NULL; + } + for (i = 0; i < len_len; i++) { + len <<= 8; + len += buf[pos++]; + } + } else { + len = buf[pos++]; + } + + if (len > buf_len - pos) { + uprintf("get_oid_data_from_asn1: Overflow error (computed length %d is larger than remaining data)", len); + return NULL; + } + } + + if (len != 0) { + if (is_sequence) { + ret = get_oid_data_from_asn1_internal(&buf[pos], len, oid, oid_len, asn1_type, data_len, matched); + if (ret != NULL) + return ret; + } else { + // NB: 0x06 = "OID" tag + if ((!*matched) && (tag == 0x06) && (len == oid_len) && (memcmp(&buf[pos], oid, oid_len) == 0)) { + *matched = TRUE; + } else if ((*matched) && (tag == asn1_type)) { + *data_len = len; + return (void*) &buf[pos]; + } + } + pos += len; + } + }; + + return NULL; +} + +/* + * Parse an ASN.1 binary buffer and return a pointer to the first instance of OID data of type 'asn1_type', + * matching the binary OID 'oid' (of size 'oid_len'). If successful, the length or the returned data is + * placed in 'data_len'. + * If 'oid' is NULL, the first data element of type 'asn1_type' is returned. + */ +void* get_oid_data_from_asn1(const uint8_t* buf, size_t buf_len, const uint8_t* oid, size_t oid_len, + uint8_t asn1_type, size_t* data_len) +{ + BOOL matched = (oid == NULL); + return get_oid_data_from_asn1_internal(buf, buf_len, oid, oid_len, asn1_type, data_len, &matched); +} diff --git a/src/pki.c b/src/pki.c index 00d01418..c4ec4013 100644 --- a/src/pki.c +++ b/src/pki.c @@ -119,6 +119,8 @@ const char* WinPKIErrorString(void) return "Not digitally signed."; case TRUST_E_EXPLICIT_DISTRUST: return "One of the certificates used was marked as untrusted by the user."; + case TRUST_E_TIME_STAMP: + return "The timestamp could not be verified."; default: static_sprintf(error_string, "Unknown PKI error 0x%08lX", error_code); return error_string; @@ -137,7 +139,6 @@ char* GetSignatureName(const char* path) PCCERT_CONTEXT pCertContext = NULL; DWORD dwSize, dwEncoding, dwContentType, dwFormatType, dwSubjectSize; PCMSG_SIGNER_INFO pSignerInfo = NULL; - PCMSG_SIGNER_INFO pCounterSignerInfo = NULL; DWORD dwSignerInfo = 0; CERT_INFO CertInfo = { 0 }; SPROG_PUBLISHERINFO ProgPubInfo = { 0 }; @@ -221,7 +222,6 @@ out: safe_free(ProgPubInfo.lpszPublisherLink); safe_free(ProgPubInfo.lpszMoreInfoLink); safe_free(pSignerInfo); - safe_free(pCounterSignerInfo); if (pCertContext != NULL) CertFreeCertificateContext(pCertContext); if (hStore != NULL) @@ -231,6 +231,154 @@ out: return p; } +// The timestamping authorities we use are RFC 3161 compliant +static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) +{ + // Binary representation of szOID_TIMESTAMP_TOKEN or "1.2.840.113549.1.9.16.1.4" + const uint8_t OID_RFC3161_timeStamp[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x10, 0x01, 0x04 }; + BOOL r; + DWORD n, dwSize; + PCRYPT_CONTENT_INFO pCounterSignerInfo = NULL; + uint64_t ts = 0ULL; + uint8_t *timestamp_token; + size_t timestamp_token_size; + char* timestamp_str; + size_t timestamp_str_size; + + // Loop through unathenticated attributes for szOID_RFC3161_counterSign OID + for (n = 0; n < pSignerInfo->UnauthAttrs.cAttr; n++) { + if (lstrcmpA(pSignerInfo->UnauthAttrs.rgAttr[n].pszObjId, szOID_RFC3161_counterSign) == 0) { + // Get size + r = CryptDecodeObject(PKCS_7_ASN_ENCODING, PKCS_CONTENT_INFO, + pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].pbData, + pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].cbData, + 0, NULL, &dwSize); + if (!r) { + uprintf("PKI: Could not get CounterSigner (timestamp) data size: %s", WinPKIErrorString()); + continue; + } + + // Allocate memory. + pCounterSignerInfo = calloc(dwSize, 1); + if (pCounterSignerInfo == NULL) { + uprintf("PKI: Unable to allocate memory for CounterSigner (timestamp) data"); + continue; + } + + // Now read the CounterSigner message data + r = CryptDecodeObject(PKCS_7_ASN_ENCODING, PKCS_CONTENT_INFO, + pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].pbData, + pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].cbData, + 0, (PVOID)pCounterSignerInfo, &dwSize); + if (!r) { + uprintf("PKI: Could not retrieve CounterSigner (timestamp) data: %s", WinPKIErrorString()); + continue; + } + + // Get the RFC 3161 timestamp message + timestamp_token = get_oid_data_from_asn1(pCounterSignerInfo->Content.pbData, + pCounterSignerInfo->Content.cbData, OID_RFC3161_timeStamp, sizeof(OID_RFC3161_timeStamp), + // 0x04 = "Octet String" ASN.1 tag + 0x04, ×tamp_token_size); + if (timestamp_token) { + timestamp_str = get_oid_data_from_asn1(timestamp_token, timestamp_token_size, NULL, 0, + // 0x18 = "Generalized Time" ASN.1 tag + 0x18, ×tamp_str_size); + if (timestamp_str) { + // As per RFC 3161 The syntax is: YYYYMMDDhhmmss[.s...]Z + if ((timestamp_str_size < 14) || (timestamp_str[timestamp_str_size - 1] != 'Z')) { + // Sanity checks + uprintf("PKI: Not an RFC 3161 timestamp"); + DumpBufferHex(timestamp_str, timestamp_str_size); + } else { + ts = strtoull(timestamp_str, NULL, 10); + } + } + } + safe_free(pCounterSignerInfo); + } + } + return ts; +} + +// Return the signature timestamp (as a YYYYMMDDHHMMSS value) or 0 on error +uint64_t GetSignatureTimeStamp(const char* path) +{ + char *mpath = NULL; + BOOL r; + HMODULE hm; + HCERTSTORE hStore = NULL; + HCRYPTMSG hMsg = NULL; + DWORD dwSize, dwEncoding, dwContentType, dwFormatType; + PCMSG_SIGNER_INFO pSignerInfo = NULL; + DWORD dwSignerInfo = 0; + wchar_t *szFileName; + uint64_t timestamp = 0ULL; + + // If the path is NULL, get the signature of the current runtime + if (path == NULL) { + szFileName = calloc(MAX_PATH, sizeof(wchar_t)); + if (szFileName == NULL) + goto out; + hm = GetModuleHandle(NULL); + if (hm == NULL) { + uprintf("PKI: Could not get current executable handle: %s", WinPKIErrorString()); + goto out; + } + dwSize = GetModuleFileNameW(hm, szFileName, MAX_PATH); + if ((dwSize == 0) || ((dwSize == MAX_PATH) && (GetLastError() == ERROR_INSUFFICIENT_BUFFER))) { + uprintf("PKI: Could not get module filename: %s", WinPKIErrorString()); + goto out; + } + mpath = wchar_to_utf8(szFileName); + } else { + szFileName = utf8_to_wchar(path); + } + + // Get message handle and store handle from the signed file. + r = CryptQueryObject(CERT_QUERY_OBJECT_FILE, szFileName, + CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED, CERT_QUERY_FORMAT_FLAG_BINARY, + 0, &dwEncoding, &dwContentType, &dwFormatType, &hStore, &hMsg, NULL); + if (!r) { + uprintf("PKI: Failed to get signature for '%s': %s", (path == NULL) ? mpath : path, WinPKIErrorString()); + goto out; + } + + // Get signer information size. + r = CryptMsgGetParam(hMsg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &dwSignerInfo); + if (!r) { + uprintf("PKI: Failed to get signer size: %s", WinPKIErrorString()); + goto out; + } + + // Allocate memory for signer information. + pSignerInfo = (PCMSG_SIGNER_INFO)calloc(dwSignerInfo, 1); + if (!pSignerInfo) { + uprintf("PKI: Could not allocate memory for signer information"); + goto out; + } + + // Get Signer Information. + r = CryptMsgGetParam(hMsg, CMSG_SIGNER_INFO_PARAM, 0, (PVOID)pSignerInfo, &dwSignerInfo); + if (!r) { + uprintf("PKI: Failed to get signer information: %s", WinPKIErrorString()); + goto out; + } + + // Get the RFC 3161 timestamp + timestamp = GetRFC3161TimeStamp(pSignerInfo); + +out: + safe_free(mpath); + safe_free(szFileName); + safe_free(pSignerInfo); + if (hStore != NULL) + CertCloseStore(hStore, 0); + if (hMsg != NULL) + CryptMsgClose(hMsg); + return timestamp; +} + // From https://msdn.microsoft.com/en-us/library/windows/desktop/aa382384.aspx LONG ValidateSignature(HWND hDlg, const char* path) { @@ -241,6 +389,7 @@ LONG ValidateSignature(HWND hDlg, const char* path) { 0xaac56b, 0xcd44, 0x11d0,{ 0x8c, 0xc2, 0x0, 0xc0, 0x4f, 0xc2, 0x95, 0xee } }; char *signature_name; size_t i, len; + uint64_t current_ts, update_ts; // Check the signature name. Make it specific enough (i.e. don't simply check for "Akeo") // so that, besides hacking our server, it'll place an extra hurdle on any malicious entity @@ -292,6 +441,21 @@ LONG ValidateSignature(HWND hDlg, const char* path) safe_free(trust_file.pcwszFilePath); switch (r) { case ERROR_SUCCESS: + // Verify that the timestamp of the downloaded update is in the future of our current one. + // This is done to prevent the use of an officially signed, but older binary, as potential attack vector. + current_ts = GetSignatureTimeStamp(NULL); + if (current_ts == 0ULL) { + uprintf("PKI: Cannot retreive the current binary's timestamp - Aborting update"); + r = TRUST_E_TIME_STAMP; + } else { + update_ts = GetSignatureTimeStamp(path); + if (update_ts < current_ts) { + uprintf("PKI: Update timestamp (%" PRIi64 ") is older than ours (%" PRIi64 ")! - Aborting update", update_ts, current_ts); + r = TRUST_E_TIME_STAMP; + } + } + if (r != ERROR_SUCCESS) + MessageBoxExU(hDlg, lmprintf(MSG_300), lmprintf(MSG_299), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid); break; case TRUST_E_NOSIGNATURE: // Should already have been reported, but since we have a custom message for it... diff --git a/src/resource.h b/src/resource.h index cb9bcef1..e059eb71 100644 --- a/src/resource.h +++ b/src/resource.h @@ -481,7 +481,8 @@ #define MSG_297 3297 #define MSG_298 3298 #define MSG_299 3299 -#define MSG_MAX 3300 +#define MSG_300 3300 +#define MSG_MAX 3301 // Next default values for new objects // diff --git a/src/rufus.h b/src/rufus.h index 2edfb86d..5d3680f2 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -477,6 +477,8 @@ extern char* insert_section_data(const char* filename, const char* section, cons extern char* replace_in_token_data(const char* filename, const char* token, const char* src, const char* rep, BOOL dos2unix); extern char* replace_char(const char* src, const char c, const char* rep); extern void parse_update(char* buf, size_t len); +extern void* get_oid_data_from_asn1(const uint8_t* buf, size_t buf_len, const uint8_t* oid, size_t oid_len, + uint8_t asn1_type, size_t* data_len); extern uint8_t WimExtractCheck(void); extern BOOL WimExtractFile(const char* wim_image, int index, const char* src, const char* dst); extern BOOL WimExtractFile_API(const char* image, int index, const char* src, const char* dst); @@ -487,6 +489,7 @@ extern BOOL AppendVHDFooter(const char* vhd_path); extern int SetWinToGoIndex(void); extern int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid); extern char* GetSignatureName(const char* path); +extern uint64_t GetSignatureTimeStamp(const char* path); extern LONG ValidateSignature(HWND hDlg, const char* path); extern BOOL IsFontAvailable(const char* font_name); extern BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, diff --git a/src/rufus.rc b/src/rufus.rc index 0d0c2a73..31c9429e 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1187" +CAPTION "Rufus 2.17.1188" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1187,0 - PRODUCTVERSION 2,17,1187,0 + FILEVERSION 2,17,1188,0 + PRODUCTVERSION 2,17,1188,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1187" + VALUE "FileVersion", "2.17.1188" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1187" + VALUE "ProductVersion", "2.17.1188" END END BLOCK "VarFileInfo" From c74d7bce1f3d0b0db66ffe1495dfb43897a7c961 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 2 Sep 2017 16:06:41 +0100 Subject: [PATCH 69/97] [misc] update ChangeLog for BETA --- ChangeLog.txt | 9 +++++++++ src/rufus.rc | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index dc743db8..ce49f493 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,12 @@ +o Version 2.17 (2017.09.??) + Add support for Debian 9 live ISOs in UEFI mode + Add support for Super Floppy Disk "partitioning" mode + Add support for more non-USB card readers + Strengthen download update checks, to prevent attack scenarios that leverage user unawareness + Fix an issue with Spanish translation prompts not displaying properly + Fix an issue with Windows To Go support on some non-official Windows ISOs + Fix an issue with log autoscrolling + o Version 2.16 (2017.07.31) Add an audiovisual cue on completion/error Add a workaround for ISOs using nonstandard Rock Ridge extensions (looking at you Kali Linux!) diff --git a/src/rufus.rc b/src/rufus.rc index 31c9429e..eb4df7de 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1188" +CAPTION "Rufus 2.17.1189" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1188,0 - PRODUCTVERSION 2,17,1188,0 + FILEVERSION 2,17,1189,0 + PRODUCTVERSION 2,17,1189,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1188" + VALUE "FileVersion", "2.17.1189" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1188" + VALUE "ProductVersion", "2.17.1189" END END BLOCK "VarFileInfo" From a73e695ba4dd11a24750984128500ea0dfe2393a Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sun, 3 Sep 2017 13:54:07 +0100 Subject: [PATCH 70/97] [pki] timestamp validation improvements * Add timestamp processing for nested signature and check for anomalous differences * Also prevent attack scenarios that may attempt to leverage multiple nested signatures or countersigners * Simplify code by using CryptDecodeObjectEx/WinVerifyTrustEx and improve timestamp reporting --- src/pki.c | 139 ++++++++++++++++++++++++++++++++++++++++----------- src/rufus.c | 3 +- src/rufus.h | 1 + src/rufus.rc | 10 ++-- src/stdio.c | 17 +++++++ 5 files changed, 136 insertions(+), 34 deletions(-) diff --git a/src/pki.c b/src/pki.c index c4ec4013..c81420fd 100644 --- a/src/pki.c +++ b/src/pki.c @@ -35,6 +35,11 @@ #define ENCODING (X509_ASN_ENCODING | PKCS_7_ASN_ENCODING) +// MinGW doesn't seem to have this one +#if !defined(szOID_NESTED_SIGNATURE) +#define szOID_NESTED_SIGNATURE "1.3.6.1.4.1.311.2.4.1" +#endif + // Signatures names we accept (may be suffixed, but the signature should start with one of those) const char* cert_name[3] = { "Akeo Consulting", "Akeo Systems", "Pete Batard" }; @@ -236,7 +241,7 @@ static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) { // Binary representation of szOID_TIMESTAMP_TOKEN or "1.2.840.113549.1.9.16.1.4" const uint8_t OID_RFC3161_timeStamp[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x10, 0x01, 0x04 }; - BOOL r; + BOOL r, found = FALSE; DWORD n, dwSize; PCRYPT_CONTENT_INFO pCounterSignerInfo = NULL; uint64_t ts = 0ULL; @@ -245,33 +250,25 @@ static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) char* timestamp_str; size_t timestamp_str_size; - // Loop through unathenticated attributes for szOID_RFC3161_counterSign OID + // Loop through unauthenticated attributes for szOID_RFC3161_counterSign OID for (n = 0; n < pSignerInfo->UnauthAttrs.cAttr; n++) { if (lstrcmpA(pSignerInfo->UnauthAttrs.rgAttr[n].pszObjId, szOID_RFC3161_counterSign) == 0) { - // Get size - r = CryptDecodeObject(PKCS_7_ASN_ENCODING, PKCS_CONTENT_INFO, + // Depending on how Microsoft implemented their timestamp checks, and the fact that we are dealing + // with UnauthAttrs, there's a possibility that an attacker may add a "fake" RFC 3161 countersigner + // to try to trick us into using their timestamp data. Detect that. + if (found) { + uprintf("PKI: Multiple RFC 3161 countersigners found. This could indicate something very nasty..."); + return 0ULL; + } + found = TRUE; + + // Read the countersigner message data + r = CryptDecodeObjectEx(PKCS_7_ASN_ENCODING, PKCS_CONTENT_INFO, pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].pbData, pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].cbData, - 0, NULL, &dwSize); + CRYPT_DECODE_ALLOC_FLAG, NULL, (PVOID)&pCounterSignerInfo, &dwSize); if (!r) { - uprintf("PKI: Could not get CounterSigner (timestamp) data size: %s", WinPKIErrorString()); - continue; - } - - // Allocate memory. - pCounterSignerInfo = calloc(dwSize, 1); - if (pCounterSignerInfo == NULL) { - uprintf("PKI: Unable to allocate memory for CounterSigner (timestamp) data"); - continue; - } - - // Now read the CounterSigner message data - r = CryptDecodeObject(PKCS_7_ASN_ENCODING, PKCS_CONTENT_INFO, - pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].pbData, - pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].cbData, - 0, (PVOID)pCounterSignerInfo, &dwSize); - if (!r) { - uprintf("PKI: Could not retrieve CounterSigner (timestamp) data: %s", WinPKIErrorString()); + uprintf("PKI: Could not retrieve RFC 3161 countersigner data: %s", WinPKIErrorString()); continue; } @@ -295,7 +292,73 @@ static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) } } } - safe_free(pCounterSignerInfo); + LocalFree(pCounterSignerInfo); + } + } + return ts; +} + +// The following is used to get the RFP 3161 timestamp of a nested signature +static uint64_t GetNestedRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) +{ + BOOL r, found = FALSE; + DWORD n, dwSize; + PCRYPT_CONTENT_INFO pNestedSignature = NULL; + PCMSG_SIGNER_INFO pNestedSignerInfo = NULL; + HCRYPTMSG hMsg = NULL; + uint64_t ts = 0ULL; + + // Loop through unauthenticated attributes for szOID_NESTED_SIGNATURE OID + for (n = 0; ; n++) { + if (pNestedSignature != NULL) + LocalFree(pNestedSignature); + if (hMsg != NULL) + CryptMsgClose(hMsg); + safe_free(pNestedSignerInfo); + if (n >= pSignerInfo->UnauthAttrs.cAttr) + break; + if (lstrcmpA(pSignerInfo->UnauthAttrs.rgAttr[n].pszObjId, szOID_NESTED_SIGNATURE) == 0) { + if (found) { + uprintf("PKI: Multiple nested signatures found. This could indicate something very nasty..."); + return 0ULL; + } + found = TRUE; + r = CryptDecodeObjectEx(PKCS_7_ASN_ENCODING, PKCS_CONTENT_INFO, + pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].pbData, + pSignerInfo->UnauthAttrs.rgAttr[n].rgValue[0].cbData, + CRYPT_DECODE_ALLOC_FLAG, NULL, (PVOID)&pNestedSignature, &dwSize); + if (!r) { + uprintf("PKI: Could not retrieve nested signature data: %s", WinPKIErrorString()); + continue; + } + + hMsg = CryptMsgOpenToDecode(ENCODING, CMSG_DETACHED_FLAG, CMSG_SIGNED, (HCRYPTPROV)NULL, NULL, NULL); + if (hMsg == NULL) { + uprintf("PKI: Could not create nested signature message: %s", WinPKIErrorString()); + continue; + } + r = CryptMsgUpdate(hMsg, pNestedSignature->Content.pbData, pNestedSignature->Content.cbData, TRUE); + if (!r) { + uprintf("PKI: Could not update message: %s", WinPKIErrorString()); + continue; + } + // Get nested signer + r = CryptMsgGetParam(hMsg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &dwSize); + if (!r) { + uprintf("PKI: Failed to get nested signer size: %s", WinPKIErrorString()); + continue; + } + pNestedSignerInfo = (PCMSG_SIGNER_INFO)calloc(dwSize, 1); + if (!pNestedSignerInfo) { + uprintf("PKI: Could not allocate memory for nested signer"); + continue; + } + r = CryptMsgGetParam(hMsg, CMSG_SIGNER_INFO_PARAM, 0, (PVOID)pNestedSignerInfo, &dwSize); + if (!r) { + uprintf("PKI: Failed to get nested signer information: %s", WinPKIErrorString()); + continue; + } + ts = GetRFC3161TimeStamp(pNestedSignerInfo); } } return ts; @@ -313,7 +376,7 @@ uint64_t GetSignatureTimeStamp(const char* path) PCMSG_SIGNER_INFO pSignerInfo = NULL; DWORD dwSignerInfo = 0; wchar_t *szFileName; - uint64_t timestamp = 0ULL; + uint64_t timestamp = 0ULL, nested_timestamp; // If the path is NULL, get the signature of the current runtime if (path == NULL) { @@ -340,7 +403,7 @@ uint64_t GetSignatureTimeStamp(const char* path) CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED, CERT_QUERY_FORMAT_FLAG_BINARY, 0, &dwEncoding, &dwContentType, &dwFormatType, &hStore, &hMsg, NULL); if (!r) { - uprintf("PKI: Failed to get signature for '%s': %s", (path == NULL) ? mpath : path, WinPKIErrorString()); + uprintf("PKI: Failed to get signature for '%s': %s", (path==NULL)?mpath:path, WinPKIErrorString()); goto out; } @@ -367,6 +430,26 @@ uint64_t GetSignatureTimeStamp(const char* path) // Get the RFC 3161 timestamp timestamp = GetRFC3161TimeStamp(pSignerInfo); + if (timestamp) + uprintf("Note: '%s' has timestamp %s", (path==NULL)?mpath:path, TimestampToHumanReadable(timestamp)); + // Because we are currently using both SHA-1 and SHA-256 signatures, we are in the very specific + // situation that Windows may say our executable passes Authenticode validation on Windows 7 or + // later (which includes timestamp validation) even if the SHA-1 signature or timestamps have + // been altered. + // This means that, if we don't also check the nested SHA-256 signature timestamp, an attacker + // could alter the SHA-1 one (which is the one we use by default for chronology validation) and + // trick us into using an invalid timestamp value. To prevent this, we validate that, if we have + // both a regular and nested timestamp, they are within 60 seconds of each other. + nested_timestamp = GetNestedRFC3161TimeStamp(pSignerInfo); + if (nested_timestamp) + uprintf("Note: '%s' has nested timestamp %s", (path==NULL)?mpath:path, TimestampToHumanReadable(nested_timestamp)); + if ((timestamp != 0ULL) && (nested_timestamp != 0ULL)) { + if (_abs64(nested_timestamp - timestamp) > 100) { + uprintf("PKI: Signature timestamp and nested timestamp differ by more than a minute. " + "This could indicate something very nasty...", timestamp, nested_timestamp); + timestamp = 0ULL; + } + } out: safe_free(mpath); @@ -437,7 +520,7 @@ LONG ValidateSignature(HWND hDlg, const char* path) trust_data.dwUnionChoice = WTD_CHOICE_FILE; trust_data.pFile = &trust_file; - r = WinVerifyTrust(NULL, &guid_generic_verify, &trust_data); + r = WinVerifyTrustEx(INVALID_HANDLE_VALUE, &guid_generic_verify, &trust_data); safe_free(trust_file.pcwszFilePath); switch (r) { case ERROR_SUCCESS: @@ -450,7 +533,7 @@ LONG ValidateSignature(HWND hDlg, const char* path) } else { update_ts = GetSignatureTimeStamp(path); if (update_ts < current_ts) { - uprintf("PKI: Update timestamp (%" PRIi64 ") is older than ours (%" PRIi64 ")! - Aborting update", update_ts, current_ts); + uprintf("PKI: Update timestamp (%" PRIi64 ") is younger than ours (%" PRIi64 ")! - Aborting update", update_ts, current_ts); r = TRUST_E_TIME_STAMP; } } diff --git a/src/rufus.c b/src/rufus.c index 272cac92..e3747190 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2285,7 +2285,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA case WM_COMMAND: #ifdef RUFUS_TEST if (LOWORD(wParam) == IDC_TEST) { - ExtractEfiImgFiles("C:\\rufus"); + uprintf("ts = %lld", GetSignatureTimeStamp("C:\\rufus\\rufus-2.17_BETA.exe")); +// ExtractEfiImgFiles("C:\\rufus"); // ExtractEFI("C:\\rufus\\efi.img", "C:\\rufus\\efi"); // uprintf("Proceed = %s", CheckDriveAccess(2000)?"True":"False"); // char* choices[] = { "Choice 1", "Choice 2", "Choice 3" }; diff --git a/src/rufus.h b/src/rufus.h index 5d3680f2..341e3925 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -425,6 +425,7 @@ extern void UpdateProgress(int op, float percent); extern const char* StrError(DWORD error_code, BOOL use_default_locale); extern char* GuidToString(const GUID* guid); extern char* SizeToHumanReadable(uint64_t size, BOOL copy_to_log, BOOL fake_units); +extern char* TimestampToHumanReadable(uint64_t ts); extern HWND MyCreateDialog(HINSTANCE hInstance, int Dialog_ID, HWND hWndParent, DLGPROC lpDialogFunc); extern INT_PTR MyDialogBox(HINSTANCE hInstance, int Dialog_ID, HWND hWndParent, DLGPROC lpDialogFunc); extern void CenterDialog(HWND hDlg); diff --git a/src/rufus.rc b/src/rufus.rc index eb4df7de..0bb7dac6 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1189" +CAPTION "Rufus 2.17.1190" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1189,0 - PRODUCTVERSION 2,17,1189,0 + FILEVERSION 2,17,1190,0 + PRODUCTVERSION 2,17,1190,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1189" + VALUE "FileVersion", "2.17.1190" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1189" + VALUE "ProductVersion", "2.17.1190" END END BLOCK "VarFileInfo" diff --git a/src/stdio.c b/src/stdio.c index c5b0707f..a9ce4654 100644 --- a/src/stdio.c +++ b/src/stdio.c @@ -228,6 +228,23 @@ char* SizeToHumanReadable(uint64_t size, BOOL copy_to_log, BOOL fake_units) return str_size; } +// Convert a YYYYMMDDHHMMSS UTC timestamp to a more human readable version +char* TimestampToHumanReadable(uint64_t ts) +{ + uint64_t rem = ts, divisor = 10000000000ULL; + uint16_t data[6]; + int i; + static char str[64]; + + for (i = 0; i < 6; i++) { + data[i] = (uint16_t) ((divisor == 0)?rem:(rem / divisor)); + rem %= divisor; + divisor /= 100ULL; + } + static_sprintf(str, "%04d.%02d.%02d %02d:%02d:%02d (UTC)", data[0], data[1], data[2], data[3], data[4], data[5]); + return str; +} + // Convert custom error code to messages const char* _StrError(DWORD error_code) { From 94e4c0905b127666146dd1ac1e42e4865eb3ee55 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 4 Sep 2017 14:32:56 +0100 Subject: [PATCH 71/97] [pki] improve ASN.1 parser * Enable search from OIDs expressed as strings and ignore non UNIVERSAL classes --- src/parser.c | 126 ++++++++++++++++++++++++++++++++++++++++++++------- src/pki.c | 8 ++-- src/rufus.h | 3 +- src/rufus.rc | 10 ++-- 4 files changed, 119 insertions(+), 28 deletions(-) diff --git a/src/parser.c b/src/parser.c index d53cc22e..b175b332 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1266,29 +1266,34 @@ char* replace_char(const char* src, const char c, const char* rep) return res; } -static void* get_oid_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, const void* oid, +static void* get_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, const void* oid, size_t oid_len, uint8_t asn1_type, size_t* data_len, BOOL* matched) { void* ret; size_t pos = 0, len, len_len, i; uint8_t tag; - BOOL is_sequence; + BOOL is_sequence, is_universal_tag; while (pos < buf_len) { - is_sequence = buf[pos] & 0x20; // Only need to handle the sequence attribute + is_sequence = buf[pos] & 0x20; + is_universal_tag = ((buf[pos] & 0xC0) == 0x00); tag = buf[pos++] & 0x1F; + if (tag == 0x1F) { + uprintf("get_data_from_asn1: Long form tags are unsupported"); + return NULL; + } // Compute the length len = 0; len_len = 1; - if (tag == 0x05) { // ignore "NULL" tag + if ((is_universal_tag) && (tag == 0x05)) { // ignore "NULL" tag pos++; } else { if (buf[pos] & 0x80) { len_len = buf[pos++] & 0x7F; // The data we're dealing with is not expected to ever be larger than 64K if (len_len > 2) { - uprintf("get_oid_data_from_asn1: Length fields larger than 2 bytes are unsupported"); + uprintf("get_data_from_asn1: Length fields larger than 2 bytes are unsupported"); return NULL; } for (i = 0; i < len_len; i++) { @@ -1300,23 +1305,23 @@ static void* get_oid_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, } if (len > buf_len - pos) { - uprintf("get_oid_data_from_asn1: Overflow error (computed length %d is larger than remaining data)", len); + uprintf("get_data_from_asn1: Overflow error (computed length %d is larger than remaining data)", len); return NULL; } } if (len != 0) { if (is_sequence) { - ret = get_oid_data_from_asn1_internal(&buf[pos], len, oid, oid_len, asn1_type, data_len, matched); + ret = get_data_from_asn1_internal(&buf[pos], len, oid, oid_len, asn1_type, data_len, matched); if (ret != NULL) return ret; - } else { + } else if (is_universal_tag) { // Only process tags that belong to the UNIVERSAL class // NB: 0x06 = "OID" tag if ((!*matched) && (tag == 0x06) && (len == oid_len) && (memcmp(&buf[pos], oid, oid_len) == 0)) { *matched = TRUE; } else if ((*matched) && (tag == asn1_type)) { *data_len = len; - return (void*) &buf[pos]; + return (void*)&buf[pos]; } } pos += len; @@ -1326,15 +1331,104 @@ static void* get_oid_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, return NULL; } +// Helper functions to convert an OID string to an OID byte array +// Taken from from openpgp-oid.c +static size_t make_flagged_int(unsigned long value, uint8_t *buf, size_t buflen) +{ + BOOL more = FALSE; + int shift; + + for (shift = 28; shift > 0; shift -= 7) { + if (more || value >= ((unsigned long)1 << shift)) { + buf[buflen++] = (uint8_t) (0x80 | (value >> shift)); + value -= (value >> shift) << shift; + more = TRUE; + } + } + buf[buflen++] = (uint8_t) value; + return buflen; +} + +// Convert OID string 'oid_str' to an OID byte array of size 'ret_len' +// The returned array must be freed by the caller. +static uint8_t* oid_from_str(const char* oid_str, size_t* ret_len) +{ + uint8_t* oid = NULL; + unsigned long val1 = 0, val; + const char *endp; + int arcno = 0; + size_t oid_len = 0; + + if ((oid_str == NULL) || (oid_str[0] == 0)) + return NULL; + + // We can safely assume that the encoded OID is shorter than the string. + oid = malloc(1 + strlen(oid_str) + 2); + if (oid == NULL) + return NULL; + + do { + arcno++; + val = strtoul(oid_str, (char**)&endp, 10); + if (!isdigit(*oid_str) || !(*endp == '.' || !*endp)) + goto err; + if (*endp == '.') + oid_str = endp + 1; + + if (arcno == 1) { + if (val > 2) + break; // Not allowed, error caught below. + val1 = val; + } else if (arcno == 2) { + // Need to combine the first two arcs in one byte. + if (val1 < 2) { + if (val > 39) + goto err; + oid[oid_len++] = (uint8_t)(val1 * 40 + val); + } else { + val += 80; + oid_len = make_flagged_int(val, oid, oid_len); + } + } else { + oid_len = make_flagged_int(val, oid, oid_len); + } + } while (*endp == '.'); + + // It is not possible to encode only the first arc. + if (arcno == 1 || oid_len < 2 || oid_len > 254) + goto err; + + *ret_len = oid_len; + return oid; + +err: + free(oid); + return NULL; +} + /* * Parse an ASN.1 binary buffer and return a pointer to the first instance of OID data of type 'asn1_type', - * matching the binary OID 'oid' (of size 'oid_len'). If successful, the length or the returned data is - * placed in 'data_len'. - * If 'oid' is NULL, the first data element of type 'asn1_type' is returned. + * matching the OID 'oid_str' (expressed as an OID string). If successful, the length or the returned data + * is placed in 'data_len'. Note: Only the UNIVERSAL class is supported for 'asn1_type' (other classes are + * ignored). If 'oid_str' is NULL or empty, the first data element of type 'asn1_type' is returned. */ -void* get_oid_data_from_asn1(const uint8_t* buf, size_t buf_len, const uint8_t* oid, size_t oid_len, - uint8_t asn1_type, size_t* data_len) +void* get_data_from_asn1(const uint8_t* buf, size_t buf_len, const char* oid_str, uint8_t asn1_type, size_t* data_len) { - BOOL matched = (oid == NULL); - return get_oid_data_from_asn1_internal(buf, buf_len, oid, oid_len, asn1_type, data_len, &matched); + void* ret; + uint8_t* oid = NULL; + size_t oid_len = 0; + BOOL matched = ((oid_str == NULL) || (oid_str[0] == 0)); + + if (!matched) { + // We have an OID string to convert + oid = oid_from_str(oid_str, &oid_len); + if (oid == NULL) { + uprintf("get_oid_data_from_asn1: Could not convert OID string '%s'", oid_str); + return NULL; + } + } + + ret = get_data_from_asn1_internal(buf, buf_len, oid, oid_len, asn1_type, data_len, &matched); + free(oid); + return ret; } diff --git a/src/pki.c b/src/pki.c index c81420fd..d7264afb 100644 --- a/src/pki.c +++ b/src/pki.c @@ -239,8 +239,6 @@ out: // The timestamping authorities we use are RFC 3161 compliant static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) { - // Binary representation of szOID_TIMESTAMP_TOKEN or "1.2.840.113549.1.9.16.1.4" - const uint8_t OID_RFC3161_timeStamp[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x10, 0x01, 0x04 }; BOOL r, found = FALSE; DWORD n, dwSize; PCRYPT_CONTENT_INFO pCounterSignerInfo = NULL; @@ -273,12 +271,12 @@ static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) } // Get the RFC 3161 timestamp message - timestamp_token = get_oid_data_from_asn1(pCounterSignerInfo->Content.pbData, - pCounterSignerInfo->Content.cbData, OID_RFC3161_timeStamp, sizeof(OID_RFC3161_timeStamp), + timestamp_token = get_data_from_asn1(pCounterSignerInfo->Content.pbData, + pCounterSignerInfo->Content.cbData, szOID_TIMESTAMP_TOKEN, // 0x04 = "Octet String" ASN.1 tag 0x04, ×tamp_token_size); if (timestamp_token) { - timestamp_str = get_oid_data_from_asn1(timestamp_token, timestamp_token_size, NULL, 0, + timestamp_str = get_data_from_asn1(timestamp_token, timestamp_token_size, NULL, // 0x18 = "Generalized Time" ASN.1 tag 0x18, ×tamp_str_size); if (timestamp_str) { diff --git a/src/rufus.h b/src/rufus.h index 341e3925..113b846f 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -478,8 +478,7 @@ extern char* insert_section_data(const char* filename, const char* section, cons extern char* replace_in_token_data(const char* filename, const char* token, const char* src, const char* rep, BOOL dos2unix); extern char* replace_char(const char* src, const char c, const char* rep); extern void parse_update(char* buf, size_t len); -extern void* get_oid_data_from_asn1(const uint8_t* buf, size_t buf_len, const uint8_t* oid, size_t oid_len, - uint8_t asn1_type, size_t* data_len); +extern void* get_data_from_asn1(const uint8_t* buf, size_t buf_len, const char* oid_str, uint8_t asn1_type, size_t* data_len); extern uint8_t WimExtractCheck(void); extern BOOL WimExtractFile(const char* wim_image, int index, const char* src, const char* dst); extern BOOL WimExtractFile_API(const char* image, int index, const char* src, const char* dst); diff --git a/src/rufus.rc b/src/rufus.rc index 0bb7dac6..2b4a2819 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1190" +CAPTION "Rufus 2.17.1191" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1190,0 - PRODUCTVERSION 2,17,1190,0 + FILEVERSION 2,17,1191,0 + PRODUCTVERSION 2,17,1191,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1190" + VALUE "FileVersion", "2.17.1191" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1190" + VALUE "ProductVersion", "2.17.1191" END END BLOCK "VarFileInfo" From 9464ae94a44cbc1089d94cab51d908d082cae886 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 5 Sep 2017 22:21:34 +0100 Subject: [PATCH 72/97] [pki] more ASN.1 parser improvements --- src/parser.c | 60 ++++++++++++++++++++++++++++++++-------------------- src/pki.c | 2 +- src/rufus.rc | 10 ++++----- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/src/parser.c b/src/parser.c index b175b332..9846402e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1266,10 +1266,12 @@ char* replace_char(const char* src, const char c, const char* rep) return res; } -static void* get_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, const void* oid, - size_t oid_len, uint8_t asn1_type, size_t* data_len, BOOL* matched) +/* + * Internal recursive call for get_data_from_asn1(). Returns FALSE on error, TRUE otherwise. + */ +static BOOL get_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, const void* oid, + size_t oid_len, uint8_t asn1_type, void** data, size_t* data_len, BOOL* matched) { - void* ret; size_t pos = 0, len, len_len, i; uint8_t tag; BOOL is_sequence, is_universal_tag; @@ -1280,7 +1282,7 @@ static void* get_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, con tag = buf[pos++] & 0x1F; if (tag == 0x1F) { uprintf("get_data_from_asn1: Long form tags are unsupported"); - return NULL; + return FALSE; } // Compute the length @@ -1294,7 +1296,7 @@ static void* get_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, con // The data we're dealing with is not expected to ever be larger than 64K if (len_len > 2) { uprintf("get_data_from_asn1: Length fields larger than 2 bytes are unsupported"); - return NULL; + return FALSE; } for (i = 0; i < len_len; i++) { len <<= 8; @@ -1306,51 +1308,57 @@ static void* get_data_from_asn1_internal(const uint8_t* buf, size_t buf_len, con if (len > buf_len - pos) { uprintf("get_data_from_asn1: Overflow error (computed length %d is larger than remaining data)", len); - return NULL; + return FALSE; } } if (len != 0) { if (is_sequence) { - ret = get_data_from_asn1_internal(&buf[pos], len, oid, oid_len, asn1_type, data_len, matched); - if (ret != NULL) - return ret; + if (!get_data_from_asn1_internal(&buf[pos], len, oid, oid_len, asn1_type, data, data_len, matched)) + return FALSE; // error + if (*data != NULL) + return TRUE; } else if (is_universal_tag) { // Only process tags that belong to the UNIVERSAL class // NB: 0x06 = "OID" tag if ((!*matched) && (tag == 0x06) && (len == oid_len) && (memcmp(&buf[pos], oid, oid_len) == 0)) { *matched = TRUE; } else if ((*matched) && (tag == asn1_type)) { *data_len = len; - return (void*)&buf[pos]; + *data = (void*)&buf[pos]; + return TRUE; } } pos += len; } }; - return NULL; + return TRUE; } -// Helper functions to convert an OID string to an OID byte array -// Taken from from openpgp-oid.c -static size_t make_flagged_int(unsigned long value, uint8_t *buf, size_t buflen) +/* + * Helper functions to convert an OID string to an OID byte array + * Taken from from openpgp-oid.c + */ +static size_t make_flagged_int(unsigned long value, uint8_t *buf, size_t buf_len) { BOOL more = FALSE; int shift; for (shift = 28; shift > 0; shift -= 7) { if (more || value >= ((unsigned long)1 << shift)) { - buf[buflen++] = (uint8_t) (0x80 | (value >> shift)); + buf[buf_len++] = (uint8_t) (0x80 | (value >> shift)); value -= (value >> shift) << shift; more = TRUE; } } - buf[buflen++] = (uint8_t) value; - return buflen; + buf[buf_len++] = (uint8_t) value; + return buf_len; } -// Convert OID string 'oid_str' to an OID byte array of size 'ret_len' -// The returned array must be freed by the caller. +/* + * Convert OID string 'oid_str' to an OID byte array of size 'ret_len' + * The returned array must be freed by the caller. + */ static uint8_t* oid_from_str(const char* oid_str, size_t* ret_len) { uint8_t* oid = NULL; @@ -1414,21 +1422,27 @@ err: */ void* get_data_from_asn1(const uint8_t* buf, size_t buf_len, const char* oid_str, uint8_t asn1_type, size_t* data_len) { - void* ret; + void* data = NULL; uint8_t* oid = NULL; size_t oid_len = 0; BOOL matched = ((oid_str == NULL) || (oid_str[0] == 0)); + if (buf_len >= 65536) { + uprintf("get_data_from_asn1: Buffers larger than 64KB are not supported"); + return NULL; + } + if (!matched) { // We have an OID string to convert oid = oid_from_str(oid_str, &oid_len); if (oid == NULL) { - uprintf("get_oid_data_from_asn1: Could not convert OID string '%s'", oid_str); + uprintf("get_data_from_asn1: Could not convert OID string '%s'", oid_str); return NULL; } } - ret = get_data_from_asn1_internal(buf, buf_len, oid, oid_len, asn1_type, data_len, &matched); + // No need to check for the return value as data is always NULL on error + get_data_from_asn1_internal(buf, buf_len, oid, oid_len, asn1_type, &data, data_len, &matched); free(oid); - return ret; + return data; } diff --git a/src/pki.c b/src/pki.c index d7264afb..afdd414f 100644 --- a/src/pki.c +++ b/src/pki.c @@ -531,7 +531,7 @@ LONG ValidateSignature(HWND hDlg, const char* path) } else { update_ts = GetSignatureTimeStamp(path); if (update_ts < current_ts) { - uprintf("PKI: Update timestamp (%" PRIi64 ") is younger than ours (%" PRIi64 ")! - Aborting update", update_ts, current_ts); + uprintf("PKI: Update timestamp (%" PRIi64 ") is younger than ours (%" PRIi64 ") - Aborting update", update_ts, current_ts); r = TRUST_E_TIME_STAMP; } } diff --git a/src/rufus.rc b/src/rufus.rc index 2b4a2819..4a79f31a 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1191" +CAPTION "Rufus 2.17.1192" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1191,0 - PRODUCTVERSION 2,17,1191,0 + FILEVERSION 2,17,1192,0 + PRODUCTVERSION 2,17,1192,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1191" + VALUE "FileVersion", "2.17.1192" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1191" + VALUE "ProductVersion", "2.17.1192" END END BLOCK "VarFileInfo" From 4a213c3ba08610e3bcb42776f9c2cc3cf52eb864 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 6 Sep 2017 14:00:30 +0100 Subject: [PATCH 73/97] [core] allow the use of A: and B: as drive letters and fix in-use detection for Z: * Closes #1016 * Also expand support for Arch Linux derivatives Syslinux config files --- ChangeLog.txt | 1 + src/drive.c | 5 +---- src/iso.c | 2 +- src/rufus.rc | 10 +++++----- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index ce49f493..0671418a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,6 +5,7 @@ o Version 2.17 (2017.09.??) Strengthen download update checks, to prevent attack scenarios that leverage user unawareness Fix an issue with Spanish translation prompts not displaying properly Fix an issue with Windows To Go support on some non-official Windows ISOs + Fix an issue with using A: or B: as flash drive letters Fix an issue with log autoscrolling o Version 2.16 (2017.07.31) diff --git a/src/drive.c b/src/drive.c index 7d4512fe..3eeafdd8 100644 --- a/src/drive.c +++ b/src/drive.c @@ -431,9 +431,6 @@ static BOOL _GetDriveLettersAndType(DWORD DriveIndex, char* drive_letters, UINT* if (!isalpha(*drive)) continue; *drive = (char)toupper((int)*drive); - if (*drive < 'C') { - continue; - } // IOCTL_STORAGE_GET_DEVICE_NUMBER's STORAGE_DEVICE_NUMBER.DeviceNumber is // not unique! An HDD, a DVD and probably other drives can have the same @@ -502,7 +499,7 @@ char GetUnusedDriveLetter(void) goto out; } - for (drive_letter = 'C'; drive_letter < 'Z'; drive_letter++) { + for (drive_letter = 'C'; drive_letter <= 'Z'; drive_letter++) { for (drive = drives ;*drive; drive += safe_strlen(drive)+1) { if (!isalpha(*drive)) continue; diff --git a/src/iso.c b/src/iso.c index c2f03874..8574c71f 100644 --- a/src/iso.c +++ b/src/iso.c @@ -83,7 +83,7 @@ static const char* install_wim_name[] = { "install.wim", "install.swm" }; static const char* grub_dirname = "/boot/grub/i386-pc"; static const char* grub_cfg = "grub.cfg"; static const char* syslinux_cfg[] = { "isolinux.cfg", "syslinux.cfg", "extlinux.conf" }; -static const char* arch_cfg[] = { "archiso_sys32.cfg", "archiso_sys64.cfg" }; +static const char* arch_cfg[] = { "archiso_sys.cfg", "archiso_sys32.cfg", "archiso_sys64.cfg" }; static const char* isolinux_bin[] = { "isolinux.bin", "boot.bin" }; static const char* pe_dirname[] = { "/i386", "/minint" }; static const char* pe_file[] = { "ntdetect.com", "setupldr.bin", "txtsetup.sif" }; diff --git a/src/rufus.rc b/src/rufus.rc index 4a79f31a..a698218f 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1192" +CAPTION "Rufus 2.17.1193" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1192,0 - PRODUCTVERSION 2,17,1192,0 + FILEVERSION 2,17,1193,0 + PRODUCTVERSION 2,17,1193,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1192" + VALUE "FileVersion", "2.17.1193" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1192" + VALUE "ProductVersion", "2.17.1193" END END BLOCK "VarFileInfo" From c22b378f9a702ba534e912c5a9f564e1aa7d5514 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 8 Sep 2017 15:38:30 +0100 Subject: [PATCH 74/97] [misc] display image and disk size in the log * Also fix 2 Coverity warnings * Also remove unneeded LFs in drive.c --- ChangeLog.txt | 2 +- src/drive.c | 108 +++++++++++++++++++++++++------------------------- src/pki.c | 12 ++++-- src/rufus.c | 3 +- src/rufus.rc | 10 ++--- 5 files changed, 70 insertions(+), 65 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 0671418a..6f4e02b7 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,8 +5,8 @@ o Version 2.17 (2017.09.??) Strengthen download update checks, to prevent attack scenarios that leverage user unawareness Fix an issue with Spanish translation prompts not displaying properly Fix an issue with Windows To Go support on some non-official Windows ISOs - Fix an issue with using A: or B: as flash drive letters Fix an issue with log autoscrolling + Fix an issue when using A: or B: as drive letters o Version 2.16 (2017.07.31) Add an audiovisual cue on completion/error diff --git a/src/drive.c b/src/drive.c index 3eeafdd8..97ff723e 100644 --- a/src/drive.c +++ b/src/drive.c @@ -158,7 +158,7 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr Sleep(DRIVE_ACCESS_TIMEOUT / DRIVE_ACCESS_RETRIES); } if (hDrive == INVALID_HANDLE_VALUE) { - uprintf("Could not open %s: %s\n", Path, WindowsErrorString()); + uprintf("Could not open %s: %s", Path, WindowsErrorString()); goto out; } @@ -168,7 +168,7 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr if (bLockDrive) { if (DeviceIoControl(hDrive, FSCTL_ALLOW_EXTENDED_DASD_IO, NULL, 0, NULL, 0, &size, NULL)) { - uprintf("I/O boundary checks disabled\n"); + uprintf("I/O boundary checks disabled"); } uprintf("Requesting lock..."); @@ -247,13 +247,13 @@ char* GetLogicalName(DWORD DriveIndex, BOOL bKeepTrailingBackslash, BOOL bSilent if (i == 0) { hVolume = FindFirstVolumeA(volume_name, sizeof(volume_name)); if (hVolume == INVALID_HANDLE_VALUE) { - suprintf("Could not access first GUID volume: %s\n", WindowsErrorString()); + suprintf("Could not access first GUID volume: %s", WindowsErrorString()); goto out; } } else { if (!FindNextVolumeA(hVolume, volume_name, sizeof(volume_name))) { if (GetLastError() != ERROR_NO_MORE_FILES) { - suprintf("Could not access next GUID volume: %s\n", WindowsErrorString()); + suprintf("Could not access next GUID volume: %s", WindowsErrorString()); } goto out; } @@ -262,7 +262,7 @@ char* GetLogicalName(DWORD DriveIndex, BOOL bKeepTrailingBackslash, BOOL bSilent // Sanity checks len = safe_strlen(volume_name); if ((len <= 1) || (safe_strnicmp(volume_name, volume_start, 4) != 0) || (volume_name[len-1] != '\\')) { - suprintf("'%s' is not a GUID volume name\n", volume_name); + suprintf("'%s' is not a GUID volume name", volume_name); continue; } @@ -273,27 +273,27 @@ char* GetLogicalName(DWORD DriveIndex, BOOL bKeepTrailingBackslash, BOOL bSilent volume_name[len-1] = 0; if (QueryDosDeviceA(&volume_name[4], path, sizeof(path)) == 0) { - suprintf("Failed to get device path for GUID volume '%s': %s\n", volume_name, WindowsErrorString()); + suprintf("Failed to get device path for GUID volume '%s': %s", volume_name, WindowsErrorString()); continue; } for (j=0; (j sizeof(drives)) { - uprintf("GetLogicalDriveStrings: Buffer too small (required %d vs. %d)\n", size, sizeof(drives)); + uprintf("GetLogicalDriveStrings: Buffer too small (required %d vs. %d)", size, sizeof(drives)); goto out; } @@ -445,7 +445,7 @@ static BOOL _GetDriveLettersAndType(DWORD DriveIndex, char* drive_letters, UINT* hDrive = CreateFileA(logical_drive, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hDrive == INVALID_HANDLE_VALUE) { -// uprintf("Warning: could not open drive %c: %s\n", drive[0], WindowsErrorString()); +// uprintf("Warning: could not open drive %c: %s", drive[0], WindowsErrorString()); continue; } @@ -491,11 +491,11 @@ char GetUnusedDriveLetter(void) size = GetLogicalDriveStringsA(sizeof(drives), drives); if (size == 0) { - uprintf("GetLogicalDriveStrings failed: %s\n", WindowsErrorString()); + uprintf("GetLogicalDriveStrings failed: %s", WindowsErrorString()); goto out; } if (size > sizeof(drives)) { - uprintf("GetLogicalDriveStrings: Buffer too small (required %d vs. %d)\n", size, sizeof(drives)); + uprintf("GetLogicalDriveStrings: Buffer too small (required %d vs. %d)", size, sizeof(drives)); goto out; } @@ -544,11 +544,11 @@ BOOL GetDriveLabel(DWORD DriveIndex, char* letters, char** label) if (DeviceIoControl(hPhysical, IOCTL_STORAGE_CHECK_VERIFY, NULL, 0, NULL, 0, &size, NULL)) AutorunLabel = get_token_data_file("label", AutorunPath); else if (GetLastError() == ERROR_NOT_READY) - uprintf("Ignoring autorun.inf label for drive %c: %s\n", letters[0], + uprintf("Ignoring autorun.inf label for drive %c: %s", letters[0], (HRESULT_CODE(GetLastError()) == ERROR_NOT_READY)?"No media":WindowsErrorString()); safe_closehandle(hPhysical); if (AutorunLabel != NULL) { - uprintf("Using autorun.inf label for drive %c: '%s'\n", letters[0], AutorunLabel); + uprintf("Using autorun.inf label for drive %c: '%s'", letters[0], AutorunLabel); static_strcpy(VolumeLabel, AutorunLabel); safe_free(AutorunLabel); *label = VolumeLabel; @@ -630,17 +630,17 @@ BOOL AnalyzeMBR(HANDLE hPhysicalDrive, const char* TargetName) set_bytes_per_sector(SelectedDrive.SectorSize); if (!is_br(fp)) { - uprintf("%s does not have an x86 %s\n", TargetName, mbr_name); + uprintf("%s does not have an x86 %s", TargetName, mbr_name); return FALSE; } for (i=0; iGeometry.BytesPerSector; SelectedDrive.FirstDataSector = MAXDWORD; if (SelectedDrive.SectorSize < 512) { - suprintf("Warning: Drive 0x%02x reports a sector size of %d - Correcting to 512 bytes.\n", + suprintf("Warning: Drive 0x%02x reports a sector size of %d - Correcting to 512 bytes.", DriveIndex, SelectedDrive.SectorSize); SelectedDrive.SectorSize = 512; } SelectedDrive.SectorsPerTrack = DiskGeometry->Geometry.SectorsPerTrack; SelectedDrive.MediaType = DiskGeometry->Geometry.MediaType; - suprintf("Disk type: %s, Sector Size: %d bytes\n", (SelectedDrive.MediaType == FixedMedia)?"FIXED":"Removable", - SelectedDrive.SectorSize); - suprintf("Cylinders: %" PRIi64 ", TracksPerCylinder: %d, SectorsPerTrack: %d\n", + suprintf("Disk type: %s, Disk size: %s, Sector size: %d bytes", (SelectedDrive.MediaType == FixedMedia)?"FIXED":"Removable", + SizeToHumanReadable(SelectedDrive.DiskSize, FALSE, TRUE), SelectedDrive.SectorSize); + suprintf("Cylinders: %" PRIi64 ", Tracks per cylinder: %d, Sectors per track: %d", DiskGeometry->Geometry.Cylinders, DiskGeometry->Geometry.TracksPerCylinder, DiskGeometry->Geometry.SectorsPerTrack); r = DeviceIoControl(hPhysical, IOCTL_DISK_GET_DRIVE_LAYOUT_EX, NULL, 0, layout, sizeof(layout), &size, NULL ); if (!r || size <= 0) { - suprintf("Could not get layout for drive 0x%02x: %s\n", DriveIndex, WindowsErrorString()); + suprintf("Could not get layout for drive 0x%02x: %s", DriveIndex, WindowsErrorString()); safe_closehandle(hPhysical); return 0; } @@ -767,9 +767,9 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys suprintf("Partition type: SFD (Super Floppy Disk) or Unpartitioned"); super_floppy_disk = TRUE; } else { - suprintf("Partition type: MBR, NB Partitions: %d\n", SelectedDrive.nPartitions); + suprintf("Partition type: MBR, NB Partitions: %d", SelectedDrive.nPartitions); SelectedDrive.has_mbr_uefi_marker = (DriveLayout->Mbr.Signature == MBR_UEFI_MARKER); - suprintf("Disk ID: 0x%08X %s\n", DriveLayout->Mbr.Signature, SelectedDrive.has_mbr_uefi_marker ? "(UEFI target)" : ""); + suprintf("Disk ID: 0x%08X %s", DriveLayout->Mbr.Signature, SelectedDrive.has_mbr_uefi_marker ? "(UEFI target)" : ""); AnalyzeMBR(hPhysical, "Drive"); } for (i=0; iPartitionCount; i++) { @@ -777,7 +777,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys part_type = DriveLayout->PartitionEntry[i].Mbr.PartitionType; isUefiNtfs = (i == 1) && (part_type == 0xef) && (DriveLayout->PartitionEntry[i].PartitionLength.QuadPart <= 1*MB); - suprintf("Partition %d%s:\n", i+(super_floppy_disk?0:1), isUefiNtfs?" (UEFI:NTFS)":""); + suprintf("Partition %d%s:", i+(super_floppy_disk?0:1), isUefiNtfs?" (UEFI:NTFS)":""); for (j=0; jPartitionCount); - suprintf("Disk GUID: %s\n", GuidToString(&DriveLayout->Gpt.DiskId)); - suprintf("Max parts: %d, Start Offset: %" PRIi64 ", Usable = %" PRIi64 " bytes\n", + suprintf("Partition type: GPT, NB Partitions: %d", DriveLayout->PartitionCount); + suprintf("Disk GUID: %s", GuidToString(&DriveLayout->Gpt.DiskId)); + suprintf("Max parts: %d, Start Offset: %" PRIi64 ", Usable = %" PRIi64 " bytes", DriveLayout->Gpt.MaxPartitionCount, DriveLayout->Gpt.StartingUsableOffset.QuadPart, DriveLayout->Gpt.UsableLength.QuadPart); for (i=0; iPartitionCount; i++) { SelectedDrive.nPartitions++; tmp[0] = 0; wchar_to_utf8_no_alloc(DriveLayout->PartitionEntry[i].Gpt.Name, tmp, sizeof(tmp)); - suprintf("Partition %d:\r\n Type: %s\r\n Name: '%s'\n", i+1, + suprintf("Partition %d:\r\n Type: %s\r\n Name: '%s'", i+1, GuidToString(&DriveLayout->PartitionEntry[i].Gpt.PartitionType), tmp); - suprintf(" ID: %s\r\n Size: %s (%" PRIi64 " bytes)\r\n Start Sector: %" PRIi64 ", Attributes: 0x%016" PRIX64 "\n", + suprintf(" ID: %s\r\n Size: %s (%" PRIi64 " bytes)\r\n Start Sector: %" PRIi64 ", Attributes: 0x%016" PRIX64, GuidToString(&DriveLayout->PartitionEntry[i].Gpt.PartitionId), SizeToHumanReadable(DriveLayout->PartitionEntry[i].PartitionLength.QuadPart, TRUE, FALSE), DriveLayout->PartitionEntry[i].PartitionLength, @@ -833,7 +833,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys break; default: SelectedDrive.PartitionType = PARTITION_STYLE_MBR; - suprintf("Partition type: RAW\n"); + suprintf("Partition type: RAW"); break; } #if defined(__GNUC__) @@ -857,12 +857,12 @@ static BOOL FlushDrive(char drive_letter) hDrive = CreateFileA(logical_drive, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hDrive == INVALID_HANDLE_VALUE) { - uprintf("Failed to open %c: for flushing: %s\n", drive_letter, WindowsErrorString()); + uprintf("Failed to open %c: for flushing: %s", drive_letter, WindowsErrorString()); goto out; } r = FlushFileBuffers(hDrive); if (r == FALSE) - uprintf("Failed to flush %c: %s\n", drive_letter, WindowsErrorString()); + uprintf("Failed to flush %c: %s", drive_letter, WindowsErrorString()); out: safe_closehandle(hDrive); @@ -877,7 +877,7 @@ BOOL UnmountVolume(HANDLE hDrive) DWORD size; if (!DeviceIoControl(hDrive, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &size, NULL)) { - uprintf("Could not unmount drive: %s\n", WindowsErrorString()); + uprintf("Could not unmount drive: %s", WindowsErrorString()); return FALSE; } return TRUE; @@ -899,7 +899,7 @@ BOOL MountVolume(char* drive_name, char *drive_guid) // than the one we want. If that's the case, we need to unmount first. if ( (GetVolumePathNamesForVolumeNameA(drive_guid, mounted_letter, sizeof(mounted_letter), &size)) && (size > 1) && (mounted_letter[0] != drive_name[0]) ) { - uprintf("Volume is already mounted, but as %c: instead of %c: - Unmounting...\n", mounted_letter[0], drive_name[0]); + uprintf("Volume is already mounted, but as %c: instead of %c: - Unmounting...", mounted_letter[0], drive_name[0]); if (!DeleteVolumeMountPointA(mounted_letter)) uprintf("Failed to unmount volume: %s", WindowsErrorString()); // Also delete the destination mountpoint if needed (Don't care about errors) @@ -912,16 +912,16 @@ BOOL MountVolume(char* drive_name, char *drive_guid) // with ERROR_DIR_NOT_EMPTY. If that's the case, just check that mountpoints match if (GetLastError() == ERROR_DIR_NOT_EMPTY) { if (!GetVolumeNameForVolumeMountPointA(drive_name, mounted_guid, sizeof(mounted_guid))) { - uprintf("%s already mounted, but volume GUID could not be checked: %s\n", + uprintf("%s already mounted, but volume GUID could not be checked: %s", drive_name, WindowsErrorString()); return FALSE; } if (safe_strcmp(drive_guid, mounted_guid) != 0) { - uprintf("%s already mounted, but volume GUID doesn't match:\r\n expected %s, got %s\n", + uprintf("%s already mounted, but volume GUID doesn't match:\r\n expected %s, got %s", drive_name, drive_guid, mounted_guid); return FALSE; } - uprintf("%s was already mounted as %s\n", drive_guid, drive_name); + uprintf("%s was already mounted as %s", drive_guid, drive_name); } else { return FALSE; } @@ -1179,7 +1179,7 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m DriveLayoutEx.PartitionEntry[pn].Mbr.PartitionType = 0x0c; // FAT32 LBA break; default: - uprintf("Unsupported file system\n"); + uprintf("Unsupported file system"); return FALSE; } } else { @@ -1274,14 +1274,14 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m size = sizeof(CreateDisk); r = DeviceIoControl(hDrive, IOCTL_DISK_CREATE_DISK, (BYTE*)&CreateDisk, size, NULL, 0, &size, NULL ); if (!r) { - uprintf("Could not reset disk: %s\n", WindowsErrorString()); + uprintf("Could not reset disk: %s", WindowsErrorString()); return FALSE; } size = sizeof(DriveLayoutEx) - ((partition_style == PARTITION_STYLE_GPT)?((4-pn)*sizeof(PARTITION_INFORMATION_EX)):0); r = DeviceIoControl(hDrive, IOCTL_DISK_SET_DRIVE_LAYOUT_EX, (BYTE*)&DriveLayoutEx, size, NULL, 0, &size, NULL ); if (!r) { - uprintf("Could not set drive layout: %s\n", WindowsErrorString()); + uprintf("Could not set drive layout: %s", WindowsErrorString()); return FALSE; } @@ -1299,7 +1299,7 @@ BOOL RefreshDriveLayout(HANDLE hDrive) // Diskpart does call the following IOCTL this after updating the partition table, so we do too r = DeviceIoControl(hDrive, IOCTL_DISK_UPDATE_PROPERTIES, NULL, 0, NULL, 0, &size, NULL ); if (!r) - uprintf("Could not refresh drive layout: %s\n", WindowsErrorString()); + uprintf("Could not refresh drive layout: %s", WindowsErrorString()); return r; } @@ -1316,14 +1316,14 @@ BOOL InitializeDisk(HANDLE hDrive) r = DeviceIoControl(hDrive, IOCTL_DISK_CREATE_DISK, (BYTE*)&CreateDisk, size, NULL, 0, &size, NULL ); if (!r) { - uprintf("Could not delete drive layout: %s\n", WindowsErrorString()); + uprintf("Could not delete drive layout: %s", WindowsErrorString()); safe_closehandle(hDrive); return FALSE; } r = DeviceIoControl(hDrive, IOCTL_DISK_UPDATE_PROPERTIES, NULL, 0, NULL, 0, &size, NULL ); if (!r) { - uprintf("Could not refresh drive layout: %s\n", WindowsErrorString()); + uprintf("Could not refresh drive layout: %s", WindowsErrorString()); safe_closehandle(hDrive); return FALSE; } diff --git a/src/pki.c b/src/pki.c index afdd414f..c724d725 100644 --- a/src/pki.c +++ b/src/pki.c @@ -157,12 +157,12 @@ char* GetSignatureName(const char* path) hm = GetModuleHandle(NULL); if (hm == NULL) { uprintf("PKI: Could not get current executable handle: %s", WinPKIErrorString()); - return NULL; + goto out; } dwSize = GetModuleFileNameW(hm, szFileName, MAX_PATH); if ((dwSize == 0) || ((dwSize == MAX_PATH) && (GetLastError() == ERROR_INSUFFICIENT_BUFFER))) { uprintf("PKI: Could not get module filename: %s", WinPKIErrorString()); - return NULL; + goto out; } mpath = wchar_to_utf8(szFileName); } else { @@ -308,10 +308,14 @@ static uint64_t GetNestedRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) // Loop through unauthenticated attributes for szOID_NESTED_SIGNATURE OID for (n = 0; ; n++) { - if (pNestedSignature != NULL) + if (pNestedSignature != NULL) { LocalFree(pNestedSignature); - if (hMsg != NULL) + pNestedSignature = NULL; + } + if (hMsg != NULL) { CryptMsgClose(hMsg); + hMsg = NULL; + } safe_free(pNestedSignerInfo); if (n >= pSignerInfo->UnauthAttrs.cAttr) break; diff --git a/src/rufus.c b/src/rufus.c index e3747190..eaa12486 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -1089,7 +1089,8 @@ DWORD WINAPI ISOScanThread(LPVOID param) } if (!dont_display_image_name) { for (i = (int)safe_strlen(image_path); (i > 0) && (image_path[i] != '\\'); i--); - PrintStatusDebug(0, MSG_205, &image_path[i + 1]); + PrintStatus(0, MSG_205, &image_path[i + 1]); + uprintf("Using image: %s (%s)", &image_path[i + 1], SizeToHumanReadable(img_report.image_size, FALSE, FALSE)); } // Lose the focus on the select ISO (but place it on Close) SendMessage(hMainDialog, WM_NEXTDLGCTL, (WPARAM)FALSE, 0); diff --git a/src/rufus.rc b/src/rufus.rc index a698218f..f9d3c8be 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1193" +CAPTION "Rufus 2.17.1194" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1193,0 - PRODUCTVERSION 2,17,1193,0 + FILEVERSION 2,17,1194,0 + PRODUCTVERSION 2,17,1194,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1193" + VALUE "FileVersion", "2.17.1194" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1193" + VALUE "ProductVersion", "2.17.1194" END END BLOCK "VarFileInfo" From f89f97d4abfb7033d771ae0c943d6b541c56862b Mon Sep 17 00:00:00 2001 From: Roberto Pino Date: Sat, 9 Sep 2017 00:14:26 +0100 Subject: [PATCH 75/97] [loc] update Dutch translation to latest --- res/localization/rufus.loc | 16 ++++++++++++---- src/rufus.rc | 10 +++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index c09ea44e..0e2835f7 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -4247,7 +4247,7 @@ t MSG_285 "Den hentede fil er signeret af '%s'.\nDet er ikke en signatur vi genk ################################################################################ l "nl-NL" "Dutch (Nederlands)" 0x0413, 0x0813 -v 1.0.21 +v 1.0.22 b "en-US" # Main dialog @@ -4535,9 +4535,9 @@ t MSG_116 "Deze image maakt gebruik van Grub %s maar de applicatie bevat alleen # Tooltips # Partition Scheme and Target Type t MSG_150 "Normaal gesproken de veiligste keuze. Als u een UEFI computer hebt maar u wilt " - "\neen besturingssysteem in EFI mode installeren, selecteer dan één van de andere opties" + "\neen besturingssysteem in EFI mode installeren, selecteer dan één van de andere opties" t MSG_151 "Gebruik deze optie als u een besturingssysteem in EFI mode wilt installeren, maar toegang nodig hebt tot\n" - "de USB inhoud van Windows XP" + "de USB inhoud van Windows XP" t MSG_152 "Aanbevolen optie om een besturingssysteem in EFI mode te installeren en wanneer USB toegang niet nodig is voor Windows XP" t MSG_153 "Test patroon: 0x%02X" t MSG_154 "Test patroon: 0x%02X, 0x%02X" @@ -4553,7 +4553,7 @@ t MSG_163 "Aanvinken om de USB drive opstartbaar te maken" t MSG_164 "Gebruikte methode om de drive opstartbaar te maken" t MSG_165 "Klik om een image te selecteren..." t MSG_166 "Vink aan om internationale labels te zien en een apparaat\n" - "pictogram in te stellen (creëert een autorun.inf bestand)" + "pictogram in te stellen (creëert een autorun.inf bestand)" t MSG_167 "Installeert een MBR die een opstartselectie toestaat en de BIOS USB drive ID kan verbergen" t MSG_168 "Probeert de eerste opstartbare USB drive (gewoonlijk 0x80) voor te laten doen als een andere disk.\n" "Dit is alleen nodig als u Windows XP installeert en meer dan één disk heeft" @@ -4710,6 +4710,14 @@ t MSG_291 "Versie selectie" t MSG_292 "Selecteer a.u.b. de windows versie die u wilt installeren:" t MSG_293 "Niet ondersteunde Windows versie" t MSG_294 "Deze Windows versie wordt niet langer ondersteund door Rufus." +t MSG_295 "Waarschuwing: Onofficiële versie" +t MSG_296 "Deze versie van Rufus is NIET gemaakt door de originele developer(s).\n\nWeet je zeker dat je dit programma wilt uitvoeren?" +t MSG_297 "Onvolledige ISO gedetecteerd" +t MSG_298 "Het ISO bestand dat u heeft geselecteerd komt niet overeen met de aangegeven waarde " + "grootte: %s van de data ontbreekt!\n\nAls u dit bestand van het " + "internet heeft gehaald, probeer een nieuwe kopie te downloaden en te verifiëren met de " + "MD5 of SHA checksums die overeenkomen met de officiële versie.\n\nU kunt de " + "MD5 of SHA in Rufus berekenen door op het '#' button te klikken." ################################################################################ l "fi-FI" "Finnish (Suomi)" 0x040B diff --git a/src/rufus.rc b/src/rufus.rc index f9d3c8be..b4122b38 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1194" +CAPTION "Rufus 2.17.1195" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1194,0 - PRODUCTVERSION 2,17,1194,0 + FILEVERSION 2,17,1195,0 + PRODUCTVERSION 2,17,1195,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1194" + VALUE "FileVersion", "2.17.1195" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1194" + VALUE "ProductVersion", "2.17.1195" END END BLOCK "VarFileInfo" From e3fbfb30d3260ca59ca98c034897ef3153c9d6d2 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 11 Sep 2017 12:13:47 +0100 Subject: [PATCH 76/97] [pki] add country code validation on signature check * Also validate against the CN rather than the simple name, and require an exact match --- src/pki.c | 42 ++++++++++++++++++++++++++++-------------- src/rufus.c | 2 +- src/rufus.h | 2 +- src/rufus.rc | 10 +++++----- 4 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/pki.c b/src/pki.c index c724d725..838d789c 100644 --- a/src/pki.c +++ b/src/pki.c @@ -40,8 +40,11 @@ #define szOID_NESTED_SIGNATURE "1.3.6.1.4.1.311.2.4.1" #endif -// Signatures names we accept (may be suffixed, but the signature should start with one of those) +// Signatures names we accept. Must be the the exact name, including capitalization, +// that CertGetNameStringA(CERT_NAME_ATTR_TYPE, szOID_COMMON_NAME) returns. const char* cert_name[3] = { "Akeo Consulting", "Akeo Systems", "Pete Batard" }; +// For added security, we also validate the country code of the certificate recipient. +const char* cert_country = "IE"; typedef struct { LPWSTR lpszProgramName; @@ -133,16 +136,17 @@ const char* WinPKIErrorString(void) } // Mostly from https://support.microsoft.com/en-us/kb/323809 -char* GetSignatureName(const char* path) +char* GetSignatureName(const char* path, const char* country_code) { static char szSubjectName[128]; + static char szCountry[3]; char *p = NULL, *mpath = NULL; BOOL r; HMODULE hm; HCERTSTORE hStore = NULL; HCRYPTMSG hMsg = NULL; PCCERT_CONTEXT pCertContext = NULL; - DWORD dwSize, dwEncoding, dwContentType, dwFormatType, dwSubjectSize; + DWORD dwSize, dwEncoding, dwContentType, dwFormatType; PCMSG_SIGNER_INFO pSignerInfo = NULL; DWORD dwSignerInfo = 0; CERT_INFO CertInfo = { 0 }; @@ -209,15 +213,29 @@ char* GetSignatureName(const char* path) goto out; } + // If a country code is provided, validate that the certificate we have is for the same country + if (country_code != NULL) { + dwSize = CertGetNameStringA(pCertContext, CERT_NAME_ATTR_TYPE, 0, szOID_COUNTRY_NAME, + szCountry, sizeof(szCountry)); + if (dwSize < 2) { + uprintf("PKI: Failed to get Country Code"); + goto out; + } + if (strcmpi(country_code, szCountry) != 0) { + uprintf("PKI: Unexpected Country Code (Found '%s', expected '%s')", szCountry, country_code); + goto out; + } + } + // Isolate the signing certificate subject name - dwSubjectSize = CertGetNameStringA(pCertContext, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, + dwSize = CertGetNameStringA(pCertContext, CERT_NAME_ATTR_TYPE, 0, szOID_COMMON_NAME, szSubjectName, sizeof(szSubjectName)); - if (dwSubjectSize <= 1) { + if (dwSize <= 1) { uprintf("PKI: Failed to get Subject Name"); goto out; } - uprintf("Downloaded executable is signed by '%s'", szSubjectName); + uprintf("Binary executable is signed by '%s' (%s)", szSubjectName, szCountry); p = szSubjectName; out: @@ -473,25 +491,21 @@ LONG ValidateSignature(HWND hDlg, const char* path) GUID guid_generic_verify = // WINTRUST_ACTION_GENERIC_VERIFY_V2 { 0xaac56b, 0xcd44, 0x11d0,{ 0x8c, 0xc2, 0x0, 0xc0, 0x4f, 0xc2, 0x95, 0xee } }; char *signature_name; - size_t i, len; + size_t i; uint64_t current_ts, update_ts; // Check the signature name. Make it specific enough (i.e. don't simply check for "Akeo") // so that, besides hacking our server, it'll place an extra hurdle on any malicious entity // into also fooling a C.A. to issue a certificate that passes our test. - signature_name = GetSignatureName(path); + signature_name = GetSignatureName(path, cert_country); if (signature_name == NULL) { uprintf("PKI: Could not get signature name"); MessageBoxExU(hDlg, lmprintf(MSG_284), lmprintf(MSG_283), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid); return TRUST_E_NOSIGNATURE; } for (i = 0; i < ARRAYSIZE(cert_name); i++) { - len = strlen(cert_name[i]); - if (strncmp(signature_name, cert_name[i], len) == 0) { - // Test for whitespace after the part we match, for added safety - if ((len >= strlen(signature_name)) || isspace(signature_name[len])) - break; - } + if (strcmp(signature_name, cert_name[i]) == 0) + break; } if (i >= ARRAYSIZE(cert_name)) { uprintf("PKI: Signature '%s' is unexpected...", signature_name); diff --git a/src/rufus.c b/src/rufus.c index eaa12486..c0787c35 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -3166,7 +3166,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine // Look for a .ini file in the current app directory static_sprintf(ini_path, "%s\\rufus.ini", app_dir); fd = fopenU(ini_path, ini_flags); // Will create the file if portable mode is requested - vc |= (safe_strcmp(GetSignatureName(NULL), cert_name[0]) == 0); + vc |= (safe_strcmp(GetSignatureName(NULL, NULL), cert_name[0]) == 0); if (fd != NULL) { ini_file = ini_path; fclose(fd); diff --git a/src/rufus.h b/src/rufus.h index 113b846f..e2a6195d 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -488,7 +488,7 @@ extern BOOL IsBootableImage(const char* path); extern BOOL AppendVHDFooter(const char* vhd_path); extern int SetWinToGoIndex(void); extern int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid); -extern char* GetSignatureName(const char* path); +extern char* GetSignatureName(const char* path, const char* country_code); extern uint64_t GetSignatureTimeStamp(const char* path); extern LONG ValidateSignature(HWND hDlg, const char* path); extern BOOL IsFontAvailable(const char* font_name); diff --git a/src/rufus.rc b/src/rufus.rc index b4122b38..397c08a0 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1195" +CAPTION "Rufus 2.17.1196" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1195,0 - PRODUCTVERSION 2,17,1195,0 + FILEVERSION 2,17,1196,0 + PRODUCTVERSION 2,17,1196,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1195" + VALUE "FileVersion", "2.17.1196" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1195" + VALUE "ProductVersion", "2.17.1196" END END BLOCK "VarFileInfo" From 92c05556d17769465ec161d5ad65cb2f2a7c03b4 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 11 Sep 2017 19:06:51 +0100 Subject: [PATCH 77/97] [iso] add a warning for unsupported multi-extent ISO-9660 files * This is related to issue #1007, which libcdio still needs to fix. --- src/libcdio/iso9660/iso9660_fs.c | 6 ++++++ src/rufus.rc | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/libcdio/iso9660/iso9660_fs.c b/src/libcdio/iso9660/iso9660_fs.c index 86561663..646daaaf 100644 --- a/src/libcdio/iso9660/iso9660_fs.c +++ b/src/libcdio/iso9660/iso9660_fs.c @@ -799,6 +799,12 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, } } + if (p_iso9660_dir->file_flags & ISO_MULTIEXTENT) + { + cdio_warn("Can't handle multi-extent file '%s' - Data will be truncated!", p_stat->filename); + free(p_stat); + return NULL; + } iso9660_get_dtime(&(p_iso9660_dir->recording_time), true, &(p_stat->tm)); diff --git a/src/rufus.rc b/src/rufus.rc index 397c08a0..5270a8db 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1196" +CAPTION "Rufus 2.17.1197" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1196,0 - PRODUCTVERSION 2,17,1196,0 + FILEVERSION 2,17,1197,0 + PRODUCTVERSION 2,17,1197,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1196" + VALUE "FileVersion", "2.17.1197" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1196" + VALUE "ProductVersion", "2.17.1197" END END BLOCK "VarFileInfo" From 14d2a629c91350acb2859bddde201732a518627e Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 12 Sep 2017 10:45:45 +0100 Subject: [PATCH 78/97] v2.17 (build 1198) --- ChangeLog.txt | 2 +- res/appstore/AppxManifest.xml | 2 +- src/rufus.rc | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 6f4e02b7..45ab4964 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,4 @@ -o Version 2.17 (2017.09.??) +o Version 2.17 (2017.09.12) Add support for Debian 9 live ISOs in UEFI mode Add support for Super Floppy Disk "partitioning" mode Add support for more non-USB card readers diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml index 88e18572..a85da28c 100644 --- a/res/appstore/AppxManifest.xml +++ b/res/appstore/AppxManifest.xml @@ -8,7 +8,7 @@ for an interesting struggle, when you also happen to have a comma in one of the fields... --> diff --git a/src/rufus.rc b/src/rufus.rc index 5270a8db..870b32fd 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1197" +CAPTION "Rufus 2.17.1198" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1197,0 - PRODUCTVERSION 2,17,1197,0 + FILEVERSION 2,17,1198,0 + PRODUCTVERSION 2,17,1198,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1197" + VALUE "FileVersion", "2.17.1198" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1197" + VALUE "ProductVersion", "2.17.1198" END END BLOCK "VarFileInfo" From 44c9cb0b826a9cf6bd1ed7a251aa731285d83e41 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 14 Sep 2017 17:30:41 +0100 Subject: [PATCH 79/97] [iso] add support for ISO9660 multiextent files * Closes #1007 --- src/iso.c | 79 +++++++------ src/libcdio/cdio/iso9660.h | 15 ++- src/libcdio/iso9660/iso9660_fs.c | 189 ++++++++++++++++++------------- src/rufus.c | 9 +- src/rufus.rc | 10 +- 5 files changed, 177 insertions(+), 125 deletions(-) diff --git a/src/iso.c b/src/iso.c index 8574c71f..cbecbdd5 100644 --- a/src/iso.c +++ b/src/iso.c @@ -498,7 +498,7 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path) CdioListNode_t* p_entnode; iso9660_stat_t *p_statbuf; CdioList_t* p_entlist; - size_t i; + size_t i, j; lsn_t lsn; int64_t i_file_length; @@ -552,7 +552,7 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path) if (iso_extract_files(p_iso, psz_iso_name)) goto out; } else { - i_file_length = p_statbuf->size; + i_file_length = p_statbuf->total_size; if (check_iso_props(psz_path, i_file_length, psz_basename, psz_fullpath, &props)) { continue; } @@ -586,24 +586,27 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path) uprintf(stupid_antivirus); else goto out; - } else for (i=0; i_file_length>0; i++) { - if (FormatStatus) goto out; - memset(buf, 0, ISO_BLOCKSIZE); - lsn = p_statbuf->lsn + (lsn_t)i; - if (iso9660_iso_seek_read(p_iso, buf, lsn, 1) != ISO_BLOCKSIZE) { - uprintf(" Error reading ISO9660 file %s at LSN %lu", - psz_iso_name, (long unsigned int)lsn); - goto out; + } else for (j=0; jextents; j++) { + i_file_length = p_statbuf->size[j]; + for (i=0; i_file_length>0; i++) { + if (FormatStatus) goto out; + memset(buf, 0, ISO_BLOCKSIZE); + lsn = p_statbuf->lsn[j] + (lsn_t)i; + if (iso9660_iso_seek_read(p_iso, buf, lsn, 1) != ISO_BLOCKSIZE) { + uprintf(" Error reading ISO9660 file %s at LSN %lu", + psz_iso_name, (long unsigned int)lsn); + goto out; + } + buf_size = (DWORD)MIN(i_file_length, ISO_BLOCKSIZE); + ISO_BLOCKING(r = WriteFileWithRetry(file_handle, buf, buf_size, &wr_size, WRITE_RETRIES)); + if (!r) { + uprintf(" Error writing file: %s", WindowsErrorString()); + goto out; + } + i_file_length -= ISO_BLOCKSIZE; + if (nb_blocks++ % PROGRESS_THRESHOLD == 0) + UpdateProgress(OP_DOS, 100.0f*nb_blocks/total_blocks); } - buf_size = (DWORD)MIN(i_file_length, ISO_BLOCKSIZE); - ISO_BLOCKING(r = WriteFileWithRetry(file_handle, buf, buf_size, &wr_size, WRITE_RETRIES)); - if (!r) { - uprintf(" Error writing file: %s", WindowsErrorString()); - goto out; - } - i_file_length -= ISO_BLOCKSIZE; - if (nb_blocks++ % PROGRESS_THRESHOLD == 0) - UpdateProgress(OP_DOS, 100.0f*nb_blocks/total_blocks); } if (preserve_timestamps) { LPFILETIME ft = to_filetime(mktime(&p_statbuf->tm)); @@ -944,7 +947,7 @@ out: int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_file, DWORD attributes) { - size_t i; + size_t i, j; ssize_t read_size; int64_t file_length, r = 0; char buf[UDF_BLOCKSIZE]; @@ -1009,21 +1012,23 @@ try_iso: goto out; } - file_length = p_statbuf->size; - for (i = 0; file_length > 0; i++) { - memset(buf, 0, ISO_BLOCKSIZE); - lsn = p_statbuf->lsn + (lsn_t)i; - if (iso9660_iso_seek_read(p_iso, buf, lsn, 1) != ISO_BLOCKSIZE) { - uprintf(" Error reading ISO9660 file %s at LSN %lu", iso_file, (long unsigned int)lsn); - goto out; + for (j = 0; j < p_statbuf->extents; j++) { + file_length = p_statbuf->size[j]; + for (i = 0; file_length > 0; i++) { + memset(buf, 0, ISO_BLOCKSIZE); + lsn = p_statbuf->lsn[j] + (lsn_t)i; + if (iso9660_iso_seek_read(p_iso, buf, lsn, 1) != ISO_BLOCKSIZE) { + uprintf(" Error reading ISO9660 file %s at LSN %lu", iso_file, (long unsigned int)lsn); + goto out; + } + buf_size = (DWORD)MIN(file_length, ISO_BLOCKSIZE); + if (!WriteFileWithRetry(file_handle, buf, buf_size, &wr_size, WRITE_RETRIES)) { + uprintf(" Error writing file %s: %s", dest_file, WindowsErrorString()); + goto out; + } + file_length -= ISO_BLOCKSIZE; + r += ISO_BLOCKSIZE; } - buf_size = (DWORD)MIN(file_length, ISO_BLOCKSIZE); - if (!WriteFileWithRetry(file_handle, buf, buf_size, &wr_size, WRITE_RETRIES)) { - uprintf(" Error writing file %s: %s", dest_file, WindowsErrorString()); - goto out; - } - file_length -= ISO_BLOCKSIZE; - r += ISO_BLOCKSIZE; } out: @@ -1092,8 +1097,8 @@ try_iso: uprintf("Could not get ISO-9660 file information for file %s", wim_path); goto out; } - if (iso9660_iso_seek_read(p_iso, buf, p_statbuf->lsn, 1) != ISO_BLOCKSIZE) { - uprintf("Error reading ISO-9660 file %s at LSN %lu", wim_path, (long unsigned int)p_statbuf->lsn); + if (iso9660_iso_seek_read(p_iso, buf, p_statbuf->lsn[0], 1) != ISO_BLOCKSIZE) { + uprintf("Error reading ISO-9660 file %s at LSN %d", wim_path, p_statbuf->lsn[0]); goto out; } r = wim_header[3]; @@ -1190,7 +1195,7 @@ BOOL ExtractEfiImgFiles(const char* dir) if (p_private == NULL) goto out; p_private->p_iso = p_iso; - p_private->lsn = p_statbuf->lsn; + p_private->lsn = p_statbuf->lsn[0]; // Image should be small enough not to use multiextents p_private->sec_start = 0; // Populate our intial buffer if (iso9660_iso_seek_read(p_private->p_iso, p_private->buf, p_private->lsn, ISO_NB_BLOCKS) != ISO_NB_BLOCKS * ISO_BLOCKSIZE) { diff --git a/src/libcdio/cdio/iso9660.h b/src/libcdio/cdio/iso9660.h index 829ab1a6..22d73942 100644 --- a/src/libcdio/cdio/iso9660.h +++ b/src/libcdio/cdio/iso9660.h @@ -156,6 +156,9 @@ extern enum iso_vd_enum_s { /*! \brief Maximum number of characters in a volume-set id. */ #define ISO_MAX_VOLUMESET_ID 128 +/*! \brief Maximum number of multi file extent licdio supports. */ +#define ISO_MAX_MULTIEXTENT 8 + /*! String inside frame which identifies an ISO 9660 filesystem. This string is the "id" field of an iso9660_pvd_t or an iso9660_svd_t. */ @@ -517,17 +520,19 @@ PRAGMA_END_PACKED */ struct iso9660_stat_s { /* big endian!! */ - iso_rock_statbuf_t rr; /**< Rock Ridge-specific fields */ + iso_rock_statbuf_t rr; /**< Rock Ridge-specific fields */ struct tm tm; /**< time on entry - FIXME merge with one of entries above, like ctime? */ - lsn_t lsn; /**< start logical sector number */ - uint32_t size; /**< total size in bytes */ - uint32_t secsize; /**< number of sectors allocated */ + uint64_t total_size; /**< total size in bytes */ + uint8_t extents; /**< number of multiextents */ + lsn_t lsn[ISO_MAX_MULTIEXTENT]; /**< start logical sector number for each extent */ + uint32_t size[ISO_MAX_MULTIEXTENT]; /**< size of each extent */ + uint32_t secsize[ISO_MAX_MULTIEXTENT]; /**< number of sectors allocated for each extent*/ iso9660_xa_t xa; /**< XA attributes */ enum { _STAT_FILE = 1, _STAT_DIR = 2 } type; bool b_xa; - char filename[EMPTY_ARRAY_SIZE]; /**< filename */ + char filename[EMPTY_ARRAY_SIZE]; /**< filename */ }; /** A mask used in iso9660_ifs_read_vd which allows what kinds diff --git a/src/libcdio/iso9660/iso9660_fs.c b/src/libcdio/iso9660/iso9660_fs.c index 646daaaf..c0bd2249 100644 --- a/src/libcdio/iso9660/iso9660_fs.c +++ b/src/libcdio/iso9660/iso9660_fs.c @@ -709,14 +709,17 @@ iso9660_iso_seek_read (const iso9660_t *p_iso, void *ptr, lsn_t start, static iso9660_stat_t * -_iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, - uint8_t u_joliet_level) +_iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, + iso9660_stat_t *last_p_stat, + bool_3way_t b_xa, uint8_t u_joliet_level) { uint8_t dir_len= iso9660_get_dir_len(p_iso9660_dir); iso711_t i_fname; unsigned int stat_len; - iso9660_stat_t *p_stat; + iso9660_stat_t *p_stat = last_p_stat; bool err; + char rr_fname[256] = ""; + int i_rr_fname; if (!dir_len) return NULL; @@ -725,7 +728,9 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, /* .. string in statbuf is one longer than in p_iso9660_dir's listing '\1' */ stat_len = sizeof(iso9660_stat_t)+i_fname+2; - p_stat = calloc(1, stat_len); + /* Reuse multiextent p_stat if not NULL */ + if (!p_stat) + p_stat = calloc(1, stat_len); if (!p_stat) { cdio_warn("Couldn't calloc(1, %d)", stat_len); @@ -733,24 +738,33 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, } p_stat->type = (p_iso9660_dir->file_flags & ISO_DIRECTORY) ? _STAT_DIR : _STAT_FILE; - p_stat->lsn = from_733_with_err (p_iso9660_dir->extent, &err); + p_stat->lsn[p_stat->extents] = from_733_with_err (p_iso9660_dir->extent, &err); if (err) { free(p_stat); return NULL; } - p_stat->size = from_733_with_err (p_iso9660_dir->size, &err); + p_stat->size[p_stat->extents] = from_733_with_err (p_iso9660_dir->size, &err); + p_stat->total_size += p_stat->size[p_stat->extents]; if (err) { free(p_stat); return NULL; } - p_stat->secsize = _cdio_len2blocks (p_stat->size, ISO_BLOCKSIZE); + p_stat->secsize[p_stat->extents] = _cdio_len2blocks (p_stat->size[p_stat->extents], ISO_BLOCKSIZE); p_stat->rr.b3_rock = dunno; /*FIXME should do based on mask */ p_stat->b_xa = false; + /* Only resolve the full filename when we're not dealing with extent */ + if ((p_iso9660_dir->file_flags & ISO_MULTIEXTENT) == 0) { - char rr_fname[256] = ""; - - int i_rr_fname = + /* Check if this is the last part of a multiextent file */ + if (p_stat->extents != 0) { + if (strcmp(p_stat->filename, &p_iso9660_dir->filename.str[1]) != 0) { + cdio_warn("Warning: Non consecutive multiextent file parts for '%s'", p_stat->filename); + free(p_stat); + return NULL; + } + } + i_rr_fname = #ifdef HAVE_ROCK get_rock_ridge_filename(p_iso9660_dir, rr_fname, p_stat); #else @@ -797,13 +811,16 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, strncpy (p_stat->filename, &p_iso9660_dir->filename.str[1], i_fname); } } + } else { + /* Use the plain ISO-9660 name when dealing with a multiextent file part */ + strncpy(p_stat->filename, &p_iso9660_dir->filename.str[1], i_fname); } - - if (p_iso9660_dir->file_flags & ISO_MULTIEXTENT) - { - cdio_warn("Can't handle multi-extent file '%s' - Data will be truncated!", p_stat->filename); - free(p_stat); - return NULL; + p_stat->extents++; + if (p_stat->extents > ISO_MAX_MULTIEXTENT) { + cdio_warn("Warning: Too many multiextent file parts for '%s'", p_stat->filename); + free(p_stat->rr.psz_symlink); + free(p_stat); + return NULL; } iso9660_get_dtime(&(p_iso9660_dir->recording_time), true, &(p_stat->tm)); @@ -927,8 +944,8 @@ _fs_stat_root (CdIo_t *p_cdio) p_iso9660_dir = &(p_env->pvd.root_directory_record) ; #endif - p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, b_xa, - p_env->u_joliet_level); + p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, NULL, + b_xa, p_env->u_joliet_level); return p_stat; } @@ -948,7 +965,8 @@ _ifs_stat_root (iso9660_t *p_iso) p_iso9660_dir = &(p_iso->pvd.root_directory_record) ; #endif - p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa, + p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, NULL, + p_iso->b_xa, p_iso->u_joliet_level); return p_stat; } @@ -980,18 +998,18 @@ _fs_stat_traverse (const CdIo_t *p_cdio, const iso9660_stat_t *_root, cdio_assert (_root->type == _STAT_DIR); - _dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE); + _dirbuf = calloc(1, _root->secsize[0] * ISO_BLOCKSIZE); if (!_dirbuf) { - cdio_warn("Couldn't calloc(1, %d)", _root->secsize * ISO_BLOCKSIZE); + cdio_warn("Couldn't calloc(1, %d)", _root->secsize[0] * ISO_BLOCKSIZE); return NULL; } - if (cdio_read_data_sectors (p_cdio, _dirbuf, _root->lsn, ISO_BLOCKSIZE, - _root->secsize)) + if (cdio_read_data_sectors (p_cdio, _dirbuf, _root->lsn[0], ISO_BLOCKSIZE, + _root->secsize[0])) return NULL; - while (offset < (_root->secsize * ISO_BLOCKSIZE)) + while (offset < (_root->secsize[0] * ISO_BLOCKSIZE)) { iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; iso9660_stat_t *p_iso9660_stat; @@ -1003,8 +1021,8 @@ _fs_stat_traverse (const CdIo_t *p_cdio, const iso9660_stat_t *_root, continue; } - p_iso9660_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, dunno, - p_env->u_joliet_level); + p_iso9660_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, NULL, + dunno, p_env->u_joliet_level); cmp = strcmp(splitpath[0], p_iso9660_stat->filename); @@ -1043,7 +1061,7 @@ _fs_stat_traverse (const CdIo_t *p_cdio, const iso9660_stat_t *_root, offset += iso9660_get_dir_len(p_iso9660_dir); } - cdio_assert (offset == (_root->secsize * ISO_BLOCKSIZE)); + cdio_assert (offset == (_root->secsize[0] * ISO_BLOCKSIZE)); /* not found */ free (_dirbuf); @@ -1054,13 +1072,14 @@ static iso9660_stat_t * _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, char **splitpath) { - unsigned offset = 0; + unsigned offset; uint8_t *_dirbuf = NULL; int ret; + iso9660_stat_t *p_stat = NULL; + iso9660_dir_t *p_iso9660_dir = NULL; if (!splitpath[0]) { - iso9660_stat_t *p_stat; unsigned int len=sizeof(iso9660_stat_t) + strlen(_root->filename)+1; p_stat = calloc(1, len); cdio_assert (p_stat != NULL); @@ -1077,20 +1096,20 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, cdio_assert (_root->type == _STAT_DIR); - _dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE); + _dirbuf = calloc(1, _root->secsize[0] * ISO_BLOCKSIZE); if (!_dirbuf) { - cdio_warn("Couldn't calloc(1, %d)", _root->secsize * ISO_BLOCKSIZE); + cdio_warn("Couldn't calloc(1, %d)", _root->secsize[0] * ISO_BLOCKSIZE); return NULL; } - ret = iso9660_iso_seek_read (p_iso, _dirbuf, _root->lsn, _root->secsize); - if (ret!=ISO_BLOCKSIZE*_root->secsize) return NULL; + ret = iso9660_iso_seek_read (p_iso, _dirbuf, _root->lsn[0], _root->secsize[0]); + if (ret!=ISO_BLOCKSIZE*_root->secsize[0]) return NULL; - while (offset < (_root->secsize * ISO_BLOCKSIZE)) + for (offset = 0; offset < (_root->secsize[0] * ISO_BLOCKSIZE); + offset += iso9660_get_dir_len(p_iso9660_dir)) { - iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; - iso9660_stat_t *p_stat; + p_iso9660_dir = (void *) &_dirbuf[offset]; int cmp; if (!iso9660_get_dir_len(p_iso9660_dir)) @@ -1099,8 +1118,8 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, continue; } - p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa, - p_iso->u_joliet_level); + p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_stat, + p_iso->b_xa, p_iso->u_joliet_level); if (!p_stat) { cdio_warn("Bad directory information for %s", splitpath[0]); @@ -1108,6 +1127,10 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, return NULL; } + /* If we have multiextent file parts, loop until the last one */ + if (p_iso9660_dir->file_flags & ISO_MULTIEXTENT) + continue; + cmp = strcmp(splitpath[0], p_stat->filename); if ( 0 != cmp && 0 == p_iso->u_joliet_level @@ -1141,11 +1164,10 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, free(p_stat->rr.psz_symlink); free(p_stat); - - offset += iso9660_get_dir_len(p_iso9660_dir); + p_stat = NULL; } - cdio_assert (offset == (_root->secsize * ISO_BLOCKSIZE)); + cdio_assert (offset == (_root->secsize[0] * ISO_BLOCKSIZE)); /* not found */ free (_dirbuf); @@ -1268,6 +1290,8 @@ CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[], bool b_mode2) { generic_img_private_t *p_env; + iso9660_dir_t *p_iso9660_dir; + iso9660_stat_t *p_iso9660_stat = NULL; iso9660_stat_t *p_stat; if (!p_cdio) return NULL; @@ -1289,24 +1313,23 @@ iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[], bool b_mode2) uint8_t *_dirbuf = NULL; CdioList_t *retval = _cdio_list_new (); - _dirbuf = calloc(1, p_stat->secsize * ISO_BLOCKSIZE); + _dirbuf = calloc(1, p_stat->secsize[0] * ISO_BLOCKSIZE); if (!_dirbuf) { - cdio_warn("Couldn't calloc(1, %d)", p_stat->secsize * ISO_BLOCKSIZE); + cdio_warn("Couldn't calloc(1, %d)", p_stat->secsize[0] * ISO_BLOCKSIZE); _cdio_list_free (retval, true); return NULL; } - if (cdio_read_data_sectors (p_cdio, _dirbuf, p_stat->lsn, - ISO_BLOCKSIZE, p_stat->secsize)) { + if (cdio_read_data_sectors (p_cdio, _dirbuf, p_stat->lsn[0], + ISO_BLOCKSIZE, p_stat->secsize[0])) { _cdio_list_free (retval, true); return NULL; } - while (offset < (p_stat->secsize * ISO_BLOCKSIZE)) + while (offset < (p_stat->secsize[0] * ISO_BLOCKSIZE)) { - iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; - iso9660_stat_t *p_iso9660_stat; + p_iso9660_dir = (void *) &_dirbuf[offset]; if (!iso9660_get_dir_len(p_iso9660_dir)) { @@ -1314,14 +1337,20 @@ iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[], bool b_mode2) continue; } - p_iso9660_stat = _iso9660_dir_to_statbuf(p_iso9660_dir, dunno, + p_iso9660_stat = _iso9660_dir_to_statbuf(p_iso9660_dir, + p_iso9660_stat, dunno, p_env->u_joliet_level); - _cdio_list_append (retval, p_iso9660_stat); + if ((p_iso9660_stat) && + ((p_iso9660_dir->file_flags & ISO_MULTIEXTENT) == 0)) + { + _cdio_list_append (retval, p_iso9660_stat); + p_iso9660_stat = NULL; + } offset += iso9660_get_dir_len(p_iso9660_dir); } - cdio_assert (offset == (p_stat->secsize * ISO_BLOCKSIZE)); + cdio_assert (offset == (p_stat->secsize[0] * ISO_BLOCKSIZE)); free (_dirbuf); free (p_stat); @@ -1336,6 +1365,8 @@ iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[], bool b_mode2) CdioList_t * iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]) { + iso9660_dir_t *p_iso9660_dir; + iso9660_stat_t *p_iso9660_stat = NULL; iso9660_stat_t *p_stat; if (!p_iso) return NULL; @@ -1355,12 +1386,12 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]) unsigned offset = 0; uint8_t *_dirbuf = NULL; CdioList_t *retval = _cdio_list_new (); - const size_t dirbuf_len = p_stat->secsize * ISO_BLOCKSIZE; + const size_t dirbuf_len = p_stat->secsize[0] * ISO_BLOCKSIZE; if (!dirbuf_len) { - cdio_warn("Invalid directory buffer sector size %u", p_stat->secsize); + cdio_warn("Invalid directory buffer sector size %u", p_stat->secsize[0]); free(p_stat->rr.psz_symlink); free(p_stat); _cdio_list_free (retval, true); @@ -1377,7 +1408,7 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]) return NULL; } - ret = iso9660_iso_seek_read (p_iso, _dirbuf, p_stat->lsn, p_stat->secsize); + ret = iso9660_iso_seek_read (p_iso, _dirbuf, p_stat->lsn[0], p_stat->secsize[0]); if (ret != dirbuf_len) { _cdio_list_free (retval, true); free(p_stat->rr.psz_symlink); @@ -1388,8 +1419,7 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]) while (offset < (dirbuf_len)) { - iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; - iso9660_stat_t *p_iso9660_stat; + p_iso9660_dir = (void *) &_dirbuf[offset]; if (!iso9660_get_dir_len(p_iso9660_dir)) { @@ -1397,11 +1427,16 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]) continue; } - p_iso9660_stat = _iso9660_dir_to_statbuf(p_iso9660_dir, p_iso->b_xa, + p_iso9660_stat = _iso9660_dir_to_statbuf(p_iso9660_dir, + p_iso9660_stat, + p_iso->b_xa, p_iso->u_joliet_level); - - if (p_iso9660_stat) - _cdio_list_append (retval, p_iso9660_stat); + if ((p_iso9660_stat) && + ((p_iso9660_dir->file_flags & ISO_MULTIEXTENT) == 0)) + { + _cdio_list_append(retval, p_iso9660_stat); + p_iso9660_stat = NULL; + } offset += iso9660_get_dir_len(p_iso9660_dir); } @@ -1440,6 +1475,7 @@ find_lsn_recurse (void *p_image, iso9660_readdir_t iso9660_readdir, iso9660_stat_t *statbuf = _cdio_list_node_data (entnode); const char *psz_filename = (char *) statbuf->filename; unsigned int len = strlen(psz_path) + strlen(psz_filename)+2; + size_t extent; if (*ppsz_full_filename != NULL) free(*ppsz_full_filename); *ppsz_full_filename = calloc(1, len); @@ -1451,19 +1487,20 @@ find_lsn_recurse (void *p_image, iso9660_readdir_t iso9660_readdir, _cdio_list_append (dirlist, strdup(*ppsz_full_filename)); } - if (statbuf->lsn == lsn) { - const unsigned int len2 = sizeof(iso9660_stat_t)+strlen(statbuf->filename)+1; - iso9660_stat_t *ret_stat = calloc(1, len2); - if (!ret_stat) - { + for (extent = 0; extent < statbuf->extents; extent++) { + if (statbuf->lsn[extent] == lsn) { + const unsigned int len2 = sizeof(iso9660_stat_t)+strlen(statbuf->filename)+1; + iso9660_stat_t *ret_stat = calloc(1, len2); + if (!ret_stat) { _cdio_list_free (dirlist, true); cdio_warn("Couldn't calloc(1, %d)", len2); return NULL; } - memcpy(ret_stat, statbuf, len2); - _cdio_list_free (entlist, true); - _cdio_list_free (dirlist, true); - return ret_stat; + memcpy(ret_stat, statbuf, len2); + _cdio_list_free (entlist, true); + _cdio_list_free (dirlist, true); + return ret_stat; + } } } @@ -1588,17 +1625,17 @@ iso_have_rr_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, cdio_assert (_root->type == _STAT_DIR); - _dirbuf = calloc(1, _root->secsize * ISO_BLOCKSIZE); + _dirbuf = calloc(1, _root->secsize[0] * ISO_BLOCKSIZE); if (!_dirbuf) { - cdio_warn("Couldn't calloc(1, %d)", _root->secsize * ISO_BLOCKSIZE); + cdio_warn("Couldn't calloc(1, %d)", _root->secsize[0] * ISO_BLOCKSIZE); return dunno; } - ret = iso9660_iso_seek_read (p_iso, _dirbuf, _root->lsn, _root->secsize); - if (ret!=ISO_BLOCKSIZE*_root->secsize) return false; + ret = iso9660_iso_seek_read (p_iso, _dirbuf, _root->lsn[0], _root->secsize[0]); + if (ret!=ISO_BLOCKSIZE*_root->secsize[0]) return false; - while (offset < (_root->secsize * ISO_BLOCKSIZE)) + while (offset < (_root->secsize[0] * ISO_BLOCKSIZE)) { iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; iso9660_stat_t *p_stat; @@ -1609,7 +1646,7 @@ iso_have_rr_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, continue; } - p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa, + p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, NULL, p_iso->b_xa, p_iso->u_joliet_level); have_rr = p_stat->rr.b3_rock; if ( have_rr != yep) { @@ -1629,7 +1666,7 @@ iso_have_rr_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, } } - cdio_assert (offset == (_root->secsize * ISO_BLOCKSIZE)); + cdio_assert (offset == (_root->secsize[0] * ISO_BLOCKSIZE)); /* not found */ free (_dirbuf); diff --git a/src/rufus.c b/src/rufus.c index c0787c35..903daae9 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -484,9 +484,14 @@ static void SetFSFromISO(void) fs_mask |= 1< Date: Thu, 14 Sep 2017 19:06:04 +0100 Subject: [PATCH 80/97] [misc] fix VS2017 code analysis warnings * Also set rufus-next to 2.18 --- configure | 20 ++++++++++---------- configure.ac | 2 +- res/appstore/AppxManifest.xml | 2 +- res/appstore/packme.cmd | 2 +- src/checksum.c | 8 ++++---- src/pki.c | 4 ++-- src/registry.h | 20 ++++++++++---------- src/rufus.rc | 10 +++++----- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/configure b/configure index 535b2d0a..5ad1c2a2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for rufus 2.17. +# Generated by GNU Autoconf 2.69 for rufus 2.18. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='rufus' PACKAGE_TARNAME='rufus' -PACKAGE_VERSION='2.17' -PACKAGE_STRING='rufus 2.17' +PACKAGE_VERSION='2.18' +PACKAGE_STRING='rufus 2.18' PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues' PACKAGE_URL='https://rufus.akeo.ie' @@ -1228,7 +1228,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rufus 2.17 to adapt to many kinds of systems. +\`configure' configures rufus 2.18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1294,7 +1294,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rufus 2.17:";; + short | recursive ) echo "Configuration of rufus 2.18:";; esac cat <<\_ACEOF @@ -1385,7 +1385,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rufus configure 2.17 +rufus configure 2.18 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1440,7 +1440,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rufus $as_me 2.17, which was +It was created by rufus $as_me 2.18, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2303,7 +2303,7 @@ fi # Define the identity of the package. PACKAGE='rufus' - VERSION='2.17' + VERSION='2.18' cat >>confdefs.h <<_ACEOF @@ -4483,7 +4483,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rufus $as_me 2.17, which was +This file was extended by rufus $as_me 2.18, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4537,7 +4537,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -rufus config.status 2.17 +rufus config.status 2.18 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 339ab2aa..72d493ba 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([rufus], [2.17], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie]) +AC_INIT([rufus], [2.18], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie]) AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies]) AC_CONFIG_SRCDIR([src/rufus.c]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml index a85da28c..a7ab7892 100644 --- a/res/appstore/AppxManifest.xml +++ b/res/appstore/AppxManifest.xml @@ -8,7 +8,7 @@ for an interesting struggle, when you also happen to have a comma in one of the fields... --> diff --git a/res/appstore/packme.cmd b/res/appstore/packme.cmd index 11e33f84..cd182eb9 100644 --- a/res/appstore/packme.cmd +++ b/res/appstore/packme.cmd @@ -1,5 +1,5 @@ @echo off -set VERSION=2.17 +set VERSION=2.18 rem Make sure you don't have anything you don't want included in the package, as anything residing in the rem current directory will be included, including any previous .appx, which makes for nice recursion... diff --git a/src/checksum.c b/src/checksum.c index bcb68693..27d4443a 100644 --- a/src/checksum.c +++ b/src/checksum.c @@ -66,7 +66,7 @@ /* Globals */ char sum_str[CHECKSUM_MAX][65]; uint32_t bufnum, sum_count[CHECKSUM_MAX] = { 16, 20, 32 }; -HANDLE data_ready[CHECKSUM_MAX], thread_ready[CHECKSUM_MAX]; +HANDLE data_ready[CHECKSUM_MAX] = { 0 }, thread_ready[CHECKSUM_MAX] = { 0 }; DWORD read_size[2]; unsigned char ALIGNED(64) buffer[2][BUFFER_SIZE]; @@ -886,7 +886,7 @@ DWORD WINAPI SumThread(void* param) float format_percent = 0.0f; if ((image_path == NULL) || (thread_affinity == NULL)) - goto out; + ExitThread(r); uprintf("\r\nComputing checksum for '%s'...", image_path); @@ -985,8 +985,8 @@ out: for (i = 0; i < CHECKSUM_MAX; i++) { if (sum_thread[i] != NULL) TerminateThread(sum_thread[i], 1); - CloseHandle(data_ready[i]); - CloseHandle(thread_ready[i]); + safe_closehandle(data_ready[i]); + safe_closehandle(thread_ready[i]); } safe_closehandle(h); PostMessage(hMainDialog, UM_FORMAT_COMPLETED, (WPARAM)FALSE, 0); diff --git a/src/pki.c b/src/pki.c index 838d789c..7f7ead8b 100644 --- a/src/pki.c +++ b/src/pki.c @@ -258,7 +258,7 @@ out: static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) { BOOL r, found = FALSE; - DWORD n, dwSize; + DWORD n, dwSize = 0; PCRYPT_CONTENT_INFO pCounterSignerInfo = NULL; uint64_t ts = 0ULL; uint8_t *timestamp_token; @@ -318,7 +318,7 @@ static uint64_t GetRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) static uint64_t GetNestedRFC3161TimeStamp(PCMSG_SIGNER_INFO pSignerInfo) { BOOL r, found = FALSE; - DWORD n, dwSize; + DWORD n, dwSize = 0; PCRYPT_CONTENT_INFO pNestedSignature = NULL; PCMSG_SIGNER_INFO pNestedSignerInfo = NULL; HCRYPTMSG hMsg = NULL; diff --git a/src/registry.h b/src/registry.h index 81eb6803..84043b4b 100644 --- a/src/registry.h +++ b/src/registry.h @@ -83,7 +83,7 @@ static __inline BOOL _GetRegistryKey(HKEY key_root, const char* key_name, DWORD break; } - if (i != 0) { + if (i > 0) { // Prefix with "SOFTWARE" if needed if (_strnicmp(key_name, software_prefix, sizeof(software_prefix) - 1) != 0) { if (i + sizeof(software_prefix) >= sizeof(long_key_name)) @@ -146,19 +146,12 @@ static __inline BOOL _SetRegistryKey(HKEY key_root, const char* key_name, DWORD } // Find if we're dealing with a short key - for (i = safe_strlen(key_name); i>0; i--) { + for (i = safe_strlen(key_name); i > 0; i--) { if (key_name[i] == '\\') break; } - if (i == 0) { - // If this is a short key name, store the value under our app sub-hive - if (RegCreateKeyExA(hRoot, "SOFTWARE\\" COMPANY_NAME "\\" APPLICATION_NAME, 0, NULL, 0, - KEY_SET_VALUE | KEY_QUERY_VALUE | KEY_CREATE_SUB_KEY, NULL, &hApp, &dwDisp) != ERROR_SUCCESS) { - hApp = NULL; - goto out; - } - } else { + if (i > 0) { // Prefix with "SOFTWARE" if needed if (_strnicmp(key_name, software_prefix, sizeof(software_prefix) - 1) != 0) { if (i + sizeof(software_prefix) >= sizeof(long_key_name)) @@ -178,6 +171,13 @@ static __inline BOOL _SetRegistryKey(HKEY key_root, const char* key_name, DWORD hApp = NULL; goto out; } + } else { + // This is a short key name, store the value under our app sub-hive + if (RegCreateKeyExA(hRoot, "SOFTWARE\\" COMPANY_NAME "\\" APPLICATION_NAME, 0, NULL, 0, + KEY_SET_VALUE | KEY_QUERY_VALUE | KEY_CREATE_SUB_KEY, NULL, &hApp, &dwDisp) != ERROR_SUCCESS) { + hApp = NULL; + goto out; + } } r = (RegSetValueExA(hApp, &key_name[i], 0, dwType, src, src_size) == ERROR_SUCCESS); diff --git a/src/rufus.rc b/src/rufus.rc index 0bbcaf06..c97f06d1 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1199" +CAPTION "Rufus 2.18.1200" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1199,0 - PRODUCTVERSION 2,17,1199,0 + FILEVERSION 2,18,1200,0 + PRODUCTVERSION 2,18,1200,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1199" + VALUE "FileVersion", "2.18.1200" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1199" + VALUE "ProductVersion", "2.18.1200" END END BLOCK "VarFileInfo" From 8286a0f63afa5c4422df38de82d2a70c35d041fa Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 15 Sep 2017 12:40:33 +0100 Subject: [PATCH 81/97] [core] add a cheat mode to reset the current USB device (cycle port) * Will not work on Vista, Windows 7 or Server 2008 * Also update Windows version info --- src/dev.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++---- src/dev.h | 10 ++++++++- src/rufus.c | 30 ++++++++++++++++++-------- src/rufus.h | 11 +++++----- src/rufus.rc | 10 ++++----- src/stdfn.c | 12 +++++------ 6 files changed, 103 insertions(+), 30 deletions(-) diff --git a/src/dev.c b/src/dev.c index 04fe943f..7ecd327e 100644 --- a/src/dev.c +++ b/src/dev.c @@ -1,7 +1,7 @@ /* * Rufus: The Reliable USB Formatting Utility * Device detection and enumeration - * Copyright 2014-2017 Pete Batard + * Copyright © 2014-2017 Pete Batard * * 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 @@ -42,7 +42,8 @@ #include "drive.h" #include "dev.h" -extern StrArray DriveID, DriveLabel; +extern StrArray DriveID, DriveLabel, DriveHub; +extern uint32_t DrivePort[MAX_DRIVES]; extern BOOL enable_HDDs, use_fake_units, enable_vmdk, usb_debug, list_non_usb_removable_drives; /* @@ -123,6 +124,51 @@ out: return r; } +/* + * Cycle port (reset) the selected device + */ +BOOL ResetDevice(int index) +{ + static uint64_t LastReset = 0; + BOOL r = FALSE; + HANDLE handle = INVALID_HANDLE_VALUE; + DWORD size; + USB_CYCLE_PORT_PARAMS cycle_port; + + // Wait at least 10 secs between resets + if (_GetTickCount64() < LastReset + 10000ULL) { + uprintf("You must wait at least 10 seconds before trying to reset a device"); + return FALSE; + } + + if (DriveHub.String[index] == NULL) + return FALSE; + + LastReset = _GetTickCount64(); + + handle = CreateFileA(DriveHub.String[index], GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); + if (handle == INVALID_HANDLE_VALUE) { + uprintf("Could not open %s: %s", DriveHub.String[index], WindowsErrorString()); + goto out; + } + + memset(&cycle_port, 0, sizeof(cycle_port)); + size = sizeof(cycle_port); + cycle_port.ConnectionIndex = DrivePort[index]; + uprintf("Cycling port %d (reset) on %s", DrivePort[index], DriveHub.String[index]); + // As per https://msdn.microsoft.com/en-us/library/windows/hardware/ff537340.aspx + // IOCTL_USB_HUB_CYCLE_PORT is not supported on Windows 7, Windows Vista, and Windows Server 2008 + if (!DeviceIoControl(handle, IOCTL_USB_HUB_CYCLE_PORT, &cycle_port, size, &cycle_port, size, &size, NULL)) { + uprintf(" Failed to cycle port: %s", WindowsErrorString()); + goto out; + } + r = TRUE; + +out: + safe_closehandle(handle); + return r; +} + static __inline BOOL IsVHD(const char* buffer) { int i; @@ -319,12 +365,13 @@ BOOL GetDevices(DWORD devnum) LONG maxwidth = 0; int s, score, drive_number, remove_drive; char drive_letters[27], *device_id, *devid_list = NULL, entry_msg[128]; - char *p, *label, *entry, buffer[MAX_PATH], str[MAX_PATH], *method_str; + char *p, *label, *entry, buffer[MAX_PATH], str[MAX_PATH], *method_str, *hub_path; usb_device_props props; IGNORE_RETVAL(ComboBox_ResetContent(hDeviceList)); StrArrayClear(&DriveID); StrArrayClear(&DriveLabel); + StrArrayClear(&DriveHub); StrArrayCreate(&dev_if_path, 128); // Add a dummy for string index zero, as this is what non matching hashes will point to StrArrayAdd(&dev_if_path, "", TRUE); @@ -452,6 +499,7 @@ BOOL GetDevices(DWORD devnum) memset(buffer, 0, sizeof(buffer)); memset(&props, 0, sizeof(props)); method_str = ""; + hub_path = NULL; if (!SetupDiGetDeviceRegistryPropertyA(dev_info, &dev_info_data, SPDRP_ENUMERATOR_NAME, &datatype, (LPBYTE)buffer, sizeof(buffer), &size)) { uprintf("SetupDiGetDeviceRegistryProperty (Enumerator Name) failed: %s\n", WindowsErrorString()); @@ -584,8 +632,10 @@ BOOL GetDevices(DWORD devnum) if ((uintptr_t)htab_devid.table[j].data > 0) { uuprintf(" Matched with Hub[%d]: '%s'", (uintptr_t)htab_devid.table[j].data, dev_if_path.String[(uintptr_t)htab_devid.table[j].data]); - if (GetUSBProperties(dev_if_path.String[(uintptr_t)htab_devid.table[j].data], device_id, &props)) + if (GetUSBProperties(dev_if_path.String[(uintptr_t)htab_devid.table[j].data], device_id, &props)) { method_str = ""; + hub_path = dev_if_path.String[(uintptr_t)htab_devid.table[j].data]; + } #ifdef FORCED_DEVICE props.vid = FORCED_VID; props.pid = FORCED_PID; @@ -769,6 +819,8 @@ BOOL GetDevices(DWORD devnum) // Must ensure that the combo box is UNSORTED for indexes to be the same StrArrayAdd(&DriveID, buffer, TRUE); StrArrayAdd(&DriveLabel, label, TRUE); + if ((hub_path != NULL) && (StrArrayAdd(&DriveHub, hub_path, TRUE) >= 0)) + DrivePort[DriveHub.Index - 1] = props.port; IGNORE_RETVAL(ComboBox_SetItemData(hDeviceList, ComboBox_AddStringU(hDeviceList, entry), drive_index)); maxwidth = max(maxwidth, GetEntryWidth(hDeviceList, entry)); diff --git a/src/dev.h b/src/dev.h index 2b1841a1..f1cf429d 100644 --- a/src/dev.h +++ b/src/dev.h @@ -1,7 +1,7 @@ /* * Rufus: The Reliable USB Formatting Utility * Device listing - * Copyright 2014-2016 Pete Batard + * Copyright © 2014-2016 Pete Batard * * 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 @@ -106,9 +106,12 @@ DECLSPEC_IMPORT CONFIGRET WINAPI CM_Get_Sibling(PDEVINST pdnDevInst, DEVINST dnD // This last one is unknown from MinGW32 and needs to be fetched from the DLL PF_TYPE_DECL(WINAPI, CONFIGRET, CM_Get_DevNode_Registry_PropertyA, (DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG)); +#define USB_HUB_CYCLE_PORT 273 #define USB_GET_NODE_CONNECTION_INFORMATION_EX 274 #define USB_GET_NODE_CONNECTION_INFORMATION_EX_V2 279 +#define IOCTL_USB_HUB_CYCLE_PORT \ + CTL_CODE(FILE_DEVICE_USB, USB_HUB_CYCLE_PORT, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX \ CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_INFORMATION_EX, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2 \ @@ -172,6 +175,11 @@ typedef struct _USB_NODE_CONNECTION_INFORMATION_EX_V2 { USB_NODE_CONNECTION_INFORMATION_EX_V2_FLAGS Flags; } USB_NODE_CONNECTION_INFORMATION_EX_V2, *PUSB_NODE_CONNECTION_INFORMATION_EX_V2; +typedef struct { + ULONG ConnectionIndex; + ULONG StatusReturned; +} USB_CYCLE_PORT_PARAMS; + #pragma pack(pop) const GUID _GUID_DEVINTERFACE_DISK = diff --git a/src/rufus.c b/src/rufus.c index 903daae9..ed58ee8c 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -114,7 +114,8 @@ uint16_t rufus_version[3], embedded_sl_version[2]; char embedded_sl_version_str[2][12] = { "?.??", "?.??" }; char embedded_sl_version_ext[2][32]; RUFUS_UPDATE update = { {0,0,0}, {0,0}, NULL, NULL}; -StrArray DriveID, DriveLabel, BlockingProcess; +StrArray DriveID, DriveLabel, DriveHub, BlockingProcess; +uint32_t DrivePort[MAX_DRIVES]; extern char* szStatusMessage; static HANDLE format_thid = NULL, dialog_handle = NULL; @@ -1828,9 +1829,10 @@ static void InitDialog(HWND hDlg) } IGNORE_RETVAL(ComboBox_SetCurSel(hDiskID, 0)); - // Create the string array + // Create the string arrays StrArrayCreate(&DriveID, MAX_DRIVES); StrArrayCreate(&DriveLabel, MAX_DRIVES); + StrArrayCreate(&DriveHub, MAX_DRIVES); StrArrayCreate(&BlockingProcess, 16); // Set various checkboxes CheckDlgButton(hDlg, IDC_QUICKFORMAT, BST_CHECKED); @@ -2351,6 +2353,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA PostQuitMessage(0); StrArrayDestroy(&DriveID); StrArrayDestroy(&DriveLabel); + StrArrayDestroy(&DriveHub); StrArrayDestroy(&BlockingProcess); DestroyAllTooltips(); DestroyWindow(hLogDlg); @@ -3351,7 +3354,7 @@ relaunch: // Do our own event processing and process "magic" commands while(GetMessage(&msg, NULL, 0, 0)) { - // ** ***** **** ** ******** * + // ** ***** **** ** ********** // .,ABCDEFGHIJKLMNOPQRSTUVWXYZ // Ctrl-A => Select the log data @@ -3359,6 +3362,7 @@ relaunch: (msg.message == WM_KEYDOWN) && (msg.wParam == 'A') ) { // Might also need ES_NOHIDESEL property if you want to select when not active Edit_SetSel(hLog, 0, -1); + continue; } // Alt-. => Enable USB enumeration debug if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == VK_OEM_PERIOD)) { @@ -3385,12 +3389,12 @@ relaunch: PrintStatusTimeout(lmprintf(MSG_256), detect_fakes); continue; } - // Alt C => Force the update check to be successful - // This will set the reported current version of Rufus to 0.0.0.0 when performing an update - // check, so that it always succeeds. This is useful for translators. + // Alt-C => Cycle USB port for currently selected device if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'C')) { - force_update = !force_update; - PrintStatusTimeout(lmprintf(MSG_259), force_update); + int index = ComboBox_GetCurSel(hDeviceList); + if (index < 0) + break; + ResetDevice(index); continue; } // Alt-D => Delete the NoDriveTypeAutorun key on exit (useful if the app crashed) @@ -3473,7 +3477,6 @@ relaunch: PrintStatusTimeout(lmprintf(MSG_290), !disable_file_indexing); continue; } - // Alt-R => Remove all the registry keys that may have been created by Rufus if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'R')) { PrintStatus(2000, DeleteRegistryKey(REGKEY_HKCU, COMPANY_NAME "\\" APPLICATION_NAME)?MSG_248:MSG_249); @@ -3525,11 +3528,20 @@ relaunch: SHDeleteDirectoryExU(NULL, tmp_path, FOF_SILENT | FOF_NOERRORUI | FOF_NOCONFIRMATION); continue; } + // Alt Y => Force the update check to be successful + // This will set the reported current version of Rufus to 0.0.0.0 when performing an update + // check, so that it always succeeds. This is useful for translators. + if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'Y')) { + force_update = !force_update; + PrintStatusTimeout(lmprintf(MSG_259), force_update); + continue; + } // Alt-Z => Zero the drive if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'Z')) { zero_drive = TRUE; // Simulate a button click for Start PostMessage(hDlg, WM_COMMAND, (WPARAM)IDC_START, 0); + continue; } // Hazardous cheat modes require Ctrl + Alt diff --git a/src/rufus.h b/src/rufus.h index e2a6195d..ab1f7223 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -369,11 +369,11 @@ enum WindowsVersion { WINDOWS_UNDEFINED = -1, WINDOWS_UNSUPPORTED = 0, WINDOWS_XP = 0x51, - WINDOWS_2003 = 0x52, // Also XP x64 - WINDOWS_VISTA = 0x60, - WINDOWS_7 = 0x61, - WINDOWS_8 = 0x62, - WINDOWS_8_1 = 0x63, + WINDOWS_2003 = 0x52, // Also XP_64 + WINDOWS_VISTA = 0x60, // Also 2008 + WINDOWS_7 = 0x61, // Also 2008_R2 + WINDOWS_8 = 0x62, // Also 2012 + WINDOWS_8_1 = 0x63, // Also 2012_R2 WINDOWS_10_PREVIEW1 = 0x64, WINDOWS_10 = 0xA0, WINDOWS_MAX @@ -460,6 +460,7 @@ extern DWORD GetResourceSize(HMODULE module, char* name, char* type, const char* extern DWORD RunCommand(const char* cmdline, const char* dir, BOOL log); extern BOOL CompareGUID(const GUID *guid1, const GUID *guid2); extern BOOL GetDevices(DWORD devnum); +extern BOOL ResetDevice(int index); extern BOOL GetOpticalMedia(IMG_SAVE* img_save); extern BOOL SetLGP(BOOL bRestore, BOOL* bExistingKey, const char* szPath, const char* szPolicy, DWORD dwValue); extern LONG GetEntryWidth(HWND hDropDown, const char* entry); diff --git a/src/rufus.rc b/src/rufus.rc index c97f06d1..132dcb37 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1200" +CAPTION "Rufus 2.18.1201" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1200,0 - PRODUCTVERSION 2,18,1200,0 + FILEVERSION 2,18,1201,0 + PRODUCTVERSION 2,18,1201,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1200" + VALUE "FileVersion", "2.18.1201" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1200" + VALUE "ProductVersion", "2.18.1201" END END BLOCK "VarFileInfo" diff --git a/src/stdfn.c b/src/stdfn.c index 90ef4b8c..73329c5c 100644 --- a/src/stdfn.c +++ b/src/stdfn.c @@ -284,20 +284,20 @@ void GetWindowsVersion(void) switch (nWindowsVersion) { case 0x51: w = "XP"; break; - case 0x52: w = (!GetSystemMetrics(89)?"2003":"2003_R2"); + case 0x52: w = (!GetSystemMetrics(89)?"Server 2003":"Server 2003_R2"); break; - case 0x60: w = (ws?"Vista":"2008"); + case 0x60: w = (ws?"Vista":"Server 2008"); break; - case 0x61: w = (ws?"7":"2008_R2"); + case 0x61: w = (ws?"7":"Server 2008_R2"); break; - case 0x62: w = (ws?"8":"2012"); + case 0x62: w = (ws?"8":"Server 2012"); break; - case 0x63: w = (ws?"8.1":"2012_R2"); + case 0x63: w = (ws?"8.1":"Server 2012_R2"); break; case 0x64: w = (ws?"10 (Preview 1)":"Server 10 (Preview 1)"); break; // Starting with Windows 10 Preview 2, the major is the same as the public-facing version - case 0xA0: w = (ws?"10":"Server 10"); + case 0xA0: w = (ws?"10":"Server 2016"); break; default: if (nWindowsVersion < 0x51) From bb311f004223926558c3b5d3f6fbcefe115279da Mon Sep 17 00:00:00 2001 From: Andrea Wood Date: Thu, 28 Sep 2017 19:10:14 +0200 Subject: [PATCH 82/97] [loc] update Danish translation to latest --- res/localization/rufus.loc | 20 ++++++++++++++++++-- src/rufus.rc | 10 +++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 0e2835f7..f669b5f5 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -3808,7 +3808,7 @@ t MSG_298 "U vybraného ISO soubor neodpovídá deklarovaná velikost: %s z úda ################################################################################ l "da-DK" "Danish (Dansk)" 0x0406 -v 1.0.19 +v 1.0.22 b "en-US" # Main dialog g IDD_DIALOG @@ -4119,7 +4119,8 @@ t MSG_173 "Klik for at vælge..." t MSG_174 "Rufus - Det pålidelige USB-formateringsværktøj" t MSG_175 "Version %d.%d (Build %d)" t MSG_176 "Dansk oversættelse: Jens Hansen \\line " - "\\tab\\tab Bo Riis " + "\\tab\\tab Bo Riis \\line" + "\\tab\\tab Andrea Wood " t MSG_177 "Rapporter fejl eller anmod om forbedringer på:" t MSG_178 "Yderligere rettigheder:" t MSG_179 "Opdateringspolitik:" @@ -4244,6 +4245,21 @@ t MSG_283 "Ugyldig signatur" t MSG_284 "Den hentede fil mangler en digital signatur." t MSG_285 "Den hentede fil er signeret af '%s'.\nDet er ikke en signatur vi genkender og det kan tyde " "på at der er en form for ondsindet aktivitet...\nEr du sikker på at du vil køre denne fil?" +t MSG_286 "Skriver 0-er til stationer: %0.1f%% fuldført" +t MSG_287 "Opdagelse af ikke-USB flytbare drev" +t MSG_288 "Manglende udvidede rettigheder" +t MSG_289 "Dette program kan bare køre med udvidede rettigheder" +t MSG_290 "Fil Indeksering" +t MSG_291 "Versions valg" +t MSG_292 "Valg venligst versionen af Windows du ønsker at installere:" +t MSG_293 "Ikke støttet Windows version" +t MSG_294 "Denne version af Windows er ikke længere støttet af Rufus." +t MSG_295 "Advarsel: Uofficiel version" +t MSG_296 "Denne version af Rufus er IKKE produceret af dens officielle udvikler(e).\n\nEr du sikker på at du vil køre programmet?" +t MSG_297 "Forkortet ISO opdaget" +t MSG_298 "ISO-filen du har valgt, stemmer ikke overens med den erklærede størrelse: %s af dataene mangler!\n\nHvis du har " + "downloadet filen fra internettet, bør du prøve at downloade en ny kopi og verificere at MD5 eller SHA kontrolsummen svarer " + "til de officielle.\n\nLæg mærke til at du kan beregne MD5 eller SHA i Rufus ved at klikke på '#'-knappen." ################################################################################ l "nl-NL" "Dutch (Nederlands)" 0x0413, 0x0813 diff --git a/src/rufus.rc b/src/rufus.rc index 132dcb37..bf52de6e 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1201" +CAPTION "Rufus 2.18.1202" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1201,0 - PRODUCTVERSION 2,18,1201,0 + FILEVERSION 2,18,1202,0 + PRODUCTVERSION 2,18,1202,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1201" + VALUE "FileVersion", "2.18.1202" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1201" + VALUE "ProductVersion", "2.18.1202" END END BLOCK "VarFileInfo" From 7f82dbf0fcd0e2388122e62c0986badf3325406a Mon Sep 17 00:00:00 2001 From: jzeferino Date: Mon, 2 Oct 2017 21:52:04 +0100 Subject: [PATCH 83/97] [loc] fix some Portuguese (Portugal) translation * Closes #1032 --- res/localization/rufus.loc | 4 ++-- src/rufus.rc | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index f669b5f5..96eb5c31 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -12986,7 +12986,7 @@ t MSG_054 "Dispositivo está protegido contra escrita." t MSG_055 "Outra aplicação está a usar o dispositivo. " "Feche todas as aplicações que possam estar a usar o dispositivo." t MSG_056 "Formatação rápida não está disponível para este dispositivo." -t MSG_057 "Nome do volume não é válido." +t MSG_057 "O Nome do volume não é válido." t MSG_058 "O identificador do dispositivo não é válido." t MSG_059 "O tamanho de cluster indicado não é válido para este dispositivo." t MSG_060 "O tamanho do volume não é válido." @@ -13007,7 +13007,7 @@ t MSG_072 "Verificação de erros no disco foi interrompida." t MSG_073 "Erro na análise da imagem ISO." t MSG_074 "Erro na extração da imagem ISO." t MSG_075 "Impossível montar o volume." -t MSG_076 "Impossível alterar/setup de ficheiros para arranque." +t MSG_076 "Impossível alterar/configurar ficheiros para arranque." t MSG_077 "Impossível atribuir letra de unidade." t MSG_078 "Impossível montar o volume GUID." t MSG_079 "O dispositivo não está pronto." diff --git a/src/rufus.rc b/src/rufus.rc index bf52de6e..bb7e2c65 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1202" +CAPTION "Rufus 2.18.1203" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1202,0 - PRODUCTVERSION 2,18,1202,0 + FILEVERSION 2,18,1203,0 + PRODUCTVERSION 2,18,1203,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1202" + VALUE "FileVersion", "2.18.1203" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1202" + VALUE "ProductVersion", "2.18.1203" END END BLOCK "VarFileInfo" From 293440b2e9e8e4d2029be1fc6af907f41c4dca24 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 13 Oct 2017 10:34:23 +0100 Subject: [PATCH 84/97] [pki] fix a minor initialization issue --- src/pki.c | 2 +- src/rufus.rc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pki.c b/src/pki.c index 7f7ead8b..832ad863 100644 --- a/src/pki.c +++ b/src/pki.c @@ -139,7 +139,7 @@ const char* WinPKIErrorString(void) char* GetSignatureName(const char* path, const char* country_code) { static char szSubjectName[128]; - static char szCountry[3]; + char szCountry[3] = "__"; char *p = NULL, *mpath = NULL; BOOL r; HMODULE hm; diff --git a/src/rufus.rc b/src/rufus.rc index bb7e2c65..397f1ba4 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1203" +CAPTION "Rufus 2.18.1204" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1203,0 - PRODUCTVERSION 2,18,1203,0 + FILEVERSION 2,18,1204,0 + PRODUCTVERSION 2,18,1204,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1203" + VALUE "FileVersion", "2.18.1204" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1203" + VALUE "ProductVersion", "2.18.1204" END END BLOCK "VarFileInfo" From 88631806da52d883f30c7feb656bdfc9afcc1235 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 12 Oct 2017 16:40:54 +0100 Subject: [PATCH 85/97] [cmp] propagate decompression errors from bled * If, for example, you have a truncated gz-compressed file and try to write it to disk, bled_uncompress_with_handles() will return an error. Previously, this was not reported back to the user. * Closes #1040 --- src/format.c | 11 +++++++++-- src/rufus.rc | 10 +++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/format.c b/src/format.c index 5d1e9353..d9b07d55 100644 --- a/src/format.c +++ b/src/format.c @@ -1531,6 +1531,7 @@ static BOOL WriteDrive(HANDLE hPhysicalDrive, HANDLE hSourceImage) LARGE_INTEGER li; DWORD rSize, wSize, BufSize; uint64_t wb, target_size = hSourceImage?img_report.image_size:SelectedDrive.DiskSize; + int64_t bled_ret; uint8_t *buffer = NULL; int i; @@ -1541,10 +1542,16 @@ static BOOL WriteDrive(HANDLE hPhysicalDrive, HANDLE hSourceImage) LastRefresh = 0; if (img_report.compression_type != BLED_COMPRESSION_NONE) { - uprintf("Writing Compressed Image..."); + uprintf("Writing compressed image..."); bled_init(_uprintf, update_progress, &FormatStatus); - bled_uncompress_with_handles(hSourceImage, hPhysicalDrive, img_report.compression_type); + bled_ret = bled_uncompress_with_handles(hSourceImage, hPhysicalDrive, img_report.compression_type); bled_exit(); + if ((bled_ret < 0) && (SCODE_CODE(FormatStatus) != ERROR_CANCELLED)) { + // Unfortunately, different compression backends return different negative error codes + uprintf("Could not write compressed image: %" PRIi64, bled_ret); + FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | ERROR_WRITE_FAULT; + goto out; + } } else { uprintf(hSourceImage?"Writing Image...":"Zeroing drive..."); // Our buffer size must be a multiple of the sector size and *ALIGNED* to the sector size diff --git a/src/rufus.rc b/src/rufus.rc index 397f1ba4..dd7cee17 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1204" +CAPTION "Rufus 2.18.1205" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1204,0 - PRODUCTVERSION 2,18,1204,0 + FILEVERSION 2,18,1205,0 + PRODUCTVERSION 2,18,1205,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1204" + VALUE "FileVersion", "2.18.1205" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1204" + VALUE "ProductVersion", "2.18.1205" END END BLOCK "VarFileInfo" From 1af0e16e916b94fee1631fafdec61fdfb5bb12ae Mon Sep 17 00:00:00 2001 From: embar- Date: Sat, 9 Sep 2017 10:33:20 +0100 Subject: [PATCH 86/97] [loc] update Lithuanian translation * Closes #1034 --- res/localization/rufus.loc | 257 +++++++++++++++++++------------------ src/rufus.rc | 10 +- 2 files changed, 134 insertions(+), 133 deletions(-) diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 96eb5c31..2f23aede 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -9891,24 +9891,24 @@ t IDS_PARTITION_TYPE_TXT "Skaidinių schema ir paskirties sistemos tipas" t IDS_FILESYSTEM_TXT "Failų sistema" t IDS_CLUSTERSIZE_TXT "Klasterio dydis" t IDS_LABEL_TXT "Nauja tomo žymė" -t IDS_FORMAT_OPTIONS_GRP "Formatavimo parinktys" +t IDS_FORMAT_OPTIONS_GRP "Suženklinimo parinktys" s IDC_BADBLOCKS +25,0 -t IDC_BADBLOCKS "Tikrinti įrenginį dėl blogų blokų" +t IDC_BADBLOCKS "Tikrinti, ar įrenginyje yra blogų blokų" m IDC_NBPASSES +25,0 s IDC_NBPASSES -25,0 -t IDC_QUICKFORMAT "Greitas formatavimas" -t IDC_BOOT "Kurti įkelties diską naudojant" +t IDC_QUICKFORMAT "Greitasis suženklinimas" +t IDC_BOOT "Paleidžiama iš laikmenos" t IDC_WINDOWS_INSTALL "Standartinė Windows įdiegtis" -t IDC_SET_ICON "Kurti išplėstinės žymės ir piktogramos failus" +t IDC_SET_ICON "Kurti išplėstinių žymių ir piktogramų failus" s IDC_ABOUT -15,0 t IDC_ABOUT "Apie..." m IDC_LOG -15,0 s IDC_LOG 30,0 t IDC_LOG "Dienynas" -t IDCANCEL "Uždaryti" +t IDCANCEL "Užverti" t IDC_START "Pradėti" -t IDS_ADVANCED_OPTIONS_GRP "Išsamios parinktys" -t IDC_ENABLE_FIXED_DISKS "Rodyti USB kietuosius diskus" +t IDS_ADVANCED_OPTIONS_GRP "Išsamesnės parinktys" +t IDC_ENABLE_FIXED_DISKS "Rodyti USB standžiuosius diskus" t IDC_EXTRA_PARTITION "Pataisos seniems BIOS (papildomas skaidinys, ir kt.)" m IDC_DISK_ID +25,0 s IDC_DISK_ID -25,0 @@ -9925,7 +9925,7 @@ t IDOK "Gerai" # About -> License dialog g IDD_LICENSE t IDD_LICENSE "Rufus licencija" -t IDCANCEL "Uždaryti" +t IDCANCEL "Užverti" # Notifications. You can trigger one of these by using Alt-R and re-launching Rufus g IDD_NOTIFICATION @@ -9939,7 +9939,7 @@ g IDD_LOG t IDD_LOG "Dienynas" t IDC_LOG_CLEAR "Valyti" t IDC_LOG_SAVE "Išsaugoti" -t IDCANCEL "Uždaryti" +t IDCANCEL "Užverti" # About -> Updates g IDD_UPDATE_POLICY @@ -9949,36 +9949,36 @@ s IDS_UPDATE_SETTINGS_GRP +17,0 m IDS_CHECK_NOW_GRP +17,0 s IDS_CHECK_NOW_GRP -12,0 s IDS_UPDATE_FREQUENCY_TXT +6,0 -t IDS_UPDATE_FREQUENCY_TXT "Tikrinti, ar yra naujinių" +t IDS_UPDATE_FREQUENCY_TXT "Ieškoti atnaujinimų" m IDC_UPDATE_FREQUENCY -4,0 s IDC_UPDATE_FREQUENCY +28,0 t IDS_INCLUDE_BETAS_TXT "Įtraukti beta versijas" m IDC_INCLUDE_BETAS -4,0 t IDC_CHECK_NOW "Tikrinti dabar" m IDC_CHECK_NOW +10,0 -t IDCANCEL "Uždaryti" +t IDCANCEL "Užverti" m IDCANCEL +10,0 # Dialog that appears when a new version is available g IDD_NEW_VERSION -t IDD_NEW_VERSION "Tikrinti, ar yra naujinių - Rufus" -t IDS_NEW_VERSION_AVAIL_TXT "Yra naujesnė versija. Prašau atsisiųsti naujausią versiją!" -t IDC_WEBSITE "Spausk čia, kad patektum į Rufus svetainę" -t IDS_NEW_VERSION_NOTES_GRP "Leidimo pastabos" -t IDS_NEW_VERSION_DOWNLOAD_GRP "Siųstis" -t IDC_DOWNLOAD "Siųstis" -t IDCANCEL "Uždaryti" +t IDD_NEW_VERSION "Rufus atnaujinimų paieška" +t IDS_NEW_VERSION_AVAIL_TXT "Rasta naujesnė versija. Patariama atsisiųsti naujausią versiją!" +t IDC_WEBSITE "Čia paspaudę pateksite į „Rufus“ svetainę" +t IDS_NEW_VERSION_NOTES_GRP "Pastabos apie versiją" +t IDS_NEW_VERSION_DOWNLOAD_GRP "Parsisiųsti" +t IDC_DOWNLOAD "Parsisiųsti" +t IDCANCEL "Užverti" # Messages used throughout the application t MSG_001 "Aptiktas kitas programos atvejis" -t MSG_002 "Vykdoma kita Rufus programa.\n" - "Prašau uždaryti pirmą programą prieš vykdant kitą." -t MSG_003 "ĮSPĖJIMAS: VISI DUOMENYS ĮRENGINYJE '%s' BUS SUNAIKINTI.\n" - "Norėdami tęsti šį veiksmą, spauskite Gerai. Išeiti - spauskite Atšaukti." -t MSG_004 "Rufus naujinių politika" -t MSG_005 "Ar norite leisti Rufus tikrinti programos naujinius internete?" +t MSG_002 "Jau paleista kita Rufus programa.\n" + "Prieš paleisdami naują programą, užverkite ankstesniąją programą." +t MSG_003 "ĮSPĖJIMAS: VISI DUOMENYS ĮRENGINYJE „%s“ BUS SUNAIKINTI.\n" + "Norėdami tęsti šį veiksmą, spauskite „Gerai“. Norėdami išeiti - spauskite „Atšaukti“." +t MSG_004 "Rufus atnaujinimų politika" +t MSG_005 "Ar norite leisti Rufus ieškoti programos atnaujinimų internete?" # Must be the same as IDD_DIALOG:IDCANCEL (i.e. "Close" - I know it's confusing) -t MSG_006 "Uždaryti" +t MSG_006 "Užverti" t MSG_007 "Atšaukti" t MSG_008 "Taip" t MSG_009 "Ne" @@ -10014,7 +10014,7 @@ t MSG_033 "%s skaidinių schema UEFI" # Number of bad block check passes (singular for 1 pass, plural for 2 or more passes) t MSG_034 "%d bandymas" t MSG_035 "%d bandymai" -t MSG_036 "ISO atvaizdas" +t MSG_036 "ISO atvaizdis" t MSG_037 "Programa" t MSG_038 "Nutraukti" t MSG_039 "Vykdyti" @@ -10031,18 +10031,18 @@ t MSG_049 "Rufus - atšaukimas" # Error messages t MSG_050 "Sėkmingai." -t MSG_051 "Nenustatyta klaida formatuojant." +t MSG_051 "Nenustatyta klaida suženklinant." t MSG_052 "Negalima naudoti parinktos failų sistemos šiai laikmenai." t MSG_053 "Prieiga prie šio įrenginio uždrausta." t MSG_054 "Laikmena apsaugota nuo įrašymo." t MSG_055 "Įrenginį naudoja kitas procesas. " "Prašau uždaryti kitus procesus, kurie gali kreiptis į įrenginį." -t MSG_056 "Greitas formatavimas negalimas šiam įrenginiui." +t MSG_056 "Greitasis suženklinimas negalimas šiam įrenginiui." t MSG_057 "Tomo žymė negaliojanti." t MSG_058 "Įrenginio klasės vardas negaliojantis." t MSG_059 "Pasirinktas klasterio dydis negalioja šiam įrenginiui." t MSG_060 "Tomo dydis negaliojantis." -t MSG_061 "Įterpkite keičiamą laikmeną į įrenginį." +t MSG_061 "Įdėkite keičiamą laikmeną į įrenginį." t MSG_062 "Gauta nepalaikoma komanda." t MSG_063 "Atminties paskirstymo klaida." t MSG_064 "Skaitymo klaida." @@ -10056,8 +10056,8 @@ t MSG_070 "Atšaukta naudotojo." # See http://en.wikipedia.org/wiki/Thread_%28computing%29 t MSG_071 "Negalima pradėti gijos." t MSG_072 "Blogų blokų tikrinimas nebuvo baigtas." -t MSG_073 "ISO atvaizdo peržiūros triktis." -t MSG_074 "ISO atvaizdo išskleidimo triktis." +t MSG_073 "ISO atvaizdžio peržiūros triktis." +t MSG_074 "ISO atvaizdžio išskleidimo triktis." t MSG_075 "Negalima prijungti tomo." t MSG_076 "Negalima papildyti/paruošti failų įkelčiai." t MSG_077 "Negalima priskirti disko raidės." @@ -10068,44 +10068,44 @@ t MSG_080 "Rufus aptiko, kad Windows vis dar išvalo savo vidinius buferius į U "Priklausomai nuo jūsų USB įrenginio spartos, šis veiksmas gali užtrukti ilgai, " "ypač su dideliais failais.\n\nMes patariame jums leisti Windows pabaigti, kad išvengtumėte iškraipymų. " "Bet jei jums nusibos laukti, galite tiesiog ištraukti įrenginį..." -t MSG_081 "Nepalaikomas atvaizdas" -t MSG_082 "Arba šis atvaizdas yra ne įkelties, arba jis naudoja įkelties ar glaudinimo metodą, kurio nepalaiko Rufus..." +t MSG_081 "Nepalaikomas atvaizdis" +t MSG_082 "Arba šis atvaizdis neskirtas sistemų paleidimui, arba jis naudoja paleidimo ar glaudinimo metodą, kurio nepalaiko Rufus..." t MSG_083 "Pakeisti %s?" -t MSG_084 "Atrodo, šis ISO atvaizdas naudoja pasenusią '%s' versiją.\n" - "Įkelties meniu dėl to gali būti vaizduojamas blogai.\n\n" +t MSG_084 "Atrodo, šis ISO atvaizdis naudoja pasenusią „%s“ versiją.\n" + "Paleidimo meniu dėl to gali būti vaizduojamas blogai.\n\n" "Galima atsisiųsti naujesnę Rufus versiją išspręsti problemai:\n" - "- Pasirinkite 'Taip' norėdami prisijungti prie interneto ir atsisiųsti failą\n" - "- Pasirinkite 'Ne' norėdami palikti esamą ISO failą nepakeistą\n" - "Jei nežinote ką daryti, reikėtų pasirinkti 'Taip'.\n\n" + "- Pasirinkite „Taip“ norėdami prisijungti prie interneto ir atsisiųsti failą\n" + "- Pasirinkite „Ne“ norėdami palikti esamą ISO failą nepakeistą\n" + "Jei nežinote ką daryti, reikėtų pasirinkti „Taip“.\n\n" "Pastaba: naujas failas bus atsiųstas į dabartinį katalogą ir jei " - "'%s' ten jau yra, jis bus panaudotas iš naujo automatiškai." -t MSG_085 "Siunčiu '%s'" -t MSG_086 "Nepasirinktas atvaizdas" + "„%s“ ten jau yra, jis bus panaudotas iš naujo automatiškai." +t MSG_085 "Parsiunčiama: „%s“" +t MSG_086 "Atvaizdis nepasirinktas" # The content between the quotes below (\"Create a bootable disk\") should match # the beginning of the IDC_BOOT text -t MSG_087 "Prašau spausti disko mygtuką norėdami pasirinkti įkelties atvaizdą, " - "arba nežymėkite \"Kurti įkelties diską...\" langelio." -t MSG_088 "Atvaizdas per didelis" -t MSG_089 "Atvaizdas yra per didelis pasirinktai paskirčiai." +t MSG_087 "Spauskite disko mygtuką, jei norite pasirinkti paleidimo atvaizdį, " + "arba nežymėkite langelio „Paleidžiama iš laikmenos“." +t MSG_088 "Atvaizdis per didelis" +t MSG_089 "Atvaizdis yra per didelis pasirinktai paskirčiai." t MSG_090 "Nepalaikomas ISO" -t MSG_091 "Naudojant UEFI paskirties tipą, tiktai EFI įkelties ISO atvaizdai yra palaikomi. " - "Prašau pasirinkti EFI įkelties ISO arba pakeisti paskirties tipą į BIOS." +t MSG_091 "Naudojant UEFI paskirties tipą, tik EFI paleidimo ISO atvaizdžiai yra palaikomi. " + "Prašome pasirinkti EFI paleidimo ISO arba pakeisti paskirties tipą į BIOS." t MSG_092 "Nepalaikoma failų sistema" t MSG_093 "SVARBU: ŠIS DISKAS TURI KELETĄ SKAIDINIŲ!!\n\n" "Tarp jų gali būti skaidinių/tomų, neparodytų ar net nematomų iš Windows. " "Jei norėsite tęsti, būsite atsakingi dėl galimo duomenų praradimo šiuose skaidiniuose." t MSG_094 "Aptikta keletas skaidinių" -t MSG_095 "DD atvaizdas" +t MSG_095 "DD atvaizdis" t MSG_096 "Pasirinkta failų sistema negali būti naudojama su šiuo ISO tipu." "Pasirinkite kitą failų sistemą arba naudokite kitokį ISO." -t MSG_097 "'%so' gali būti taikomas tik jei failų sistema yra NTFS." -t MSG_098 "SVARBU: Jūs bandote įdiegti 'Windows To Go', bet jūsų paskirties diskas neturi " - "atributo 'FIKSUOTAS'. Dėl to sistema 'Windows' greičiausiai pakibs įkelties metu, " - "kadangi Microsoft nepritaikė jos veikti su diskais, turinčiais 'KEIČIAMAS' " - "atributą.\n\nAr vis tiek norite tęsti?\n\n" - "Pastaba: Atributas 'FIKSUOTAS/KEIČIAMAS' yra techninės įrangos savybė, kurią galima pakeisti tik " - "naudojant specialias priemones iš disko gamintojo. Tačiau šios priemonės BEVEIK NIEKADA " - "viešai nepateikiamos..." +t MSG_097 "„%so“ gali būti taikomas tik jei failų sistema yra NTFS." +t MSG_098 "SVARBU: Jūs bandote įdiegti „Windows To Go“, bet jūsų paskirties diskas neturi atributo " + "FIKSUOTAS (FIXED). Dėl to sistema Windows greičiausiai pakibs įkelties metu, " + "nes Microsoft nepritaikė jos veikti su diskais, turinčiais atributą KEIČIAMAS " + "(REMOVABLE).\n\nAr vis tiek norite tęsti?\n\n" + "Pastaba: Atributas FIKSUOTAS/KEIČIAMAS (FIXED/REMOVABLE) yra techninės įrangos savybė, " + "kurią galima pakeisti tik naudojant specialias disko gamintojo priemones. Tačiau šios " + "priemonės BEVEIK NIEKADA viešai nepateikiamos..." t MSG_099 "Failų sistemos apribojimas" t MSG_100 "Šiame ISO atvaizde yra failas, didesnis negu 4 GB, tai daugiau negu " "maksimalus leistinas dydis FAT arba FAT32 failų sistemai." @@ -10114,13 +10114,13 @@ t MSG_102 "Jūsų platforma negali išskleisti failų iš WIM archyvų. WIM išs "būtinas norint sukurti EFI įkeliamus Windows 7 ir Windows Vista USB diskus. Jūs galite tai sutvarkyti " "įdiegdami dabartinę 7-Zip versiją.\nAr norite apsilankyti 7-zip atsisiuntimo puslapyje?" t MSG_103 "Atsiųsti %s?" -t MSG_104 "%s ar vėlesniam reikia, kad '%s' failas būtų įdiegtas.\n" - "Kadangi šis failas didesnis nei 100 KB ir visada yra %s ISO atvaizduose, " +t MSG_104 "%s ar vėlesniam reikia, kad būtų įdiegtas „%s“ failas.\n" + "Kadangi šis failas didesnis nei 100 KB ir visada yra %s ISO atvaizdžiuose, " "jis nėra įtrauktas į Rufus.\n\nRufus gali jums atsiųsti trūkstamą failą:\n" - "- Pasirinkite 'Taip' norėdami prisijungti prie interneto ir atsisiųsti failą\n" - "- Pasirinkite 'Ne' norėdami rankiniu būdu nukopijuoti šį failą į diską vėliau\n\n" - "Pastaba: Failas bus atsiųstas į dabartinį katalogą ir kai " - "'%s' bus ten, jis bus pakartotinai naudojamas automatiškai.\n" + "- Norėdami prisijungti prie interneto ir atsisiųsti failą, pasirinkite „Taip“.\n" + "- Norėdami rankiniu būdu nukopijuoti šį failą į diską vėliau, pasirinkite „Ne“.\n\n" + "Pastaba: failas bus atsiųstas į dabartinį katalogą ir kai " + "„%s“ bus ten, jis bus pakartotinai naudojamas automatiškai.\n" t MSG_105 "Atšaukus dabar, įrenginys gali likti NEPRIEINAMOJE būsenoje.\n" "Jei tikrai norite atšaukti, spauskite TAIP. Kitu atveju, spauskite NE." t MSG_106 "Pasirinkite katalogą" @@ -10129,39 +10129,39 @@ t MSG_108 "Rufus dienynas" t MSG_109 "0x%02X (Diskas %d)" # "Cluster size" below should be the same as the label for IDS_CLUSTERSIZE_TXT # "kilobytes" should be the same as in MSG_027 -t MSG_110 "MS-DOS negali įsikelti iš disko naudojant 64 kilobaitų Klasterio dydį.\n" - "Prašau pakeiskite Klasterio dydį arba naudokite FreeDOS." -t MSG_111 "Nesuderinamas Klasterio dydis" +t MSG_110 "MS-DOS negali įsikelti iš disko naudojant 64 kilobaitų klasterio dydį.\n" + "Pakeiskite klasterio dydį arba naudokite FreeDOS." +t MSG_111 "Nesuderinamas klasterio dydis" # "%d:%02d" below is a duration (mins:secs) -t MSG_112 "Didelių UDF tomų formatavimas gali užimti daug laiko. USB 2.0 greičiu numatoma formatavimo " - "trukmė yra %d:%02d, tuo metu eigos juosta gali atrodyti sustingusi. Prašau kantrybės!" +t MSG_112 "Didelių UDF tomų suženklinimas gali užimti daug laiko. USB 2.0 greičiu numatoma suženklinimo " + "trukmė yra %d:%02d, tuo metu eigos juosta gali atrodyti sustingusi. Būkite kantrūs!" t MSG_113 "Didelis UDF tomas" -t MSG_114 "Šis atvaizdas naudoja Syslinux %s%s, bet ši programa turi tik diegimo failus, skirtus " +t MSG_114 "Šis atvaizdis naudoja Syslinux %s%s, bet ši programa turi tik diegimo failus, skirtus " "Syslinux %s%s.\n\nKadangi naujos Syslinux versijos tarpusavyje nesuderinamos, ir nėra galimybės " "į Rufus įtraukti jas visas, du papildomi failai turi būti atsisiųsti iš " - "interneto ('ldlinux.sys' ir 'ldlinux.bss'):\n" - "- Pasirinkite 'Taip' norėdami prisijungti prie interneto ir atsisiųsti šiuos failus\n" - "- Pasirinkite 'Ne' norėdami veiksmą atšaukti\n\n" + "interneto („ldlinux.sys“ ir „ldlinux.bss“):\n" + "- Norėdami prisijungti prie interneto ir atsisiųsti šiuos failus, pasirinkite „Taip“.\n" + "- Norėdami veiksmą atšaukti, pasirinkite „Ne“.\n\n" "Pastaba: Failai bus atsiųsti į dabartinį programos katalogą ir bus naudojami vėl " "automatiškai, juos ten radus.\n" t MSG_115 "Reikalingas atsisiuntimas" -t MSG_116 "Šis atvaizdas naudoja Grub %s bet ši programa turi tik diegimo failus, skirtus " +t MSG_116 "Šis atvaizdis naudoja Grub %s bet ši programa turi tik diegimo failus, skirtus " "Grub %s.\n\nKadangi skirtingos Grub versijos gali būti nesuderinamos tarpusavyje, o jų visų " "įtraukti nėra galimybės, Rufus bandys surasti Grub įdiegimo failo " - "('core.img') versiją, atitinkančią esančią jūsų atvaizde:\n" - "- Pasirinkite 'Taip' norėdami prisijungti prie interneto ir atsisiųsti ją\n" - "- Pasirinkite 'Ne' norėdami naudoti numatytąją versiją iš Rufus\n" - "- Pasirinkite 'Atšaukti' norėdami nutraukti veiksmą\n\n" + "(„core.img“) versiją, atitinkančią esančią jūsų atvaizde:\n" + "- Norėdami prisijungti prie interneto ir atsisiųsti ją, pasirinkite „Taip“.\n" + "- Norėdami naudoti numatytąją versiją iš Rufus, pasirinkite „Ne“.\n" + "- Norėdami nutraukti, pasirinkite „Atšaukti“.\n\n" "Pastaba: Failas bus atsiųstas į dabartinį programos aplanką ir vėliau jam ten esant bus " "naudojamas automatiškai. Jei atitinkančio nebus rasta internete, bus naudojama numatytoji versija." # Tooltips # Partition Scheme and Target Type t MSG_150 "Paprastai saugiausias pasirinkimas. Bet jei turite UEFI kompiuterį ir norite įdiegti " - "operacinę sistemą EFI režimu, turėtumėte pasirinkit vieną iš kitų parinkčių" -t MSG_151 "Naudokite šią parinktį, jei norite įdiegti operacinę sistemą EFI režimu, " + "operacinę sistemą EFI veiksena, turėtumėte pasirinkit vieną iš kitų parinkčių" +t MSG_151 "Naudokite šią parinktį, jei norite įdiegti operacinę sistemą EFI veiksena, " "bet norėsite pasiekti USB turinį iš Windows XP" -t MSG_152 "Rekomenduojama parinktis įdiegiant operacinę sistemą EFI režimu ir kai " +t MSG_152 "Rekomenduojama parinktis įdiegiant operacinę sistemą EFI veiksena ir kai " "USB prieiga nebūtina iš Windows XP" t MSG_153 "Testo šablonas: 0x%02X" t MSG_154 "Testo šablonas: 0x%02X, 0x%02X" @@ -10170,12 +10170,12 @@ t MSG_156 "Testo šablonas: 0x%02X, 0x%02X, 0x%02X, 0x%02X" t MSG_157 "Nustato paskirties failų sistemą" t MSG_158 "Mažiausias dydis, kurį duomenų blokas užims failų sistemoje" t MSG_159 "Šiame laukelyje įrašykite disko žymę\nGalite naudoti tarptautinius simbolius" -t MSG_160 "Įjungti išsamias parinktis" +t MSG_160 "Rodyti išsamesnes parinktis" t MSG_161 "Tikrinti įrenginį dėl blogų blokų naudojant testo šabloną" -t MSG_162 "Nuimkite šio langelio žymę norėdami naudoti \"lėtą\" formatavimo būdą" -t MSG_163 "Pažymėkite šį langelį norėdami padaryti USB diską įkeliamą" +t MSG_162 "Nuimkite šio langelio žymę norėdami naudoti lėtą suženklinimo būdą" +t MSG_163 "Pažymėkite šį langelį, jei norite padaryti USB diską įkeliamą" t MSG_164 "Būdas, kuris bus naudojamas padaryti diską įkeliamą" -t MSG_165 "Spauskite, kad pasirinktumėte atvaizdą..." +t MSG_165 "Spauskite, kad pasirinktumėte atvaizdį..." t MSG_166 "Pažymėkite šį langelį, norėdami įgalinti tarptautinių žymių rodymą " "ir įrenginio piktogramos nustatymą (sukuria autorun.inf)" t MSG_167 "Įdiegia MBR, kuris įgalina įkelties pasirinkimą ir gali maskuoti BIOS USB disko ID" @@ -10184,13 +10184,14 @@ t MSG_168 "Bandyti maskuoti pirmą įkeliamą USB diską (paprastai 0x80) kaip k t MSG_169 "Sukurti papildomą slaptą skaidinį ir bandyti sulygiuoti skaidinių ribas.\n" "Tai gali pagerinti įkelties aptikimą su senais BIOSais" t MSG_170 "Įgalinti išorinių USB kietųjų diskų pateiktį. NAUDOTI SAVO RIZIKA!!!" -t MSG_171 "Pradėti formatavimo veiksmą.\nTai SUNAIKINS visus duomenis paskirtyje!" +t MSG_171 "Pradėti suženklinti.\nTai SUNAIKINS visus duomenis paskirtyje!" t MSG_172 "Licencijavimo informacija ir kreditai" t MSG_173 "Spauskite pasirinkti..." # The following will appear in the about dialog -t MSG_174 "Rufus - patikima USB formatavimo priemonė" +t MSG_174 "Rufus - patikima USB suženklinimo priemonė" t MSG_175 "Versija %d.%d (sąranka %d)" -t MSG_176 "Lietuviškas vertimas: Gintaras Venslovas " +t MSG_176 "Lietuviškas vertimas: Gintaras Venslovas \\line" + "\\tab\\tab embar-" t MSG_177 "Dėl pastebėtų klaidų ar pageidaujamų patobulinimų kreipkitės:" t MSG_178 "Kitos autorių teisės:" t MSG_179 "Naujinių politika:" @@ -10204,9 +10205,9 @@ t MSG_184 "Asmeninio naudojimo statistikos generavimo tikslu mes galime saugoti t MSG_185 "Atnaujinimo procesas:" t MSG_186 "Rufus neįdiegia ir nevykdo foninių tarnybų, todėl naujinių tikrinimai yra atliekami tik vykdant pagrindinę programą.\\line\n" "Interneto prieiga, be abejo, yra reikalinga naujinių tikrinimui." -t MSG_187 "Negaliojantis atvaizdas pasirinktai įkelties parinkčiai" -t MSG_188 "Dabartinis atvaizdas neatitinka pasirinktos įkelties parinkties. Prašau naudoti kitą atvaizdą arba rinktis kitą įkelties parinktį." -t MSG_189 "Šis ISO atvaizdas nesuderinamas su pasirinkta failų sistema" +t MSG_187 "Negaliojantis atvaizdis pasirinktai įkelties parinkčiai" +t MSG_188 "Dabartinis atvaizdis neatitinka pasirinktos paleidimo parinkties. Prašome naudoti kitą atvaizdį arba rinktis kitą paleidimo parinktį." +t MSG_189 "Šis ISO atvaizdis nesuderinamas su pasirinkta failų sistema" t MSG_190 "Aptiktas nesuderinamas diskas" t MSG_191 "Rašymo bandymas" t MSG_192 "Skaitymo bandymas" @@ -10218,19 +10219,19 @@ t MSG_196 "SVARBU: ŠIS DISKAS NAUDOJA NESTANDARTINĮ SEKTORIAUS DYDĮ!\n\n" "Daugeliu atveju tai reiškia, kad jūs NEGALĖSITE įkelti sistemos iš šio disko.\n" "Rufus gali mėginti sukurti įkelties diską, bet NĖRA GARANTIJŲ, kad jis veiks." t MSG_197 "Aptiktas nestandartinis sektoriaus dydis" -t MSG_198 "'Windows To Go' gali būti įdiegta tik į GPT skaidinių diską, jei jis turi įjungtą " - "atributą 'FIKSUOTAS'. Pasirinktas diskas nebuvo aptiktas kaip FIKSUOTAS." +t MSG_198 "„Windows To Go“ gali būti įdiegta tik į GPT skaidinių diską, jei jis turi įjungtą " + "atributą „FIXED“ (fiksuotas). Pasirinktas diskas nebuvo aptiktas kaip „FIXED“." t MSG_199 "Rinkitės šį, jei planuojate įdiegti Windows į kitą diską, naudodami pasirinktą įrenginį kaip įdiegimo laikmeną" t MSG_200 "Rinkitės šį, jei norite leisti Windows tiesiai iš pasirinkto įrenginio." # Status messages - these messages will appear on the status bar t MSG_201 "Atšaukiama - prašome palaukti..." -t MSG_202 "Peržiūrimas atvaizdas..." -t MSG_203 "Nepavyko peržiūrėti atvaizdo" +t MSG_202 "Peržiūrimas atvaizdis..." +t MSG_203 "Nepavyko peržiūrėti atvaizdžio" # Parameter: the name of an obsolete Syslinux .c32 module. eg: "Obsolete vesamenu.c32 detected" t MSG_204 "Aptiktas pasenęs %s" # Display the name of the image selected. eg: "Using image: en_win7_x64_sp1.iso" -t MSG_205 "Naudojamas atvaizdas: %s" +t MSG_205 "Naudojamas atvaizdis: %s" # Typically "Missing ldlinux.c32 file" t MSG_206 "Trūksta %s failo" # The name proposed by Windows' Computer Management -> Disk Management when you try to format a drive @@ -10249,23 +10250,23 @@ t MSG_214 "Nepavyko paleisti naujos programos" t MSG_215 "Atidarytas %s" t MSG_216 "Išsaugotas %s" # Formatting status (make sure you use a double % to print the percent sign) -t MSG_217 "Formatuojama: %0.1f%% baigta" +t MSG_217 "Suženklinimama: %0.1f%% baigta" t MSG_218 "Kuriama failų sistema: Užduotis %d/%d atlikta" t MSG_219 "NTFS taisymas: %d%% baigta" # Parameter: the file system and an estimated duration in mins and secs. # eg. "Formatting (UDF) - Estimated duration 3:21..." # NB: if "estimated duration" is too long, just use "estimated" or an abbreviation -t MSG_220 "Formatuojama (%s) - numatoma trukmė %d:%02d..." -t MSG_221 "Rašoma žymė (gali užtrukti)..." +t MSG_220 "Suženklinimama (%s) - numatoma trukmė %d:%02d..." +t MSG_221 "Įrašoma žymė (gali užtrukti)..." # Parameter: the file system. eg. "Formatting (NTFS)..." -t MSG_222 "Formatuojama (%s)..." +t MSG_222 "Suženklinimama (%s)..." t MSG_223 "NTFS taisymas (disko tikrinimas)..." t MSG_224 "Išvalomos MBR/PBR/GPT struktūros..." -t MSG_225 "Užsakoma disko prieiga..." +t MSG_225 "Užklausiama disko prieiga..." t MSG_226 "Tiriami esami įkelties įrašai..." t MSG_227 "Uždaromas esamas tomas..." -t MSG_228 "Rašomas valdantysis įkelties įrašas (MBR)..." -t MSG_229 "Rašomas skaidinio įkelties įrašas..." +t MSG_228 "Įrašomas valdantysis įkelties įrašas (MBR)..." +t MSG_229 "Įrašomas skaidinio įkelties įrašas..." t MSG_230 "Kopijuojami DOS failai..." t MSG_231 "Kopijuojami ISO failai..." t MSG_232 "Win7 EFI įkelties sąranka (gali užtrukti)..." @@ -10285,7 +10286,7 @@ t MSG_242 "Nepavyko atsiųsti failo." t MSG_243 "Tikrinama, ar yra Rufus naujinių..." t MSG_244 "Naujiniai: negaliu prisijungti prie interneto" t MSG_245 "Naujiniai: negaliu pasiekti versijos duomenų" -t MSG_246 "Yra nauja Rufus versija!" +t MSG_246 "Rasta nauja Rufus versija!" t MSG_247 "Naujos Rufus versijos nerasta" t MSG_248 "Programos registro raktai sėkmingai ištrinti" t MSG_249 "Nepavyko ištrinti programos registro raktų" @@ -10293,50 +10294,50 @@ t MSG_249 "Nepavyko ištrinti programos registro raktų" t MSG_250 "%s įjungtas" t MSG_251 "%s išjungtas" t MSG_252 "Dydžio tikrinimas" -t MSG_253 "Kietųjų diskų aptikimas" -t MSG_254 "Priversti didelį FAT32 formatavimą" +t MSG_253 "Standžiųjų diskų aptikimas" +t MSG_254 "Priverstinis didelių FAT32 suženklinimas" t MSG_255 "NoDriveTypeAutorun bus ištrintas išeinant" t MSG_256 "Netikrų diskų aptikimas" t MSG_257 "Joliet palaikymas" t MSG_258 "Rock Ridge palaikymas" t MSG_259 "Priversti naujintis" t MSG_260 "NTFS glaudinimas" -t MSG_261 "Rašomas atvaizdas: %0.1f%% baigta" +t MSG_261 "Įrašomas atvaizdis: %0.1f%% baigta" t MSG_262 "ISO palaikymas" t MSG_263 "Naudoti TIKRUOSIUS dydžio vienetus" -t MSG_264 "Trinamas aplankas '%s'" +t MSG_264 "Trinamas aplankas „%s“" t MSG_265 "VMWare disko aptikimas" -t MSG_266 "Dvigubas UEFI/BIOS režimas" -t MSG_267 "Taikomas Windows atvaizdas: %0.1f%% baigta" -t MSG_268 "Taikomas Windows atvaizdas..." +t MSG_266 "Dviguba UEFI/BIOS veiksena" +t MSG_267 "Taikomas Windows atvaizdis: %0.1f%% baigta" +t MSG_268 "Taikomas Windows atvaizdis..." t MSG_269 "Išsaugoti laiko žymas" t MSG_270 "USB derinimas" -t MSG_271 "Skaičiuojamos atvaizdo kontrolinės sumos: %0.1f%% baigta" +t MSG_271 "Skaičiuojamos atvaizdžio kontrolinės sumos: %0.1f%% baigta" t MSG_272 "Skaičiuoti MD5, SHA1 ir SHA256 kontrolines sumas pasirinktam atvaizdui" t MSG_273 "Keisti programos kalbą" -t MSG_274 "Aptiktas ISOHybrid atvaizdas" +t MSG_274 "Aptiktas ISOHybrid atvaizdis" # '%s' below will be replaced with your translations for MSG_036 ("ISO Image") and MSG_095 ("DD Image") -t MSG_275 "Jūsų pasirinktas atvaizdas yra 'ISOHybrid' atvaizdas. Tai reiškia, kad jis gali būti įrašytas " - "%s (failų kopijavimo) režimu arba %s (disko atvaizdo) režimu.\n" - "Rufus rekomenduoja naudoti režimą %s, tam, kad jūs visada turėtumėte visišką prieigą prie disko po įrašymo.\n" - "Tačiau, jei susiduriate su problemomis įkelties metu, galite pabandyti įrašyti šį atvaizdą iš naujo režimu %s.\n\n" - "Prašome pasirinkti režimą, kuriuo norite įrašyti šį atvaizdą:" +t MSG_275 "Jūsų pasirinktas atvaizdis yra „ISOHybrid“ atvaizdis. Tai reiškia, kad jis gali būti įrašytas " + "%s (failų kopijavimo) veiksena arba %s (disko atvaizdžio) veiksena.\n" + "Rufus rekomenduoja naudoti veikseną %s tam, kad visada turėtumėte visišką prieigą prie disko po įrašymo.\n" + "Tačiau, jei susiduriate su problemomis įkelties metu, galite pabandyti įrašyti šį atvaizdį iš naujo %s veiksena.\n\n" + "Prašome pasirinkti veikseną, kuria norite įrašyti šį atvaizdį:" # '%s' below will be replaced with your translation for MSG_036 ("ISO Image") -t MSG_276 "Įrašyti režimu %s (rekomenduojama)" +t MSG_276 "Įrašyti %s veiksena (rekomenduojama)" # '%s' below will be replaced with your translation for MSG_095 ("DD Image") -t MSG_277 "Įrašyti režimu %s" +t MSG_277 "Įrašyti %s veiksena" # The following will be used for new controls of the Rufus 3.0 interface # They are added as messages, so that I will have them available when needed. # 278 & 280 will be dropdown titles, similar to how IDS_DEVICE_TXT or IDS_PARTITION_TYPE_TXT are used # 279 & 281 will be items that can appear in the dropdowns -t MSG_278 "Įkelties tipas" -t MSG_279 "Neįkeliamas" -t MSG_280 "Atvaizdo parinktis" -t MSG_281 "(Prašau pasirinkti atvaizdą)" +t MSG_278 "Paleidimo tipas" +t MSG_279 "Nepaleidžiamas" +t MSG_280 "Atvaizdžio parinktis" +t MSG_281 "(Prašome pasirinkti atvaizdį)" t MSG_282 "Išimtinis USB disko užrakinimas" t MSG_283 "Negaliojantis parašas" t MSG_284 "Atsiųstas vykdomasis failas neturi skaitmeninio parašo." -t MSG_285 "Atsiųstą vykdomąjį failą pasirašė '%s'.\nŠio parašo mes neatpažįstame ir tai gali " +t MSG_285 "Atsiųstą vykdomąjį failą pasirašė „%s“.\nŠio parašo mes neatpažįstame ir tai gali " "būti tam tikros kenkėjiškos veiklos požymis...\nAr jūs tikrai norite vykdyti šį failą?" t MSG_286 "Nulinamas diskas: %0.1f%% baigta" t MSG_287 "Ne USB keičiamų diskų aptikimas" @@ -10347,13 +10348,13 @@ t MSG_291 "Versijos parinktis" t MSG_292 "Prašome pasirinkti Windows versiją, kurią norite įdiegti:" t MSG_293 "Nepalaikoma Windows versija" t MSG_294 "Šios Windows versijos Rufus nebepalaiko." -t MSG_295 "Įspėjimas: Neoficiali versija" -t MSG_296 "Ši Rufus versija NĖRA išleista jos oficialaus kūrėjo(ų).\n\nAr jūs tikrai norite ją vykdyti?" +t MSG_295 "Įspėjimas: neoficiali versija" +t MSG_296 "Ši Rufus versija NĖRA išleista jos oficialaus kūrėjo(ų).\n\nAr tikrai norite ją paleisti?" t MSG_297 "Aptiktas nepilnas ISO" t MSG_298 "Jūsų pasirinktas ISO failas neatitinka deklaruojamo dydžio: %s duomenų trūksta!\n\n" - "Jei jūs gavote šį failą iš interneto, pabandykite atsisiųsti jį iš naujo ir patikrinkite, " + "Jei jūs gavote šį failą internetu, pabandykite atsisiųsti jį iš naujo ir patikrinkite, " "ar MD5 or SHA kontrolinės sumos atitinka oficialiąsias.\n\nBeje, jūs galite apskaičiuoti " - "MD5 arba SHA per Rufus, paspaudę '#' mygtuką." + "MD5 arba SHA per Rufus, paspaudę mygtuką „#“." ################################################################################ l "ms-MY" "Malay (Bahasa Malaysia)" 0x043e, 0x083e diff --git a/src/rufus.rc b/src/rufus.rc index dd7cee17..352546a7 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1205" +CAPTION "Rufus 2.18.1206" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1205,0 - PRODUCTVERSION 2,18,1205,0 + FILEVERSION 2,18,1206,0 + PRODUCTVERSION 2,18,1206,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1205" + VALUE "FileVersion", "2.18.1206" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1205" + VALUE "ProductVersion", "2.18.1206" END END BLOCK "VarFileInfo" From 6a45a678b303f30c196f083904767afcab56acbe Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 23 Oct 2017 17:09:18 +0100 Subject: [PATCH 87/97] [ui] ensure that the same drive is re-selected on device refresh --- src/rufus.c | 9 +++------ src/rufus.h | 2 +- src/rufus.rc | 10 +++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/rufus.c b/src/rufus.c index ed58ee8c..06242196 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2293,12 +2293,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA case WM_COMMAND: #ifdef RUFUS_TEST if (LOWORD(wParam) == IDC_TEST) { - uprintf("ts = %lld", GetSignatureTimeStamp("C:\\rufus\\rufus-2.17_BETA.exe")); -// ExtractEfiImgFiles("C:\\rufus"); -// ExtractEFI("C:\\rufus\\efi.img", "C:\\rufus\\efi"); -// uprintf("Proceed = %s", CheckDriveAccess(2000)?"True":"False"); -// char* choices[] = { "Choice 1", "Choice 2", "Choice 3" }; -// SelectionDyn("Test Choice", "Unused", choices, ARRAYSIZE(choices)); + GetDevices(DeviceNum); break; } #endif @@ -2425,6 +2420,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA PopulateProperties(ComboBox_GetCurSel(hDeviceList)); SendMessage(hMainDialog, WM_COMMAND, (CBN_SELCHANGE<<16) | IDC_FILESYSTEM, ComboBox_GetCurSel(hFileSystem)); + nDeviceIndex = ComboBox_GetCurSel(hDeviceList); + DeviceNum = (nDeviceIndex == CB_ERR) ? 0 : (DWORD)ComboBox_GetItemData(hDeviceList, nDeviceIndex); break; case IDC_NBPASSES: if (HIWORD(wParam) != CBN_SELCHANGE) diff --git a/src/rufus.h b/src/rufus.h index ab1f7223..27e48262 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -31,7 +31,7 @@ /* Program options */ #define RUFUS_LOGGING // print info to logging facility /* Features not ready for prime time and that may *DESTROY* your data - USE AT YOUR OWN RISKS! */ -// #define RUFUS_TEST +//#define RUFUS_TEST #define APPLICATION_NAME "Rufus" #define COMPANY_NAME "Akeo Consulting" diff --git a/src/rufus.rc b/src/rufus.rc index 352546a7..bd4f1ba2 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1206" +CAPTION "Rufus 2.18.1207" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1206,0 - PRODUCTVERSION 2,18,1206,0 + FILEVERSION 2,18,1207,0 + PRODUCTVERSION 2,18,1207,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1206" + VALUE "FileVersion", "2.18.1207" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1206" + VALUE "ProductVersion", "2.18.1207" END END BLOCK "VarFileInfo" From fa94abcc8e367cc8460ef46c2b2c6a26526a89c8 Mon Sep 17 00:00:00 2001 From: ip_gpu Date: Fri, 27 Oct 2017 14:29:03 +0500 Subject: [PATCH 88/97] [misc] fix a potential resource leak * IsFontAvailable() could exit without releasing its 'hDC' handle resulting in a resource leak * Fix V773 from PSV-Studio * Closes #1050 --- src/rufus.rc | 10 +++++----- src/stdfn.c | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/rufus.rc b/src/rufus.rc index bd4f1ba2..174242e5 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1207" +CAPTION "Rufus 2.18.1208" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1207,0 - PRODUCTVERSION 2,18,1207,0 + FILEVERSION 2,18,1208,0 + PRODUCTVERSION 2,18,1208,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1207" + VALUE "FileVersion", "2.18.1208" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1207" + VALUE "ProductVersion", "2.18.1208" END END BLOCK "VarFileInfo" diff --git a/src/stdfn.c b/src/stdfn.c index 73329c5c..8dc64898 100644 --- a/src/stdfn.c +++ b/src/stdfn.c @@ -634,8 +634,10 @@ BOOL IsFontAvailable(const char* font_name) { LOGFONTA lf = { 0 }; HDC hDC = GetDC(hMainDialog); - if (font_name == NULL) + if (font_name == NULL) { + ReleaseDC(hMainDialog, hDC); return FALSE; + } lf.lfCharSet = DEFAULT_CHARSET; safe_strcpy(lf.lfFaceName, LF_FACESIZE, font_name); From 63eb747cdea03b9e43a39c266be24a5969c8873f Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 1 Nov 2017 12:30:29 +0000 Subject: [PATCH 89/97] [iso] make the lookup for updatable .cfg file more generic * For ESET and other ISOs, such as Arch derivatives * Closes #1013 --- src/iso.c | 22 ++++++++++------------ src/parser.c | 3 ++- src/rufus.rc | 10 +++++----- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/iso.c b/src/iso.c index cbecbdd5..ea9a05a7 100644 --- a/src/iso.c +++ b/src/iso.c @@ -57,9 +57,9 @@ void cdio_destroy (CdIo_t* p_cdio) {} uint32_t GetInstallWimVersion(const char* iso); typedef struct { + BOOLEAN is_cfg; BOOLEAN is_syslinux_cfg; BOOLEAN is_grub_cfg; - BOOLEAN is_arch_cfg; BOOLEAN is_old_c32[NB_OLD_C32]; } EXTRACT_PROPS; @@ -83,7 +83,6 @@ static const char* install_wim_name[] = { "install.wim", "install.swm" }; static const char* grub_dirname = "/boot/grub/i386-pc"; static const char* grub_cfg = "grub.cfg"; static const char* syslinux_cfg[] = { "isolinux.cfg", "syslinux.cfg", "extlinux.conf" }; -static const char* arch_cfg[] = { "archiso_sys.cfg", "archiso_sys32.cfg", "archiso_sys64.cfg" }; static const char* isolinux_bin[] = { "isolinux.bin", "boot.bin" }; static const char* pe_dirname[] = { "/i386", "/minint" }; static const char* pe_file[] = { "ntdetect.com", "setupldr.bin", "txtsetup.sif" }; @@ -144,11 +143,12 @@ static void log_handler (cdio_log_level_t level, const char *message) static BOOL check_iso_props(const char* psz_dirname, int64_t i_file_length, const char* psz_basename, const char* psz_fullpath, EXTRACT_PROPS *props) { - size_t i, j; + size_t i, j, len; // Check for an isolinux/syslinux config file anywhere memset(props, 0, sizeof(EXTRACT_PROPS)); for (i=0; iis_cfg = TRUE; // Required for "extlinux.conf" props->is_syslinux_cfg = TRUE; if ((scan_only) && (i == 1) && (safe_stricmp(psz_dirname, efi_dirname) == 0)) img_report.has_efi_syslinux = TRUE; @@ -161,13 +161,11 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t i_file_length, cons props->is_old_c32[i] = TRUE; } - // Check for ArchLinux derivatives config files + // Check for config files that may need patching if (!scan_only) { - for (i = 0; iis_arch_cfg = TRUE; - } - } + len = safe_strlen(psz_basename); + if ((len >= 4) && safe_stricmp(&psz_basename[len-4], ".cfg") == 0) + props->is_cfg = TRUE; } // Check for GRUB artifacts @@ -276,7 +274,7 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha // Workaround for config files requiring an ISO label for kernel append that may be // different from our USB label. Oh, and these labels must have spaces converted to \x20. - if ((props->is_syslinux_cfg) || (props->is_grub_cfg) || (props->is_arch_cfg)) { + if (props->is_cfg) { iso_label = replace_char(img_report.label, ' ', "\\x20"); usb_label = replace_char(img_report.usb_label, ' ', "\\x20"); if ((iso_label != NULL) && (usb_label != NULL)) { @@ -468,7 +466,7 @@ static int udf_extract_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const cha // The drawback however is with cancellation. With a large file, CloseHandle() // may take forever to complete and is not interruptible. We try to detect this. ISO_BLOCKING(safe_closehandle(file_handle)); - if (props.is_syslinux_cfg || props.is_grub_cfg || props.is_arch_cfg) + if (props.is_cfg) fix_config(psz_sanpath, psz_path, psz_basename, &props); safe_free(psz_sanpath); } @@ -614,7 +612,7 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path) uprintf(" Could not set timestamp: %s", WindowsErrorString()); } ISO_BLOCKING(safe_closehandle(file_handle)); - if (props.is_syslinux_cfg || props.is_grub_cfg || props.is_arch_cfg) + if (props.is_cfg) fix_config(psz_sanpath, psz_path, psz_basename, &props); safe_free(psz_sanpath); } diff --git a/src/parser.c b/src/parser.c index 9846402e..73233a6b 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1131,7 +1131,8 @@ char* replace_in_token_data(const char* filename, const char* token, const char* } // Check the input file's BOM and create an output file with the same if (fread(&bom, sizeof(bom), 1, fd_in) != 1) { - uprintf("Could not read file '%s'\n", filename); + if (!feof(fd_in)) + uprintf("Could not read file '%s'\n", filename); goto out; } switch(bom) { diff --git a/src/rufus.rc b/src/rufus.rc index 174242e5..b13f55f3 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1208" +CAPTION "Rufus 2.18.1209" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1208,0 - PRODUCTVERSION 2,18,1208,0 + FILEVERSION 2,18,1209,0 + PRODUCTVERSION 2,18,1209,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1208" + VALUE "FileVersion", "2.18.1209" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1208" + VALUE "ProductVersion", "2.18.1209" END END BLOCK "VarFileInfo" From 79a03637d6460d319d7c2e8b75bd48ff905beed7 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 1 Nov 2017 13:16:32 +0000 Subject: [PATCH 90/97] update ChangeLog for BETA release --- ChangeLog.txt | 10 ++++++++++ src/pki.c | 5 ++++- src/rufus.rc | 10 +++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 45ab4964..730d9db9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,13 @@ +o Version 2.18 (2017.11.??) + Ensure that the same drive is reselected on device refresh + Add a cheat mode to cycle the USB port of currently selected device + Make lookup for updatable .cfg file more generic (e.g. ESET SysRescue) + Fix handling of multiextent ISOs (e.g. BlackArch Linux) + Fix propagation of image decompression errors + + IMPORTANT: THIS IS THE LAST RELEASE TO SUPPORT WINDOWS XP AND WINDOWS VITA + FUTURE RUFUS RELEASES WILL *NO LONGER* BE COMPATIBILE WITH THESE PLATFORMS + o Version 2.17 (2017.09.12) Add support for Debian 9 live ISOs in UEFI mode Add support for Super Floppy Disk "partitioning" mode diff --git a/src/pki.c b/src/pki.c index 832ad863..ba041abb 100644 --- a/src/pki.c +++ b/src/pki.c @@ -235,7 +235,10 @@ char* GetSignatureName(const char* path, const char* country_code) goto out; } - uprintf("Binary executable is signed by '%s' (%s)", szSubjectName, szCountry); + if (szCountry[0] == '_') + uprintf("Binary executable is signed by '%s'", szSubjectName); + else + uprintf("Binary executable is signed by '%s' (%s)", szSubjectName, szCountry); p = szSubjectName; out: diff --git a/src/rufus.rc b/src/rufus.rc index b13f55f3..cea60634 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1209" +CAPTION "Rufus 2.18.1210" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1209,0 - PRODUCTVERSION 2,18,1209,0 + FILEVERSION 2,18,1210,0 + PRODUCTVERSION 2,18,1210,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1209" + VALUE "FileVersion", "2.18.1210" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1209" + VALUE "ProductVersion", "2.18.1210" END END BLOCK "VarFileInfo" From 9cd04be52926b23ecfec6a7d95b88630fa17aa81 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 2 Nov 2017 12:49:05 +0000 Subject: [PATCH 91/97] [grub] update grub4dos to latest and add db entry for grub 2.03 --- ChangeLog.txt | 4 +-- res/grub/grldr.mbr | Bin 8192 -> 8192 bytes res/grub/readme.txt | 4 +-- src/db.h | 7 ++-- src/ms-sys/inc/mbr_grub.h | 72 +++++++++++++++++++------------------- src/rufus.rc | 10 +++--- 6 files changed, 49 insertions(+), 48 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 730d9db9..73580a5b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,8 +5,8 @@ o Version 2.18 (2017.11.??) Fix handling of multiextent ISOs (e.g. BlackArch Linux) Fix propagation of image decompression errors - IMPORTANT: THIS IS THE LAST RELEASE TO SUPPORT WINDOWS XP AND WINDOWS VITA - FUTURE RUFUS RELEASES WILL *NO LONGER* BE COMPATIBILE WITH THESE PLATFORMS + IMPORTANT: THIS IS THE LAST RELEASE TO SUPPORT WINDOWS XP AND WINDOWS VISTA + FUTURE RUFUS RELEASES WILL *NO LONGER* BE COMPATIBLE WITH THESE PLATFORMS o Version 2.17 (2017.09.12) Add support for Debian 9 live ISOs in UEFI mode diff --git a/res/grub/grldr.mbr b/res/grub/grldr.mbr index 687ff9a006b29f298a7f42c066f8f00a31673fee..d168da09398e641845e690c4f9dff318acd8f01a 100644 GIT binary patch delta 805 zcmYk4ZD><>6vqE2H8*{U_qH)<(&WabHeAfs#^giM+M;c_RENXWZgsWltV6DELos!V zY__+Sh%r>Ory%ZwpzUzJfG+_{*X?hiQV~(d9Ahw8CsjP@g%TCw3brv7KkR&ZIKSWX z?a}M>y3;q|_L*DNj*}%lS7H_Pe7N*4- zD0t)1uNpR5nK9-;&M+|An(2TU%b4(Gyi?Jds5DbO6R`wlHpFHO(;h~v zFi&g&N^BE50oLI^QlMz{taNP2>{!qE((c;)*HW|?U4<)hdJi&eDx7Zl!4gahZA|~x zAJkWEX6&GiKXp@8ivK0kvJ{_kQy@i;Es;ukA{a~m?-adv3R1kxL*^7+wRGeKb)}7U z(PhMFgp0L+@W2%zX+O?Qk!Mo*TKhr-oL9=vQU6>^}VOQQ3LU>2Q+?Dw)v)4K$C~CFFv2=RY5HucjZfg);sBJR;%tIDc-Z*}o?@e` z%)dmYq9mU*Q$dnHb_eeXTbQppI4*2v68%Sfz(cPH<1W8@uZQjv?Pp^=Te(B?m0{vx znG$&4b-tk0lih|yS}Wgyk&-spfe%aKP@dT2?lnOlzL4upbCdXyx85}}DdF9fLN1f~ xM}7ZZw6g8(Bg{mD*yF8&eK_nr3xDE<#m&%zgNwh01X@Zbb1$(4Y)x~^m3NUgMB)Gd delta 793 zcmYk4TWAw`6vqE&Y$r7)Gi{ofG?~~`LowK98)%{Jifbjr3nDSvT3cPOjJPTbsh5ZC z)~Pk6A-iBbmSs^37RBp>wonoEPfN8$p|W1U2L&&!a?$~fidhP)*(g4Eo(|vneGebs z(H3iqk6eLs-TgJT)}oG4Q~T%75Y-Qqr^T}Xa?F1e+>V@~H`7;G?OvAJ`5NDZqCLXsMIpvr@*%<8}IY8%YaxoV@D2$fMIQ{$ns zs1z6qWYj?V8iNlPbt~0obRkQ`Lo==cqvlKtOdCeTb@E`FSq+ntshN%%eABDr)4K2r zqaRU}>fzPE2B{5T89tGH1q(mPhl)Rqbd1h#UugUw#|qJwUyb4XH}!uQ{Asa?Y5Tl> zZBa90doBE-ld4kuu0lVg_){nOQZ#IcmeXxfpZ`5m@RgaB;)O2CP0>k1%S^vk+Qbgh zam0e%aQ~>qZWP`=R+jV^jj^eY?TS<5(mv5XO)r_eAycJ$6# z;mUr3o76_$fLc)#G~kn>1Ox_lIR6yjFn(0(1k)r|yXzcxCS<%-E9Noz*pTOWpNVbR se4Po@kKOJnXvH!2UoeTA=0u + * Copyright © 2016-2017 Pete Batard * * 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 @@ -28,7 +28,6 @@ static uint8_t sha256db[] = { 0x12, 0xbd, 0x22, 0xd2, 0xb3, 0x69, 0x56, 0x0f, 0x89, 0xb8, 0x50, 0x7e, 0x7e, 0x74, 0xeb, 0xc5, 0xea, 0x44, 0x91, 0x48, 0x75, 0xf0, 0xa4, 0xcb, 0x1e, 0xa6, 0xfb, 0x4e, 0xc9, 0x89, 0x58, 0x17, // syslinux-6.03/pre6/ldlinux.sys 0x15, 0x5f, 0x36, 0x7b, 0xb1, 0x30, 0xfe, 0x05, 0x5c, 0x79, 0x9f, 0x88, 0xb3, 0xc0, 0xc1, 0xa0, 0x0a, 0x18, 0x05, 0x78, 0x22, 0x69, 0xcf, 0x7e, 0x54, 0xaa, 0x61, 0xbd, 0xe3, 0x8e, 0x05, 0x92, // syslinux-6.03/pre3/ldlinux.bss - 0x16, 0xfa, 0x7a, 0xb6, 0x9b, 0x63, 0xc3, 0x79, 0xa1, 0x25, 0x7d, 0x6a, 0x1f, 0x1c, 0xf0, 0xc8, 0x17, 0xfe, 0x59, 0x67, 0xc0, 0x69, 0x66, 0xd8, 0x7e, 0x6c, 0x48, 0x0b, 0x87, 0x71, 0x1d, 0xf7, // grub4dos-0.4.6a/grldr 0x1c, 0xb7, 0x8b, 0x98, 0xbc, 0xd6, 0x76, 0x7b, 0x01, 0x44, 0xf5, 0x00, 0xaf, 0x81, 0xef, 0x4f, 0x3c, 0x54, 0xea, 0xaf, 0xe3, 0xc9, 0x4e, 0x1f, 0xd6, 0x24, 0x68, 0x41, 0x4e, 0x98, 0x92, 0x25, // syslinux-6.03/pre20/ldlinux.bss 0x1c, 0xc6, 0x32, 0x21, 0xfd, 0xf4, 0x46, 0xfc, 0xda, 0xc6, 0xc0, 0x56, 0x35, 0x79, 0x54, 0xc1, 0x5b, 0x61, 0x75, 0xca, 0x1b, 0xc2, 0xa4, 0x9f, 0x85, 0x52, 0xec, 0xca, 0x28, 0xac, 0x3e, 0x51, // syslinux-6.02/ldlinux.bss 0x22, 0x96, 0x82, 0xac, 0x61, 0xb8, 0x8b, 0x11, 0x25, 0xfc, 0xd7, 0xe6, 0x9f, 0x4e, 0x7f, 0x46, 0x7f, 0x68, 0xc5, 0x14, 0x9e, 0xb9, 0x37, 0x1a, 0x98, 0xd8, 0xf2, 0x78, 0x41, 0x40, 0xad, 0x88, // syslinux-5.00/ldlinux.sys @@ -51,6 +50,7 @@ static uint8_t sha256db[] = { 0x42, 0x23, 0x03, 0x86, 0x6d, 0xa1, 0xf2, 0xaf, 0x28, 0x25, 0x92, 0x29, 0x17, 0x21, 0xc7, 0x61, 0x23, 0xcf, 0xe9, 0x84, 0x05, 0xb7, 0x60, 0x2a, 0xc7, 0xe3, 0xe9, 0x5b, 0xf3, 0xcb, 0xd4, 0xba, // syslinux-6.00/ldlinux.c32 0x46, 0x48, 0xe8, 0x13, 0xd7, 0x54, 0x20, 0x39, 0x4e, 0xe6, 0x35, 0xd2, 0xa4, 0x78, 0x44, 0xeb, 0xdc, 0xc9, 0x98, 0xd3, 0x45, 0x8f, 0x95, 0xf9, 0x50, 0x80, 0x50, 0x9b, 0x88, 0x80, 0x44, 0x4a, // syslinux-6.03/pre17/ldlinux.sys 0x47, 0x0c, 0x04, 0x6d, 0xe8, 0x53, 0x5d, 0x46, 0x0e, 0x05, 0x63, 0x99, 0xa8, 0x89, 0x28, 0x0b, 0x25, 0x55, 0xf2, 0xb7, 0xbf, 0x89, 0x84, 0x9a, 0x7f, 0x27, 0xa4, 0x32, 0x72, 0xb5, 0x3f, 0x12, // syslinux-6.01/ldlinux.sys + 0x4c, 0x42, 0x56, 0x49, 0xae, 0xea, 0x45, 0xce, 0x84, 0x23, 0xc5, 0x14, 0xdf, 0x20, 0xf6, 0x86, 0x43, 0xeb, 0xcb, 0x42, 0xec, 0xa3, 0xd2, 0x9b, 0x70, 0x3a, 0x7c, 0xab, 0x1f, 0xe6, 0xc7, 0xd4, // grub4dos-0.4.6a/grldr 0x4d, 0xee, 0xc3, 0x47, 0xb0, 0xa3, 0x18, 0x46, 0x09, 0x42, 0xb2, 0xeb, 0x3e, 0xd1, 0x75, 0xcf, 0x3f, 0x8c, 0x3e, 0x8c, 0xe4, 0x3b, 0x14, 0xfc, 0x8e, 0x8f, 0x8c, 0x51, 0xcb, 0xa5, 0x5a, 0xdb, // syslinux-5.02/ldlinux.c32 0x4e, 0xfb, 0x8f, 0xde, 0xb9, 0xe1, 0xe2, 0xa2, 0xc3, 0xf0, 0x11, 0xca, 0x77, 0x3b, 0x95, 0xf4, 0xb9, 0x7f, 0xbc, 0x7f, 0x3d, 0x40, 0x4d, 0x7c, 0x60, 0xf3, 0x4a, 0x61, 0x43, 0x44, 0x7e, 0x7f, // syslinux-5.01/ldlinux.c32 0x50, 0xca, 0xe9, 0x94, 0x79, 0x68, 0xdf, 0xa6, 0xd7, 0x11, 0xcd, 0xb0, 0x7d, 0x84, 0xf2, 0x56, 0x78, 0xd6, 0x69, 0xbf, 0xb0, 0x29, 0xaa, 0x56, 0xa1, 0x04, 0x55, 0xb0, 0xcd, 0x06, 0xca, 0xd2, // syslinux-6.03/pre3/ldlinux.sys @@ -70,7 +70,6 @@ static uint8_t sha256db[] = { 0x77, 0x9a, 0x5e, 0xbd, 0x69, 0xd3, 0x28, 0x5e, 0xb9, 0xed, 0x4a, 0xc7, 0xc0, 0x4d, 0x2d, 0x15, 0xcb, 0xa1, 0x8a, 0x1f, 0x97, 0xc7, 0xc4, 0xbe, 0x62, 0x48, 0x93, 0xa9, 0xe1, 0xb0, 0x89, 0x2e, // syslinux-6.03/pre9/ldlinux.sys 0x78, 0x64, 0x8e, 0xf0, 0xc5, 0x00, 0x41, 0x75, 0xb9, 0xa8, 0xea, 0x33, 0x30, 0x14, 0xea, 0x02, 0xc9, 0x17, 0xf8, 0x23, 0xe7, 0x7a, 0x3e, 0xc9, 0xac, 0xd9, 0xd2, 0x2b, 0x46, 0x02, 0xf3, 0x6d, // syslinux-6.03/pre13/ldlinux.sys 0x7d, 0xa9, 0xc5, 0x21, 0x76, 0xb8, 0xaf, 0x01, 0x64, 0xea, 0x39, 0x21, 0x22, 0x44, 0xb1, 0x0a, 0xa0, 0xc7, 0x97, 0xe7, 0x65, 0xbb, 0x6b, 0x92, 0x69, 0xb5, 0x8b, 0xc9, 0xe5, 0x0a, 0x9f, 0x18, // syslinux-5.01/ldlinux.bss - 0x80, 0xea, 0x9a, 0xc3, 0xab, 0x09, 0xaf, 0x3f, 0xbe, 0x05, 0x6a, 0xf6, 0xd4, 0x8a, 0xf5, 0x2c, 0xdb, 0xa7, 0x36, 0xcb, 0xa5, 0xe2, 0x49, 0x63, 0x49, 0xd0, 0xe9, 0x31, 0xa7, 0x16, 0x9b, 0x11, // grub4dos-0.4.6a/grldr.mbr 0x82, 0x11, 0xfa, 0xe8, 0xaf, 0xf0, 0x23, 0x3f, 0x05, 0xa8, 0xb7, 0x8c, 0x58, 0x15, 0x25, 0xe2, 0x81, 0xac, 0x98, 0x23, 0x54, 0xa8, 0xc4, 0x3b, 0xb4, 0x96, 0x5e, 0x61, 0xdc, 0x98, 0xb4, 0x62, // syslinux-6.03/pre8/ldlinux.bss 0x83, 0x9b, 0xd0, 0x8a, 0xcb, 0x68, 0x47, 0xd6, 0x55, 0x07, 0xf1, 0x4e, 0x7a, 0x55, 0x6e, 0x91, 0xe6, 0x12, 0x9c, 0x47, 0x86, 0x3f, 0x7d, 0x61, 0xe2, 0xce, 0x6d, 0xb7, 0x8d, 0xf3, 0xd2, 0x3f, // syslinux-6.03/pre9/ldlinux.bss 0x87, 0xaa, 0x91, 0xf8, 0x7f, 0xba, 0x5f, 0x31, 0x79, 0x43, 0x08, 0xda, 0xa4, 0xa4, 0x8d, 0xad, 0x6c, 0xf6, 0xfa, 0x34, 0x26, 0x4d, 0x66, 0xb8, 0x84, 0xb8, 0xb9, 0xdc, 0x96, 0x42, 0xed, 0x86, // syslinux-5.02/ldlinux.sys @@ -78,6 +77,7 @@ static uint8_t sha256db[] = { 0x8b, 0x93, 0x7e, 0x5e, 0x8b, 0xae, 0x5a, 0xf8, 0xc8, 0x95, 0x63, 0xc0, 0x0e, 0x9c, 0xaf, 0xc6, 0xcd, 0x7c, 0x2c, 0x80, 0x8a, 0xda, 0x7b, 0xf4, 0xad, 0x51, 0x08, 0xda, 0x3e, 0x51, 0xcd, 0x70, // grub-2.00-22/core.img 0x8e, 0xc8, 0x42, 0x06, 0x94, 0x4c, 0xd4, 0x3d, 0xf6, 0xba, 0x83, 0x63, 0xc0, 0x81, 0xe4, 0xa0, 0x82, 0x9e, 0x71, 0x9a, 0xbf, 0x5a, 0x46, 0x6d, 0x7c, 0x81, 0x0c, 0x2f, 0x5b, 0x6d, 0x13, 0x75, // syslinux-6.03/pre5/ldlinux.sys 0x95, 0x8d, 0x10, 0xbb, 0x87, 0x28, 0xcc, 0x1f, 0xf1, 0x6a, 0x12, 0xee, 0x6a, 0x60, 0x62, 0x40, 0xa6, 0xb7, 0x4d, 0xab, 0xa0, 0x2b, 0x8c, 0xb8, 0xed, 0x2a, 0xe8, 0x1c, 0x2f, 0xb2, 0x5b, 0x97, // syslinux-6.00/ldlinux.bss + 0x97, 0x34, 0xdc, 0x05, 0x5e, 0x3d, 0xa6, 0xd0, 0xec, 0xe8, 0x86, 0xa1, 0xde, 0x5a, 0xe2, 0xb4, 0x81, 0xd5, 0xd4, 0xdf, 0x61, 0x52, 0xf7, 0x1e, 0x82, 0x5c, 0x99, 0x44, 0x03, 0x92, 0x92, 0xf0, // grub-2.03/core.img 0x9a, 0x0b, 0xc4, 0x1b, 0xd7, 0x95, 0xed, 0xb0, 0x83, 0x0f, 0x1c, 0xc4, 0x82, 0x4b, 0xfa, 0x9d, 0xe0, 0x9d, 0x68, 0x63, 0x92, 0x09, 0x4f, 0x5a, 0xe7, 0xfb, 0xac, 0xfb, 0xb0, 0x17, 0x9d, 0xa6, // syslinux-6.03/pre1/ldlinux.bss 0x9b, 0xcc, 0x65, 0x92, 0xa7, 0xba, 0x7e, 0x73, 0x38, 0xf4, 0xbb, 0xba, 0x27, 0xc6, 0x30, 0x16, 0xb9, 0x5e, 0xcb, 0x1e, 0xc6, 0x8c, 0x0b, 0xe9, 0xb6, 0x99, 0xb2, 0xea, 0x69, 0xcb, 0xab, 0xb2, // syslinux-5.00/ldlinux.c32 0xa6, 0x82, 0x43, 0xa0, 0xf2, 0xe5, 0x90, 0xb8, 0x14, 0x02, 0xd6, 0xfa, 0x62, 0xd4, 0xfd, 0x30, 0x94, 0x8c, 0x00, 0x3d, 0xa1, 0x2b, 0xfe, 0xeb, 0x69, 0xba, 0x20, 0x34, 0x17, 0x27, 0x09, 0x4c, // syslinux-6.03/pre14/ldlinux.sys @@ -104,6 +104,7 @@ static uint8_t sha256db[] = { 0xec, 0xfd, 0xbc, 0x3f, 0x4f, 0x2e, 0x4d, 0x99, 0x16, 0x9c, 0xdd, 0xfb, 0x15, 0x2d, 0x92, 0x4d, 0x7d, 0xe6, 0x8a, 0xb6, 0x7f, 0x4d, 0x12, 0x54, 0x40, 0xfa, 0xbc, 0x9f, 0x00, 0x46, 0xd5, 0xbc, // syslinux-6.03/pre5/ldlinux.bss 0xee, 0xed, 0xc0, 0x4c, 0x13, 0x73, 0xb5, 0xc4, 0x04, 0x4d, 0x1f, 0xde, 0x0d, 0x2f, 0xb8, 0xe2, 0x8c, 0x74, 0xb1, 0x02, 0x9c, 0x99, 0xed, 0x67, 0x0a, 0x15, 0x98, 0x3f, 0x18, 0xa0, 0x4d, 0x36, // syslinux-6.02/ldlinux.c32 0xf5, 0x40, 0x26, 0x1c, 0x09, 0x7d, 0xbd, 0x8a, 0x8a, 0x12, 0x9b, 0x68, 0x99, 0x5f, 0x33, 0xab, 0xe7, 0x1c, 0x29, 0x40, 0xf8, 0x87, 0xc6, 0x68, 0x9b, 0xf8, 0xdc, 0x3f, 0x1a, 0xcf, 0x0b, 0x44, // syslinux-6.03/pre17/ldlinux.bss + 0xf5, 0xc6, 0xe8, 0xe2, 0xc1, 0xeb, 0x73, 0x80, 0x28, 0x5f, 0xa9, 0xcb, 0x1c, 0x91, 0x68, 0xe9, 0x2d, 0x5b, 0x3b, 0x55, 0xcd, 0xe0, 0x52, 0xc0, 0x43, 0xba, 0x81, 0xed, 0x17, 0xb9, 0xac, 0xef, // grub4dos-0.4.6a/grldr.mbr 0xfb, 0x0a, 0x23, 0xca, 0x4d, 0x22, 0xfd, 0xd2, 0xad, 0x4e, 0xfa, 0x1b, 0x21, 0x08, 0xb6, 0x60, 0xd2, 0xff, 0xa3, 0xf2, 0xfb, 0xdd, 0x25, 0x32, 0xdc, 0xf1, 0x3f, 0x49, 0x33, 0x28, 0x46, 0x7b, // syslinux-6.03/pre11/ldlinux.bss 0xfb, 0x49, 0xfd, 0x45, 0x8c, 0xaf, 0x47, 0x5a, 0x16, 0x05, 0x5e, 0x4a, 0x75, 0x5a, 0xc3, 0xe3, 0x95, 0x52, 0xf4, 0xe9, 0x6c, 0xa2, 0x0d, 0xea, 0x53, 0xf5, 0xc4, 0x09, 0x2b, 0x68, 0xfd, 0x4f, // syslinux-6.00/ldlinux.sys }; diff --git a/src/ms-sys/inc/mbr_grub.h b/src/ms-sys/inc/mbr_grub.h index 97ca245b..f3b42b11 100644 --- a/src/ms-sys/inc/mbr_grub.h +++ b/src/ms-sys/inc/mbr_grub.h @@ -2,40 +2,40 @@ * First 423 bytes of MBR from Grub4DOS (Converted from res/grub/grldr.mbr) */ unsigned char mbr_grub_0x0[] = { - 0xEB, 0x5E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x20, 0x39, 0xFF, 0xFF, - 0x31, 0xDB, 0x8E, 0xD3, 0xBC, 0x80, 0x05, 0xE8, 0x00, 0x00, 0x5B, 0x81, - 0xEB, 0x6A, 0x00, 0xC1, 0xEB, 0x04, 0x8C, 0xC8, 0x01, 0xC3, 0x53, 0x68, - 0x7B, 0x00, 0xCB, 0x68, 0x00, 0x20, 0x17, 0xBC, 0x00, 0x90, 0x80, 0xFA, - 0x00, 0x74, 0x02, 0xB2, 0x80, 0x16, 0x07, 0xB0, 0x10, 0x30, 0xF6, 0x31, - 0xDB, 0xE8, 0xC2, 0x00, 0x72, 0x29, 0x0E, 0x1F, 0x31, 0xF6, 0x31, 0xFF, - 0xB9, 0xDF, 0x00, 0xFC, 0xF3, 0xA5, 0xBB, 0xFC, 0x1F, 0x66, 0xB8, 0x47, - 0x52, 0x55, 0xAA, 0x66, 0x39, 0x07, 0x75, 0x03, 0xE8, 0xA8, 0x19, 0xEA, - 0xB8, 0x00, 0x00, 0x20, 0x16, 0x1F, 0x66, 0x39, 0x07, 0x74, 0x1F, 0x80, - 0xF2, 0x80, 0x68, 0xC0, 0x07, 0x07, 0xB0, 0x10, 0x30, 0xF6, 0x31, 0xDB, - 0xE8, 0x87, 0x00, 0x72, 0x05, 0xEA, 0x00, 0x00, 0xC0, 0x07, 0xBE, 0x92, - 0x01, 0xE8, 0xAF, 0x00, 0xEB, 0xFE, 0xBE, 0xBE, 0x01, 0xE8, 0x14, 0x10, - 0xF6, 0x06, 0xA4, 0x01, 0x80, 0x0F, 0x84, 0x7C, 0x19, 0x83, 0xC6, 0x0C, - 0x81, 0xFE, 0xFE, 0x01, 0x72, 0xEB, 0x77, 0x2D, 0xF6, 0x06, 0xA7, 0x01, - 0x01, 0x0F, 0x85, 0x2E, 0x17, 0x80, 0x0E, 0xA7, 0x01, 0x01, 0xF6, 0x06, - 0xA7, 0x01, 0x02, 0x75, 0xD4, 0x68, 0x00, 0x0D, 0x07, 0xB0, 0x04, 0x31, - 0xD2, 0x31, 0xDB, 0xE8, 0x3C, 0x00, 0x73, 0xC2, 0xBE, 0xBD, 0x1C, 0xE8, - 0x69, 0x00, 0xE9, 0x0A, 0x17, 0xF6, 0x06, 0xA7, 0x01, 0x01, 0x0F, 0x85, - 0x01, 0x17, 0x80, 0x0E, 0xA7, 0x01, 0x01, 0xE9, 0xE2, 0x16, 0x1E, 0x06, - 0x52, 0x56, 0x57, 0x55, 0xF9, 0xCD, 0x13, 0x5D, 0x5F, 0x5E, 0x5A, 0x07, - 0x1F, 0xC3, 0xFA, 0xB8, 0x00, 0x20, 0x8E, 0xD0, 0xBC, 0xDC, 0x8F, 0xFB, - 0x66, 0x61, 0x07, 0x1F, 0xEB, 0x97, 0xB4, 0x02, 0xBF, 0x03, 0x00, 0xB9, - 0x01, 0x00, 0x60, 0x50, 0x53, 0x51, 0xFE, 0xC8, 0x00, 0xC1, 0xD0, 0xE0, - 0x00, 0xC7, 0xB0, 0x01, 0xE8, 0xC7, 0xFF, 0x59, 0x5B, 0x58, 0x72, 0x04, - 0xFE, 0xC8, 0x75, 0xE7, 0x61, 0x73, 0x0B, 0x60, 0x31, 0xC0, 0xE8, 0xB5, - 0xFF, 0x61, 0x4F, 0x75, 0xD9, 0xF9, 0xC3, 0xB4, 0x0E, 0xCD, 0x10, 0x2E, - 0xAC, 0x3C, 0x00, 0x75, 0xF6, 0xC3, 0x0D, 0x0A, 0x4D, 0x69, 0x73, 0x73, - 0x69, 0x6E, 0x67, 0x20, 0x68, 0x65, 0x6C, 0x70, 0x65, 0x72, 0x2E, 0x00, - 0x00, 0x3F, 0xFF + 0xEB, 0x5E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x20, 0x39, 0xFF, 0xFF, + 0x31, 0xDB, 0x8E, 0xD3, 0xBC, 0x80, 0x05, 0xE8, 0x00, 0x00, 0x5B, 0x81, + 0xEB, 0x6A, 0x00, 0xC1, 0xEB, 0x04, 0x8C, 0xC8, 0x01, 0xC3, 0x53, 0x68, + 0x7B, 0x00, 0xCB, 0x68, 0x00, 0x20, 0x17, 0xBC, 0x00, 0x90, 0x80, 0xFA, + 0x00, 0x74, 0x02, 0xB2, 0x80, 0x16, 0x07, 0xB0, 0x10, 0x30, 0xF6, 0x31, + 0xDB, 0xE8, 0xC2, 0x00, 0x72, 0x29, 0x0E, 0x1F, 0x31, 0xF6, 0x31, 0xFF, + 0xB9, 0xDF, 0x00, 0xFC, 0xF3, 0xA5, 0xBB, 0xFC, 0x1F, 0x66, 0xB8, 0x47, + 0x52, 0x55, 0xAA, 0x66, 0x39, 0x07, 0x75, 0x03, 0xE8, 0xB6, 0x19, 0xEA, + 0xB8, 0x00, 0x00, 0x20, 0x16, 0x1F, 0x66, 0x39, 0x07, 0x74, 0x1F, 0x80, + 0xF2, 0x80, 0x68, 0xC0, 0x07, 0x07, 0xB0, 0x10, 0x30, 0xF6, 0x31, 0xDB, + 0xE8, 0x87, 0x00, 0x72, 0x05, 0xEA, 0x00, 0x00, 0xC0, 0x07, 0xBE, 0x92, + 0x01, 0xE8, 0xAF, 0x00, 0xEB, 0xFE, 0xBE, 0xBE, 0x01, 0xE8, 0x14, 0x10, + 0xF6, 0x06, 0xA4, 0x01, 0x80, 0x0F, 0x84, 0x8A, 0x19, 0x83, 0xC6, 0x0C, + 0x81, 0xFE, 0xFE, 0x01, 0x72, 0xEB, 0x77, 0x2D, 0xF6, 0x06, 0xA7, 0x01, + 0x01, 0x0F, 0x85, 0x3C, 0x17, 0x80, 0x0E, 0xA7, 0x01, 0x01, 0xF6, 0x06, + 0xA7, 0x01, 0x02, 0x75, 0xD4, 0x68, 0x00, 0x0D, 0x07, 0xB0, 0x04, 0x31, + 0xD2, 0x31, 0xDB, 0xE8, 0x3C, 0x00, 0x73, 0xC2, 0xBE, 0xCB, 0x1C, 0xE8, + 0x69, 0x00, 0xE9, 0x18, 0x17, 0xF6, 0x06, 0xA7, 0x01, 0x01, 0x0F, 0x85, + 0x0F, 0x17, 0x80, 0x0E, 0xA7, 0x01, 0x01, 0xE9, 0xF0, 0x16, 0x1E, 0x06, + 0x52, 0x56, 0x57, 0x55, 0xF9, 0xCD, 0x13, 0x5D, 0x5F, 0x5E, 0x5A, 0x07, + 0x1F, 0xC3, 0xFA, 0xB8, 0x00, 0x20, 0x8E, 0xD0, 0xBC, 0xDC, 0x8F, 0xFB, + 0x66, 0x61, 0x07, 0x1F, 0xEB, 0x97, 0xB4, 0x02, 0xBF, 0x03, 0x00, 0xB9, + 0x01, 0x00, 0x60, 0x50, 0x53, 0x51, 0xFE, 0xC8, 0x00, 0xC1, 0xD0, 0xE0, + 0x00, 0xC7, 0xB0, 0x01, 0xE8, 0xC7, 0xFF, 0x59, 0x5B, 0x58, 0x72, 0x04, + 0xFE, 0xC8, 0x75, 0xE7, 0x61, 0x73, 0x0B, 0x60, 0x31, 0xC0, 0xE8, 0xB5, + 0xFF, 0x61, 0x4F, 0x75, 0xD9, 0xF9, 0xC3, 0xB4, 0x0E, 0xCD, 0x10, 0x2E, + 0xAC, 0x3C, 0x00, 0x75, 0xF6, 0xC3, 0x0D, 0x0A, 0x4D, 0x69, 0x73, 0x73, + 0x69, 0x6E, 0x67, 0x20, 0x68, 0x65, 0x6C, 0x70, 0x65, 0x72, 0x2E, 0x00, + 0x00, 0x3F, 0xFF }; diff --git a/src/rufus.rc b/src/rufus.rc index cea60634..ceebae52 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1210" +CAPTION "Rufus 2.18.1211" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1210,0 - PRODUCTVERSION 2,18,1210,0 + FILEVERSION 2,18,1211,0 + PRODUCTVERSION 2,18,1211,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1210" + VALUE "FileVersion", "2.18.1211" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1210" + VALUE "ProductVersion", "2.18.1211" END END BLOCK "VarFileInfo" From 9b5cd92029d50007f69fecb94a3183ffd3ee5b60 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 3 Nov 2017 18:04:33 +0000 Subject: [PATCH 92/97] [arm] add Visual Studio ARM64 compilation support * Windows 10 ARM users *WILL* be able to run Rufus natively the very same day they got their new device! --- .gitignore | 1 + rufus.sln | 47 ++++++- src/.msvc/rufus.vcxproj | 122 +++++++++++++----- src/bled/.msvc/bled.vcxproj | 81 ++++++++++-- src/bled/platform.h | 2 +- src/getopt/.msvc/getopt.vcxproj | 96 +++++++++----- src/libcdio/driver/.msvc/driver.vcxproj | 98 +++++++++----- src/libcdio/iso9660/.msvc/iso9660.vcxproj | 98 +++++++++----- src/libcdio/udf/.msvc/udf.vcxproj | 98 +++++++++----- src/ms-sys/.msvc/ms-sys.vcxproj | 102 ++++++++++----- src/rufus.rc | 10 +- src/syslinux/libfat/.msvc/libfat.vcxproj | 100 +++++++++----- .../libinstaller/.msvc/libinstaller.vcxproj | 100 +++++++++----- src/syslinux/win/.msvc/win.vcxproj | 100 +++++++++----- 14 files changed, 753 insertions(+), 302 deletions(-) diff --git a/.gitignore b/.gitignore index 3b26472e..6ac9a73e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ .libs Makefile arm +arm64 x86_32 x86_64 autom4te.cache diff --git a/rufus.sln b/rufus.sln index 30c8f379..f0a98300 100644 --- a/rufus.sln +++ b/rufus.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.4 +VisualStudioVersion = 15.0.27004.2006 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rufus", "src\.msvc\rufus.vcxproj", "{731858A7-0303-4988-877B-9C0DD6471864}" EndProject @@ -25,129 +25,171 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|arm = Debug|arm + Debug|arm64 = Debug|arm64 Debug|x86_32 = Debug|x86_32 Debug|x86_64 = Debug|x86_64 Release|arm = Release|arm + Release|arm64 = Release|arm64 Release|x86_32 = Release|x86_32 Release|x86_64 = Release|x86_64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {731858A7-0303-4988-877B-9C0DD6471864}.Debug|arm.ActiveCfg = Debug|ARM {731858A7-0303-4988-877B-9C0DD6471864}.Debug|arm.Build.0 = Debug|ARM + {731858A7-0303-4988-877B-9C0DD6471864}.Debug|arm64.ActiveCfg = Debug|ARM64 + {731858A7-0303-4988-877B-9C0DD6471864}.Debug|arm64.Build.0 = Debug|ARM64 {731858A7-0303-4988-877B-9C0DD6471864}.Debug|x86_32.ActiveCfg = Debug|Win32 {731858A7-0303-4988-877B-9C0DD6471864}.Debug|x86_32.Build.0 = Debug|Win32 {731858A7-0303-4988-877B-9C0DD6471864}.Debug|x86_64.ActiveCfg = Debug|x64 {731858A7-0303-4988-877B-9C0DD6471864}.Debug|x86_64.Build.0 = Debug|x64 {731858A7-0303-4988-877B-9C0DD6471864}.Release|arm.ActiveCfg = Release|ARM {731858A7-0303-4988-877B-9C0DD6471864}.Release|arm.Build.0 = Release|ARM + {731858A7-0303-4988-877B-9C0DD6471864}.Release|arm64.ActiveCfg = Release|ARM64 + {731858A7-0303-4988-877B-9C0DD6471864}.Release|arm64.Build.0 = Release|ARM64 {731858A7-0303-4988-877B-9C0DD6471864}.Release|x86_32.ActiveCfg = Release|Win32 {731858A7-0303-4988-877B-9C0DD6471864}.Release|x86_32.Build.0 = Release|Win32 {731858A7-0303-4988-877B-9C0DD6471864}.Release|x86_64.ActiveCfg = Release|x64 {731858A7-0303-4988-877B-9C0DD6471864}.Release|x86_64.Build.0 = Release|x64 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|arm.ActiveCfg = Debug|ARM {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|arm.Build.0 = Debug|ARM + {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|arm64.ActiveCfg = Debug|ARM64 + {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|arm64.Build.0 = Debug|ARM64 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|x86_32.ActiveCfg = Debug|Win32 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|x86_32.Build.0 = Debug|Win32 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|x86_64.ActiveCfg = Debug|x64 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|x86_64.Build.0 = Debug|x64 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|arm.ActiveCfg = Release|ARM {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|arm.Build.0 = Release|ARM + {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|arm64.ActiveCfg = Release|ARM64 + {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|arm64.Build.0 = Release|ARM64 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|x86_32.ActiveCfg = Release|Win32 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|x86_32.Build.0 = Release|Win32 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|x86_64.ActiveCfg = Release|x64 {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|x86_64.Build.0 = Release|x64 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|arm.ActiveCfg = Debug|ARM {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|arm.Build.0 = Debug|ARM + {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|arm64.ActiveCfg = Debug|ARM64 + {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|arm64.Build.0 = Debug|ARM64 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|x86_32.ActiveCfg = Debug|Win32 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|x86_32.Build.0 = Debug|Win32 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|x86_64.ActiveCfg = Debug|x64 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|x86_64.Build.0 = Debug|x64 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|arm.ActiveCfg = Release|ARM {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|arm.Build.0 = Release|ARM + {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|arm64.ActiveCfg = Release|ARM64 + {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|arm64.Build.0 = Release|ARM64 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|x86_32.ActiveCfg = Release|Win32 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|x86_32.Build.0 = Release|Win32 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|x86_64.ActiveCfg = Release|x64 {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|x86_64.Build.0 = Release|x64 {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|arm.ActiveCfg = Debug|ARM {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|arm.Build.0 = Debug|ARM + {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|arm64.ActiveCfg = Debug|ARM64 + {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|arm64.Build.0 = Debug|ARM64 {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|x86_32.ActiveCfg = Debug|Win32 {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|x86_32.Build.0 = Debug|Win32 {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|x86_64.ActiveCfg = Debug|x64 {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|x86_64.Build.0 = Debug|x64 {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|arm.ActiveCfg = Release|ARM {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|arm.Build.0 = Release|ARM + {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|arm64.ActiveCfg = Release|ARM64 + {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|arm64.Build.0 = Release|ARM64 {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|x86_32.ActiveCfg = Release|Win32 {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|x86_32.Build.0 = Release|Win32 {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|x86_64.ActiveCfg = Release|x64 {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|x86_64.Build.0 = Release|x64 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|arm.ActiveCfg = Debug|ARM {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|arm.Build.0 = Debug|ARM + {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|arm64.ActiveCfg = Debug|ARM64 + {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|arm64.Build.0 = Debug|ARM64 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|x86_32.ActiveCfg = Debug|Win32 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|x86_32.Build.0 = Debug|Win32 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|x86_64.ActiveCfg = Debug|x64 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|x86_64.Build.0 = Debug|x64 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|arm.ActiveCfg = Release|ARM {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|arm.Build.0 = Release|ARM + {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|arm64.ActiveCfg = Release|ARM64 + {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|arm64.Build.0 = Release|ARM64 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|x86_32.ActiveCfg = Release|Win32 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|x86_32.Build.0 = Release|Win32 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|x86_64.ActiveCfg = Release|x64 {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|x86_64.Build.0 = Release|x64 {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|arm.ActiveCfg = Debug|ARM {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|arm.Build.0 = Debug|ARM + {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|arm64.ActiveCfg = Debug|ARM64 + {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|arm64.Build.0 = Debug|ARM64 {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|x86_32.ActiveCfg = Debug|Win32 {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|x86_32.Build.0 = Debug|Win32 {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|x86_64.ActiveCfg = Debug|x64 {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|x86_64.Build.0 = Debug|x64 {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|arm.ActiveCfg = Release|ARM {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|arm.Build.0 = Release|ARM + {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|arm64.ActiveCfg = Release|ARM64 + {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|arm64.Build.0 = Release|ARM64 {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|x86_32.ActiveCfg = Release|Win32 {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|x86_32.Build.0 = Release|Win32 {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|x86_64.ActiveCfg = Release|x64 {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|x86_64.Build.0 = Release|x64 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|arm.ActiveCfg = Debug|ARM {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|arm.Build.0 = Debug|ARM + {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|arm64.ActiveCfg = Debug|ARM64 + {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|arm64.Build.0 = Debug|ARM64 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|x86_32.ActiveCfg = Debug|Win32 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|x86_32.Build.0 = Debug|Win32 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|x86_64.ActiveCfg = Debug|x64 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|x86_64.Build.0 = Debug|x64 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|arm.ActiveCfg = Release|ARM {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|arm.Build.0 = Release|ARM + {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|arm64.ActiveCfg = Release|ARM64 + {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|arm64.Build.0 = Release|ARM64 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|x86_32.ActiveCfg = Release|Win32 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|x86_32.Build.0 = Release|Win32 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|x86_64.ActiveCfg = Release|x64 {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|x86_64.Build.0 = Release|x64 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|arm.ActiveCfg = Debug|ARM {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|arm.Build.0 = Debug|ARM + {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|arm64.ActiveCfg = Debug|ARM64 + {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|arm64.Build.0 = Debug|ARM64 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|x86_32.ActiveCfg = Debug|Win32 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|x86_32.Build.0 = Debug|Win32 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|x86_64.ActiveCfg = Debug|x64 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|x86_64.Build.0 = Debug|x64 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|arm.ActiveCfg = Release|ARM {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|arm.Build.0 = Release|ARM + {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|arm64.ActiveCfg = Release|ARM64 + {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|arm64.Build.0 = Release|ARM64 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|x86_32.ActiveCfg = Release|Win32 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|x86_32.Build.0 = Release|Win32 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|x86_64.ActiveCfg = Release|x64 {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|x86_64.Build.0 = Release|x64 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|arm.ActiveCfg = Debug|ARM {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|arm.Build.0 = Debug|ARM + {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|arm64.ActiveCfg = Debug|ARM64 + {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|arm64.Build.0 = Debug|ARM64 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|x86_32.ActiveCfg = Debug|Win32 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|x86_32.Build.0 = Debug|Win32 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|x86_64.ActiveCfg = Debug|x64 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|x86_64.Build.0 = Debug|x64 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|arm.ActiveCfg = Release|ARM {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|arm.Build.0 = Release|ARM + {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|arm64.ActiveCfg = Release|ARM64 + {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|arm64.Build.0 = Release|ARM64 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|x86_32.ActiveCfg = Release|Win32 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|x86_32.Build.0 = Release|Win32 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|x86_64.ActiveCfg = Release|x64 {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|x86_64.Build.0 = Release|x64 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|arm.ActiveCfg = Debug|ARM {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|arm.Build.0 = Debug|ARM + {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|arm64.ActiveCfg = Debug|ARM64 + {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|arm64.Build.0 = Debug|ARM64 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|x86_32.ActiveCfg = Debug|Win32 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|x86_32.Build.0 = Debug|Win32 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|x86_64.ActiveCfg = Debug|x64 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|x86_64.Build.0 = Debug|x64 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|arm.ActiveCfg = Release|ARM {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|arm.Build.0 = Release|ARM + {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|arm64.ActiveCfg = Release|ARM64 + {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|arm64.Build.0 = Release|ARM64 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|x86_32.ActiveCfg = Release|Win32 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|x86_32.Build.0 = Release|Win32 {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|x86_64.ActiveCfg = Release|x64 @@ -156,4 +198,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CCF051E2-A27D-48B0-94ED-ADC18A40E0DB} + EndGlobalSection EndGlobal diff --git a/src/.msvc/rufus.vcxproj b/src/.msvc/rufus.vcxproj index b4f6757d..585731ed 100644 --- a/src/.msvc/rufus.vcxproj +++ b/src/.msvc/rufus.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -17,6 +21,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -38,7 +46,7 @@ Application Unicode true - v141_xp + v141 Application @@ -47,10 +55,17 @@ v141 true + + Application + Unicode + true + v141 + true + Application Unicode - v141_xp + v141 Application @@ -58,6 +73,12 @@ v141 true + + Application + Unicode + v141 + true + Application Unicode @@ -70,29 +91,16 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -101,21 +109,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - @@ -157,7 +159,32 @@ RequireAdministrator true Windows - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0\um\arm;$(SolutionDir)\res\arm + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\um\arm + + + _UNICODE;UNICODE;RUFUS_LOC;%(PreprocessorDefinitions) + + + + + + + + _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + MultiThreadedDebug + Level3 + ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + CompileAsC + true + false + 4091;28252;28253;%(DisableSpecificWarnings) + + + advapi32.lib;comctl32.lib;comdlg32.lib;crypt32.lib;gdi32.lib;ole32.lib;setupapi.lib;shell32.lib;shlwapi.lib;wininet.lib;wintrust.lib;ole32.lib;advapi32.lib;gdi32.lib;shell32.lib;comdlg32.lib;%(AdditionalDependencies) + RequireAdministrator + true + Windows + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\um\arm64 _UNICODE;UNICODE;RUFUS_LOC;%(PreprocessorDefinitions) @@ -233,7 +260,32 @@ RequireAdministrator false Windows - C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0\um\arm;$(SolutionDir)\res\arm + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\um\arm + + + _UNICODE;UNICODE;RUFUS_LOC;%(PreprocessorDefinitions) + + + + + + + + _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;%(PreprocessorDefinitions) + MultiThreaded + Level3 + ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + CompileAsC + true + false + 4091;28252;28253;%(DisableSpecificWarnings) + + + advapi32.lib;comctl32.lib;comdlg32.lib;crypt32.lib;gdi32.lib;ole32.lib;setupapi.lib;shell32.lib;shlwapi.lib;wininet.lib;wintrust.lib;ole32.lib;advapi32.lib;gdi32.lib;shell32.lib;comdlg32.lib;%(AdditionalDependencies) + RequireAdministrator + false + Windows + C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\um\arm64 _UNICODE;UNICODE;RUFUS_LOC;%(PreprocessorDefinitions) diff --git a/src/bled/.msvc/bled.vcxproj b/src/bled/.msvc/bled.vcxproj index 024bc3bd..eb87de9c 100644 --- a/src/bled/.msvc/bled.vcxproj +++ b/src/bled/.msvc/bled.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -17,6 +21,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -68,6 +76,7 @@ bled {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D} bled + 10.0.15063.0 @@ -81,6 +90,12 @@ v141 true + + StaticLibrary + Unicode + v141 + true + StaticLibrary Unicode @@ -97,16 +112,28 @@ v141 true + + StaticLibrary + Unicode + v141 + true + StaticLibrary Unicode v141 - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -115,21 +142,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - Level3 @@ -167,6 +188,24 @@ odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + Level3 + ProgramDatabase + true + Disabled + _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + MultiThreadedDebug + ..\.. + + + true + true + true + $(OutDir)$(TargetName)$(TargetExt) + odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + Level3 @@ -222,6 +261,24 @@ true + + + Level3 + true + _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) + MultiThreaded + ..\.. + + + true + true + $(OutDir)$(TargetName)$(TargetExt) + odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + true + + Level3 diff --git a/src/bled/platform.h b/src/bled/platform.h index 954abec9..f8819589 100644 --- a/src/bled/platform.h +++ b/src/bled/platform.h @@ -220,7 +220,7 @@ static __inline uint64_t bswap_64(uint64_t x) #elif defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN # define BB_BIG_ENDIAN 0 # define BB_LITTLE_ENDIAN 1 -#elif defined(__386__) || defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64) || (defined(_M_ARM)) +#elif defined(__386__) || defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || (defined(_M_ARM64)) # define BB_BIG_ENDIAN 0 # define BB_LITTLE_ENDIAN 1 #else diff --git a/src/getopt/.msvc/getopt.vcxproj b/src/getopt/.msvc/getopt.vcxproj index 3bbb4e2e..2c7321ab 100644 --- a/src/getopt/.msvc/getopt.vcxproj +++ b/src/getopt/.msvc/getopt.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -17,6 +21,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -29,6 +37,7 @@ {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E} getopt + 10.0.15063.0 @@ -44,6 +53,13 @@ v141 true + + StaticLibrary + Unicode + true + v141 + true + StaticLibrary Unicode @@ -55,6 +71,12 @@ v141 true + + StaticLibrary + Unicode + v141 + true + StaticLibrary Unicode @@ -67,45 +89,32 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ + $(SolutionDir)x86_64\$(Configuration)\ + $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - $(SolutionDir)arm\$(Configuration)\ - - - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - $(SolutionDir)arm\$(Configuration)\ + false + false + false + false + false + false + false + false @@ -135,6 +144,19 @@ true + + + HAVE_STRING_H;%(PreprocessorDefinitions) + true + MultiThreadedDebug + Level3 + ProgramDatabase + 28252;28253 + + + true + + X64 @@ -177,6 +199,18 @@ true + + + MaxSpeed + HAVE_STRING_H;%(PreprocessorDefinitions) + MultiThreaded + Level3 + 28252;28253 + + + true + + X64 diff --git a/src/libcdio/driver/.msvc/driver.vcxproj b/src/libcdio/driver/.msvc/driver.vcxproj index 2c30ed0e..6e54d046 100644 --- a/src/libcdio/driver/.msvc/driver.vcxproj +++ b/src/libcdio/driver/.msvc/driver.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -13,6 +17,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -61,6 +69,7 @@ Win32Proj driver libcdio-driver + 10.0.15063.0 @@ -76,6 +85,13 @@ v141 true + + StaticLibrary + true + Unicode + v141 + true + StaticLibrary false @@ -91,6 +107,14 @@ v141 true + + StaticLibrary + false + true + Unicode + v141 + true + StaticLibrary true @@ -105,29 +129,16 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -136,21 +147,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - Level3 @@ -186,6 +191,23 @@ + + + + + Level3 + Disabled + HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreadedDebug + ProgramDatabase + + + Windows + true + + + Level3 @@ -213,6 +235,20 @@ + + + Level3 + + + MaxSpeed + true + HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) + ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreaded + ProgramDatabase + + + Level3 diff --git a/src/libcdio/iso9660/.msvc/iso9660.vcxproj b/src/libcdio/iso9660/.msvc/iso9660.vcxproj index 454e5b01..c7037475 100644 --- a/src/libcdio/iso9660/.msvc/iso9660.vcxproj +++ b/src/libcdio/iso9660/.msvc/iso9660.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -13,6 +17,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -53,6 +61,7 @@ Win32Proj iso9660 libcdio-iso9660 + 10.0.15063.0 @@ -68,6 +77,13 @@ v141 true + + StaticLibrary + true + Unicode + v141 + true + StaticLibrary false @@ -83,6 +99,14 @@ v141 true + + StaticLibrary + false + true + Unicode + v141 + true + StaticLibrary true @@ -97,29 +121,16 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -128,21 +139,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - Level3 @@ -178,6 +183,23 @@ + + + + + Level3 + Disabled + HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreadedDebug + ProgramDatabase + + + Windows + true + + + Level3 @@ -205,6 +227,20 @@ + + + Level3 + + + MaxSpeed + true + HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) + ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreaded + ProgramDatabase + + + Level3 diff --git a/src/libcdio/udf/.msvc/udf.vcxproj b/src/libcdio/udf/.msvc/udf.vcxproj index 05effde4..5f4f7024 100644 --- a/src/libcdio/udf/.msvc/udf.vcxproj +++ b/src/libcdio/udf/.msvc/udf.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -13,6 +17,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -47,6 +55,7 @@ Win32Proj udf libcdio-udf + 10.0.15063.0 @@ -62,6 +71,13 @@ v141 true + + StaticLibrary + true + Unicode + v141 + true + StaticLibrary false @@ -77,6 +93,14 @@ v141 true + + StaticLibrary + false + true + Unicode + v141 + true + StaticLibrary true @@ -91,29 +115,16 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -122,21 +133,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - Level3 @@ -172,6 +177,23 @@ + + + + + Level3 + Disabled + HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreadedDebug + ProgramDatabase + + + Windows + true + + + Level3 @@ -199,6 +221,20 @@ + + + Level3 + + + MaxSpeed + true + HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) + ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreaded + ProgramDatabase + + + Level3 diff --git a/src/ms-sys/.msvc/ms-sys.vcxproj b/src/ms-sys/.msvc/ms-sys.vcxproj index f9559535..5628235e 100644 --- a/src/ms-sys/.msvc/ms-sys.vcxproj +++ b/src/ms-sys/.msvc/ms-sys.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -13,6 +17,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -88,6 +96,7 @@ {2B1D078D-8EB4-4398-9CA4-23457265A7F6} Win32Proj mssys + 10.0.15063.0 @@ -103,6 +112,13 @@ v141 true + + StaticLibrary + true + Unicode + v141 + true + StaticLibrary false @@ -118,6 +134,14 @@ v141 true + + StaticLibrary + false + true + Unicode + v141 + true + StaticLibrary true @@ -132,29 +156,16 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -163,21 +174,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - Level3 @@ -216,6 +221,25 @@ + + + + + Level3 + Disabled + _CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + ../inc;%(AdditionalIncludeDirectories) + MultiThreadedDebug + ProgramDatabase + /analyze:stacksize32850 %(AdditionalOptions) + 28252;28253 + + + Windows + true + + + Level3 @@ -246,6 +270,22 @@ + + + Level3 + + + MaxSpeed + true + %(PreprocessorDefinitions) + ../inc;%(AdditionalIncludeDirectories) + MultiThreaded + ProgramDatabase + /analyze:stacksize32850 %(AdditionalOptions) + 28252;28253 + + + Level3 diff --git a/src/rufus.rc b/src/rufus.rc index ceebae52..a2c37ce1 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1211" +CAPTION "Rufus 2.18.1212" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1211,0 - PRODUCTVERSION 2,18,1211,0 + FILEVERSION 2,18,1212,0 + PRODUCTVERSION 2,18,1212,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1211" + VALUE "FileVersion", "2.18.1212" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1211" + VALUE "ProductVersion", "2.18.1212" END END BLOCK "VarFileInfo" diff --git a/src/syslinux/libfat/.msvc/libfat.vcxproj b/src/syslinux/libfat/.msvc/libfat.vcxproj index 2a880797..0bd089b6 100644 --- a/src/syslinux/libfat/.msvc/libfat.vcxproj +++ b/src/syslinux/libfat/.msvc/libfat.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -13,6 +17,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -43,6 +51,7 @@ Win32Proj libfat syslinux-libfat + 10.0.15063.0 @@ -58,6 +67,13 @@ v141 true + + StaticLibrary + true + Unicode + v141 + true + StaticLibrary false @@ -73,6 +89,14 @@ v141 true + + StaticLibrary + false + true + Unicode + v141 + true + StaticLibrary true @@ -87,29 +111,16 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -118,21 +129,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - Level3 @@ -170,6 +175,24 @@ + + + + + Level3 + Disabled + inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreadedDebug + ProgramDatabase + 4018;4244 + + + Windows + true + + + Level3 @@ -199,6 +222,21 @@ + + + Level3 + + + MaxSpeed + true + inline=__inline;%(PreprocessorDefinitions) + ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreaded + ProgramDatabase + 4018;4244 + + + Level3 diff --git a/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj b/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj index 878d8169..10deecc7 100644 --- a/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj +++ b/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -13,6 +17,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -43,6 +51,7 @@ Win32Proj libinstaller syslinux-libinstaller + 10.0.15063.0 @@ -58,6 +67,13 @@ v141 true + + StaticLibrary + true + Unicode + v141 + true + StaticLibrary false @@ -73,6 +89,14 @@ v141 true + + StaticLibrary + false + true + Unicode + v141 + true + StaticLibrary true @@ -87,29 +111,16 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -118,21 +129,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - Level3 @@ -170,6 +175,24 @@ + + + + + Level3 + Disabled + inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreadedDebug + ProgramDatabase + 4244;4267 + + + Windows + true + + + Level3 @@ -199,6 +222,21 @@ + + + Level3 + + + MaxSpeed + true + inline=__inline;%(PreprocessorDefinitions) + ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreaded + ProgramDatabase + 4244;4267 + + + Level3 diff --git a/src/syslinux/win/.msvc/win.vcxproj b/src/syslinux/win/.msvc/win.vcxproj index bcd0d7b7..8ec983c4 100644 --- a/src/syslinux/win/.msvc/win.vcxproj +++ b/src/syslinux/win/.msvc/win.vcxproj @@ -5,6 +5,10 @@ Debug ARM + + Debug + ARM64 + Debug Win32 @@ -13,6 +17,10 @@ Release ARM + + Release + ARM64 + Release Win32 @@ -37,6 +45,7 @@ Win32Proj win syslinux-win + 10.0.15063.0 @@ -52,6 +61,13 @@ v141 true + + StaticLibrary + true + Unicode + v141 + true + StaticLibrary false @@ -67,6 +83,14 @@ v141 true + + StaticLibrary + false + true + Unicode + v141 + true + StaticLibrary true @@ -81,29 +105,16 @@ v141 - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm\$(Configuration)\ + $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ + $(SolutionDir)arm64\$(Configuration)\ + $(SolutionDir)arm64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_32\$(Configuration)\ @@ -112,21 +123,15 @@ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ $(SolutionDir)x86_64\$(Configuration)\ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false false - false false + false + false + false + false false false - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - - - $(SolutionDir)arm\$(Configuration)\ - $(SolutionDir)arm\$(Configuration)\$(ProjectName)\ - Level3 @@ -164,6 +169,24 @@ + + + + + Level3 + Disabled + inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreadedDebug + ProgramDatabase + 4244;4267;4996 + + + Windows + true + + + Level3 @@ -193,6 +216,21 @@ + + + Level3 + + + MaxSpeed + true + inline=__inline;%(PreprocessorDefinitions) + ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + MultiThreaded + ProgramDatabase + 4244;4267;4996 + + + Level3 From 9c8cb59253f8de1fd3fc74ed5d10b4bee9e41996 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 7 Nov 2017 11:24:57 +0000 Subject: [PATCH 93/97] v2.18 (build 1213) --- ChangeLog.txt | 3 ++- res/appstore/AppxManifest.xml | 2 +- src/rufus.c | 2 +- src/rufus.rc | 10 +++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 73580a5b..32eed73c 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,9 +1,10 @@ -o Version 2.18 (2017.11.??) +o Version 2.18 (2017.11.07) Ensure that the same drive is reselected on device refresh Add a cheat mode to cycle the USB port of currently selected device Make lookup for updatable .cfg file more generic (e.g. ESET SysRescue) Fix handling of multiextent ISOs (e.g. BlackArch Linux) Fix propagation of image decompression errors + Update grub4dos to latest IMPORTANT: THIS IS THE LAST RELEASE TO SUPPORT WINDOWS XP AND WINDOWS VISTA FUTURE RUFUS RELEASES WILL *NO LONGER* BE COMPATIBLE WITH THESE PLATFORMS diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml index a7ab7892..f8171429 100644 --- a/res/appstore/AppxManifest.xml +++ b/res/appstore/AppxManifest.xml @@ -8,7 +8,7 @@ for an interesting struggle, when you also happen to have a comma in one of the fields... --> diff --git a/src/rufus.c b/src/rufus.c index 06242196..85471ff2 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2284,7 +2284,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA char tmp[128]; wchar_t* wbuffer = NULL; loc_cmd* lcmd = NULL; - EXT_DECL(img_ext, NULL, __VA_GROUP__("*.img;*.vhd;*.gz;*.bzip2;*.xz;*.lzma;*.Z;*.zip"), __VA_GROUP__(lmprintf(MSG_095))); + EXT_DECL(img_ext, NULL, __VA_GROUP__("*.img;*.vhd;*.gz;*.bzip2;*.bz2;*.xz;*.lzma;*.Z;*.zip"), __VA_GROUP__(lmprintf(MSG_095))); EXT_DECL(iso_ext, NULL, __VA_GROUP__("*.iso"), __VA_GROUP__(lmprintf(MSG_036))); LPNMTOOLBAR lpnmtb; diff --git a/src/rufus.rc b/src/rufus.rc index a2c37ce1..5b4958ec 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1212" +CAPTION "Rufus 2.18.1213" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1212,0 - PRODUCTVERSION 2,18,1212,0 + FILEVERSION 2,18,1213,0 + PRODUCTVERSION 2,18,1213,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1212" + VALUE "FileVersion", "2.18.1213" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1212" + VALUE "ProductVersion", "2.18.1213" END END BLOCK "VarFileInfo" From c5f4e5a2eed072ae569faf44ab5ee1c475abd4b4 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 11 Nov 2017 15:41:04 +0000 Subject: [PATCH 94/97] [misc] drop Clang support and move VS2017 project files to .vs --- {src/bled/.msvc => .vs}/bled.vcxproj | 84 ++--- {src/bled/.clang => .vs}/bled.vcxproj.filters | 68 ++-- {src/getopt/.msvc => .vs}/getopt.vcxproj | 6 +- .../.clang => .vs}/getopt.vcxproj.filters | 6 +- .../libcdio-driver.vcxproj | 68 ++-- .../libcdio-driver.vcxproj.filters | 52 ++-- .../libcdio-iso9660.vcxproj | 52 ++-- .../libcdio-iso9660.vcxproj.filters | 36 +-- .../udf.vcxproj => .vs/libcdio-udf.vcxproj | 40 +-- .../libcdio-udf.vcxproj.filters | 24 +- {src/ms-sys/.msvc => .vs}/ms-sys.vcxproj | 124 ++++---- .../.clang => .vs}/ms-sys.vcxproj.filters | 108 +++---- {src/.msvc => .vs}/rufus.vcxproj | 132 ++++---- {src/.msvc => .vs}/rufus.vcxproj.filters | 98 +++--- .../syslinux-libfat.vcxproj | 32 +- .../syslinux-libfat.vcxproj.filters | 16 +- .../syslinux-libinstaller.vcxproj | 32 +- .../syslinux-libinstaller.vcxproj.filters | 16 +- .../win.vcxproj => .vs/syslinux-win.vcxproj | 20 +- .../syslinux-win.vcxproj.filters | 4 +- rufus (Clang).sln | 117 ------- rufus.sln | 20 +- src/.clang/rufus.vcxproj | 290 ------------------ src/.clang/rufus.vcxproj.filters | 174 ----------- src/.msvc/rufus_sources | 57 ---- src/bled/.clang/bled.vcxproj | 193 ------------ src/bled/.msvc/bled.vcxproj.filters | 117 ------- src/bled/.msvc/bled_sources | 20 -- src/format.c | 7 - src/getopt/.clang/getopt.vcxproj | 159 ---------- src/getopt/.msvc/getopt.vcxproj.filters | 26 -- src/getopt/.msvc/getopt_sources | 16 - src/libcdio/driver/.clang/driver.vcxproj | 202 ------------ .../driver/.msvc/driver.vcxproj.filters | 95 ------ src/libcdio/driver/.msvc/driver_sources | 26 -- src/libcdio/iso9660/.clang/iso9660.vcxproj | 194 ------------ .../iso9660/.msvc/iso9660.vcxproj.filters | 71 ----- src/libcdio/iso9660/.msvc/iso9660_sources | 19 -- src/libcdio/udf/.clang/udf.vcxproj | 188 ------------ src/libcdio/udf/.msvc/udf.vcxproj.filters | 53 ---- src/libcdio/udf/.msvc/udf_sources | 20 -- src/missing.h | 12 - src/ms-sys/.clang/ms-sys.vcxproj | 237 -------------- src/ms-sys/.msvc/ms-sys.vcxproj.filters | 179 ----------- src/ms-sys/.msvc/ms-sys_sources | 21 -- src/rufus.rc | 10 +- src/syslinux/libfat/.clang/libfat.vcxproj | 184 ----------- .../libfat/.msvc/libfat.vcxproj.filters | 41 --- src/syslinux/libfat/.msvc/libfat_sources | 18 -- .../libinstaller/.clang/libinstaller.vcxproj | 184 ----------- .../.msvc/libinstaller.vcxproj.filters | 41 --- .../libinstaller/.msvc/libinstaller_sources | 17 - src/syslinux/win/.clang/win.vcxproj | 182 ----------- src/syslinux/win/.msvc/win.vcxproj.filters | 23 -- src/syslinux/win/.msvc/win_sources | 15 - 55 files changed, 524 insertions(+), 3722 deletions(-) rename {src/bled/.msvc => .vs}/bled.vcxproj (85%) rename {src/bled/.clang => .vs}/bled.vcxproj.filters (55%) rename {src/getopt/.msvc => .vs}/getopt.vcxproj (98%) rename {src/getopt/.clang => .vs}/getopt.vcxproj.filters (82%) rename src/libcdio/driver/.msvc/driver.vcxproj => .vs/libcdio-driver.vcxproj (83%) rename src/libcdio/driver/.clang/driver.vcxproj.filters => .vs/libcdio-driver.vcxproj.filters (57%) rename src/libcdio/iso9660/.msvc/iso9660.vcxproj => .vs/libcdio-iso9660.vcxproj (85%) rename src/libcdio/iso9660/.clang/iso9660.vcxproj.filters => .vs/libcdio-iso9660.vcxproj.filters (60%) rename src/libcdio/udf/.msvc/udf.vcxproj => .vs/libcdio-udf.vcxproj (87%) rename src/libcdio/udf/.clang/udf.vcxproj.filters => .vs/libcdio-udf.vcxproj.filters (64%) rename {src/ms-sys/.msvc => .vs}/ms-sys.vcxproj (76%) rename {src/ms-sys/.clang => .vs}/ms-sys.vcxproj.filters (52%) rename {src/.msvc => .vs}/rufus.vcxproj (80%) rename {src/.msvc => .vs}/rufus.vcxproj.filters (62%) rename src/syslinux/libfat/.msvc/libfat.vcxproj => .vs/syslinux-libfat.vcxproj (90%) rename src/syslinux/libfat/.clang/libfat.vcxproj.filters => .vs/syslinux-libfat.vcxproj.filters (68%) rename src/syslinux/libinstaller/.msvc/libinstaller.vcxproj => .vs/syslinux-libinstaller.vcxproj (89%) rename src/syslinux/libinstaller/.clang/libinstaller.vcxproj.filters => .vs/syslinux-libinstaller.vcxproj.filters (66%) rename src/syslinux/win/.msvc/win.vcxproj => .vs/syslinux-win.vcxproj (92%) rename src/syslinux/win/.clang/win.vcxproj.filters => .vs/syslinux-win.vcxproj.filters (85%) delete mode 100644 rufus (Clang).sln delete mode 100644 src/.clang/rufus.vcxproj delete mode 100644 src/.clang/rufus.vcxproj.filters delete mode 100644 src/.msvc/rufus_sources delete mode 100644 src/bled/.clang/bled.vcxproj delete mode 100644 src/bled/.msvc/bled.vcxproj.filters delete mode 100644 src/bled/.msvc/bled_sources delete mode 100644 src/getopt/.clang/getopt.vcxproj delete mode 100644 src/getopt/.msvc/getopt.vcxproj.filters delete mode 100644 src/getopt/.msvc/getopt_sources delete mode 100644 src/libcdio/driver/.clang/driver.vcxproj delete mode 100644 src/libcdio/driver/.msvc/driver.vcxproj.filters delete mode 100644 src/libcdio/driver/.msvc/driver_sources delete mode 100644 src/libcdio/iso9660/.clang/iso9660.vcxproj delete mode 100644 src/libcdio/iso9660/.msvc/iso9660.vcxproj.filters delete mode 100644 src/libcdio/iso9660/.msvc/iso9660_sources delete mode 100644 src/libcdio/udf/.clang/udf.vcxproj delete mode 100644 src/libcdio/udf/.msvc/udf.vcxproj.filters delete mode 100644 src/libcdio/udf/.msvc/udf_sources delete mode 100644 src/ms-sys/.clang/ms-sys.vcxproj delete mode 100644 src/ms-sys/.msvc/ms-sys.vcxproj.filters delete mode 100644 src/ms-sys/.msvc/ms-sys_sources delete mode 100644 src/syslinux/libfat/.clang/libfat.vcxproj delete mode 100644 src/syslinux/libfat/.msvc/libfat.vcxproj.filters delete mode 100644 src/syslinux/libfat/.msvc/libfat_sources delete mode 100644 src/syslinux/libinstaller/.clang/libinstaller.vcxproj delete mode 100644 src/syslinux/libinstaller/.msvc/libinstaller.vcxproj.filters delete mode 100644 src/syslinux/libinstaller/.msvc/libinstaller_sources delete mode 100644 src/syslinux/win/.clang/win.vcxproj delete mode 100644 src/syslinux/win/.msvc/win.vcxproj.filters delete mode 100644 src/syslinux/win/.msvc/win_sources diff --git a/src/bled/.msvc/bled.vcxproj b/.vs/bled.vcxproj similarity index 85% rename from src/bled/.msvc/bled.vcxproj rename to .vs/bled.vcxproj index eb87de9c..532b2100 100644 --- a/src/bled/.msvc/bled.vcxproj +++ b/.vs/bled.vcxproj @@ -35,42 +35,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + bled @@ -159,7 +159,7 @@ Disabled _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) MultiThreadedDebug - ..\.. + ..\src CompileAsC @@ -178,7 +178,7 @@ Disabled _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) MultiThreadedDebug - ..\.. + ..\src true @@ -196,7 +196,7 @@ Disabled _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) MultiThreadedDebug - ..\.. + ..\src true @@ -214,7 +214,7 @@ Disabled _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) MultiThreadedDebug - ..\.. + ..\src CompileAsC @@ -230,7 +230,7 @@ Level3 _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) MultiThreaded - ..\.. + ..\src CompileAsC @@ -249,7 +249,7 @@ true _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) MultiThreaded - ..\.. + ..\src true @@ -267,7 +267,7 @@ true _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) MultiThreaded - ..\.. + ..\src true @@ -284,7 +284,7 @@ Level3 _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) MultiThreaded - ..\.. + ..\src CompileAsC diff --git a/src/bled/.clang/bled.vcxproj.filters b/.vs/bled.vcxproj.filters similarity index 55% rename from src/bled/.clang/bled.vcxproj.filters rename to .vs/bled.vcxproj.filters index 5aae9f16..09996190 100644 --- a/src/bled/.clang/bled.vcxproj.filters +++ b/.vs/bled.vcxproj.filters @@ -9,108 +9,108 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files diff --git a/src/getopt/.msvc/getopt.vcxproj b/.vs/getopt.vcxproj similarity index 98% rename from src/getopt/.msvc/getopt.vcxproj rename to .vs/getopt.vcxproj index 2c7321ab..0c2448de 100644 --- a/src/getopt/.msvc/getopt.vcxproj +++ b/.vs/getopt.vcxproj @@ -227,11 +227,11 @@ - - + + - + diff --git a/src/getopt/.clang/getopt.vcxproj.filters b/.vs/getopt.vcxproj.filters similarity index 82% rename from src/getopt/.clang/getopt.vcxproj.filters rename to .vs/getopt.vcxproj.filters index 2e23d852..42735f9e 100644 --- a/src/getopt/.clang/getopt.vcxproj.filters +++ b/.vs/getopt.vcxproj.filters @@ -11,15 +11,15 @@ - + Source Files - + Source Files - + Header Files diff --git a/src/libcdio/driver/.msvc/driver.vcxproj b/.vs/libcdio-driver.vcxproj similarity index 83% rename from src/libcdio/driver/.msvc/driver.vcxproj rename to .vs/libcdio-driver.vcxproj index 6e54d046..9656ff11 100644 --- a/src/libcdio/driver/.msvc/driver.vcxproj +++ b/.vs/libcdio-driver.vcxproj @@ -35,34 +35,34 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + {FA1B1093-BA86-410A-B7A0-7A54C605F812} @@ -161,7 +161,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase CompileAsC @@ -181,7 +181,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase @@ -198,7 +198,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase @@ -212,7 +212,7 @@ Level3 HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase CompileAsC @@ -229,7 +229,7 @@ MaxSpeed true HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase @@ -243,7 +243,7 @@ MaxSpeed true HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase @@ -254,7 +254,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase CompileAsC @@ -271,7 +271,7 @@ Level3 HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase CompileAsC diff --git a/src/libcdio/driver/.clang/driver.vcxproj.filters b/.vs/libcdio-driver.vcxproj.filters similarity index 57% rename from src/libcdio/driver/.clang/driver.vcxproj.filters rename to .vs/libcdio-driver.vcxproj.filters index de927206..1825f9cd 100644 --- a/src/libcdio/driver/.clang/driver.vcxproj.filters +++ b/.vs/libcdio-driver.vcxproj.filters @@ -11,84 +11,84 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files diff --git a/src/libcdio/iso9660/.msvc/iso9660.vcxproj b/.vs/libcdio-iso9660.vcxproj similarity index 85% rename from src/libcdio/iso9660/.msvc/iso9660.vcxproj rename to .vs/libcdio-iso9660.vcxproj index c7037475..f4c701ba 100644 --- a/src/libcdio/iso9660/.msvc/iso9660.vcxproj +++ b/.vs/libcdio-iso9660.vcxproj @@ -35,26 +35,26 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + {D4E80F35-2604-40AC-B436-97B052ECB572} @@ -153,7 +153,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase CompileAsC @@ -173,7 +173,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase @@ -190,7 +190,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase @@ -204,7 +204,7 @@ Level3 HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase CompileAsC @@ -221,7 +221,7 @@ MaxSpeed true HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase @@ -235,7 +235,7 @@ MaxSpeed true HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase @@ -246,7 +246,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase CompileAsC @@ -263,7 +263,7 @@ Level3 HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase CompileAsC diff --git a/src/libcdio/iso9660/.clang/iso9660.vcxproj.filters b/.vs/libcdio-iso9660.vcxproj.filters similarity index 60% rename from src/libcdio/iso9660/.clang/iso9660.vcxproj.filters rename to .vs/libcdio-iso9660.vcxproj.filters index 53c3514f..e3b3c656 100644 --- a/src/libcdio/iso9660/.clang/iso9660.vcxproj.filters +++ b/.vs/libcdio-iso9660.vcxproj.filters @@ -11,60 +11,60 @@ - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Source Files - + Source Files - + Source Files - + Source Files diff --git a/src/libcdio/udf/.msvc/udf.vcxproj b/.vs/libcdio-udf.vcxproj similarity index 87% rename from src/libcdio/udf/.msvc/udf.vcxproj rename to .vs/libcdio-udf.vcxproj index 5f4f7024..1152237c 100644 --- a/src/libcdio/udf/.msvc/udf.vcxproj +++ b/.vs/libcdio-udf.vcxproj @@ -35,20 +35,20 @@ - - - - - + + + + + - - - - - - - + + + + + + + {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC} @@ -147,7 +147,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase CompileAsC @@ -167,7 +167,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase @@ -184,7 +184,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase @@ -198,7 +198,7 @@ Level3 HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase CompileAsC @@ -215,7 +215,7 @@ MaxSpeed true HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase @@ -229,7 +229,7 @@ MaxSpeed true HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase @@ -240,7 +240,7 @@ Level3 Disabled HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase CompileAsC @@ -257,7 +257,7 @@ Level3 HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\libcdio;..\src\libcdio\driver;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase CompileAsC diff --git a/src/libcdio/udf/.clang/udf.vcxproj.filters b/.vs/libcdio-udf.vcxproj.filters similarity index 64% rename from src/libcdio/udf/.clang/udf.vcxproj.filters rename to .vs/libcdio-udf.vcxproj.filters index 617205d6..432966ce 100644 --- a/src/libcdio/udf/.clang/udf.vcxproj.filters +++ b/.vs/libcdio-udf.vcxproj.filters @@ -11,42 +11,42 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files diff --git a/src/ms-sys/.msvc/ms-sys.vcxproj b/.vs/ms-sys.vcxproj similarity index 76% rename from src/ms-sys/.msvc/ms-sys.vcxproj rename to .vs/ms-sys.vcxproj index 5628235e..9915023e 100644 --- a/src/ms-sys/.msvc/ms-sys.vcxproj +++ b/.vs/ms-sys.vcxproj @@ -35,62 +35,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + {2B1D078D-8EB4-4398-9CA4-23457265A7F6} @@ -188,7 +188,7 @@ Level3 Disabled _CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) + ..\src\ms-sys\inc;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 28252;28253 @@ -209,7 +209,7 @@ Level3 Disabled _CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) + ..\src\ms-sys\inc;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase /analyze:stacksize32850 %(AdditionalOptions) @@ -228,7 +228,7 @@ Level3 Disabled _CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) + ..\src\ms-sys\inc;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase /analyze:stacksize32850 %(AdditionalOptions) @@ -244,7 +244,7 @@ Level3 %(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) + ..\src\ms-sys\inc;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 28252;28253 @@ -262,7 +262,7 @@ MaxSpeed true %(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) + ..\src\ms-sys\inc;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase /analyze:stacksize32850 %(AdditionalOptions) @@ -278,7 +278,7 @@ MaxSpeed true %(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) + ..\src\ms-sys\inc;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase /analyze:stacksize32850 %(AdditionalOptions) @@ -291,7 +291,7 @@ Level3 Disabled _CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) + ..\src\ms-sys\inc;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 28252;28253 @@ -309,7 +309,7 @@ Level3 %(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) + ..\src\ms-sys\inc;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 28252;28253 diff --git a/src/ms-sys/.clang/ms-sys.vcxproj.filters b/.vs/ms-sys.vcxproj.filters similarity index 52% rename from src/ms-sys/.clang/ms-sys.vcxproj.filters rename to .vs/ms-sys.vcxproj.filters index 7945874b..f469421c 100644 --- a/src/ms-sys/.clang/ms-sys.vcxproj.filters +++ b/.vs/ms-sys.vcxproj.filters @@ -11,168 +11,168 @@ - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files diff --git a/src/.msvc/rufus.vcxproj b/.vs/rufus.vcxproj similarity index 80% rename from src/.msvc/rufus.vcxproj rename to .vs/rufus.vcxproj index 585731ed..f9ea449f 100644 --- a/src/.msvc/rufus.vcxproj +++ b/.vs/rufus.vcxproj @@ -124,7 +124,7 @@ _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) MultiThreadedDebug Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + ..\src\msvc-missing;..\src\ms-sys\inc;..\src\syslinux\libinstaller;..\src\syslinux\libfat;..\src\syslinux\win;..\src\libcdio;..\src\getopt;%(AdditionalIncludeDirectories) CompileAsC true false @@ -148,7 +148,7 @@ _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) MultiThreadedDebug Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + ..\src\msvc-missing;..\src\ms-sys\inc;..\src\syslinux\libinstaller;..\src\syslinux\libfat;..\src\syslinux\win;..\src\libcdio;..\src\getopt;%(AdditionalIncludeDirectories) CompileAsC true false @@ -173,7 +173,7 @@ _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) MultiThreadedDebug Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + ..\src\msvc-missing;..\src\ms-sys\inc;..\src\syslinux\libinstaller;..\src\syslinux\libfat;..\src\syslinux\win;..\src\libcdio;..\src\getopt;%(AdditionalIncludeDirectories) CompileAsC true false @@ -198,7 +198,7 @@ X64 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + ..\src\msvc-missing;..\src\ms-sys\inc;..\src\syslinux\libinstaller;..\src\syslinux\libfat;..\src\syslinux\win;..\src\libcdio;..\src\getopt;%(AdditionalIncludeDirectories) _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) MultiThreadedDebug Level3 @@ -226,7 +226,7 @@ _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;%(PreprocessorDefinitions) MultiThreaded Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + ..\src\msvc-missing;..\src\ms-sys\inc;..\src\syslinux\libinstaller;..\src\syslinux\libfat;..\src\syslinux\win;..\src\libcdio;..\src\getopt;%(AdditionalIncludeDirectories) CompileAsC true false @@ -249,7 +249,7 @@ _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;%(PreprocessorDefinitions) MultiThreaded Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + ..\src\msvc-missing;..\src\ms-sys\inc;..\src\syslinux\libinstaller;..\src\syslinux\libfat;..\src\syslinux\win;..\src\libcdio;..\src\getopt;%(AdditionalIncludeDirectories) CompileAsC true false @@ -274,7 +274,7 @@ _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;%(PreprocessorDefinitions) MultiThreaded Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + ..\src\msvc-missing;..\src\ms-sys\inc;..\src\syslinux\libinstaller;..\src\syslinux\libfat;..\src\syslinux\win;..\src\libcdio;..\src\getopt;%(AdditionalIncludeDirectories) CompileAsC true false @@ -302,7 +302,7 @@ _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;%(PreprocessorDefinitions) MultiThreaded Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) + ..\src\msvc-missing;..\src\ms-sys\inc;..\src\syslinux\libinstaller;..\src\syslinux\libfat;..\src\syslinux\win;..\src\libcdio;..\src\getopt;%(AdditionalIncludeDirectories) CompileAsC true false @@ -320,90 +320,90 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - + - + {fb6d52d4-a2f8-c358-db85-bbcaecfddd7d} - + {ae83e1b4-ce06-47ee-b7a3-c3a1d7c2d71e} - + {fa1b1093-ba86-410a-b7a0-7a54c605f812} - + {d4e80f35-2604-40ac-b436-97b052ecb572} - + {0cec40a6-a195-4be5-a88b-0ab00eb142ec} - + {2b1d078d-8eb4-4398-9ca4-23457265a7f6} - + {8390dce0-859d-4f57-ad9c-aaeac4d77eef} - + {266502ac-cd74-4581-b707-938a7d05ad7a} - + {7d2e9784-ddf7-4988-a887-cf099bc3b340} diff --git a/src/.msvc/rufus.vcxproj.filters b/.vs/rufus.vcxproj.filters similarity index 62% rename from src/.msvc/rufus.vcxproj.filters rename to .vs/rufus.vcxproj.filters index 6e35a581..14d7605f 100644 --- a/src/.msvc/rufus.vcxproj.filters +++ b/.vs/rufus.vcxproj.filters @@ -15,159 +15,159 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Resource Files - + Resource Files - + Resource Files - + Resource Files - + Resource Files diff --git a/src/syslinux/libfat/.msvc/libfat.vcxproj b/.vs/syslinux-libfat.vcxproj similarity index 90% rename from src/syslinux/libfat/.msvc/libfat.vcxproj rename to .vs/syslinux-libfat.vcxproj index 0bd089b6..b3392477 100644 --- a/src/syslinux/libfat/.msvc/libfat.vcxproj +++ b/.vs/syslinux-libfat.vcxproj @@ -35,16 +35,16 @@ - - - - + + + + - - - - + + + + {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF} @@ -143,7 +143,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4018;4244 @@ -164,7 +164,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4018;4244 @@ -182,7 +182,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4018;4244 @@ -197,7 +197,7 @@ Level3 inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4018;4244 @@ -215,7 +215,7 @@ MaxSpeed true inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4018;4244 @@ -230,7 +230,7 @@ MaxSpeed true inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4018;4244 @@ -242,7 +242,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4018;4244 @@ -260,7 +260,7 @@ Level3 inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4018;4244 diff --git a/src/syslinux/libfat/.clang/libfat.vcxproj.filters b/.vs/syslinux-libfat.vcxproj.filters similarity index 68% rename from src/syslinux/libfat/.clang/libfat.vcxproj.filters rename to .vs/syslinux-libfat.vcxproj.filters index 8a20e022..717f809c 100644 --- a/src/syslinux/libfat/.clang/libfat.vcxproj.filters +++ b/.vs/syslinux-libfat.vcxproj.filters @@ -11,30 +11,30 @@ - + Header Files - + Header Files - + Header Files - + Header Files - + Source Files - + Source Files - + Source Files - + Source Files diff --git a/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj b/.vs/syslinux-libinstaller.vcxproj similarity index 89% rename from src/syslinux/libinstaller/.msvc/libinstaller.vcxproj rename to .vs/syslinux-libinstaller.vcxproj index 10deecc7..f5176ad1 100644 --- a/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj +++ b/.vs/syslinux-libinstaller.vcxproj @@ -35,16 +35,16 @@ - - - - - + + + + + - - - + + + {266502AC-CD74-4581-B707-938A7D05AD7A} @@ -143,7 +143,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4244;4267 @@ -164,7 +164,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4244;4267 @@ -182,7 +182,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4244;4267 @@ -197,7 +197,7 @@ Level3 inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4244;4267 @@ -215,7 +215,7 @@ MaxSpeed true inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4244;4267 @@ -230,7 +230,7 @@ MaxSpeed true inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4244;4267 @@ -242,7 +242,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4244;4267 @@ -260,7 +260,7 @@ Level3 inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4244;4267 diff --git a/src/syslinux/libinstaller/.clang/libinstaller.vcxproj.filters b/.vs/syslinux-libinstaller.vcxproj.filters similarity index 66% rename from src/syslinux/libinstaller/.clang/libinstaller.vcxproj.filters rename to .vs/syslinux-libinstaller.vcxproj.filters index 5cc1daa8..e6ec6ef1 100644 --- a/src/syslinux/libinstaller/.clang/libinstaller.vcxproj.filters +++ b/.vs/syslinux-libinstaller.vcxproj.filters @@ -11,30 +11,30 @@ - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Source Files - + Source Files - + Source Files diff --git a/src/syslinux/win/.msvc/win.vcxproj b/.vs/syslinux-win.vcxproj similarity index 92% rename from src/syslinux/win/.msvc/win.vcxproj rename to .vs/syslinux-win.vcxproj index 8ec983c4..85c644c7 100644 --- a/src/syslinux/win/.msvc/win.vcxproj +++ b/.vs/syslinux-win.vcxproj @@ -35,10 +35,10 @@ - + - + {7D2E9784-DDF7-4988-A887-CF099BC3B340} @@ -137,7 +137,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4244;4267;4996 @@ -158,7 +158,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4244;4267;4996 @@ -176,7 +176,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4244;4267;4996 @@ -191,7 +191,7 @@ Level3 inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4244;4267;4996 @@ -209,7 +209,7 @@ MaxSpeed true inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4244;4267;4996 @@ -224,7 +224,7 @@ MaxSpeed true inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4244;4267;4996 @@ -236,7 +236,7 @@ Level3 Disabled inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreadedDebug ProgramDatabase 4244;4267;4996 @@ -254,7 +254,7 @@ Level3 inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) + ..\src;..\src\msvc-missing;%(AdditionalIncludeDirectories) MultiThreaded ProgramDatabase 4244;4267;4996 diff --git a/src/syslinux/win/.clang/win.vcxproj.filters b/.vs/syslinux-win.vcxproj.filters similarity index 85% rename from src/syslinux/win/.clang/win.vcxproj.filters rename to .vs/syslinux-win.vcxproj.filters index ce6dd6c7..26aac8c5 100644 --- a/src/syslinux/win/.clang/win.vcxproj.filters +++ b/.vs/syslinux-win.vcxproj.filters @@ -11,12 +11,12 @@ - + Header Files - + Source Files diff --git a/rufus (Clang).sln b/rufus (Clang).sln deleted file mode 100644 index f7a226b5..00000000 --- a/rufus (Clang).sln +++ /dev/null @@ -1,117 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.4 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rufus", "src\.clang\rufus.vcxproj", "{731858A7-0303-4988-877B-9C0DD6471864}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ms-sys", "src\ms-sys\.clang\ms-sys.vcxproj", "{2B1D078D-8EB4-4398-9CA4-23457265A7F6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-libfat", "src\syslinux\libfat\.clang\libfat.vcxproj", "{8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-libinstaller", "src\syslinux\libinstaller\.clang\libinstaller.vcxproj", "{266502AC-CD74-4581-B707-938A7D05AD7A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-win", "src\syslinux\win\.clang\win.vcxproj", "{7D2E9784-DDF7-4988-A887-CF099BC3B340}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-iso9660", "src\libcdio\iso9660\.clang\iso9660.vcxproj", "{D4E80F35-2604-40AC-B436-97B052ECB572}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-udf", "src\libcdio\udf\.clang\udf.vcxproj", "{0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-driver", "src\libcdio\driver\.clang\driver.vcxproj", "{FA1B1093-BA86-410A-B7A0-7A54C605F812}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getopt", "src\getopt\.clang\getopt.vcxproj", "{AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bled", "src\bled\.clang\bled.vcxproj", "{FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86_32 = Debug|x86_32 - Debug|x86_64 = Debug|x86_64 - Release|x86_32 = Release|x86_32 - Release|x86_64 = Release|x86_64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {731858A7-0303-4988-877B-9C0DD6471864}.Debug|x86_32.ActiveCfg = Debug|Win32 - {731858A7-0303-4988-877B-9C0DD6471864}.Debug|x86_32.Build.0 = Debug|Win32 - {731858A7-0303-4988-877B-9C0DD6471864}.Debug|x86_64.ActiveCfg = Debug|x64 - {731858A7-0303-4988-877B-9C0DD6471864}.Debug|x86_64.Build.0 = Debug|x64 - {731858A7-0303-4988-877B-9C0DD6471864}.Release|x86_32.ActiveCfg = Release|Win32 - {731858A7-0303-4988-877B-9C0DD6471864}.Release|x86_32.Build.0 = Release|Win32 - {731858A7-0303-4988-877B-9C0DD6471864}.Release|x86_64.ActiveCfg = Release|x64 - {731858A7-0303-4988-877B-9C0DD6471864}.Release|x86_64.Build.0 = Release|x64 - {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|x86_32.ActiveCfg = Debug|Win32 - {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|x86_32.Build.0 = Debug|Win32 - {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|x86_64.ActiveCfg = Debug|x64 - {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Debug|x86_64.Build.0 = Debug|x64 - {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|x86_32.ActiveCfg = Release|Win32 - {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|x86_32.Build.0 = Release|Win32 - {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|x86_64.ActiveCfg = Release|x64 - {2B1D078D-8EB4-4398-9CA4-23457265A7F6}.Release|x86_64.Build.0 = Release|x64 - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|x86_32.ActiveCfg = Debug|Win32 - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|x86_32.Build.0 = Debug|Win32 - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|x86_64.ActiveCfg = Debug|x64 - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Debug|x86_64.Build.0 = Debug|x64 - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|x86_32.ActiveCfg = Release|Win32 - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|x86_32.Build.0 = Release|Win32 - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|x86_64.ActiveCfg = Release|x64 - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}.Release|x86_64.Build.0 = Release|x64 - {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|x86_32.ActiveCfg = Debug|Win32 - {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|x86_32.Build.0 = Debug|Win32 - {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|x86_64.ActiveCfg = Debug|x64 - {266502AC-CD74-4581-B707-938A7D05AD7A}.Debug|x86_64.Build.0 = Debug|x64 - {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|x86_32.ActiveCfg = Release|Win32 - {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|x86_32.Build.0 = Release|Win32 - {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|x86_64.ActiveCfg = Release|x64 - {266502AC-CD74-4581-B707-938A7D05AD7A}.Release|x86_64.Build.0 = Release|x64 - {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|x86_32.ActiveCfg = Debug|Win32 - {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|x86_32.Build.0 = Debug|Win32 - {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|x86_64.ActiveCfg = Debug|x64 - {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Debug|x86_64.Build.0 = Debug|x64 - {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|x86_32.ActiveCfg = Release|Win32 - {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|x86_32.Build.0 = Release|Win32 - {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|x86_64.ActiveCfg = Release|x64 - {7D2E9784-DDF7-4988-A887-CF099BC3B340}.Release|x86_64.Build.0 = Release|x64 - {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|x86_32.ActiveCfg = Debug|Win32 - {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|x86_32.Build.0 = Debug|Win32 - {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|x86_64.ActiveCfg = Debug|x64 - {D4E80F35-2604-40AC-B436-97B052ECB572}.Debug|x86_64.Build.0 = Debug|x64 - {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|x86_32.ActiveCfg = Release|Win32 - {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|x86_32.Build.0 = Release|Win32 - {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|x86_64.ActiveCfg = Release|x64 - {D4E80F35-2604-40AC-B436-97B052ECB572}.Release|x86_64.Build.0 = Release|x64 - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|x86_32.ActiveCfg = Debug|Win32 - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|x86_32.Build.0 = Debug|Win32 - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|x86_64.ActiveCfg = Debug|x64 - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Debug|x86_64.Build.0 = Debug|x64 - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|x86_32.ActiveCfg = Release|Win32 - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|x86_32.Build.0 = Release|Win32 - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|x86_64.ActiveCfg = Release|x64 - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}.Release|x86_64.Build.0 = Release|x64 - {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|x86_32.ActiveCfg = Debug|Win32 - {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|x86_32.Build.0 = Debug|Win32 - {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|x86_64.ActiveCfg = Debug|x64 - {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Debug|x86_64.Build.0 = Debug|x64 - {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|x86_32.ActiveCfg = Release|Win32 - {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|x86_32.Build.0 = Release|Win32 - {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|x86_64.ActiveCfg = Release|x64 - {FA1B1093-BA86-410A-B7A0-7A54C605F812}.Release|x86_64.Build.0 = Release|x64 - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|x86_32.ActiveCfg = Debug|Win32 - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|x86_32.Build.0 = Debug|Win32 - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|x86_64.ActiveCfg = Debug|x64 - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Debug|x86_64.Build.0 = Debug|x64 - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|x86_32.ActiveCfg = Release|Win32 - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|x86_32.Build.0 = Release|Win32 - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|x86_64.ActiveCfg = Release|x64 - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}.Release|x86_64.Build.0 = Release|x64 - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|x86_32.ActiveCfg = Debug|Win32 - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|x86_32.Build.0 = Debug|Win32 - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|x86_64.ActiveCfg = Debug|x64 - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Debug|x86_64.Build.0 = Debug|x64 - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|x86_32.ActiveCfg = Release|Win32 - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|x86_32.Build.0 = Release|Win32 - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|x86_64.ActiveCfg = Release|x64 - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}.Release|x86_64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/rufus.sln b/rufus.sln index f0a98300..f50a33fc 100644 --- a/rufus.sln +++ b/rufus.sln @@ -2,25 +2,25 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27004.2006 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rufus", "src\.msvc\rufus.vcxproj", "{731858A7-0303-4988-877B-9C0DD6471864}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rufus", ".vs\rufus.vcxproj", "{731858A7-0303-4988-877B-9C0DD6471864}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ms-sys", "src\ms-sys\.msvc\ms-sys.vcxproj", "{2B1D078D-8EB4-4398-9CA4-23457265A7F6}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ms-sys", ".vs\ms-sys.vcxproj", "{2B1D078D-8EB4-4398-9CA4-23457265A7F6}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-libfat", "src\syslinux\libfat\.msvc\libfat.vcxproj", "{8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-libfat", ".vs\syslinux-libfat.vcxproj", "{8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-libinstaller", "src\syslinux\libinstaller\.msvc\libinstaller.vcxproj", "{266502AC-CD74-4581-B707-938A7D05AD7A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-libinstaller", ".vs\syslinux-libinstaller.vcxproj", "{266502AC-CD74-4581-B707-938A7D05AD7A}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-win", "src\syslinux\win\.msvc\win.vcxproj", "{7D2E9784-DDF7-4988-A887-CF099BC3B340}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslinux-win", ".vs\syslinux-win.vcxproj", "{7D2E9784-DDF7-4988-A887-CF099BC3B340}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-iso9660", "src\libcdio\iso9660\.msvc\iso9660.vcxproj", "{D4E80F35-2604-40AC-B436-97B052ECB572}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-iso9660", ".vs\libcdio-iso9660.vcxproj", "{D4E80F35-2604-40AC-B436-97B052ECB572}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-udf", "src\libcdio\udf\.msvc\udf.vcxproj", "{0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-udf", ".vs\libcdio-udf.vcxproj", "{0CEC40A6-A195-4BE5-A88B-0AB00EB142EC}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-driver", "src\libcdio\driver\.msvc\driver.vcxproj", "{FA1B1093-BA86-410A-B7A0-7A54C605F812}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio-driver", ".vs\libcdio-driver.vcxproj", "{FA1B1093-BA86-410A-B7A0-7A54C605F812}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getopt", "src\getopt\.msvc\getopt.vcxproj", "{AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getopt", ".vs\getopt.vcxproj", "{AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bled", "src\bled\.msvc\bled.vcxproj", "{FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bled", ".vs\bled.vcxproj", "{FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/.clang/rufus.vcxproj b/src/.clang/rufus.vcxproj deleted file mode 100644 index 7b3b6716..00000000 --- a/src/.clang/rufus.vcxproj +++ /dev/null @@ -1,290 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - rufus - {731858A7-0303-4988-877B-9C0DD6471864} - rufus - Win32Proj - - - - Application - Unicode - true - v141_clang_c2 - - - Application - Unicode - v141_clang_c2 - - - Application - Unicode - true - v141_clang_c2 - - - Application - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - - _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) - CompileAsC - true - 4091;28252;28253;%(DisableSpecificWarnings) - Disabled - true - -Wno-deprecated-declarations - - - setupapi.lib;comctl32.lib;wininet.lib;shlwapi.lib;crypt32.lib;wintrust.lib;psapi.lib;%(AdditionalDependencies) - RequireAdministrator - true - Windows - MachineX86 - - - _UNICODE;UNICODE;RUFUS_LOC;%(PreprocessorDefinitions) - - - - - - X64 - - - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) - _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - CompileAsC - true - 4091;28252;28253;%(DisableSpecificWarnings) - Disabled - true - -Wno-deprecated-declarations - - - setupapi.lib;comctl32.lib;wininet.lib;shlwapi.lib;crypt32.lib;wintrust.lib;psapi.lib;%(AdditionalDependencies) - RequireAdministrator - true - Windows - MachineX64 - - - _UNICODE;UNICODE;RUFUS_LOC;%(PreprocessorDefinitions) - - - - - - _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;%(PreprocessorDefinitions) - MultiThreaded - Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) - CompileAsC - true - 4091;28252;28253;%(DisableSpecificWarnings) - true - -Wno-deprecated-declarations - - - setupapi.lib;comctl32.lib;wininet.lib;shlwapi.lib;crypt32.lib;wintrust.lib;psapi.lib;%(AdditionalDependencies) - RequireAdministrator - false - Windows - MachineX86 - - - - _UNICODE;UNICODE;RUFUS_LOC;%(PreprocessorDefinitions) - - - - - - X64 - - - _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;%(PreprocessorDefinitions) - MultiThreaded - Level3 - ..\msvc-missing;..\ms-sys\inc;..\syslinux\libinstaller;..\syslinux\libfat;..\syslinux\win;..\libcdio;..\getopt;%(AdditionalIncludeDirectories) - CompileAsC - true - 4091;28252;28253;%(DisableSpecificWarnings) - true - -Wno-deprecated-declarations - - - setupapi.lib;comctl32.lib;wininet.lib;shlwapi.lib;crypt32.lib;wintrust.lib;psapi.lib;%(AdditionalDependencies) - RequireAdministrator - false - Windows - MachineX64 - - - - _UNICODE;UNICODE;RUFUS_LOC;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {fb6d52d4-a2f8-c358-db85-bbcaecfddd7d} - - - {ae83e1b4-ce06-47ee-b7a3-c3a1d7c2d71e} - - - {fa1b1093-ba86-410a-b7a0-7a54c605f812} - - - {d4e80f35-2604-40ac-b436-97b052ecb572} - - - {0cec40a6-a195-4be5-a88b-0ab00eb142ec} - - - {2b1d078d-8eb4-4398-9ca4-23457265a7f6} - - - {8390dce0-859d-4f57-ad9c-aaeac4d77eef} - - - {266502ac-cd74-4581-b707-938a7d05ad7a} - - - {7d2e9784-ddf7-4988-a887-cf099bc3b340} - - - - - - \ No newline at end of file diff --git a/src/.clang/rufus.vcxproj.filters b/src/.clang/rufus.vcxproj.filters deleted file mode 100644 index 6e35a581..00000000 --- a/src/.clang/rufus.vcxproj.filters +++ /dev/null @@ -1,174 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - Resource Files - - - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/src/.msvc/rufus_sources b/src/.msvc/rufus_sources deleted file mode 100644 index 86409c87..00000000 --- a/src/.msvc/rufus_sources +++ /dev/null @@ -1,57 +0,0 @@ -TARGETNAME=rufus -TARGETTYPE=PROGRAM -UMTYPE=windows -UMENTRY=winmain - -INCLUDES=$(DDK_INC_PATH);.\ms-sys\inc;.\syslinux\libfat;.\syslinux\libinstaller;.\syslinux\win;.\msvc-missing;.\libcdio;.\getopt;.\bled -C_DEFINES = $(C_DEFINES) /DDDKBUILD /DUNICODE /D_UNICODE /DRUFUS_LOC /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W3 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib \ - $(SDK_LIB_PATH)\setupapi.lib \ - $(SDK_LIB_PATH)\ole32.lib \ - $(SDK_LIB_PATH)\uuid.lib \ - $(SDK_LIB_PATH)\shell32.lib \ - $(SDK_LIB_PATH)\wininet.lib \ - $(SDK_LIB_PATH)\shlwapi.lib \ - $(SDK_LIB_PATH)\crypt32.lib \ - $(SDK_LIB_PATH)\wintrust.lib \ - .\bled\bled.lib \ - .\ms-sys\ms-sys.lib \ - .\syslinux\libfat\libfat.lib \ - .\syslinux\libinstaller\libinstaller.lib \ - .\syslinux\win\win.lib \ - .\libcdio\iso9660\iso9660.lib \ - .\libcdio\udf\udf.lib \ - .\libcdio\driver\driver.lib \ - .\getopt\getopt.lib - -# http://jpassing.com/2008/02/01/how-to-use-manifests-with-buildexe/ -SXS_APPLICATION_MANIFEST=..\rufus.manifest - -SOURCES=badblocks.c \ - checksum.c \ - dev.c \ - dos.c \ - dos_locale.c \ - drive.c \ - format.c \ - icon.c \ - iso.c \ - localization.c \ - net.c \ - parser.c \ - pki.c \ - rufus.c \ - smart.c \ - stdfn.c \ - stdio.c \ - stdlg.c \ - syslinux.c \ - vhd.c \ - rufus.rc diff --git a/src/bled/.clang/bled.vcxproj b/src/bled/.clang/bled.vcxproj deleted file mode 100644 index d8a79190..00000000 --- a/src/bled/.clang/bled.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bled - {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D} - bled - - - - StaticLibrary - Unicode - v141_clang_c2 - - - StaticLibrary - Unicode - v141_clang_c2 - - - StaticLibrary - Unicode - v141_clang_c2 - - - StaticLibrary - Unicode - v141_clang_c2 - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - Level3 - true - Disabled - _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\.. - CompileAsC - true - - - true - true - true - $(OutDir)$(TargetName)$(TargetExt) - odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - EnableFastChecks - Disabled - _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - MultiThreadedDebug - ..\.. - CompileAsC - true - - - true - true - true - $(OutDir)$(TargetName)$(TargetExt) - odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - Level3 - _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - MultiThreaded - ..\.. - CompileAsC - true - - - true - true - $(OutDir)$(TargetName)$(TargetExt) - odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - true - - - - - Level3 - _OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - MultiThreaded - ..\.. - CompileAsC - true - - - true - true - $(OutDir)$(TargetName)$(TargetExt) - odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - .\7z.def - - - true - - - - \ No newline at end of file diff --git a/src/bled/.msvc/bled.vcxproj.filters b/src/bled/.msvc/bled.vcxproj.filters deleted file mode 100644 index 5aae9f16..00000000 --- a/src/bled/.msvc/bled.vcxproj.filters +++ /dev/null @@ -1,117 +0,0 @@ - - - - - {396df203-84ec-49b8-ae11-074c50a020f0} - - - {0147b833-dc8f-4666-be99-77dfae5e6679} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/src/bled/.msvc/bled_sources b/src/bled/.msvc/bled_sources deleted file mode 100644 index 1ae0c441..00000000 --- a/src/bled/.msvc/bled_sources +++ /dev/null @@ -1,20 +0,0 @@ -TARGETNAME=bled -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);.;..;..\msvc-missing -BLED_DEFINES = /D_OFF_T_DEFINED /D_off_t=__int64 /Doff_t=_off_t /D_FILE_OFFSET_BITS=64 -C_DEFINES=$(C_DEFINES) $(BLED_DEFINES) /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W3 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=bled.c crc32.c data_align.c data_extract_all.c data_skip.c decompress_bunzip2.c \ - decompress_gunzip.c decompress_uncompress.c decompress_unlzma.c decompress_unxz.c decompress_unzip.c \ - filter_accept_all.c filter_accept_list.c filter_accept_reject_list.c find_list_entry.c \ - header_list.c header_skip.c header_verbose_list.c init_handle.c open_transformer.c \ - seek_by_jump.c seek_by_read.c xz_dec_bcj.c xz_dec_lzma2.c xz_dec_stream.c diff --git a/src/format.c b/src/format.c index d9b07d55..460e5995 100644 --- a/src/format.c +++ b/src/format.c @@ -1810,14 +1810,7 @@ DWORD WINAPI FormatThread(void* param) if (report.bb_count) { bb_msg = lmprintf(MSG_011, report.bb_count, report.num_read_errors, report.num_write_errors, report.num_corruption_errors); -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wformat-security" -#endif fprintf(log_fd, bb_msg); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif GetLocalTime(<); fprintf(log_fd, APPLICATION_NAME " bad blocks check ended on: %04d.%02d.%02d %02d:%02d:%02d\n", lt.wYear, lt.wMonth, lt.wDay, lt.wHour, lt.wMinute, lt.wSecond); diff --git a/src/getopt/.clang/getopt.vcxproj b/src/getopt/.clang/getopt.vcxproj deleted file mode 100644 index ca7cb7f5..00000000 --- a/src/getopt/.clang/getopt.vcxproj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E} - getopt - - - - StaticLibrary - Unicode - true - v141_clang_c2 - - - StaticLibrary - Unicode - v141_clang_c2 - - - StaticLibrary - Unicode - true - v141_clang_c2 - - - StaticLibrary - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - - - true - - - true - - - true - - - true - - - - HAVE_STRING_H;%(PreprocessorDefinitions) - true - MultiThreadedDebug - Level3 - 28252;28253 - Disabled - CompileAsC - true - - - true - - - - - X64 - - - HAVE_STRING_H;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - 28252;28253 - Disabled - CompileAsC - true - - - true - - - - - MaxSpeed - HAVE_STRING_H;%(PreprocessorDefinitions) - MultiThreaded - Level3 - 28252;28253 - CompileAsC - true - - - true - - - - - X64 - - - HAVE_STRING_H;%(PreprocessorDefinitions) - MultiThreaded - Level3 - 28252;28253 - CompileAsC - true - - - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/getopt/.msvc/getopt.vcxproj.filters b/src/getopt/.msvc/getopt.vcxproj.filters deleted file mode 100644 index 2e23d852..00000000 --- a/src/getopt/.msvc/getopt.vcxproj.filters +++ /dev/null @@ -1,26 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Source Files - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/src/getopt/.msvc/getopt_sources b/src/getopt/.msvc/getopt_sources deleted file mode 100644 index 58c14674..00000000 --- a/src/getopt/.msvc/getopt_sources +++ /dev/null @@ -1,16 +0,0 @@ -TARGETNAME=getopt -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);..\msvc-missing -C_DEFINES=$(C_DEFINES) /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED /DHAVE_STRING_H - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W3 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=getopt1.c \ - getopt.c diff --git a/src/libcdio/driver/.clang/driver.vcxproj b/src/libcdio/driver/.clang/driver.vcxproj deleted file mode 100644 index 92649543..00000000 --- a/src/libcdio/driver/.clang/driver.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {FA1B1093-BA86-410A-B7A0-7A54C605F812} - Win32Proj - driver - libcdio-driver - - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - Level3 - Disabled - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - CompileAsC - true - -Wno-deprecated-declarations -Wno-sizeof-array-argument - - - Windows - true - - - MachineX86 - - - - - Level3 - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - CompileAsC - true - -Wno-deprecated-declarations -Wno-sizeof-array-argument - - - MachineX86 - - - - - Level3 - Disabled - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - CompileAsC - true - -Wno-deprecated-declarations - - - Windows - true - - - MachineX64 - - - - - Level3 - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - CompileAsC - true - -Wno-deprecated-declarations - - - Windows - true - true - true - - - MachineX64 - - - - - - \ No newline at end of file diff --git a/src/libcdio/driver/.msvc/driver.vcxproj.filters b/src/libcdio/driver/.msvc/driver.vcxproj.filters deleted file mode 100644 index de927206..00000000 --- a/src/libcdio/driver/.msvc/driver.vcxproj.filters +++ /dev/null @@ -1,95 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/src/libcdio/driver/.msvc/driver_sources b/src/libcdio/driver/.msvc/driver_sources deleted file mode 100644 index 11a76388..00000000 --- a/src/libcdio/driver/.msvc/driver_sources +++ /dev/null @@ -1,26 +0,0 @@ -TARGETNAME=driver -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);.;..;..\..\msvc-missing -LIBCDIO_DEFINES = /DHAVE_CONFIG_H /D_OFF_T_DEFINED /D_off_t=__int64 /Doff_t=_off_t /D_FILE_OFFSET_BITS=64 -C_DEFINES=$(C_DEFINES) $(LIBCDIO_DEFINES) /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W3 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=disc.c \ - ds.c \ - logging.c \ - memory.c \ - read.c \ - sector.c \ - track.c \ - util.c \ - utf8.c \ - _cdio_stdio.c \ - _cdio_stream.c \ No newline at end of file diff --git a/src/libcdio/iso9660/.clang/iso9660.vcxproj b/src/libcdio/iso9660/.clang/iso9660.vcxproj deleted file mode 100644 index fcef4684..00000000 --- a/src/libcdio/iso9660/.clang/iso9660.vcxproj +++ /dev/null @@ -1,194 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - {D4E80F35-2604-40AC-B436-97B052ECB572} - Win32Proj - iso9660 - libcdio-iso9660 - - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - Level3 - Disabled - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - CompileAsC - true - -Wno-deprecated-declarations -Wno-array-bounds -Wno-unused-variable - - - Windows - true - - - MachineX86 - - - - - Level3 - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - CompileAsC - true - -Wno-deprecated-declarations -Wno-array-bounds -Wno-unused-variable - - - MachineX86 - - - - - Level3 - Disabled - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - CompileAsC - true - -Wno-deprecated-declarations -Wno-array-bounds -Wno-unused-variable - - - Windows - true - - - MachineX64 - - - - - Level3 - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - CompileAsC - true - -Wno-deprecated-declarations -Wno-array-bounds -Wno-unused-variable - - - Windows - true - true - true - - - MachineX64 - - - - - - \ No newline at end of file diff --git a/src/libcdio/iso9660/.msvc/iso9660.vcxproj.filters b/src/libcdio/iso9660/.msvc/iso9660.vcxproj.filters deleted file mode 100644 index 53c3514f..00000000 --- a/src/libcdio/iso9660/.msvc/iso9660.vcxproj.filters +++ /dev/null @@ -1,71 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/src/libcdio/iso9660/.msvc/iso9660_sources b/src/libcdio/iso9660/.msvc/iso9660_sources deleted file mode 100644 index 53681832..00000000 --- a/src/libcdio/iso9660/.msvc/iso9660_sources +++ /dev/null @@ -1,19 +0,0 @@ -TARGETNAME=iso9660 -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);.;..;..\driver;..\..\msvc-missing -LIBCDIO_DEFINES = /DHAVE_CONFIG_H /D_OFF_T_DEFINED /D_off_t=__int64 /Doff_t=_off_t /D_FILE_OFFSET_BITS=64 -C_DEFINES=$(C_DEFINES) $(LIBCDIO_DEFINES) /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W3 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=iso9660.c \ - iso9660_fs.c \ - rock.c \ - xa.c \ No newline at end of file diff --git a/src/libcdio/udf/.clang/udf.vcxproj b/src/libcdio/udf/.clang/udf.vcxproj deleted file mode 100644 index 711fb2d1..00000000 --- a/src/libcdio/udf/.clang/udf.vcxproj +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - {0CEC40A6-A195-4BE5-A88B-0AB00EB142EC} - Win32Proj - udf - libcdio-udf - - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - Level3 - Disabled - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - CompileAsC - true - -Wno-deprecated-declarations - - - Windows - true - - - MachineX86 - - - - - Level3 - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - CompileAsC - true - -Wno-deprecated-declarations - - - MachineX86 - - - - - Level3 - Disabled - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - CompileAsC - true - -Wno-deprecated-declarations - - - Windows - true - - - MachineX64 - - - - - Level3 - HAVE_CONFIG_H;_OFF_T_DEFINED;_off_t=__int64;off_t=_off_t;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions) - ..;..\..;..\..\driver;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - CompileAsC - true - -Wno-deprecated-declarations - - - Windows - true - true - true - - - MachineX64 - - - - - - \ No newline at end of file diff --git a/src/libcdio/udf/.msvc/udf.vcxproj.filters b/src/libcdio/udf/.msvc/udf.vcxproj.filters deleted file mode 100644 index 617205d6..00000000 --- a/src/libcdio/udf/.msvc/udf.vcxproj.filters +++ /dev/null @@ -1,53 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/src/libcdio/udf/.msvc/udf_sources b/src/libcdio/udf/.msvc/udf_sources deleted file mode 100644 index 624862c5..00000000 --- a/src/libcdio/udf/.msvc/udf_sources +++ /dev/null @@ -1,20 +0,0 @@ -TARGETNAME=udf -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);.;..;..\driver;..\..\msvc-missing -LIBCDIO_DEFINES = /DHAVE_CONFIG_H /D_OFF_T_DEFINED /D_off_t=__int64 /Doff_t=_off_t /D_FILE_OFFSET_BITS=64 -C_DEFINES=$(C_DEFINES) $(LIBCDIO_DEFINES) /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W3 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=udf.c \ - udf_file.c \ - udf_fs.c \ - udf_time.c \ - filemode.c \ No newline at end of file diff --git a/src/missing.h b/src/missing.h index 17fd6f23..0822fc4a 100644 --- a/src/missing.h +++ b/src/missing.h @@ -60,11 +60,9 @@ /* Read/write with endianness swap */ #if defined (_MSC_VER) && (_MSC_VER >= 1300) #include -#if !defined(__clang__) #pragma intrinsic(_byteswap_ushort) #pragma intrinsic(_byteswap_ulong) #pragma intrinsic(_byteswap_uint64) -#endif #define bswap_uint64 _byteswap_uint64 #define bswap_uint32 _byteswap_ulong #define bswap_uint16 _byteswap_ushort @@ -270,16 +268,6 @@ typedef struct _ATTACH_VIRTUAL_DISK_PARAMETERS { #define ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY (INTERNET_ERROR_BASE + 174) #endif -/* Clang/MinGW32 has an issue with intptr_t */ -#ifndef _UINTPTR_T_DEFINED -#define _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif -#endif - /* * IFile[Open]Dialog interface for Vista and later (from MinGW headers) */ diff --git a/src/ms-sys/.clang/ms-sys.vcxproj b/src/ms-sys/.clang/ms-sys.vcxproj deleted file mode 100644 index 625403a7..00000000 --- a/src/ms-sys/.clang/ms-sys.vcxproj +++ /dev/null @@ -1,237 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {2B1D078D-8EB4-4398-9CA4-23457265A7F6} - Win32Proj - mssys - - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - Level3 - Disabled - _CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) - MultiThreadedDebug - - - 28252;28253 - CompileAsC - true - - - Windows - true - - - MachineX86 - - - - - Level3 - %(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) - MultiThreaded - - - 28252;28253 - CompileAsC - true - - - MachineX86 - - - - - Level3 - Disabled - _CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) - MultiThreadedDebug - - - 28252;28253 - CompileAsC - true - - - Windows - true - - - MachineX64 - - - - - Level3 - %(PreprocessorDefinitions) - ../inc;%(AdditionalIncludeDirectories) - MultiThreaded - - - 28252;28253 - CompileAsC - true - - - Windows - true - true - true - - - MachineX64 - - - - - - \ No newline at end of file diff --git a/src/ms-sys/.msvc/ms-sys.vcxproj.filters b/src/ms-sys/.msvc/ms-sys.vcxproj.filters deleted file mode 100644 index 7945874b..00000000 --- a/src/ms-sys/.msvc/ms-sys.vcxproj.filters +++ /dev/null @@ -1,179 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/src/ms-sys/.msvc/ms-sys_sources b/src/ms-sys/.msvc/ms-sys_sources deleted file mode 100644 index b5f95834..00000000 --- a/src/ms-sys/.msvc/ms-sys_sources +++ /dev/null @@ -1,21 +0,0 @@ -TARGETNAME=ms-sys -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);.\inc;..\msvc-missing -C_DEFINES=$(C_DEFINES) /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W3 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=file.c \ - br.c \ - fat12.c \ - fat16.c \ - fat32.c \ - ntfs.c \ - partition_info.c \ No newline at end of file diff --git a/src/rufus.rc b/src/rufus.rc index 5b4958ec..89f6287c 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1213" +CAPTION "Rufus 2.18.1214" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1213,0 - PRODUCTVERSION 2,18,1213,0 + FILEVERSION 2,18,1214,0 + PRODUCTVERSION 2,18,1214,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1213" + VALUE "FileVersion", "2.18.1214" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1213" + VALUE "ProductVersion", "2.18.1214" END END BLOCK "VarFileInfo" diff --git a/src/syslinux/libfat/.clang/libfat.vcxproj b/src/syslinux/libfat/.clang/libfat.vcxproj deleted file mode 100644 index 6e66661d..00000000 --- a/src/syslinux/libfat/.clang/libfat.vcxproj +++ /dev/null @@ -1,184 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - {8390DCE0-859D-4F57-AD9C-AAEAC4D77EEF} - Win32Proj - libfat - syslinux-libfat - - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - Level3 - Disabled - inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - 4018;4244 - CompileAsC - true - - - Windows - true - - - MachineX86 - - - - - Level3 - inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - 4018;4244 - CompileAsC - true - - - MachineX86 - - - - - Level3 - Disabled - inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - 4018;4244 - CompileAsC - true - - - Windows - true - - - MachineX64 - - - - - Level3 - inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - 4018;4244 - CompileAsC - true - - - Windows - true - true - true - - - MachineX64 - - - - - - \ No newline at end of file diff --git a/src/syslinux/libfat/.msvc/libfat.vcxproj.filters b/src/syslinux/libfat/.msvc/libfat.vcxproj.filters deleted file mode 100644 index 8a20e022..00000000 --- a/src/syslinux/libfat/.msvc/libfat.vcxproj.filters +++ /dev/null @@ -1,41 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/src/syslinux/libfat/.msvc/libfat_sources b/src/syslinux/libfat/.msvc/libfat_sources deleted file mode 100644 index 9059eb50..00000000 --- a/src/syslinux/libfat/.msvc/libfat_sources +++ /dev/null @@ -1,18 +0,0 @@ -TARGETNAME=libfat -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);..\..\msvc-missing -C_DEFINES=$(C_DEFINES) /Dinline=__inline /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W2 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=cache.c \ - fatchain.c \ - open.c \ - searchdir.c \ No newline at end of file diff --git a/src/syslinux/libinstaller/.clang/libinstaller.vcxproj b/src/syslinux/libinstaller/.clang/libinstaller.vcxproj deleted file mode 100644 index d330e904..00000000 --- a/src/syslinux/libinstaller/.clang/libinstaller.vcxproj +++ /dev/null @@ -1,184 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - {266502AC-CD74-4581-B707-938A7D05AD7A} - Win32Proj - libinstaller - syslinux-libinstaller - - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - Level3 - Disabled - inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - 4244;4267 - CompileAsC - true - - - Windows - true - - - MachineX86 - - - - - Level3 - inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - 4244;4267 - CompileAsC - true - - - MachineX86 - - - - - Level3 - Disabled - inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - 4244;4267 - CompileAsC - true - - - Windows - true - - - MachineX64 - - - - - Level3 - inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - 4244;4267 - CompileAsC - true - - - Windows - true - true - true - - - MachineX64 - - - - - - \ No newline at end of file diff --git a/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj.filters b/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj.filters deleted file mode 100644 index 5cc1daa8..00000000 --- a/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj.filters +++ /dev/null @@ -1,41 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/src/syslinux/libinstaller/.msvc/libinstaller_sources b/src/syslinux/libinstaller/.msvc/libinstaller_sources deleted file mode 100644 index 80d1d686..00000000 --- a/src/syslinux/libinstaller/.msvc/libinstaller_sources +++ /dev/null @@ -1,17 +0,0 @@ -TARGETNAME=libinstaller -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);..\..\msvc-missing -C_DEFINES=$(C_DEFINES) /Dinline=__inline /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W2 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=fs.c \ - setadv.c \ - syslxmod.c \ No newline at end of file diff --git a/src/syslinux/win/.clang/win.vcxproj b/src/syslinux/win/.clang/win.vcxproj deleted file mode 100644 index 2061cc8f..00000000 --- a/src/syslinux/win/.clang/win.vcxproj +++ /dev/null @@ -1,182 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - {7D2E9784-DDF7-4988-A887-CF099BC3B340} - Win32Proj - win - syslinux-win - - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - StaticLibrary - true - Unicode - v141_clang_c2 - - - StaticLibrary - false - true - Unicode - v141_clang_c2 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_32\$(Configuration)\ - $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - $(SolutionDir)x86_64\$(Configuration)\ - $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\ - false - false - false - false - - - true - - - true - - - true - - - true - - - - Level3 - Disabled - inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - 4244;4267;4996 - CompileAsC - true - -Wno-deprecated-declarations - - - Windows - true - - - MachineX86 - - - - - Level3 - inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - 4244;4267;4996 - CompileAsC - true - -Wno-deprecated-declarations - - - MachineX86 - - - - - Level3 - Disabled - inline=__inline;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreadedDebug - 4244;4267;4996 - CompileAsC - true - -Wno-deprecated-declarations - - - Windows - true - - - MachineX64 - - - - - Level3 - inline=__inline;%(PreprocessorDefinitions) - ..;..\..\..\msvc-missing;%(AdditionalIncludeDirectories) - MultiThreaded - 4244;4267;4996 - CompileAsC - true - -Wno-deprecated-declarations - - - Windows - true - true - true - - - MachineX64 - - - - - - \ No newline at end of file diff --git a/src/syslinux/win/.msvc/win.vcxproj.filters b/src/syslinux/win/.msvc/win.vcxproj.filters deleted file mode 100644 index ce6dd6c7..00000000 --- a/src/syslinux/win/.msvc/win.vcxproj.filters +++ /dev/null @@ -1,23 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/src/syslinux/win/.msvc/win_sources b/src/syslinux/win/.msvc/win_sources deleted file mode 100644 index 6cc0bb71..00000000 --- a/src/syslinux/win/.msvc/win_sources +++ /dev/null @@ -1,15 +0,0 @@ -TARGETNAME=win -TARGETTYPE=LIBRARY - -INCLUDES=$(DDK_INC_PATH);..\..\msvc-missing -C_DEFINES=$(C_DEFINES) /Dinline=__inline /DDDKBUILD /DUNICODE /D_UNICODE /DISOLATION_AWARE_ENABLED - -!IFNDEF MSC_WARNING_LEVEL -MSC_WARNING_LEVEL=/W2 -!ENDIF -USE_MSVCRT=1 - -TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\user32.lib - -SOURCES=ntfssect.c From 903ac993f2c762b2f4abc074c6fb9028117a9103 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 13 Nov 2017 14:29:48 +0000 Subject: [PATCH 95/97] [misc] remove no longer needed XP workarounds --- _sign.cmd | 5 +- configure | 4 +- configure.ac | 4 +- res/down.ico | Bin 1150 -> 0 bytes res/up.ico | Bin 1150 -> 0 bytes src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/badblocks.c | 4 +- src/checksum.c | 4 +- src/dev.c | 8 +- src/drive.c | 18 +- src/format.c | 33 ++-- src/iso.c | 1 + src/localization.c | 6 +- src/missing.h | 453 +------------------------------------------- src/resource.h | 2 - src/rufus.c | 187 ++++++++---------- src/rufus.h | 8 +- src/rufus.rc | 14 +- src/stdfn.c | 8 +- src/stdio.c | 9 +- src/stdlg.c | 460 +++++++++++++++++---------------------------- src/vhd.c | 4 +- 23 files changed, 299 insertions(+), 937 deletions(-) delete mode 100644 res/down.ico delete mode 100644 res/up.ico diff --git a/_sign.cmd b/_sign.cmd index 7b74a33c..7d0132ee 100644 --- a/_sign.cmd +++ b/_sign.cmd @@ -1,6 +1,3 @@ @echo off -"C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool" sign /v /sha1 655f6413a8f721e3286ace95025c9e0ea132a984 /fd SHA1 /tr http://timestamp.comodoca.com/rfc3161 /td SHA1 %1 -if ERRORLEVEL 1 goto out -"C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool" sign /as /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 %1 -:out +"C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool" sign /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 %1 exit diff --git a/configure b/configure index 5ad1c2a2..6267b5bc 100755 --- a/configure +++ b/configure @@ -3813,9 +3813,7 @@ esac $as_echo "#define _GNU_SOURCE /**/" >>confdefs.h -# Clang needs an explicit WIN32_WINNT defined else it produces warnings -# in msapi_utf8.h - including winver.h only doesn't work -AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x501 -D_WIN32_IE=0x501 -D_WIN32_WINNT=0x501" +AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x601 -D_WIN32_WINNT=0x601 -D_WIN32_IE=0x800" # "-Wl,--nxcompat" to enable DEP (Data Execution Prevention) AM_LDFLAGS="${AM_LDFLAGS} -Wl,-no-undefined -Wl,--nxcompat" diff --git a/configure.ac b/configure.ac index 72d493ba..8c41e9ff 100644 --- a/configure.ac +++ b/configure.ac @@ -17,9 +17,7 @@ AC_CHECK_TOOL(WINDRES, windres, windres) AC_C_INLINE AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions]) -# Clang needs an explicit WIN32_WINNT defined else it produces warnings -# in msapi_utf8.h - including winver.h only doesn't work -AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x501 -D_WIN32_IE=0x501 -D_WIN32_WINNT=0x501" +AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x601 -D_WIN32_WINNT=0x601 -D_WIN32_IE=0x800" # "-Wl,--nxcompat" to enable DEP (Data Execution Prevention) AM_LDFLAGS="${AM_LDFLAGS} -Wl,-no-undefined -Wl,--nxcompat" diff --git a/res/down.ico b/res/down.ico deleted file mode 100644 index ccce932a861b7969e01e2246d14189dd69a35d47..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmZQzU<5(|0R|wcz>vYhz#zuJz@P!dKp~(AL>x#lH~{5F0dXO4Z?pe2ApQ@ciPM2l z1=IWG%NLM-lFUHX3(`-D8QAm^YX&~Ogv=mDFFrGX`oaE$sUbvz)FVQhfdOVeNSsJa sa-1UDH=Nl2fgy>E|I{-u{IF+W_#n@~@PMCz;Q%`WLjyAcBdZ0m0aiTvYhz#zuJz@P!dKp~(AL>x#lH~{5F0cHr?+w6Y@i2sv-uOOQO z()Z=d7osspJ(_;7{lu67bt8)XAhUqt1kJ#u7v>gxW)RYg&kSPqVl#tOz366u`~(vl pr7=U`KQJXC;|6911{glT&cN`1pMl|nJOjfIdj^I-^{8q=`T!HU4h{eS diff --git a/src/Makefile.am b/src/Makefile.am index e60a4061..b9a3a92a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,4 +15,4 @@ rufus_SOURCES = badblocks.c checksum.c dev.c dos.c dos_locale.c drive.c format.c rufus_CFLAGS = -I./ms-sys/inc -I./syslinux/libfat -I./syslinux/libinstaller -I./syslinux/win -I./libcdio $(AM_CFLAGS) rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows rufus_LDADD = rufus_rc.o bled/libbled.a ms-sys/libmssys.a syslinux/libfat/libfat.a syslinux/libinstaller/libinstaller.a syslinux/win/libwin.a \ - libcdio/iso9660/libiso9660.a libcdio/udf/libudf.a libcdio/driver/libdriver.a -lsetupapi -lole32 -lgdi32 -lwininet -lshlwapi -lcrypt32 -lwintrust -lcomdlg32 -luuid -lpsapi + libcdio/iso9660/libiso9660.a libcdio/udf/libudf.a libcdio/driver/libdriver.a -lsetupapi -lole32 -lgdi32 -lwininet -lshlwapi -lcrypt32 -lwintrust -lcomdlg32 -lcomctl32 -luuid -lpsapi diff --git a/src/Makefile.in b/src/Makefile.in index f40c4c10..fa2984d7 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -276,7 +276,7 @@ rufus_SOURCES = badblocks.c checksum.c dev.c dos.c dos_locale.c drive.c format.c rufus_CFLAGS = -I./ms-sys/inc -I./syslinux/libfat -I./syslinux/libinstaller -I./syslinux/win -I./libcdio $(AM_CFLAGS) rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows rufus_LDADD = rufus_rc.o bled/libbled.a ms-sys/libmssys.a syslinux/libfat/libfat.a syslinux/libinstaller/libinstaller.a syslinux/win/libwin.a \ - libcdio/iso9660/libiso9660.a libcdio/udf/libudf.a libcdio/driver/libdriver.a -lsetupapi -lole32 -lgdi32 -lwininet -lshlwapi -lcrypt32 -lwintrust -lcomdlg32 -luuid -lpsapi + libcdio/iso9660/libiso9660.a libcdio/udf/libudf.a libcdio/driver/libdriver.a -lsetupapi -lole32 -lgdi32 -lwininet -lshlwapi -lcrypt32 -lwintrust -lcomdlg32 -lcomctl32 -luuid -lpsapi all: all-recursive diff --git a/src/badblocks.c b/src/badblocks.c index 02318a05..4f7bc9b0 100644 --- a/src/badblocks.c +++ b/src/badblocks.c @@ -350,7 +350,7 @@ static void pattern_fill(unsigned char *buffer, unsigned int pattern, unsigned char bpattern[sizeof(pattern)], *ptr; if (pattern == (unsigned int) ~0) { - srand((unsigned int)_GetTickCount64()); + srand((unsigned int)GetTickCount64()); for (ptr = buffer; ptr < buffer + n; ptr++) { // coverity[dont_call] (*ptr) = rand() % (1 << (8 * sizeof(char))); @@ -452,7 +452,7 @@ static unsigned int test_rw(HANDLE hDrive, blk_t last_block, size_t block_size, cur_pattern = 0; for (pat_idx = 0; pat_idx < nb_passes; pat_idx++) { - srand((unsigned int)_GetTickCount64()); + srand((unsigned int)GetTickCount64()); if (cancel_ops) goto out; // coverity[dont_call] id_offset = rand() * (block_size-sizeof(blk_t)) / RAND_MAX; diff --git a/src/checksum.c b/src/checksum.c index 27d4443a..40352a61 100644 --- a/src/checksum.c +++ b/src/checksum.c @@ -929,8 +929,8 @@ DWORD WINAPI SumThread(void* param) read_size[0] = 1; // Don't trigger the first loop break for (rb = 0; ;rb += read_size[_bufnum]) { // Update the progress and check for cancel - if (_GetTickCount64() > LastRefresh + MAX_REFRESH) { - LastRefresh = _GetTickCount64(); + if (GetTickCount64() > LastRefresh + MAX_REFRESH) { + LastRefresh = GetTickCount64(); format_percent = (100.0f*rb) / (1.0f*img_report.image_size); PrintInfo(0, MSG_271, format_percent); SendMessage(hProgress, PBM_SETPOS, (WPARAM)((format_percent / 100.0f)*MAX_PROGRESS), 0); diff --git a/src/dev.c b/src/dev.c index 7ecd327e..b2e61281 100644 --- a/src/dev.c +++ b/src/dev.c @@ -136,7 +136,7 @@ BOOL ResetDevice(int index) USB_CYCLE_PORT_PARAMS cycle_port; // Wait at least 10 secs between resets - if (_GetTickCount64() < LastReset + 10000ULL) { + if (GetTickCount64() < LastReset + 10000ULL) { uprintf("You must wait at least 10 seconds before trying to reset a device"); return FALSE; } @@ -144,7 +144,7 @@ BOOL ResetDevice(int index) if (DriveHub.String[index] == NULL) return FALSE; - LastReset = _GetTickCount64(); + LastReset = GetTickCount64(); handle = CreateFileA(DriveHub.String[index], GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); if (handle == INVALID_HANDLE_VALUE) { @@ -432,9 +432,7 @@ BOOL GetDevices(DWORD devnum) // Build a single list of Device IDs from all the storage enumerators we know of full_list_size = 0; - ulFlags = CM_GETIDLIST_FILTER_SERVICE; - if (nWindowsVersion >= WINDOWS_7) - ulFlags |= CM_GETIDLIST_FILTER_PRESENT; + ulFlags = CM_GETIDLIST_FILTER_SERVICE | CM_GETIDLIST_FILTER_PRESENT; for (s=0; sPartitionEntry[i].Gpt.PartitionType, &PARTITION_MSFT_RESERVED_GUID)) || (CompareGUID(&DriveLayout->PartitionEntry[i].Gpt.PartitionType, &PARTITION_SYSTEM_GUID)) ) --SelectedDrive.nPartitions; - if ( (memcmp(&PARTITION_BASIC_DATA_GUID, &DriveLayout->PartitionEntry[i].Gpt.PartitionType, sizeof(GUID)) == 0) && - (nWindowsVersion >= WINDOWS_VISTA) ) + if (memcmp(&PARTITION_BASIC_DATA_GUID, &DriveLayout->PartitionEntry[i].Gpt.PartitionType, sizeof(GUID)) == 0) ret = TRUE; } break; @@ -1242,7 +1242,7 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m // This helps us reselect the partition scheme option that was used when creating the // drive in Rufus. As far as I can tell, Windows doesn't care much if this signature // isn't unique for USB drives. - CreateDisk.Mbr.Signature = mbr_uefi_marker?MBR_UEFI_MARKER:(DWORD)_GetTickCount64(); + CreateDisk.Mbr.Signature = mbr_uefi_marker?MBR_UEFI_MARKER:(DWORD)GetTickCount64(); DriveLayoutEx.PartitionStyle = PARTITION_STYLE_MBR; DriveLayoutEx.PartitionCount = 4; // Must be multiple of 4 for MBR diff --git a/src/format.c b/src/format.c index 460e5995..adf1a276 100644 --- a/src/format.c +++ b/src/format.c @@ -607,8 +607,8 @@ static BOOL FormatFAT32(DWORD DriveIndex) format_percent = 0.0f; for (i=0; i<(SystemAreaSize+BurstSize-1); i+=BurstSize) { - if (_GetTickCount64() > LastRefresh + MAX_REFRESH) { - LastRefresh = _GetTickCount64(); + if (GetTickCount64() > LastRefresh + MAX_REFRESH) { + LastRefresh = GetTickCount64(); format_percent = (100.0f*i)/(1.0f*(SystemAreaSize+BurstSize)); PrintInfo(0, MSG_217, format_percent); UpdateProgress(OP_FORMAT, format_percent); @@ -1516,8 +1516,8 @@ static BOOL SetupWinToGo(const char* drive_name, BOOL use_ms_efi) static void update_progress(const uint64_t processed_bytes) { - if (_GetTickCount64() > LastRefresh + MAX_REFRESH) { - LastRefresh = _GetTickCount64(); + if (GetTickCount64() > LastRefresh + MAX_REFRESH) { + LastRefresh = GetTickCount64(); format_percent = (100.0f*processed_bytes)/(1.0f*img_report.image_size); PrintInfo(0, MSG_261, format_percent); UpdateProgress(OP_FORMAT, format_percent); @@ -1574,8 +1574,8 @@ static BOOL WriteDrive(HANDLE hPhysicalDrive, HANDLE hSourceImage) // will be as fast, if not faster, than whatever async scheme you can come up with. rSize = BufSize; for (wb = 0, wSize = 0; wb < (uint64_t)SelectedDrive.DiskSize; wb += wSize) { - if (_GetTickCount64() > LastRefresh + MAX_REFRESH) { - LastRefresh = _GetTickCount64(); + if (GetTickCount64() > LastRefresh + MAX_REFRESH) { + LastRefresh = GetTickCount64(); format_percent = (100.0f*wb) / (1.0f*target_size); PrintInfo(0, hSourceImage?MSG_261:MSG_286, format_percent); UpdateProgress(OP_FORMAT, format_percent); @@ -1661,11 +1661,6 @@ DWORD WINAPI FormatThread(void* param) char kolibri_dst[] = "?:\\MTLD_F32"; char grub4dos_dst[] = "?:\\grldr"; - PF_TYPE_DECL(WINAPI, LANGID, GetThreadUILanguage, (void)); - PF_TYPE_DECL(WINAPI, LANGID, SetThreadUILanguage, (LANGID)); - PF_INIT(GetThreadUILanguage, Kernel32); - PF_INIT(SetThreadUILanguage, Kernel32); - fs = (int)ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem)); bt = (int)ComboBox_GetItemData(hBootType, ComboBox_GetCurSel(hBootType)); pt = GETPARTTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme))); @@ -1751,10 +1746,6 @@ DWORD WINAPI FormatThread(void* param) UpdateProgress(OP_ANALYZE_MBR, -1.0f); } - // Yet another half-workaround needed for XP... - if (nWindowsVersion <= WINDOWS_XP) - InitializeDisk(hPhysicalDrive); - if (zero_drive) { WriteDrive(hPhysicalDrive, NULL); goto out; @@ -1764,7 +1755,7 @@ DWORD WINAPI FormatThread(void* param) // Note, Microsoft's way of cleaning partitions (IOCTL_DISK_CREATE_DISK, which is what we apply // in InitializeDisk) is *NOT ENOUGH* to reset a disk and can render it inoperable for partitioning // or formatting under Windows. See https://github.com/pbatard/rufus/issues/759 for details. - if ((nWindowsVersion > WINDOWS_XP) && ((!IsChecked(IDC_BOOT)) || (bt != BT_IMG))) { + if ((!IsChecked(IDC_BOOT)) || (bt != BT_IMG)) { if ((!ClearMBRGPT(hPhysicalDrive, SelectedDrive.DiskSize, SelectedDrive.SectorSize, use_large_fat32)) || (!InitializeDisk(hPhysicalDrive))) { uprintf("Could not reset partitions\n"); @@ -2068,9 +2059,9 @@ DWORD WINAPI FormatThread(void* param) // NTFS fixup (WinPE/AIK images don't seem to boot without an extra checkdisk) if ((bt == BT_ISO) && (fs == FS_NTFS)) { // Try to ensure that all messages from Checkdisk will be in English - if ((pfGetThreadUILanguage != NULL) && (PRIMARYLANGID(pfGetThreadUILanguage()) != LANG_ENGLISH)) { - pfSetThreadUILanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)); - if (PRIMARYLANGID(pfGetThreadUILanguage()) != LANG_ENGLISH) + if (PRIMARYLANGID(GetThreadUILanguage()) != LANG_ENGLISH) { + SetThreadUILanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)); + if (PRIMARYLANGID(GetThreadUILanguage()) != LANG_ENGLISH) uprintf("Note: CheckDisk messages may be localized"); } CheckDisk(drive_name[0]); @@ -2169,8 +2160,8 @@ DWORD WINAPI SaveImageThread(void* param) } if (rSize == 0) break; - if (_GetTickCount64() > LastRefresh + MAX_REFRESH) { - LastRefresh = _GetTickCount64(); + if (GetTickCount64() > LastRefresh + MAX_REFRESH) { + LastRefresh = GetTickCount64(); format_percent = (100.0f*wb)/(1.0f*img_save->DeviceSize); PrintInfo(0, MSG_261, format_percent); UpdateProgress(OP_FORMAT, format_percent); diff --git a/src/iso.c b/src/iso.c index ea9a05a7..76f28ad2 100644 --- a/src/iso.c +++ b/src/iso.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include diff --git a/src/localization.c b/src/localization.c index 350443cf..fe0b89c5 100644 --- a/src/localization.c +++ b/src/localization.c @@ -447,7 +447,7 @@ static void CALLBACK OutputMessageTimeout(HWND hWnd, UINT uMsg, UINT_PTR idEvent KillTimer(hMainDialog, idEvent); bOutputTimerArmed[i] = FALSE; PrintMessage[i](output_msg[i]); - last_msg_time[i] = _GetTickCount64(); + last_msg_time[i] = GetTickCount64(); } static void OutputMessage(BOOL info, char* msg) @@ -460,7 +460,7 @@ static void OutputMessage(BOOL info, char* msg) output_msg[i] = msg; } else { // Find if we need to arm a timer - delta = _GetTickCount64() - last_msg_time[i]; + delta = GetTickCount64() - last_msg_time[i]; if (delta < (2 * MAX_REFRESH)) { // Not enough time has elapsed since our last output => arm a timer output_msg[i] = msg; @@ -468,7 +468,7 @@ static void OutputMessage(BOOL info, char* msg) bOutputTimerArmed[i] = TRUE; } else { PrintMessage[i](msg); - last_msg_time[i] = _GetTickCount64(); + last_msg_time[i] = GetTickCount64(); } } } diff --git a/src/missing.h b/src/missing.h index 0822fc4a..8e0b4bfa 100644 --- a/src/missing.h +++ b/src/missing.h @@ -18,10 +18,6 @@ */ #include -#include -#include -#include -#include #pragma once @@ -106,461 +102,14 @@ static __inline void *_reallocf(void *ptr, size_t size) { #define _RT_RCDATA MAKEINTRESOURCEA(10) #define _RT_GROUP_ICON MAKEINTRESOURCEA((ULONG_PTR)(MAKEINTRESOURCEA(3) + 11)) -/* UI redefinitions for MinGW */ -#ifndef PBM_SETSTATE -#define PBM_SETSTATE (WM_USER+16) -#endif -#ifndef PBST_NORMAL -#define PBST_NORMAL 1 -#endif -#ifndef PBST_ERROR -#define PBST_ERROR 2 -#endif -#ifndef PBST_PAUSED -#define PBST_PAUSED 3 -#endif -#ifndef BUTTON_IMAGELIST_ALIGN_CENTER -#define BUTTON_IMAGELIST_ALIGN_CENTER 4 -#endif -#ifndef BCM_SETIMAGELIST -#define BCM_SETIMAGELIST 0x1602 -#endif -#ifndef DBT_CUSTOMEVENT -#define DBT_CUSTOMEVENT 0x8006 -#endif -#ifndef ERROR_FILE_TOO_LARGE -#define ERROR_FILE_TOO_LARGE 223 -#endif -#ifndef MSGFLT_ADD -#define MSGFLT_ADD 1 -#endif +/* MinGW doesn't know these */ #ifndef WM_CLIENTSHUTDOWN #define WM_CLIENTSHUTDOWN 0x3B #endif #ifndef WM_COPYGLOBALDATA #define WM_COPYGLOBALDATA 0x49 #endif -#ifndef PBS_MARQUEE -#define PBS_MARQUEE 0x08 -#endif -#ifndef PBM_SETMARQUEE -#define PBM_SETMARQUEE (WM_USER+10) -#endif - -typedef struct { - HIMAGELIST himl; - RECT margin; - UINT uAlign; -} MY_BUTTON_IMAGELIST; - -typedef struct -{ - LPCITEMIDLIST pidl; - BOOL fRecursive; -} MY_SHChangeNotifyEntry; /* The following is used for native ISO mounting in Windows 8 or later */ #define VIRTUAL_STORAGE_TYPE_VENDOR_MICROSOFT \ { 0xEC984AECL, 0xA0F9, 0x47e9, { 0x90, 0x1F, 0x71, 0x41, 0x5A, 0x66, 0x34, 0x5B } } - -typedef enum _VIRTUAL_DISK_ACCESS_MASK { - VIRTUAL_DISK_ACCESS_NONE = 0x00000000, - VIRTUAL_DISK_ACCESS_ATTACH_RO = 0x00010000, - VIRTUAL_DISK_ACCESS_ATTACH_RW = 0x00020000, - VIRTUAL_DISK_ACCESS_DETACH = 0x00040000, - VIRTUAL_DISK_ACCESS_GET_INFO = 0x00080000, - VIRTUAL_DISK_ACCESS_CREATE = 0x00100000, - VIRTUAL_DISK_ACCESS_METAOPS = 0x00200000, - VIRTUAL_DISK_ACCESS_READ = 0x000d0000, - VIRTUAL_DISK_ACCESS_ALL = 0x003f0000, - VIRTUAL_DISK_ACCESS_WRITABLE = 0x00320000 -} VIRTUAL_DISK_ACCESS_MASK; - -typedef enum _OPEN_VIRTUAL_DISK_FLAG { - OPEN_VIRTUAL_DISK_FLAG_NONE = 0x00000000, - OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS = 0x00000001, - OPEN_VIRTUAL_DISK_FLAG_BLANK_FILE = 0x00000002, - OPEN_VIRTUAL_DISK_FLAG_BOOT_DRIVE = 0x00000004, - OPEN_VIRTUAL_DISK_FLAG_CACHED_IO = 0x00000008, - OPEN_VIRTUAL_DISK_FLAG_CUSTOM_DIFF_CHAIN = 0x00000010 -} OPEN_VIRTUAL_DISK_FLAG; - -typedef enum _OPEN_VIRTUAL_DISK_VERSION { - OPEN_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0, - OPEN_VIRTUAL_DISK_VERSION_1 = 1, - OPEN_VIRTUAL_DISK_VERSION_2 = 2 -} OPEN_VIRTUAL_DISK_VERSION; - -typedef enum _ATTACH_VIRTUAL_DISK_FLAG { - ATTACH_VIRTUAL_DISK_FLAG_NONE = 0x00000000, - ATTACH_VIRTUAL_DISK_FLAG_READ_ONLY = 0x00000001, - ATTACH_VIRTUAL_DISK_FLAG_NO_DRIVE_LETTER = 0x00000002, - ATTACH_VIRTUAL_DISK_FLAG_PERMANENT_LIFETIME = 0x00000004, - ATTACH_VIRTUAL_DISK_FLAG_NO_LOCAL_HOST = 0x00000008 -} ATTACH_VIRTUAL_DISK_FLAG; - -typedef enum _ATTACH_VIRTUAL_DISK_VERSION { - ATTACH_VIRTUAL_DISK_VERSION_UNSPECIFIED = 0, - ATTACH_VIRTUAL_DISK_VERSION_1 = 1 -} ATTACH_VIRTUAL_DISK_VERSION; - -typedef enum _DETACH_VIRTUAL_DISK_FLAG { - DETACH_VIRTUAL_DISK_FLAG_NONE = 0x00000000 -} DETACH_VIRTUAL_DISK_FLAG; - -#ifndef _VIRTUAL_STORAGE_TYPE_DEFINED -#define _VIRTUAL_STORAGE_TYPE_DEFINED -typedef struct _VIRTUAL_STORAGE_TYPE { - ULONG DeviceId; - GUID VendorId; -} VIRTUAL_STORAGE_TYPE, *PVIRTUAL_STORAGE_TYPE; -#endif - -typedef struct _OPEN_VIRTUAL_DISK_PARAMETERS { - OPEN_VIRTUAL_DISK_VERSION Version; - union { - struct { - ULONG RWDepth; - } Version1; - struct { - BOOL GetInfoOnly; - BOOL ReadOnly; - GUID ResiliencyGuid; - } Version2; - }; -} OPEN_VIRTUAL_DISK_PARAMETERS, *POPEN_VIRTUAL_DISK_PARAMETERS; - -typedef struct _ATTACH_VIRTUAL_DISK_PARAMETERS { - ATTACH_VIRTUAL_DISK_VERSION Version; - union { - struct { - ULONG Reserved; - } Version1; - }; -} ATTACH_VIRTUAL_DISK_PARAMETERS, *PATTACH_VIRTUAL_DISK_PARAMETERS; - -/* Networking constants missing from MinGW */ -#if !defined(ERROR_INTERNET_DISCONNECTED) -#define ERROR_INTERNET_DISCONNECTED (INTERNET_ERROR_BASE + 163) -#endif -#if !defined(ERROR_INTERNET_SERVER_UNREACHABLE) -#define ERROR_INTERNET_SERVER_UNREACHABLE (INTERNET_ERROR_BASE + 164) -#endif -#if !defined(ERROR_INTERNET_PROXY_SERVER_UNREACHABLE) -#define ERROR_INTERNET_PROXY_SERVER_UNREACHABLE (INTERNET_ERROR_BASE + 165) -#endif -#if !defined(ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT) -#define ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT (INTERNET_ERROR_BASE + 166) -#endif -#if !defined(ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT) -#define ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT (INTERNET_ERROR_BASE + 167) -#endif -#if !defined(ERROR_INTERNET_FAILED_DUETOSECURITYCHECK) -#define ERROR_INTERNET_FAILED_DUETOSECURITYCHECK (INTERNET_ERROR_BASE + 171) -#endif -#if !defined(ERROR_INTERNET_NOT_INITIALIZED) -#define ERROR_INTERNET_NOT_INITIALIZED (INTERNET_ERROR_BASE + 172) -#endif -#if !defined(ERROR_INTERNET_NEED_MSN_SSPI_PKG) -#define ERROR_INTERNET_NEED_MSN_SSPI_PKG (INTERNET_ERROR_BASE + 173) -#endif -#if !defined(ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY) -#define ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY (INTERNET_ERROR_BASE + 174) -#endif - -/* - * IFile[Open]Dialog interface for Vista and later (from MinGW headers) - */ -#ifndef __IFileDialog_INTERFACE_DEFINED__ -#define __IFileDialog_INTERFACE_DEFINED__ - -enum _FILEOPENDIALOGOPTIONS { - FOS_OVERWRITEPROMPT = 0x2, - FOS_STRICTFILETYPES = 0x4, - FOS_NOCHANGEDIR = 0x8, - FOS_PICKFOLDERS = 0x20, - FOS_FORCEFILESYSTEM = 0x40, - FOS_ALLNONSTORAGEITEMS = 0x80, - FOS_NOVALIDATE = 0x100, - FOS_ALLOWMULTISELECT = 0x200, - FOS_PATHMUSTEXIST = 0x800, - FOS_FILEMUSTEXIST = 0x1000, - FOS_CREATEPROMPT = 0x2000, - FOS_SHAREAWARE = 0x4000, - FOS_NOREADONLYRETURN = 0x8000, - FOS_NOTESTFILECREATE = 0x10000, - FOS_HIDEMRUPLACES = 0x20000, - FOS_HIDEPINNEDPLACES = 0x40000, - FOS_NODEREFERENCELINKS = 0x100000, - FOS_DONTADDTORECENT = 0x2000000, - FOS_FORCESHOWHIDDEN = 0x10000000, - FOS_DEFAULTNOMINIMODE = 0x20000000, - FOS_FORCEPREVIEWPANEON = 0x40000000 -}; - -typedef enum FDAP { - FDAP_BOTTOM = 0, - FDAP_TOP = 1 -} FDAP; - -typedef DWORD FILEOPENDIALOGOPTIONS; - -DEFINE_GUID(IID_IFileDialog, 0x42f85136, 0xdb7e, 0x439c, 0x85, 0xf1, 0xe4, 0x07, 0x5d, 0x13, 0x5f, 0xc8); - -typedef struct IFileDialogVtbl { - BEGIN_INTERFACE - - /*** IUnknown methods ***/ - HRESULT(STDMETHODCALLTYPE *QueryInterface)( - IFileDialog* This, - REFIID riid, - void **ppvObject); - - ULONG(STDMETHODCALLTYPE *AddRef)( - IFileDialog* This); - - ULONG(STDMETHODCALLTYPE *Release)( - IFileDialog* This); - - /*** IModalWindow methods ***/ - HRESULT(STDMETHODCALLTYPE *Show)( - IFileDialog* This, - HWND hwndOwner); - - /*** IFileDialog methods ***/ - HRESULT(STDMETHODCALLTYPE *SetFileTypes)( - IFileDialog* This, - UINT cFileTypes, - const COMDLG_FILTERSPEC *rgFilterSpec); - - HRESULT(STDMETHODCALLTYPE *SetFileTypeIndex)( - IFileDialog* This, - UINT iFileType); - - HRESULT(STDMETHODCALLTYPE *GetFileTypeIndex)( - IFileDialog* This, - UINT *piFileType); - - HRESULT(STDMETHODCALLTYPE *Advise)( - IFileDialog* This, - IFileDialogEvents *pfde, - DWORD *pdwCookie); - - HRESULT(STDMETHODCALLTYPE *Unadvise)( - IFileDialog* This, - DWORD dwCookie); - - HRESULT(STDMETHODCALLTYPE *SetOptions)( - IFileDialog* This, - FILEOPENDIALOGOPTIONS fos); - - HRESULT(STDMETHODCALLTYPE *GetOptions)( - IFileDialog* This, - FILEOPENDIALOGOPTIONS *pfos); - - HRESULT(STDMETHODCALLTYPE *SetDefaultFolder)( - IFileDialog* This, - IShellItem *psi); - - HRESULT(STDMETHODCALLTYPE *SetFolder)( - IFileDialog* This, - IShellItem *psi); - - HRESULT(STDMETHODCALLTYPE *GetFolder)( - IFileDialog* This, - IShellItem **ppsi); - - HRESULT(STDMETHODCALLTYPE *GetCurrentSelection)( - IFileDialog* This, - IShellItem **ppsi); - - HRESULT(STDMETHODCALLTYPE *SetFileName)( - IFileDialog* This, - LPCWSTR pszName); - - HRESULT(STDMETHODCALLTYPE *GetFileName)( - IFileDialog* This, - LPWSTR *pszName); - - HRESULT(STDMETHODCALLTYPE *SetTitle)( - IFileDialog* This, - LPCWSTR pszTitle); - - HRESULT(STDMETHODCALLTYPE *SetOkButtonLabel)( - IFileDialog* This, - LPCWSTR pszText); - - HRESULT(STDMETHODCALLTYPE *SetFileNameLabel)( - IFileDialog* This, - LPCWSTR pszLabel); - - HRESULT(STDMETHODCALLTYPE *GetResult)( - IFileDialog* This, - IShellItem **ppsi); - - HRESULT(STDMETHODCALLTYPE *AddPlace)( - IFileDialog* This, - IShellItem *psi, - FDAP fdap); - - HRESULT(STDMETHODCALLTYPE *SetDefaultExtension)( - IFileDialog* This, - LPCWSTR pszDefaultExtension); - - HRESULT(STDMETHODCALLTYPE *Close)( - IFileDialog* This, - HRESULT hr); - - HRESULT(STDMETHODCALLTYPE *SetClientGuid)( - IFileDialog* This, - REFGUID guid); - - HRESULT(STDMETHODCALLTYPE *ClearClientData)( - IFileDialog* This); - - HRESULT(STDMETHODCALLTYPE *SetFilter)( - IFileDialog* This, - IShellItemFilter *pFilter); - - END_INTERFACE -} IFileDialogVtbl; -interface IFileDialog { - CONST_VTBL IFileDialogVtbl* lpVtbl; -}; -#endif - -#ifndef __IFileOpenDialog_INTERFACE_DEFINED__ -#define __IFileOpenDialog_INTERFACE_DEFINED__ - -DEFINE_GUID(IID_IFileOpenDialog, 0xd57c7288, 0xd4ad, 0x4768, 0xbe, 0x02, 0x9d, 0x96, 0x95, 0x32, 0xd9, 0x60); - -typedef struct IFileOpenDialogVtbl { - BEGIN_INTERFACE - - /*** IUnknown methods ***/ - HRESULT(STDMETHODCALLTYPE *QueryInterface)( - IFileOpenDialog* This, - REFIID riid, - void **ppvObject); - - ULONG(STDMETHODCALLTYPE *AddRef)( - IFileOpenDialog* This); - - ULONG(STDMETHODCALLTYPE *Release)( - IFileOpenDialog* This); - - /*** IModalWindow methods ***/ - HRESULT(STDMETHODCALLTYPE *Show)( - IFileOpenDialog* This, - HWND hwndOwner); - - /*** IFileDialog methods ***/ - HRESULT(STDMETHODCALLTYPE *SetFileTypes)( - IFileOpenDialog* This, - UINT cFileTypes, - const COMDLG_FILTERSPEC *rgFilterSpec); - - HRESULT(STDMETHODCALLTYPE *SetFileTypeIndex)( - IFileOpenDialog* This, - UINT iFileType); - - HRESULT(STDMETHODCALLTYPE *GetFileTypeIndex)( - IFileOpenDialog* This, - UINT *piFileType); - - HRESULT(STDMETHODCALLTYPE *Advise)( - IFileOpenDialog* This, - IFileDialogEvents *pfde, - DWORD *pdwCookie); - - HRESULT(STDMETHODCALLTYPE *Unadvise)( - IFileOpenDialog* This, - DWORD dwCookie); - - HRESULT(STDMETHODCALLTYPE *SetOptions)( - IFileOpenDialog* This, - FILEOPENDIALOGOPTIONS fos); - - HRESULT(STDMETHODCALLTYPE *GetOptions)( - IFileOpenDialog* This, - FILEOPENDIALOGOPTIONS *pfos); - - HRESULT(STDMETHODCALLTYPE *SetDefaultFolder)( - IFileOpenDialog* This, - IShellItem *psi); - - HRESULT(STDMETHODCALLTYPE *SetFolder)( - IFileOpenDialog* This, - IShellItem *psi); - - HRESULT(STDMETHODCALLTYPE *GetFolder)( - IFileOpenDialog* This, - IShellItem **ppsi); - - HRESULT(STDMETHODCALLTYPE *GetCurrentSelection)( - IFileOpenDialog* This, - IShellItem **ppsi); - - HRESULT(STDMETHODCALLTYPE *SetFileName)( - IFileOpenDialog* This, - LPCWSTR pszName); - - HRESULT(STDMETHODCALLTYPE *GetFileName)( - IFileOpenDialog* This, - LPWSTR *pszName); - - HRESULT(STDMETHODCALLTYPE *SetTitle)( - IFileOpenDialog* This, - LPCWSTR pszTitle); - - HRESULT(STDMETHODCALLTYPE *SetOkButtonLabel)( - IFileOpenDialog* This, - LPCWSTR pszText); - - HRESULT(STDMETHODCALLTYPE *SetFileNameLabel)( - IFileOpenDialog* This, - LPCWSTR pszLabel); - - HRESULT(STDMETHODCALLTYPE *GetResult)( - IFileOpenDialog* This, - IShellItem **ppsi); - - HRESULT(STDMETHODCALLTYPE *AddPlace)( - IFileOpenDialog* This, - IShellItem *psi, - FDAP fdap); - - HRESULT(STDMETHODCALLTYPE *SetDefaultExtension)( - IFileOpenDialog* This, - LPCWSTR pszDefaultExtension); - - HRESULT(STDMETHODCALLTYPE *Close)( - IFileOpenDialog* This, - HRESULT hr); - - HRESULT(STDMETHODCALLTYPE *SetClientGuid)( - IFileOpenDialog* This, - REFGUID guid); - - HRESULT(STDMETHODCALLTYPE *ClearClientData)( - IFileOpenDialog* This); - - HRESULT(STDMETHODCALLTYPE *SetFilter)( - IFileOpenDialog* This, - IShellItemFilter *pFilter); - - /*** IFileOpenDialog methods ***/ - HRESULT(STDMETHODCALLTYPE *GetResults)( - IFileOpenDialog* This, - IShellItemArray **ppenum); - - HRESULT(STDMETHODCALLTYPE *GetSelectedItems)( - IFileOpenDialog* This, - IShellItemArray **ppsai); - - END_INTERFACE -} IFileOpenDialogVtbl; -interface IFileOpenDialog { - CONST_VTBL IFileOpenDialogVtbl* lpVtbl; -}; -#endif diff --git a/src/resource.h b/src/resource.h index e059eb71..8f8f0398 100644 --- a/src/resource.h +++ b/src/resource.h @@ -13,8 +13,6 @@ #define IDD_CHECKSUM 109 #define IDD_LIST 110 #define IDI_ICON 120 -#define IDI_UP 121 -#define IDI_DOWN 122 #define IDD_DIALOG_XP 151 #define IDD_ABOUTBOX_XP 152 #define IDD_NOTIFICATION_XP 153 diff --git a/src/rufus.c b/src/rufus.c index 85471ff2..c496721f 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -47,14 +47,6 @@ #include "../res/grub/grub_version.h" #include "../res/grub2/grub2_version.h" -// ImageList calls are unavailable on XP -PF_TYPE_DECL(WINAPI, HIMAGELIST, ImageList_Create, (int, int, UINT, int, int)); -PF_TYPE_DECL(WINAPI, int, ImageList_AddIcon, (HIMAGELIST, HICON)); -PF_TYPE_DECL(WINAPI, int, ImageList_ReplaceIcon, (HIMAGELIST, int, HICON)); - -PF_TYPE_DECL(WINAPI, BOOL, SHChangeNotifyDeregister, (ULONG)); -PF_TYPE_DECL(WINAPI, ULONG, SHChangeNotifyRegister, (HWND, int, LONG, UINT, int, const MY_SHChangeNotifyEntry*)); - const char* cmdline_hogger = "rufus.com"; const char* FileSystemLabel[FS_MAX] = { "FAT", "FAT32", "NTFS", "UDF", "exFAT", "ReFS" }; const char* ep_reg = "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer"; @@ -92,8 +84,7 @@ char msgbox[1024], msgbox_title[32], *ini_file = NULL; OPENED_LIBRARIES_VARS; HINSTANCE hMainInstance; HWND hMainDialog, hLangToolbar = NULL, hUpdatesDlg = NULL; -MY_BUTTON_IMAGELIST bi_iso = { 0 }, bi_up = { 0 }, bi_down = { 0 }; -GetTickCount64_t pfGetTickCount64 = NULL; +BUTTON_IMAGELIST bi_iso = { 0 }, bi_up = { 0 }, bi_down = { 0 }; char szFolderPath[MAX_PATH], app_dir[MAX_PATH], system_dir[MAX_PATH], temp_dir[MAX_PATH], sysnative_dir[MAX_PATH]; char* image_path = NULL; float fScale = 1.0f; @@ -265,22 +256,18 @@ static BOOL DefineClusterSizes(void) } } - // exFAT (requires KB955704 installed on XP => don't bother) - if (nWindowsVersion > WINDOWS_XP) { - SelectedDrive.ClusterSize[FS_EXFAT].Allowed = 0x03FFFE00; - if (SelectedDrive.DiskSize < 256*MB) // < 256 MB - SelectedDrive.ClusterSize[FS_EXFAT].Default = 4*KB; - else if (SelectedDrive.DiskSize < 32*GB) // < 32 GB - SelectedDrive.ClusterSize[FS_EXFAT].Default = 32*KB; - else - SelectedDrive.ClusterSize[FS_EXFAT].Default = 128*KB; - } + // exFAT + SelectedDrive.ClusterSize[FS_EXFAT].Allowed = 0x03FFFE00; + if (SelectedDrive.DiskSize < 256*MB) // < 256 MB + SelectedDrive.ClusterSize[FS_EXFAT].Default = 4*KB; + else if (SelectedDrive.DiskSize < 32*GB) // < 32 GB + SelectedDrive.ClusterSize[FS_EXFAT].Default = 32*KB; + else + SelectedDrive.ClusterSize[FS_EXFAT].Default = 128*KB; - // UDF (only supported for Vista and later) - if (nWindowsVersion >= WINDOWS_VISTA) { - SelectedDrive.ClusterSize[FS_UDF].Allowed = SINGLE_CLUSTERSIZE_DEFAULT; - SelectedDrive.ClusterSize[FS_UDF].Default = 1; - } + // UDF + SelectedDrive.ClusterSize[FS_UDF].Allowed = SINGLE_CLUSTERSIZE_DEFAULT; + SelectedDrive.ClusterSize[FS_UDF].Default = 1; // ReFS (only supported for Windows 8.1 and later and for fixed disks) if (SelectedDrive.DiskSize >= 512*MB) { @@ -445,10 +432,7 @@ static BOOL SetDriveInfo(int ComboIndex) } for (i=0; i<3; i++) { - // Populate MBR/BIOS, MBR/UEFI and GPT/UEFI targets, with an exception - // for XP, as it doesn't support GPT at all - if ((i == 2) && (nWindowsVersion <= WINDOWS_XP)) - continue; + // Populate MBR/BIOS, MBR/UEFI and GPT/UEFI targets pt = (i==2)?PARTITION_STYLE_GPT:PARTITION_STYLE_MBR; if (i==0) { SetMBRForUEFI(FALSE); @@ -820,8 +804,8 @@ void UpdateProgress(int op, float percent) } // Reduce the refresh rate, to avoid weird effects on the sliding part of progress bar - if (_GetTickCount64() > LastRefresh + (2 * MAX_REFRESH)) { - LastRefresh = _GetTickCount64(); + if (GetTickCount64() > LastRefresh + (2 * MAX_REFRESH)) { + LastRefresh = GetTickCount64(); SendMessage(hProgress, PBM_SETPOS, (WPARAM)pos, 0); SetTaskbarProgressValue(pos, MAX_PROGRESS); } @@ -1708,10 +1692,6 @@ static void InitDialog(HWND hDlg) ShowWindow(GetDlgItem(hDlg, IDC_TEST), SW_SHOW); #endif - PF_INIT(ImageList_Create, Comctl32); - PF_INIT(ImageList_AddIcon, Comctl32); - PF_INIT(ImageList_ReplaceIcon, Comctl32); - // Quite a burden to carry around as parameters hMainDialog = hDlg; MainThreadId = GetCurrentThreadId(); @@ -1748,7 +1728,7 @@ static void InitDialog(HWND hDlg) // Create the font and brush for the Info edit box hInfoFont = CreateFontA(lfHeight, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, - 0, 0, PROOF_QUALITY, 0, (nWindowsVersion >= WINDOWS_VISTA)?"Segoe UI":"Arial Unicode MS"); + 0, 0, PROOF_QUALITY, 0, "Segoe UI"); SendDlgItemMessageA(hDlg, IDC_INFO, WM_SETFONT, (WPARAM)hInfoFont, TRUE); hInfoBrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE)); HideCaret(hInfo); @@ -1853,22 +1833,15 @@ static void InitDialog(HWND hDlg) hIconLang = (HICON)LoadImage(hINetCplDllInst, MAKEINTRESOURCE(1313), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED); } - if (nWindowsVersion >= WINDOWS_VISTA) { - hIconDown = (HICON)LoadImage(hShell32DllInst, MAKEINTRESOURCE(16750), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED); - hIconUp = (HICON)LoadImage(hShell32DllInst, MAKEINTRESOURCE(16749), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED); - } else { - hIconDown = (HICON)LoadImage(hMainInstance, MAKEINTRESOURCE(IDI_DOWN), IMAGE_ICON, 16, 16, 0); - hIconUp = (HICON)LoadImage(hMainInstance, MAKEINTRESOURCE(IDI_UP), IMAGE_ICON, 16, 16, 0); - } + hIconDown = (HICON)LoadImage(hShell32DllInst, MAKEINTRESOURCE(16750), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED); + hIconUp = (HICON)LoadImage(hShell32DllInst, MAKEINTRESOURCE(16749), IMAGE_ICON, s16, s16, LR_DEFAULTCOLOR | LR_SHARED); // Create the language toolbar hLangToolbar = CreateWindowExW(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_TABSTOP | TBSTYLE_TRANSPARENT | CCS_NOPARENTALIGN | CCS_NORESIZE | CCS_NODIVIDER, 0, 0, 0, 0, hMainDialog, NULL, hMainInstance, NULL); - if ((pfImageList_Create != NULL) && (pfImageList_AddIcon != NULL)) { - hLangToolbarImageList = pfImageList_Create(i16, i16, ILC_COLOR32, 1, 0); - pfImageList_AddIcon(hLangToolbarImageList, hIconLang); - SendMessage(hLangToolbar, TB_SETIMAGELIST, (WPARAM)0, (LPARAM)hLangToolbarImageList); - } + hLangToolbarImageList = ImageList_Create(i16, i16, ILC_COLOR32, 1, 0); + ImageList_AddIcon(hLangToolbarImageList, hIconLang); + SendMessage(hLangToolbar, TB_SETIMAGELIST, (WPARAM)0, (LPARAM)hLangToolbarImageList); SendMessage(hLangToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0); memset(tbLangToolbarButtons, 0, sizeof(TBBUTTON)); tbLangToolbarButtons[0].idCommand = lang_button_id; @@ -1917,25 +1890,22 @@ static void InitDialog(HWND hDlg) info_original_proc = (WNDPROC)SetWindowLongPtr(hInfo, GWLP_WNDPROC, (LONG_PTR)InfoCallback); // Set the icons on the the buttons - if ((pfImageList_Create != NULL) && (pfImageList_ReplaceIcon != NULL)) { + bi_iso.himl = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_MASK, 1, 0); + ImageList_ReplaceIcon(bi_iso.himl, -1, hIconDisc); + SetRect(&bi_iso.margin, 0, 1, 0, 0); + bi_iso.uAlign = BUTTON_IMAGELIST_ALIGN_CENTER; + bi_down.himl = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_MASK, 1, 0); + ImageList_ReplaceIcon(bi_down.himl, -1, hIconDown); + SetRect(&bi_down.margin, 0, 0, 0, 0); + bi_down.uAlign = BUTTON_IMAGELIST_ALIGN_CENTER; + bi_up.himl = ImageList_Create(i16, i16, ILC_COLOR32 | ILC_MASK, 1, 0); + ImageList_ReplaceIcon(bi_up.himl, -1, hIconUp); + SetRect(&bi_up.margin, 0, 0, 0, 0); + bi_up.uAlign = BUTTON_IMAGELIST_ALIGN_CENTER; - bi_iso.himl = pfImageList_Create(i16, i16, ILC_COLOR32 | ILC_MASK, 1, 0); - pfImageList_ReplaceIcon(bi_iso.himl, -1, hIconDisc); - SetRect(&bi_iso.margin, 0, 1, 0, 0); - bi_iso.uAlign = BUTTON_IMAGELIST_ALIGN_CENTER; - bi_down.himl = pfImageList_Create(i16, i16, ILC_COLOR32 | ILC_MASK, 1, 0); - pfImageList_ReplaceIcon(bi_down.himl, -1, hIconDown); - SetRect(&bi_down.margin, 0, 0, 0, 0); - bi_down.uAlign = BUTTON_IMAGELIST_ALIGN_CENTER; - bi_up.himl = pfImageList_Create(i16, i16, ILC_COLOR32 | ILC_MASK, 1, 0); - pfImageList_ReplaceIcon(bi_up.himl, -1, hIconUp); - SetRect(&bi_up.margin, 0, 0, 0, 0); - bi_up.uAlign = BUTTON_IMAGELIST_ALIGN_CENTER; - - SendMessage(hSelectISO, BCM_SETIMAGELIST, 0, (LPARAM)&bi_iso); - SendMessage(GetDlgItem(hDlg, IDC_ADVANCED), BCM_SETIMAGELIST, 0, - (LPARAM)(advanced_mode?&bi_up:&bi_down)); - } + SendMessage(hSelectISO, BCM_SETIMAGELIST, 0, (LPARAM)&bi_iso); + SendMessage(GetDlgItem(hDlg, IDC_ADVANCED), BCM_SETIMAGELIST, 0, + (LPARAM)(advanced_mode?&bi_up:&bi_down)); // Set the various tooltips CreateTooltip(hFileSystem, lmprintf(MSG_157), -1); @@ -1960,10 +1930,8 @@ static void InitDialog(HWND hDlg) CreateTooltip(hLangToolbar, lmprintf(MSG_273), -1); // Set a label for the Advanced Mode and Select Image button for screen readers - if (nWindowsVersion > WINDOWS_XP) { - SetWindowTextU(GetDlgItem(hDlg, IDC_ADVANCED), lmprintf(MSG_160)); - SetWindowTextU(hSelectISO, lmprintf(MSG_165)); - } + SetWindowTextU(GetDlgItem(hDlg, IDC_ADVANCED), lmprintf(MSG_160)); + SetWindowTextU(hSelectISO, lmprintf(MSG_165)); if (!advanced_mode) // Hide as needed, since we display the advanced controls by default ToggleAdvanced(FALSE); @@ -2195,7 +2163,7 @@ static BOOL CheckDriveAccess(DWORD dwTimeOut) char *PhysicalPath = NULL, DevPath[MAX_PATH]; char drive_letter[27], drive_name[] = "?:"; char *message, title[128]; - DWORD cur_time, end_time = GetTickCount() + dwTimeOut; + uint64_t cur_time, end_time = GetTickCount64() + dwTimeOut; // Get the current selected device DWORD DeviceNum = (DWORD)ComboBox_GetItemData(hDeviceList, ComboBox_GetCurSel(hDeviceList)); @@ -2225,10 +2193,10 @@ static BOOL CheckDriveAccess(DWORD dwTimeOut) drive_name[0] = drive_letter[i]; if (QueryDosDeviceA(drive_name, DevPath, sizeof(DevPath)) != 0) { StrArrayClear(&BlockingProcess); - cur_time = GetTickCount(); + cur_time = GetTickCount64(); if (cur_time >= end_time) break; - access_mask = SearchProcess(DevPath, end_time - cur_time, TRUE, TRUE, TRUE); + access_mask = SearchProcess(DevPath, (DWORD)(end_time - cur_time), TRUE, TRUE, TRUE); CHECK_FOR_USER_CANCEL; // Ignore if all we have is read-only if ((access_mask & 0x06) || (access_mask == 0x80)) { @@ -2272,7 +2240,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA static BOOL first_log_display = TRUE, isMarquee = FALSE, queued_hotplug_event = FALSE; static ULONG ulRegister = 0; static LPITEMIDLIST pidlDesktop = NULL; - static MY_SHChangeNotifyEntry NotifyEntry; + static SHChangeNotifyEntry NotifyEntry; static DWORD_PTR thread_affinity[4]; DRAWITEMSTRUCT* pDI; HDROP droppedFileInfo; @@ -2316,7 +2284,6 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA switch(LOWORD(wParam)) { case IDOK: // close application case IDCANCEL: - PF_INIT(SHChangeNotifyDeregister, Shell32); EnableWindow(GetDlgItem(hDlg, IDCANCEL), FALSE); if (format_thid != NULL) { if ((no_confirmation_on_cancel) || (MessageBoxExU(hMainDialog, lmprintf(MSG_105), lmprintf(MSG_049), @@ -2343,8 +2310,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA PrintInfo(0, MSG_201); return (INT_PTR)TRUE; } - if ((pfSHChangeNotifyDeregister != NULL) && (ulRegister != 0)) - pfSHChangeNotifyDeregister(ulRegister); + if (ulRegister != 0) + SHChangeNotifyDeregister(ulRegister); PostQuitMessage(0); StrArrayDestroy(&DriveID); StrArrayDestroy(&DriveLabel); @@ -2711,7 +2678,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA case DBT_DEVICEARRIVAL: case DBT_DEVICEREMOVECOMPLETE: case DBT_CUSTOMEVENT: // Sent by our timer refresh function or for card reader media change - LastRefresh = _GetTickCount64(); + LastRefresh = GetTickCount64(); KillTimer(hMainDialog, TID_REFRESH_TIMER); if (!format_op_in_progress) { queued_hotplug_event = FALSE; @@ -2724,8 +2691,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA return (INT_PTR)TRUE; case DBT_DEVNODES_CHANGED: // If it's been more than a second since last device refresh, arm a refresh timer - if (_GetTickCount64() > LastRefresh + 1000) { - LastRefresh = _GetTickCount64(); + if (GetTickCount64() > LastRefresh + 1000) { + LastRefresh = GetTickCount64(); SetTimer(hMainDialog, TID_REFRESH_TIMER, 1000, RefreshTimer); } break; @@ -2736,7 +2703,6 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA break; case WM_INITDIALOG: - PF_INIT(SHChangeNotifyRegister, shell32); // Make sure fScale is set before the first call to apply localization, so that move/resize scale appropriately hDC = GetDC(hDlg); fScale = GetDeviceCaps(hDC, LOGPIXELSX) / 96.0f; @@ -2753,12 +2719,12 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA GetDevices(0); CheckForUpdates(FALSE); // Register MEDIA_INSERTED/MEDIA_REMOVED notifications for card readers - if ((pfSHChangeNotifyRegister != NULL) && (SUCCEEDED(SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, &pidlDesktop)))) { + if (SUCCEEDED(SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, &pidlDesktop))) { NotifyEntry.pidl = pidlDesktop; NotifyEntry.fRecursive = TRUE; // NB: The following only works if the media is already formatted. // If you insert a blank card, notifications will not be sent... :( - ulRegister = pfSHChangeNotifyRegister(hDlg, 0x0001 | 0x0002 | 0x8000, + ulRegister = SHChangeNotifyRegister(hDlg, 0x0001 | 0x0002 | 0x8000, SHCNE_MEDIAINSERTED | SHCNE_MEDIAREMOVED, UM_MEDIA_CHANGE, 1, &NotifyEntry); } // Bring our Window on top. We have to go through all *THREE* of these, or Far Manager hides our window :( @@ -3039,7 +3005,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine char *tmp, *locale_name = NULL, **argv = NULL; wchar_t **wenv, **wargv; PF_TYPE_DECL(CDECL, int, __wgetmainargs, (int*, wchar_t***, wchar_t***, int, int*)); - PF_TYPE_DECL(WINAPI, BOOL, ChangeWindowMessageFilter, (UINT message, DWORD dwFlag)); HANDLE mutex = NULL, hogmutex = NULL, hFile = NULL; HWND hDlg = NULL; HDC hDC; @@ -3058,7 +3023,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine SetDllDirectoryA(""); uprintf("*** " APPLICATION_NAME " init ***\n"); - PF_INIT(GetTickCount64, kernel32); // Reattach the console, if we were started from commandline if (AttachConsole(ATTACH_PARENT_PROCESS) != 0) { @@ -3239,6 +3203,19 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } selected_langid = get_language_id(selected_locale); + // Set the Windows version + GetWindowsVersion(); + + // ...and nothing of value was lost + if (nWindowsVersion < WINDOWS_7) { + // Load the translation before we print the error + get_loc_data_file(loc_file, selected_locale); + right_to_left_mode = ((selected_locale->ctrl_id) & LOC_RIGHT_TO_LEFT); + // Set MB_SYSTEMMODAL to prevent Far Manager from stealing focus... + MessageBoxExU(NULL, lmprintf(MSG_294), lmprintf(MSG_293), MB_ICONSTOP | MB_IS_RTL | MB_SYSTEMMODAL, selected_langid); + goto out; + } + // This is needed as there appears to be a *FLAW* in Windows allowing the app to run unelevated with some // weirdly configured user accounts, even as we explicitly set 'requireAdministrator' in the manifest... if (!IsCurrentProcessElevated()) { @@ -3280,9 +3257,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine uprintf("Could not load RichEdit library - some dialogs may not display: %s\n", WindowsErrorString()); } - // Set the Windows version - GetWindowsVersion(); - // Increase the application privileges (SE_DEBUG_PRIVILEGE), so that we can report // the Windows Services preventing access to the disk or volume we want to format. EnablePrivileges(); @@ -3291,16 +3265,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine // 0x9e disables removable and fixed drive notifications lgp_set = SetLGP(FALSE, &existing_key, ep_reg, "NoDriveTypeAutorun", 0x9e); - if (nWindowsVersion > WINDOWS_XP) { - // Re-enable AutoMount if needed - if (!GetAutoMount(&automount)) { - uprintf("Could not get AutoMount status"); - automount = TRUE; // So that we don't try to change its status on exit - } else if (!automount) { - uprintf("AutoMount was detected as disabled - temporarily re-enabling it"); - if (!SetAutoMount(TRUE)) - uprintf("Failed to enable AutoMount"); - } + // Re-enable AutoMount if needed + if (!GetAutoMount(&automount)) { + uprintf("Could not get AutoMount status"); + automount = TRUE; // So that we don't try to change its status on exit + } else if (!automount) { + uprintf("AutoMount was detected as disabled - temporarily re-enabling it"); + if (!SetAutoMount(TRUE)) + uprintf("Failed to enable AutoMount"); } relaunch: @@ -3329,18 +3301,11 @@ relaunch: if ((relaunch_rc.left > -65536) && (relaunch_rc.top > -65536)) SetWindowPos(hDlg, HWND_TOP, relaunch_rc.left, relaunch_rc.top, 0, 0, SWP_NOSIZE); - // Enable drag-n-drop through the message filter (for Vista or later) - if (nWindowsVersion >= WINDOWS_VISTA) { - PF_INIT(ChangeWindowMessageFilter, user32); - if (pfChangeWindowMessageFilter != NULL) { - // NB: We use ChangeWindowMessageFilter() here because - // ChangeWindowMessageFilterEx() is not available on Vista - pfChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD); - pfChangeWindowMessageFilter(WM_COPYDATA, MSGFLT_ADD); - // CopyGlobalData is needed sine we are running elevated - pfChangeWindowMessageFilter(WM_COPYGLOBALDATA, MSGFLT_ADD); - } - } + // Enable drag-n-drop through the message filter + ChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD); + ChangeWindowMessageFilter(WM_COPYDATA, MSGFLT_ADD); + // CopyGlobalData is needed sine we are running elevated + ChangeWindowMessageFilter(WM_COPYGLOBALDATA, MSGFLT_ADD); // Set the hook to automatically close Windows' "You need to format the disk in drive..." prompt if (!SetFormatPromptHook()) @@ -3596,7 +3561,7 @@ out: } if (lgp_set) SetLGP(TRUE, &existing_key, ep_reg, "NoDriveTypeAutorun", 0); - if ((nWindowsVersion > WINDOWS_XP) && (!automount) && (!SetAutoMount(FALSE))) + if ((!automount) && (!SetAutoMount(FALSE))) uprintf("Failed to restore AutoMount to disabled"); ubflush(); // Unconditional delete with retry, just in case... diff --git a/src/rufus.h b/src/rufus.h index 27e48262..473a3e31 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -21,8 +21,8 @@ #if defined(_MSC_VER) // Disable some VS Code Analysis warnings -#pragma warning(disable: 4996) // Ignore deprecated (eg. GetVersionEx()), as we have to contend with XP -#pragma warning(disable: 28159) // We use GetTickCount64() where possible, but it's not available on XP +#pragma warning(disable: 4996) // Ignore deprecated +#pragma warning(disable: 28159) // I'll keep using GetVersionEx(), thank you very much! #pragma warning(disable: 6258) // I know what I'm using TerminateThread for #endif @@ -599,7 +599,3 @@ static __inline HMODULE GetLibraryHandle(char* szLibraryName) { #define ERROR_CANT_ASSIGN_LETTER 0x120B #define ERROR_CANT_MOUNT_VOLUME 0x120C -/* GetTickCount64 not being available on XP is a massive bother */ -PF_TYPE(WINAPI, ULONGLONG, GetTickCount64, (void)); -extern GetTickCount64_t pfGetTickCount64; -#define _GetTickCount64() ((pfGetTickCount64 != NULL)?(uint64_t)pfGetTickCount64():(uint64_t)GetTickCount()) diff --git a/src/rufus.rc b/src/rufus.rc index 89f6287c..2f9220dc 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1214" +CAPTION "Rufus 2.18.1215" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1214,0 - PRODUCTVERSION 2,18,1214,0 + FILEVERSION 2,18,1215,0 + PRODUCTVERSION 2,18,1215,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1214" + VALUE "FileVersion", "2.18.1215" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1214" + VALUE "ProductVersion", "2.18.1215" END END BLOCK "VarFileInfo" @@ -409,10 +409,6 @@ END // remains consistent on all systems. IDI_ICON ICON "../res/rufus.ico" -IDI_UP ICON "../res/up.ico" - -IDI_DOWN ICON "../res/down.ico" - #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// diff --git a/src/stdfn.c b/src/stdfn.c index 8dc64898..779184dd 100644 --- a/src/stdfn.c +++ b/src/stdfn.c @@ -36,8 +36,6 @@ int nWindowsVersion = WINDOWS_UNDEFINED; int nWindowsBuildNumber = -1; char WindowsVersionStr[128] = "Windows "; -PF_TYPE_DECL(WINAPI, int, LCIDToLocaleName, (LCID, LPWSTR, int, DWORD)); - /* * Hash table functions - modified From glibc 2.3.2: * [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986 @@ -900,11 +898,7 @@ char* GetCurrentMUI(void) static char mui_str[LOCALE_NAME_MAX_LENGTH]; wchar_t wmui_str[LOCALE_NAME_MAX_LENGTH]; - // Of course LCIDToLocaleName() is not available on XP... grrrr! - PF_INIT(LCIDToLocaleName, kernel32); - - if ( (pfLCIDToLocaleName != NULL) && - (pfLCIDToLocaleName(GetUserDefaultUILanguage(), wmui_str, LOCALE_NAME_MAX_LENGTH, 0) > 0) ) { + if (LCIDToLocaleName(GetUserDefaultUILanguage(), wmui_str, LOCALE_NAME_MAX_LENGTH, 0) > 0) { wchar_to_utf8_no_alloc(wmui_str, mui_str, LOCALE_NAME_MAX_LENGTH); } else { static_strcpy(mui_str, "en-US"); diff --git a/src/stdio.c b/src/stdio.c index a9ce4654..6298d239 100644 --- a/src/stdio.c +++ b/src/stdio.c @@ -381,7 +381,8 @@ BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWr // This is needed, for instance, if you are waiting for a thread that may issue uprintf's DWORD WaitForSingleObjectWithMessages(HANDLE hHandle, DWORD dwMilliseconds) { - DWORD res, dwCurTime, dwEndTime = GetTickCount() + dwMilliseconds; + uint64_t CurTime, EndTime = GetTickCount64() + dwMilliseconds; + DWORD res; MSG msg; do { @@ -399,11 +400,11 @@ DWORD WaitForSingleObjectWithMessages(HANDLE hHandle, DWORD dwMilliseconds) res = MsgWaitForMultipleObjects(1, &hHandle, FALSE, dwMilliseconds, QS_ALLINPUT); if (dwMilliseconds != INFINITE) { - dwCurTime = GetTickCount(); + CurTime = GetTickCount64(); // Account for the case where we may reach the timeout condition while // processing timestamps - if (dwCurTime < dwEndTime) - dwMilliseconds = dwEndTime - dwCurTime; + if (CurTime < EndTime) + dwMilliseconds = (DWORD) (EndTime - CurTime); else res = WAIT_TIMEOUT; } diff --git a/src/stdlg.c b/src/stdlg.c index bdec209f..3e549b61 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -42,12 +42,6 @@ #include "settings.h" #include "license.h" -PF_TYPE_DECL(WINAPI, HRESULT, SHCreateItemFromParsingName, (PCWSTR, IBindCtx*, REFIID, void **)); -PF_TYPE_DECL(WINAPI, LPITEMIDLIST, SHSimpleIDListFromPath, (PCWSTR pszPath)); -#define INIT_VISTA_SHELL32 PF_INIT(SHCreateItemFromParsingName, Shell32) -#define INIT_XP_SHELL32 PF_INIT(SHSimpleIDListFromPath, Shell32) -#define IS_VISTA_SHELL32_AVAILABLE (pfSHCreateItemFromParsingName != NULL) - /* Globals */ static HICON hMessageIcon = (HICON)INVALID_HANDLE_VALUE; static char* szMessageText = NULL; @@ -107,21 +101,15 @@ INT CALLBACK BrowseInfoCallback(HWND hDlg, UINT message, LPARAM lParam, LPARAM p hBrowseEdit = FindWindowExA(hDlg, NULL, "Edit", NULL); SetWindowTextU(hBrowseEdit, szFolderPath); SetDialogFocus(hDlg, hBrowseEdit); - // On XP, BFFM_SETSELECTION can't be used with a Unicode Path in SendMessageW - // or a pidl (at least with MinGW) => must use SendMessageA - if (nWindowsVersion <= WINDOWS_XP) { - SendMessageLU(hDlg, BFFM_SETSELECTION, (WPARAM)TRUE, szFolderPath); - } else { - // On Windows 7, MinGW only properly selects the specified folder when using a pidl - wpath = utf8_to_wchar(szFolderPath); - pidl = (*pfSHSimpleIDListFromPath)(wpath); - safe_free(wpath); - // NB: see http://connect.microsoft.com/VisualStudio/feedback/details/518103/bffm-setselection-does-not-work-with-shbrowseforfolder-on-windows-7 - // for details as to why we send BFFM_SETSELECTION twice. - SendMessageW(hDlg, BFFM_SETSELECTION, (WPARAM)FALSE, (LPARAM)pidl); - Sleep(100); - PostMessageW(hDlg, BFFM_SETSELECTION, (WPARAM)FALSE, (LPARAM)pidl); - } + // On Windows 7, MinGW only properly selects the specified folder when using a pidl + wpath = utf8_to_wchar(szFolderPath); + pidl = SHSimpleIDListFromPath(wpath); + safe_free(wpath); + // NB: see http://connect.microsoft.com/VisualStudio/feedback/details/518103/bffm-setselection-does-not-work-with-shbrowseforfolder-on-windows-7 + // for details as to why we send BFFM_SETSELECTION twice. + SendMessageW(hDlg, BFFM_SETSELECTION, (WPARAM)FALSE, (LPARAM)pidl); + Sleep(100); + PostMessageW(hDlg, BFFM_SETSELECTION, (WPARAM)FALSE, (LPARAM)pidl); break; case BFFM_SELCHANGED: // Update the status @@ -136,7 +124,6 @@ INT CALLBACK BrowseInfoCallback(HWND hDlg, UINT message, LPARAM lParam, LPARAM p /* * Browse for a folder and update the folder edit box - * Will use the newer IFileOpenDialog if *compiled* for Vista or later */ void BrowseForFolder(void) { @@ -152,78 +139,72 @@ void BrowseForFolder(void) { char* tmp_path = NULL; dialog_showing++; - if (nWindowsVersion >= WINDOWS_VISTA) { - INIT_VISTA_SHELL32; - if (IS_VISTA_SHELL32_AVAILABLE) { - hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC, - &IID_IFileOpenDialog, (LPVOID)&pfod); - if (FAILED(hr)) { - uprintf("CoCreateInstance for FileOpenDialog failed: error %X\n", hr); - pfod = NULL; // Just in case - goto fallback; + hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC, + &IID_IFileOpenDialog, (LPVOID)&pfod); + if (FAILED(hr)) { + uprintf("CoCreateInstance for FileOpenDialog failed: error %X\n", hr); + pfod = NULL; // Just in case + goto fallback; + } + hr = pfod->lpVtbl->SetOptions(pfod, FOS_PICKFOLDERS); + if (FAILED(hr)) { + uprintf("Failed to set folder option for FileOpenDialog: error %X\n", hr); + goto fallback; + } + // Set the initial folder (if the path is invalid, will simply use last) + wpath = utf8_to_wchar(szFolderPath); + // The new IFileOpenDialog makes us split the path + fname = NULL; + if ((wpath != NULL) && (wcslen(wpath) >= 1)) { + for (i = wcslen(wpath) - 1; i != 0; i--) { + if (wpath[i] == L'\\') { + wpath[i] = 0; + fname = &wpath[i + 1]; + break; } - hr = pfod->lpVtbl->SetOptions(pfod, FOS_PICKFOLDERS); - if (FAILED(hr)) { - uprintf("Failed to set folder option for FileOpenDialog: error %X\n", hr); - goto fallback; - } - // Set the initial folder (if the path is invalid, will simply use last) - wpath = utf8_to_wchar(szFolderPath); - // The new IFileOpenDialog makes us split the path - fname = NULL; - if ((wpath != NULL) && (wcslen(wpath) >= 1)) { - for (i = wcslen(wpath) - 1; i != 0; i--) { - if (wpath[i] == L'\\') { - wpath[i] = 0; - fname = &wpath[i + 1]; - break; - } - } - } - - hr = (*pfSHCreateItemFromParsingName)(wpath, NULL, &IID_IShellItem, (LPVOID)&si_path); - if (SUCCEEDED(hr)) { - if (wpath != NULL) { - pfod->lpVtbl->SetFolder(pfod, si_path); - } - if (fname != NULL) { - pfod->lpVtbl->SetFileName(pfod, fname); - } - } - safe_free(wpath); - - hr = pfod->lpVtbl->Show(pfod, hMainDialog); - if (SUCCEEDED(hr)) { - hr = pfod->lpVtbl->GetResult(pfod, &psi); - if (SUCCEEDED(hr)) { - psi->lpVtbl->GetDisplayName(psi, SIGDN_FILESYSPATH, &wpath); - tmp_path = wchar_to_utf8(wpath); - CoTaskMemFree(wpath); - if (tmp_path == NULL) { - uprintf("Could not convert path\n"); - } else { - static_strcpy(szFolderPath, tmp_path); - safe_free(tmp_path); - } - } else { - uprintf("Failed to set folder option for FileOpenDialog: error %X\n", hr); - } - } else if ((hr & 0xFFFF) != ERROR_CANCELLED) { - // If it's not a user cancel, assume the dialog didn't show and fallback - uprintf("Could not show FileOpenDialog: error %X\n", hr); - goto fallback; - } - pfod->lpVtbl->Release(pfod); - dialog_showing--; - return; - } -fallback: - if (pfod != NULL) { - pfod->lpVtbl->Release(pfod); } } - INIT_XP_SHELL32; + hr = SHCreateItemFromParsingName(wpath, NULL, &IID_IShellItem, (LPVOID)&si_path); + if (SUCCEEDED(hr)) { + if (wpath != NULL) { + pfod->lpVtbl->SetFolder(pfod, si_path); + } + if (fname != NULL) { + pfod->lpVtbl->SetFileName(pfod, fname); + } + } + safe_free(wpath); + + hr = pfod->lpVtbl->Show(pfod, hMainDialog); + if (SUCCEEDED(hr)) { + hr = pfod->lpVtbl->GetResult(pfod, &psi); + if (SUCCEEDED(hr)) { + psi->lpVtbl->GetDisplayName(psi, SIGDN_FILESYSPATH, &wpath); + tmp_path = wchar_to_utf8(wpath); + CoTaskMemFree(wpath); + if (tmp_path == NULL) { + uprintf("Could not convert path\n"); + } else { + static_strcpy(szFolderPath, tmp_path); + safe_free(tmp_path); + } + } else { + uprintf("Failed to set folder option for FileOpenDialog: error %X\n", hr); + } + } else if ((hr & 0xFFFF) != ERROR_CANCELLED) { + // If it's not a user cancel, assume the dialog didn't show and fallback + uprintf("Could not show FileOpenDialog: error %X\n", hr); + goto fallback; + } + pfod->lpVtbl->Release(pfod); + dialog_showing--; + return; +fallback: + if (pfod != NULL) { + pfod->lpVtbl->Release(pfod); + } + memset(&bi, 0, sizeof(BROWSEINFOW)); bi.hwndOwner = hMainDialog; bi.lpszTitle = utf8_to_wchar(lmprintf(MSG_106)); @@ -241,11 +222,10 @@ fallback: /* * Return the UTF8 path of a file selected through a load or save dialog - * Will use the newer IFileOpenDialog if *compiled* for Vista or later * All string parameters are UTF-8 - * IMPORTANT NOTE: On Vista and later, remember that you need to call - * CoInitializeEx() for *EACH* thread you invoke FileDialog from, as - * GetDisplayName() will return error 0x8001010E otherwise. + * IMPORTANT NOTE: Remember that you need to call CoInitializeEx() for + * *EACH* thread you invoke FileDialog from, as GetDisplayName() will + * return error 0x8001010E otherwise. */ char* FileDialog(BOOL save, char* path, const ext_t* ext, DWORD options) { @@ -267,86 +247,84 @@ char* FileDialog(BOOL save, char* path, const ext_t* ext, DWORD options) return NULL; dialog_showing++; - if (nWindowsVersion >= WINDOWS_VISTA) { - INIT_VISTA_SHELL32; - filter_spec = (COMDLG_FILTERSPEC*)calloc(ext->count + 1, sizeof(COMDLG_FILTERSPEC)); - if ((IS_VISTA_SHELL32_AVAILABLE) && (filter_spec != NULL)) { - // Setup the file extension filter table - for (i = 0; i < ext->count; i++) { - filter_spec[i].pszSpec = utf8_to_wchar(ext->extension[i]); - filter_spec[i].pszName = utf8_to_wchar(ext->description[i]); - } - filter_spec[i].pszSpec = L"*.*"; - filter_spec[i].pszName = utf8_to_wchar(lmprintf(MSG_107)); + filter_spec = (COMDLG_FILTERSPEC*)calloc(ext->count + 1, sizeof(COMDLG_FILTERSPEC)); + if (filter_spec != NULL) { + // Setup the file extension filter table + for (i = 0; i < ext->count; i++) { + filter_spec[i].pszSpec = utf8_to_wchar(ext->extension[i]); + filter_spec[i].pszName = utf8_to_wchar(ext->description[i]); + } + filter_spec[i].pszSpec = L"*.*"; + filter_spec[i].pszName = utf8_to_wchar(lmprintf(MSG_107)); - hr = CoCreateInstance(save ? &CLSID_FileSaveDialog : &CLSID_FileOpenDialog, NULL, CLSCTX_INPROC, - &IID_IFileDialog, (LPVOID)&pfd); + hr = CoCreateInstance(save ? &CLSID_FileSaveDialog : &CLSID_FileOpenDialog, NULL, CLSCTX_INPROC, + &IID_IFileDialog, (LPVOID)&pfd); - if (FAILED(hr)) { - SetLastError(hr); - uprintf("CoCreateInstance for FileOpenDialog failed: %s\n", WindowsErrorString()); - pfd = NULL; // Just in case - goto fallback; - } + if (FAILED(hr)) { + SetLastError(hr); + uprintf("CoCreateInstance for FileOpenDialog failed: %s\n", WindowsErrorString()); + pfd = NULL; // Just in case + goto fallback; + } - // Set the file extension filters - pfd->lpVtbl->SetFileTypes(pfd, (UINT)ext->count + 1, filter_spec); + // Set the file extension filters + pfd->lpVtbl->SetFileTypes(pfd, (UINT)ext->count + 1, filter_spec); - // Set the default directory - wpath = utf8_to_wchar(path); - hr = (*pfSHCreateItemFromParsingName)(wpath, NULL, &IID_IShellItem, (LPVOID)&si_path); - if (SUCCEEDED(hr)) { - pfd->lpVtbl->SetFolder(pfd, si_path); - } - safe_free(wpath); + // Set the default directory + wpath = utf8_to_wchar(path); + hr = SHCreateItemFromParsingName(wpath, NULL, &IID_IShellItem, (LPVOID)&si_path); + if (SUCCEEDED(hr)) { + pfd->lpVtbl->SetFolder(pfd, si_path); + } + safe_free(wpath); - // Set the default filename - wfilename = utf8_to_wchar((ext->filename == NULL) ? "" : ext->filename); - if (wfilename != NULL) { - pfd->lpVtbl->SetFileName(pfd, wfilename); - } + // Set the default filename + wfilename = utf8_to_wchar((ext->filename == NULL) ? "" : ext->filename); + if (wfilename != NULL) { + pfd->lpVtbl->SetFileName(pfd, wfilename); + } - // Display the dialog - hr = pfd->lpVtbl->Show(pfd, hMainDialog); + // Display the dialog + hr = pfd->lpVtbl->Show(pfd, hMainDialog); - // Cleanup - safe_free(wfilename); - for (i = 0; i < ext->count; i++) { - safe_free(filter_spec[i].pszSpec); - safe_free(filter_spec[i].pszName); - } + // Cleanup + safe_free(wfilename); + for (i = 0; i < ext->count; i++) { + safe_free(filter_spec[i].pszSpec); safe_free(filter_spec[i].pszName); - safe_free(filter_spec); - - if (SUCCEEDED(hr)) { - // Obtain the result of the user's interaction with the dialog. - hr = pfd->lpVtbl->GetResult(pfd, &psiResult); - if (SUCCEEDED(hr)) { - hr = psiResult->lpVtbl->GetDisplayName(psiResult, SIGDN_FILESYSPATH, &wpath); - if (SUCCEEDED(hr)) { - filepath = wchar_to_utf8(wpath); - CoTaskMemFree(wpath); - } else { - SetLastError(hr); - uprintf("Unable to access file path: %s\n", WindowsErrorString()); - } - psiResult->lpVtbl->Release(psiResult); - } - } else if ((hr & 0xFFFF) != ERROR_CANCELLED) { - // If it's not a user cancel, assume the dialog didn't show and fallback - SetLastError(hr); - uprintf("Could not show FileOpenDialog: %s\n", WindowsErrorString()); - goto fallback; - } - pfd->lpVtbl->Release(pfd); - dialog_showing--; - return filepath; } - fallback: + safe_free(filter_spec[i].pszName); safe_free(filter_spec); - if (pfd != NULL) { - pfd->lpVtbl->Release(pfd); + + if (SUCCEEDED(hr)) { + // Obtain the result of the user's interaction with the dialog. + hr = pfd->lpVtbl->GetResult(pfd, &psiResult); + if (SUCCEEDED(hr)) { + hr = psiResult->lpVtbl->GetDisplayName(psiResult, SIGDN_FILESYSPATH, &wpath); + if (SUCCEEDED(hr)) { + filepath = wchar_to_utf8(wpath); + CoTaskMemFree(wpath); + } else { + SetLastError(hr); + uprintf("Unable to access file path: %s\n", WindowsErrorString()); + } + psiResult->lpVtbl->Release(psiResult); + } + } else if ((hr & 0xFFFF) != ERROR_CANCELLED) { + // If it's not a user cancel, assume the dialog didn't show and fallback + SetLastError(hr); + uprintf("Could not show FileOpenDialog: %s\n", WindowsErrorString()); + goto fallback; } + pfd->lpVtbl->Release(pfd); + dialog_showing--; + return filepath; + } + +fallback: + safe_free(filter_spec); + if (pfd != NULL) { + pfd->lpVtbl->Release(pfd); } memset(&ofn, 0, sizeof(ofn)); @@ -433,7 +411,7 @@ void CreateStatusBar(void) // Set the font we'll use to display the '#' sign in the toolbar button hFont = CreateFontA(-MulDiv(10, GetDeviceCaps(GetDC(hMainDialog), LOGPIXELSY), 72), 0, 0, 0, FW_MEDIUM, FALSE, FALSE, FALSE, DEFAULT_CHARSET, - 0, 0, PROOF_QUALITY, 0, (nWindowsVersion >= WINDOWS_VISTA)?"Segoe UI":"Arial Unicode MS"); + 0, 0, PROOF_QUALITY, 0, "Segoe UI"); // Find the width of our hash sign hDC = GetDC(hMainDialog); @@ -458,10 +436,6 @@ void CreateStatusBar(void) // Compute the dimensions for the hash button x = edge[0]; - if (nWindowsVersion <= WINDOWS_XP) { - x -= 1; - height -= 2; - } y = rect.bottom - height + 1; width = edge[1] - edge[0] - 1; // How I wish there was a way to figure out how to make Windows controls look good @@ -721,23 +695,21 @@ INT_PTR CALLBACK NotificationCallback(HWND hDlg, UINT message, WPARAM wParam, LP switch (message) { case WM_INITDIALOG: - if (nWindowsVersion >= WINDOWS_VISTA) { // of course, this stuff doesn't work on XP! - // Get the system message box font. See http://stackoverflow.com/a/6057761 - ncm.cbSize = sizeof(ncm); - // If we're compiling with the Vista SDK or later, the NONCLIENTMETRICS struct - // will be the wrong size for previous versions, so we need to adjust it. - #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA) - ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth); - #endif - SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0); - hDlgFont = CreateFontIndirect(&(ncm.lfMessageFont)); - // Set the dialog to use the system message box font - SendMessage(hDlg, WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - SendMessage(GetDlgItem(hDlg, IDC_NOTIFICATION_TEXT), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - SendMessage(GetDlgItem(hDlg, IDC_MORE_INFO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - SendMessage(GetDlgItem(hDlg, IDYES), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - SendMessage(GetDlgItem(hDlg, IDNO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); - } + // Get the system message box font. See http://stackoverflow.com/a/6057761 + ncm.cbSize = sizeof(ncm); + // If we're compiling with the Vista SDK or later, the NONCLIENTMETRICS struct + // will be the wrong size for previous versions, so we need to adjust it. + #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA) + ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth); + #endif + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0); + hDlgFont = CreateFontIndirect(&(ncm.lfMessageFont)); + // Set the dialog to use the system message box font + SendMessage(hDlg, WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDC_NOTIFICATION_TEXT), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDC_MORE_INFO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDYES), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); + SendMessage(GetDlgItem(hDlg, IDNO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0)); apply_localization(IDD_NOTIFICATION, hDlg); background_brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); @@ -878,11 +850,9 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA // If we're compiling with the Vista SDK or later, the NONCLIENTMETRICS struct // will be the wrong size for previous versions, so we need to adjust it. #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA) - if (nWindowsVersion >= WINDOWS_VISTA) { - // In versions of Windows prior to Vista, the iPaddedBorderWidth member - // is not present, so we need to subtract its size from cbSize. - ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth); - } + // In versions of Windows prior to Vista, the iPaddedBorderWidth member + // is not present, so we need to subtract its size from cbSize. + ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth); #endif SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0); hDlgFont = CreateFontIndirect(&(ncm.lfMessageFont)); @@ -1020,11 +990,9 @@ INT_PTR CALLBACK ListCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa // If we're compiling with the Vista SDK or later, the NONCLIENTMETRICS struct // will be the wrong size for previous versions, so we need to adjust it. #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA) - if (nWindowsVersion >= WINDOWS_VISTA) { - // In versions of Windows prior to Vista, the iPaddedBorderWidth member - // is not present, so we need to subtract its size from cbSize. - ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth); - } + // In versions of Windows prior to Vista, the iPaddedBorderWidth member + // is not present, so we need to subtract its size from cbSize. + ncm.cbSize -= sizeof(ncm.iPaddedBorderWidth); #endif SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0); hDlgFont = CreateFontIndirect(&(ncm.lfMessageFont)); @@ -1290,97 +1258,15 @@ LONG GetEntryWidth(HWND hDropDown, const char *entry) /* * Windows 7 taskbar icon handling (progress bar overlay, etc) - * Some platforms don't have these, so we redefine */ -typedef enum MY_STPFLAG -{ - MY_STPF_NONE = 0, - MY_STPF_USEAPPTHUMBNAILALWAYS = 0x1, - MY_STPF_USEAPPTHUMBNAILWHENACTIVE = 0x2, - MY_STPF_USEAPPPEEKALWAYS = 0x4, - MY_STPF_USEAPPPEEKWHENACTIVE = 0x8 -} MY_STPFLAG; - -typedef enum MY_THUMBBUTTONMASK -{ - MY_THB_BITMAP = 0x1, - MY_THB_ICON = 0x2, - MY_THB_TOOLTIP = 0x4, - MY_THB_FLAGS = 0x8 -} MY_THUMBBUTTONMASK; - -typedef enum MY_THUMBBUTTONFLAGS -{ - MY_THBF_ENABLED = 0, - MY_THBF_DISABLED = 0x1, - MY_THBF_DISMISSONCLICK = 0x2, - MY_THBF_NOBACKGROUND = 0x4, - MY_THBF_HIDDEN = 0x8, - MY_THBF_NONINTERACTIVE = 0x10 -} MY_THUMBBUTTONFLAGS; - -typedef struct MY_THUMBBUTTON -{ - MY_THUMBBUTTONMASK dwMask; - UINT iId; - UINT iBitmap; - HICON hIcon; - WCHAR szTip[260]; - MY_THUMBBUTTONFLAGS dwFlags; -} MY_THUMBBUTTON; - -/* -typedef enum MY_TBPFLAG -{ - TASKBAR_NOPROGRESS = 0, - TASKBAR_INDETERMINATE = 0x1, - TASKBAR_NORMAL = 0x2, - TASKBAR_ERROR = 0x4, - TASKBAR_PAUSED = 0x8 -} MY_TBPFLAG; -*/ - -#pragma push_macro("INTERFACE") -#undef INTERFACE -#define INTERFACE my_ITaskbarList3 -DECLARE_INTERFACE_(my_ITaskbarList3, IUnknown) { - STDMETHOD (QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; - STDMETHOD_(ULONG, AddRef) (THIS) PURE; - STDMETHOD_(ULONG, Release) (THIS) PURE; - STDMETHOD (HrInit) (THIS) PURE; - STDMETHOD (AddTab) (THIS_ HWND hwnd) PURE; - STDMETHOD (DeleteTab) (THIS_ HWND hwnd) PURE; - STDMETHOD (ActivateTab) (THIS_ HWND hwnd) PURE; - STDMETHOD (SetActiveAlt) (THIS_ HWND hwnd) PURE; - STDMETHOD (MarkFullscreenWindow) (THIS_ HWND hwnd, int fFullscreen) PURE; - STDMETHOD (SetProgressValue) (THIS_ HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE; - STDMETHOD (SetProgressState) (THIS_ HWND hwnd, TASKBAR_PROGRESS_FLAGS tbpFlags) PURE; - STDMETHOD (RegisterTab) (THIS_ HWND hwndTab,HWND hwndMDI) PURE; - STDMETHOD (UnregisterTab) (THIS_ HWND hwndTab) PURE; - STDMETHOD (SetTabOrder) (THIS_ HWND hwndTab, HWND hwndInsertBefore) PURE; - STDMETHOD (SetTabActive) (THIS_ HWND hwndTab, HWND hwndMDI, DWORD dwReserved) PURE; - STDMETHOD (ThumbBarAddButtons) (THIS_ HWND hwnd, UINT cButtons, MY_THUMBBUTTON* pButton) PURE; - STDMETHOD (ThumbBarUpdateButtons) (THIS_ HWND hwnd, UINT cButtons, MY_THUMBBUTTON* pButton) PURE; - STDMETHOD (ThumbBarSetImageList) (THIS_ HWND hwnd, HIMAGELIST himl) PURE; - STDMETHOD (SetOverlayIcon) (THIS_ HWND hwnd, HICON hIcon, LPCWSTR pszDescription) PURE; - STDMETHOD (SetThumbnailTooltip) (THIS_ HWND hwnd, LPCWSTR pszTip) PURE; - STDMETHOD (SetThumbnailClip) (THIS_ HWND hwnd, RECT *prcClip) PURE; -}; -const IID my_IID_ITaskbarList3 = - { 0xea1afb91, 0x9e28, 0x4b86, { 0x90, 0xe9, 0x9e, 0x9f, 0x8a, 0x5e, 0xef, 0xaf } }; -const IID my_CLSID_TaskbarList = - { 0x56fdf344, 0xfd6d, 0x11d0, { 0x95, 0x8a ,0x0, 0x60, 0x97, 0xc9, 0xa0 ,0x90 } }; - -static my_ITaskbarList3* ptbl = NULL; +static ITaskbarList3* ptbl = NULL; // Create a taskbar icon progressbar BOOL CreateTaskbarList(void) { HRESULT hr; - if (nWindowsVersion < WINDOWS_7) - // Only valid for Windows 7 or later - return FALSE; - hr = CoCreateInstance(&my_CLSID_TaskbarList, NULL, CLSCTX_ALL, &my_IID_ITaskbarList3, (LPVOID)&ptbl); + + hr = CoCreateInstance(&CLSID_TaskbarList, NULL, CLSCTX_ALL, &IID_ITaskbarList3, (LPVOID)&ptbl); if (FAILED(hr)) { uprintf("CoCreateInstance for TaskbarList failed: error %X\n", hr); ptbl = NULL; @@ -1402,8 +1288,6 @@ BOOL SetTaskbarProgressValue(ULONGLONG ullCompleted, ULONGLONG ullTotal) return FALSE; return !FAILED(ptbl->lpVtbl->SetProgressValue(ptbl, hMainDialog, ullCompleted, ullTotal)); } -#pragma pop_macro("INTERFACE") - /* * Update policy and settings dialog callback @@ -1523,7 +1407,7 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l BOOL SetUpdateCheck(void) { BOOL enable_updates; - uint64_t commcheck = _GetTickCount64(); + uint64_t commcheck = GetTickCount64(); notification_info more_info = { IDD_UPDATE_POLICY, UpdateCallback }; char filename[MAX_PATH] = "", exename[] = APPLICATION_NAME ".exe"; size_t fn_len, exe_len; @@ -1837,7 +1721,7 @@ LPCDLGTEMPLATE GetDialogTemplate(int Dialog_ID) } // All our dialogs are set to use 'Segoe UI Symbol' by default: - // 1. So that we can replace the font name with 'MS Shell Dlg' (XP) or 'Segoe UI' + // 1. So that we can replace the font name with 'Segoe UI' // 2. So that Thai displays properly on RTF controls as it won't work with regular // 'Segoe UI'... but Cyrillic won't work with 'Segoe UI Symbol' @@ -1865,12 +1749,8 @@ LPCDLGTEMPLATE GetDialogTemplate(int Dialog_ID) // We can't simply zero the characters we don't want, as the size of the font // string determines the next item lookup. So we must memmove the remaining of // our buffer. Oh, and those items are DWORD aligned. - if ((nWindowsVersion > WINDOWS_XP) && IsFontAvailable("Segoe UI")) { - // 'Segoe UI Symbol' -> 'Segoe UI' - wBuf[8] = 0; - } else { - wcscpy(wBuf, L"MS Shell Dlg"); - } + // 'Segoe UI Symbol' -> 'Segoe UI' + wBuf[8] = 0; len = wcslen(wBuf); wBuf[len + 1] = 0; dst = (uintptr_t)&wBuf[len + 2]; diff --git a/src/vhd.c b/src/vhd.c index 31042602..8a81a9f3 100644 --- a/src/vhd.c +++ b/src/vhd.c @@ -590,12 +590,12 @@ DWORD WINAPI WimProgressCallback(DWORD dwMsgId, WPARAM wParam, LPARAM lParam, PV wim_nb_files++; } else { wim_proc_files++; - if (_GetTickCount64() > LastRefresh + 100) { + if (GetTickCount64() > LastRefresh + 100) { // At the end of an actual apply, the WIM API re-lists a bunch of directories it // already processed, so we end up with more entries than counted - ignore those. if (wim_proc_files > wim_nb_files) wim_proc_files = wim_nb_files; - LastRefresh = _GetTickCount64(); + LastRefresh = GetTickCount64(); // x^3 progress, so as not to give a better idea right from the onset // as to the dismal speed with which the WIM API can actually apply files... apply_percent = 4.636942595f * ((float)wim_proc_files) / ((float)wim_nb_files); From 7c5238f23bc43346568ea24087c78947a7f98bdb Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 17 Nov 2017 18:28:44 +0100 Subject: [PATCH 96/97] [misc] fix SDK path --- _sign.cmd | 2 +- res/appstore/packme.cmd | 8 ++++---- src/rufus.rc | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/_sign.cmd b/_sign.cmd index 7d0132ee..1d06afa6 100644 --- a/_sign.cmd +++ b/_sign.cmd @@ -1,3 +1,3 @@ @echo off -"C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool" sign /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 %1 +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool" sign /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 %1 exit diff --git a/res/appstore/packme.cmd b/res/appstore/packme.cmd index cd182eb9..e976ff2c 100644 --- a/res/appstore/packme.cmd +++ b/res/appstore/packme.cmd @@ -13,11 +13,11 @@ copy "..\icon-set\rufus-48.png" "Assets\Square44x44Logo.targetsize-48.png" copy "..\icon-set\rufus-48.png" "Assets\Square44x44Logo.targetsize-48_altform-unplated.png" copy "..\icon-set\rufus-150.png" "Assets\Square150x150Logo.png" copy "..\..\rufus-%VERSION%.exe" "rufus.exe" -"C:\Program Files (x86)\Windows Kits\10\bin\x64\MakePri" createconfig /o /dq en-US /cf priconfig.xml -"C:\Program Files (x86)\Windows Kits\10\bin\x64\MakePri" new /o /pr . /cf priconfig.xml -"C:\Program Files (x86)\Windows Kits\10\bin\x64\MakeAppx" pack /o /d . /p Rufus-%VERSION%.appx +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\MakePri" createconfig /o /dq en-US /cf priconfig.xml +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\MakePri" new /o /pr . /cf priconfig.xml +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\MakeAppx" pack /o /d . /p Rufus-%VERSION%.appx if ERRORLEVEL 1 goto out -"C:\Program Files (x86)\Windows Kits\10\bin\x64\SignTool" sign /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 Rufus-%VERSION%.appx +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\SignTool" sign /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 Rufus-%VERSION%.appx :out del /q rufus.exe del /q priconfig.xml diff --git a/src/rufus.rc b/src/rufus.rc index 2f9220dc..33b8016a 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1215" +CAPTION "Rufus 2.18.1216" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1215,0 - PRODUCTVERSION 2,18,1215,0 + FILEVERSION 2,18,1216,0 + PRODUCTVERSION 2,18,1216,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1215" + VALUE "FileVersion", "2.18.1216" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1215" + VALUE "ProductVersion", "2.18.1216" END END BLOCK "VarFileInfo" From 8dfb760cf28f63ed89f2b32dcea4c9d25304f24d Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 20 Nov 2017 11:39:53 +0000 Subject: [PATCH 97/97] [misc] set Windows SDK to 10.0.16299 --- .vs/bled.vcxproj | 2 +- .vs/getopt.vcxproj | 2 +- .vs/libcdio-driver.vcxproj | 2 +- .vs/libcdio-iso9660.vcxproj | 2 +- .vs/libcdio-udf.vcxproj | 2 +- .vs/ms-sys.vcxproj | 2 +- .vs/rufus.vcxproj | 2 +- .vs/syslinux-libfat.vcxproj | 2 +- .vs/syslinux-libinstaller.vcxproj | 2 +- .vs/syslinux-win.vcxproj | 2 +- README.md | 3 ++- src/process.c | 2 +- src/process.h | 6 ------ src/rufus.h | 1 - src/rufus.rc | 10 +++++----- 15 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.vs/bled.vcxproj b/.vs/bled.vcxproj index 532b2100..347030fc 100644 --- a/.vs/bled.vcxproj +++ b/.vs/bled.vcxproj @@ -76,7 +76,7 @@ bled {FB6D52D4-A2F8-C358-DB85-BBCAECFDDD7D} bled - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/getopt.vcxproj b/.vs/getopt.vcxproj index 0c2448de..80266709 100644 --- a/.vs/getopt.vcxproj +++ b/.vs/getopt.vcxproj @@ -37,7 +37,7 @@ {AE83E1B4-CE06-47EE-B7A3-C3A1D7C2D71E} getopt - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/libcdio-driver.vcxproj b/.vs/libcdio-driver.vcxproj index 9656ff11..d9505532 100644 --- a/.vs/libcdio-driver.vcxproj +++ b/.vs/libcdio-driver.vcxproj @@ -69,7 +69,7 @@ Win32Proj driver libcdio-driver - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/libcdio-iso9660.vcxproj b/.vs/libcdio-iso9660.vcxproj index f4c701ba..e60de9e4 100644 --- a/.vs/libcdio-iso9660.vcxproj +++ b/.vs/libcdio-iso9660.vcxproj @@ -61,7 +61,7 @@ Win32Proj iso9660 libcdio-iso9660 - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/libcdio-udf.vcxproj b/.vs/libcdio-udf.vcxproj index 1152237c..c2ed1c25 100644 --- a/.vs/libcdio-udf.vcxproj +++ b/.vs/libcdio-udf.vcxproj @@ -55,7 +55,7 @@ Win32Proj udf libcdio-udf - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/ms-sys.vcxproj b/.vs/ms-sys.vcxproj index 9915023e..113ea959 100644 --- a/.vs/ms-sys.vcxproj +++ b/.vs/ms-sys.vcxproj @@ -96,7 +96,7 @@ {2B1D078D-8EB4-4398-9CA4-23457265A7F6} Win32Proj mssys - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/rufus.vcxproj b/.vs/rufus.vcxproj index f9ea449f..c75845a4 100644 --- a/.vs/rufus.vcxproj +++ b/.vs/rufus.vcxproj @@ -39,7 +39,7 @@ {731858A7-0303-4988-877B-9C0DD6471864} rufus Win32Proj - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/syslinux-libfat.vcxproj b/.vs/syslinux-libfat.vcxproj index b3392477..a25af000 100644 --- a/.vs/syslinux-libfat.vcxproj +++ b/.vs/syslinux-libfat.vcxproj @@ -51,7 +51,7 @@ Win32Proj libfat syslinux-libfat - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/syslinux-libinstaller.vcxproj b/.vs/syslinux-libinstaller.vcxproj index f5176ad1..b0462bc5 100644 --- a/.vs/syslinux-libinstaller.vcxproj +++ b/.vs/syslinux-libinstaller.vcxproj @@ -51,7 +51,7 @@ Win32Proj libinstaller syslinux-libinstaller - 10.0.15063.0 + 10.0.16299.0 diff --git a/.vs/syslinux-win.vcxproj b/.vs/syslinux-win.vcxproj index 85c644c7..a67cb89a 100644 --- a/.vs/syslinux-win.vcxproj +++ b/.vs/syslinux-win.vcxproj @@ -45,7 +45,7 @@ Win32Proj win syslinux-win - 10.0.15063.0 + 10.0.16299.0 diff --git a/README.md b/README.md index b5f1f1e5..cdb63a52 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ Features Compilation ----------- -Use either Visual Studio (2017 or later) or MinGW and then invoke the `.sln` or `configure`/`make` respectively. +Use either Visual Studio 2017 (with Update 4 and SDK 10.0.16299 installed) or MinGW and +then invoke the `.sln` or `configure`/`make` respectively. #### Visual Studio Note that, since Rufus is an OSI compliant Open Source project, you are entitled to diff --git a/src/process.c b/src/process.c index 3972be27..ac71ea61 100644 --- a/src/process.c +++ b/src/process.c @@ -43,7 +43,7 @@ PF_TYPE_DECL(NTAPI, NTSTATUS, NtQuerySystemInformation, (SYSTEM_INFORMATION_CLAS PF_TYPE_DECL(NTAPI, NTSTATUS, NtQueryInformationFile, (HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS)); PF_TYPE_DECL(NTAPI, NTSTATUS, NtQueryObject, (HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG)); PF_TYPE_DECL(NTAPI, NTSTATUS, NtDuplicateObject, (HANDLE, HANDLE, HANDLE, PHANDLE, ACCESS_MASK, ULONG, ULONG)); -PF_TYPE_DECL(NTAPI, NTSTATUS, NtOpenProcess, (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID)); +PF_TYPE_DECL(NTAPI, NTSTATUS, NtOpenProcess, (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, CLIENT_ID*)); PF_TYPE_DECL(NTAPI, NTSTATUS, NtOpenProcessToken, (HANDLE, ACCESS_MASK, PHANDLE)); PF_TYPE_DECL(NTAPI, NTSTATUS, NtAdjustPrivilegesToken, (HANDLE, BOOLEAN, PTOKEN_PRIVILEGES, ULONG, PTOKEN_PRIVILEGES, PULONG)); PF_TYPE_DECL(NTAPI, NTSTATUS, NtClose, (HANDLE)); diff --git a/src/process.h b/src/process.h index e9dc9a2b..a0d7cf6a 100644 --- a/src/process.h +++ b/src/process.h @@ -77,12 +77,6 @@ typedef struct _OBJECT_NAME_INFORMATION UNICODE_STRING Name; } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION; -typedef struct _CLIENT_ID -{ - HANDLE UniqueProcess; - HANDLE UniqueThread; -} CLIENT_ID, *PCLIENT_ID; - typedef struct _OBJECT_TYPE_INFORMATION { UNICODE_STRING TypeName; diff --git a/src/rufus.h b/src/rufus.h index 473a3e31..9cdf4077 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -598,4 +598,3 @@ static __inline HMODULE GetLibraryHandle(char* szLibraryName) { #define ERROR_CANT_PATCH 0x120A #define ERROR_CANT_ASSIGN_LETTER 0x120B #define ERROR_CANT_MOUNT_VOLUME 0x120C - diff --git a/src/rufus.rc b/src/rufus.rc index 33b8016a..ce0287e3 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.18.1216" +CAPTION "Rufus 2.18.1217" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1216,0 - PRODUCTVERSION 2,18,1216,0 + FILEVERSION 2,18,1217,0 + PRODUCTVERSION 2,18,1217,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1216" + VALUE "FileVersion", "2.18.1217" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", " 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1216" + VALUE "ProductVersion", "2.18.1217" END END BLOCK "VarFileInfo"