1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

drop support for WDK's Windows XP targets

* Die, XP, die!!!
* Also fix a Coverity warning in checksum.c
This commit is contained in:
Pete Batard 2016-03-24 12:46:44 +00:00
parent 2c90a06668
commit e4bb1a6eb8
7 changed files with 13 additions and 33 deletions

View file

@ -847,7 +847,7 @@ DWORD WINAPI SumThread(void* param)
// gets into its next wait loop // gets into its next wait loop
data_ready[i] = CreateEvent(NULL, FALSE, FALSE, NULL); data_ready[i] = CreateEvent(NULL, FALSE, FALSE, NULL);
thread_ready[i] = CreateEvent(NULL, FALSE, FALSE, NULL); thread_ready[i] = CreateEvent(NULL, FALSE, FALSE, NULL);
if ((data_ready == NULL) || (thread_ready[i] == NULL)) { if ((data_ready[i] == NULL) || (thread_ready[i] == NULL)) {
uprintf("Unable to create checksum thread event: %s", WindowsErrorString()); uprintf("Unable to create checksum thread event: %s", WindowsErrorString());
goto out; goto out;
} }

View file

@ -39,21 +39,8 @@
/* Define to 1 if you have the `fseeko64' function. */ /* Define to 1 if you have the `fseeko64' function. */
#define HAVE_FSEEKO64 1 #define HAVE_FSEEKO64 1
#if defined(_MSC_VER) /* The equivalent of fseeko64 for MSVC is _fseeki64 */
/* The equivalent of fseeko64 for MSVC is _fseeki64, however this */
/* is not available on XP when build with WDK (but _lseeki64 is) */
#if defined(DDKBUILD)
#include <windows.h>
#include <stdio.h>
#include <io.h>
static __inline int fseeko64(FILE *stream, __int64 offset, int origin) {
fflush(stream); /* VERY IMPORTANT! */
return (lseek64(_fileno(stream), offset, origin) == -1LL)?-1:0;
}
#else
#define fseeko64 _fseeki64 #define fseeko64 _fseeki64
#endif
#endif
/* Define to 1 if you have the `ftruncate' function. */ /* Define to 1 if you have the `ftruncate' function. */
/* #undef HAVE_FTRUNCATE */ /* #undef HAVE_FTRUNCATE */

View file

@ -276,13 +276,6 @@ typedef unsigned int uintptr_t;
/* /*
* IFile[Open]Dialog interface for Vista and later (from MinGW headers) * IFile[Open]Dialog interface for Vista and later (from MinGW headers)
*/ */
#ifdef DDKBUILD
typedef struct _COMDLG_FILTERSPEC {
LPCWSTR pszName;
LPCWSTR pszSpec;
} COMDLG_FILTERSPEC;
#endif
#ifndef __IFileDialog_INTERFACE_DEFINED__ #ifndef __IFileDialog_INTERFACE_DEFINED__
#define __IFileDialog_INTERFACE_DEFINED__ #define __IFileDialog_INTERFACE_DEFINED__

View file

@ -2798,9 +2798,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
}; };
// Disable loading system DLLs from the current directory (sideloading mitigation) // Disable loading system DLLs from the current directory (sideloading mitigation)
#ifndef DDKBUILD // WDK doesn't know about that one
SetDllDirectoryA(""); SetDllDirectoryA("");
#endif
uprintf("*** " APPLICATION_NAME " init ***\n"); uprintf("*** " APPLICATION_NAME " init ***\n");
PF_INIT(GetTickCount64, kernel32); PF_INIT(GetTickCount64, kernel32);

View file

@ -24,6 +24,12 @@
#pragma warning(disable: 4996) // Ignore deprecated (eg. GetVersionEx()), as we have to contend with XP #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: 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 #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 #endif
#pragma once #pragma once

View file

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

View file

@ -143,7 +143,6 @@ void BrowseForFolder(void) {
char* tmp_path = NULL; char* tmp_path = NULL;
dialog_showing++; dialog_showing++;
#ifndef DDKBUILD // WDK being uncooperative yet again...
if (nWindowsVersion >= WINDOWS_VISTA) { if (nWindowsVersion >= WINDOWS_VISTA) {
INIT_VISTA_SHELL32; INIT_VISTA_SHELL32;
if (IS_VISTA_SHELL32_AVAILABLE) { if (IS_VISTA_SHELL32_AVAILABLE) {
@ -214,7 +213,6 @@ fallback:
pfod->lpVtbl->Release(pfod); pfod->lpVtbl->Release(pfod);
} }
} }
#endif
INIT_XP_SHELL32; INIT_XP_SHELL32;
memset(&bi, 0, sizeof(BROWSEINFOW)); memset(&bi, 0, sizeof(BROWSEINFOW));
@ -260,7 +258,6 @@ char* FileDialog(BOOL save, char* path, const ext_t* ext, DWORD options)
return NULL; return NULL;
dialog_showing++; dialog_showing++;
#ifndef DDKBUILD
if (nWindowsVersion >= WINDOWS_VISTA) { if (nWindowsVersion >= WINDOWS_VISTA) {
INIT_VISTA_SHELL32; INIT_VISTA_SHELL32;
filter_spec = (COMDLG_FILTERSPEC*)calloc(ext->count + 1, sizeof(COMDLG_FILTERSPEC)); filter_spec = (COMDLG_FILTERSPEC*)calloc(ext->count + 1, sizeof(COMDLG_FILTERSPEC));
@ -341,7 +338,6 @@ fallback:
pfd->lpVtbl->Release(pfd); pfd->lpVtbl->Release(pfd);
} }
} }
#endif
memset(&ofn, 0, sizeof(ofn)); memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(ofn); ofn.lStructSize = sizeof(ofn);