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

[wdk] added WDK build file

This commit is contained in:
Pete Batard 2011-11-20 02:34:15 +00:00
parent 8fa8faf510
commit 67a07909b1
4 changed files with 35 additions and 4 deletions

1
.gitignore vendored
View file

@ -41,5 +41,4 @@ install-sh
libtool
ltmain.sh
missing
sources
stamp-h1

View file

@ -26,6 +26,7 @@
#include <string.h>
#include <commctrl.h>
#include <setupapi.h>
#include <winioctl.h>
// TODO: MinGW32 requires <ddk/ntddscsi.h>
#include <ntddscsi.h>
// http://doc.sch130.nsc.ru/www.sysinternals.com/ntw2k/source/fmifs.shtml
@ -263,6 +264,7 @@ static BOOL GetUSBDevices(void)
HANDLE hDrive;
char drive_letter;
char *label, entry[MAX_PATH], buffer[MAX_PATH];
const char* usbstor_name = "USBSTOR";
IGNORE_RETVAL(ComboBox_ResetContent(hDeviceList));
@ -281,7 +283,7 @@ static BOOL GetUSBDevices(void)
continue;
}
if (safe_strcmp(buffer, "USBSTOR") != 0)
if (safe_strcmp(buffer, usbstor_name) != 0)
continue;
memset(buffer, 0, sizeof(buffer));
if (!SetupDiGetDeviceRegistryPropertyA(dev_info, &dev_info_data, SPDRP_FRIENDLYNAME,

View file

@ -7,7 +7,10 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
#include <windows.h>
#ifndef IDC_STATIC
#define IDC_STATIC -1
#endif
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@ -55,7 +58,10 @@ END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"#include <windows.h>\r\n"
"#ifndef IDC_STATIC\r\n"
"#define IDC_STATIC -1\r\n"
"#endif\r\n"
"\0"
END

24
sources Normal file
View file

@ -0,0 +1,24 @@
TARGETNAME=rufus
TARGETTYPE=PROGRAM
UMTYPE=windows
UMENTRY=winmain
!IFNDEF MSC_WARNING_LEVEL
MSC_WARNING_LEVEL=/W3
!ENDIF
USE_MSVCRT=1
INCLUDES=$(DDK_INC_PATH)
C_DEFINES = $(C_DEFINES) /DDDKBUILD /DISOLATION_AWARE_ENABLED
TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\setupapi.lib \
$(SDK_LIB_PATH)\ole32.lib
# http://jpassing.com/2008/02/01/how-to-use-manifests-with-buildexe/
SXS_APPLICATION_MANIFEST=common_controls_and_elevation.manifest
SOURCES=rufus.c \
rufus.rc