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:
parent
8fa8faf510
commit
67a07909b1
4 changed files with 35 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -41,5 +41,4 @@ install-sh
|
||||||
libtool
|
libtool
|
||||||
ltmain.sh
|
ltmain.sh
|
||||||
missing
|
missing
|
||||||
sources
|
|
||||||
stamp-h1
|
stamp-h1
|
||||||
|
|
4
rufus.c
4
rufus.c
|
@ -26,6 +26,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <setupapi.h>
|
#include <setupapi.h>
|
||||||
|
#include <winioctl.h>
|
||||||
// TODO: MinGW32 requires <ddk/ntddscsi.h>
|
// TODO: MinGW32 requires <ddk/ntddscsi.h>
|
||||||
#include <ntddscsi.h>
|
#include <ntddscsi.h>
|
||||||
// http://doc.sch130.nsc.ru/www.sysinternals.com/ntw2k/source/fmifs.shtml
|
// http://doc.sch130.nsc.ru/www.sysinternals.com/ntw2k/source/fmifs.shtml
|
||||||
|
@ -263,6 +264,7 @@ static BOOL GetUSBDevices(void)
|
||||||
HANDLE hDrive;
|
HANDLE hDrive;
|
||||||
char drive_letter;
|
char drive_letter;
|
||||||
char *label, entry[MAX_PATH], buffer[MAX_PATH];
|
char *label, entry[MAX_PATH], buffer[MAX_PATH];
|
||||||
|
const char* usbstor_name = "USBSTOR";
|
||||||
|
|
||||||
IGNORE_RETVAL(ComboBox_ResetContent(hDeviceList));
|
IGNORE_RETVAL(ComboBox_ResetContent(hDeviceList));
|
||||||
|
|
||||||
|
@ -281,7 +283,7 @@ static BOOL GetUSBDevices(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (safe_strcmp(buffer, "USBSTOR") != 0)
|
if (safe_strcmp(buffer, usbstor_name) != 0)
|
||||||
continue;
|
continue;
|
||||||
memset(buffer, 0, sizeof(buffer));
|
memset(buffer, 0, sizeof(buffer));
|
||||||
if (!SetupDiGetDeviceRegistryPropertyA(dev_info, &dev_info_data, SPDRP_FRIENDLYNAME,
|
if (!SetupDiGetDeviceRegistryPropertyA(dev_info, &dev_info_data, SPDRP_FRIENDLYNAME,
|
||||||
|
|
10
rufus.rc
10
rufus.rc
|
@ -7,7 +7,10 @@
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
//
|
//
|
||||||
#include "afxres.h"
|
#include <windows.h>
|
||||||
|
#ifndef IDC_STATIC
|
||||||
|
#define IDC_STATIC -1
|
||||||
|
#endif
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
@ -55,7 +58,10 @@ END
|
||||||
|
|
||||||
2 TEXTINCLUDE
|
2 TEXTINCLUDE
|
||||||
BEGIN
|
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"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
24
sources
Normal file
24
sources
Normal 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
|
Loading…
Reference in a new issue