mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-24 11:47:06 -04:00
[misc] drop WDK compilation support
This commit is contained in:
parent
86c530ac50
commit
c00557900b
8 changed files with 11 additions and 224 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <stdlib.h>
|
||||
#else
|
||||
extern char *getenv ();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -33,9 +33,7 @@
|
|||
#include <io.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if !defined(DDKBUILD)
|
||||
#include <psapi.h>
|
||||
#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)
|
||||
{
|
||||
|
|
20
src/rufus.c
20
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
|
||||
|
|
|
@ -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
|
||||
|
|
10
src/rufus.rc
10
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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue