[misc] fix MinGW compilation issues

This commit is contained in:
Pete Batard 2013-06-04 00:44:49 +01:00
parent a17acd1a22
commit d3238d7210
4 changed files with 11 additions and 9 deletions

View File

@ -2,4 +2,4 @@
rm -f rufus*.exe rm -f rufus*.exe
./configure ./configure
make clean make clean
make release -j2 make release

View File

@ -90,7 +90,6 @@ char* GetPhysicalName(DWORD DriveIndex)
{ {
BOOL success = FALSE; BOOL success = FALSE;
char physical_name[24]; char physical_name[24];
char* r = NULL;
CheckDriveIndex(DriveIndex); CheckDriveIndex(DriveIndex);
safe_sprintf(physical_name, sizeof(physical_name), "\\\\.\\PHYSICALDRIVE%d", DriveIndex); safe_sprintf(physical_name, sizeof(physical_name), "\\\\.\\PHYSICALDRIVE%d", DriveIndex);
@ -286,7 +285,7 @@ out:
char GetUnusedDriveLetter(void) char GetUnusedDriveLetter(void)
{ {
DWORD size; DWORD size;
char drive_letter, *drive, drives[26*4]; /* "D:\", "E:\", etc. */ char drive_letter = 'Z'+1, *drive, drives[26*4]; /* "D:\", "E:\", etc. */
size = GetLogicalDriveStringsA(sizeof(drives), drives); size = GetLogicalDriveStringsA(sizeof(drives), drives);
if (size == 0) { if (size == 0) {

View File

@ -41,7 +41,7 @@
#include "rufus.h" #include "rufus.h"
#include "registry.h" #include "registry.h"
/* Redefinitions for the WDK */ /* Redefinitions for WDK and MinGW */
#ifndef PBM_SETSTATE #ifndef PBM_SETSTATE
#define PBM_SETSTATE (WM_USER+16) #define PBM_SETSTATE (WM_USER+16)
#endif #endif
@ -60,6 +60,9 @@
#ifndef BCM_SETIMAGELIST #ifndef BCM_SETIMAGELIST
#define BCM_SETIMAGELIST 0x1602 #define BCM_SETIMAGELIST 0x1602
#endif #endif
#ifndef DBT_CUSTOMEVENT
#define DBT_CUSTOMEVENT 0x8006
#endif
// MinGW fails to link those // MinGW fails to link those
typedef HIMAGELIST (WINAPI *ImageList_Create_t)( typedef HIMAGELIST (WINAPI *ImageList_Create_t)(

View File

@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 329 IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.3.3.245" CAPTION "Rufus v1.3.3.246"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -276,8 +276,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,3,245 FILEVERSION 1,3,3,246
PRODUCTVERSION 1,3,3,245 PRODUCTVERSION 1,3,3,246
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -294,13 +294,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", "1.3.3.245" VALUE "FileVersion", "1.3.3.246"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "(c) 2011-2013 Pete Batard (GPL v3)" VALUE "LegalCopyright", "(c) 2011-2013 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", "1.3.3.245" VALUE "ProductVersion", "1.3.3.246"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"