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

[misc] fix MinGW-w64 compilation issues

* Closes #553
This commit is contained in:
Pete Batard 2015-08-05 22:36:22 +01:00
parent e1f76a5dd1
commit b854f70bae
4 changed files with 14 additions and 11 deletions

View file

@ -68,6 +68,9 @@
#ifndef DBT_CUSTOMEVENT #ifndef DBT_CUSTOMEVENT
#define DBT_CUSTOMEVENT 0x8006 #define DBT_CUSTOMEVENT 0x8006
#endif #endif
#ifndef ERROR_FILE_TOO_LARGE
#define ERROR_FILE_TOO_LARGE 223
#endif
struct { struct {
HIMAGELIST himl; HIMAGELIST himl;

View file

@ -32,7 +32,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
CAPTION "Rufus 2.3.694" CAPTION "Rufus 2.3.695"
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
@ -298,8 +298,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,3,694,0 FILEVERSION 2,3,695,0
PRODUCTVERSION 2,3,694,0 PRODUCTVERSION 2,3,695,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -316,13 +316,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.3.694" VALUE "FileVersion", "2.3.695"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2015 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.3.694" VALUE "ProductVersion", "2.3.695"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -306,7 +306,7 @@ BOOL GetUSBDevices(DWORD devnum)
// we might have an extra vendor driver in between (e.g. "ASUS USB 3.0 Boost Storage Driver" // we might have an extra vendor driver in between (e.g. "ASUS USB 3.0 Boost Storage Driver"
// for UASP devices in ASUS "Turbo Mode" or "Apple Mobile Device USB Driver" for iPods) // for UASP devices in ASUS "Turbo Mode" or "Apple Mobile Device USB Driver" for iPods)
// so try to see if we can match the grandparent. // so try to see if we can match the grandparent.
if ( ((uint32_t)htab_devid.table[j].data == 0) if ( ((uintptr_t)htab_devid.table[j].data == 0)
&& (CM_Get_Parent(&grandparent_inst, parent_inst, 0) == CR_SUCCESS) && (CM_Get_Parent(&grandparent_inst, parent_inst, 0) == CR_SUCCESS)
&& (CM_Get_Device_IDA(grandparent_inst, str, MAX_PATH, 0) == CR_SUCCESS) ) { && (CM_Get_Device_IDA(grandparent_inst, str, MAX_PATH, 0) == CR_SUCCESS) ) {
device_id = str; device_id = str;
@ -315,8 +315,8 @@ BOOL GetUSBDevices(DWORD devnum)
if (usb_debug) if (usb_debug)
uprintf(" Matched with (GP) ID[%03d]: %s", j, device_id); uprintf(" Matched with (GP) ID[%03d]: %s", j, device_id);
} }
if ((uint32_t)htab_devid.table[j].data > 0) if ((uintptr_t)htab_devid.table[j].data > 0)
GetUSBProperties(dev_if_path.String[(uint32_t)htab_devid.table[j].data], device_id, &props); GetUSBProperties(dev_if_path.String[(uintptr_t)htab_devid.table[j].data], device_id, &props);
if (usb_debug) if (usb_debug)
uprintf(" Props VID:PID = %04X:%04X", props.vid, props.pid); uprintf(" Props VID:PID = %04X:%04X", props.vid, props.pid);
@ -446,8 +446,8 @@ BOOL GetUSBDevices(DWORD devnum)
} }
// We have multiple volumes assigned to the same device (multiple partitions) // We have multiple volumes assigned to the same device (multiple partitions)
// If that is the case, use "Multiple Volumes" instead of the label // If that is the case, use "Multiple Volumes" instead of the label
safe_strcpy(entry_msg, sizeof(entry_msg), ((drive_letters[0] != 0) && (drive_letters[1] != 0))? safe_strcpy(entry_msg, sizeof(entry_msg), (((drive_letters[0] != 0) && (drive_letters[1] != 0))?
lmprintf(MSG_047):label); lmprintf(MSG_047):label));
for (k=0, remove_drive=0; drive_letters[k] && (!remove_drive); k++) { for (k=0, remove_drive=0; drive_letters[k] && (!remove_drive); k++) {
// Append all the drive letters we detected // Append all the drive letters we detected
letter_name[2] = drive_letters[k]; letter_name[2] = drive_letters[k];

View file

@ -157,7 +157,7 @@ BOOL AppendVHDFooter(const char* vhd_path)
footer->features = bswap_uint32(VHD_FOOTER_FEATURES_RESERVED); footer->features = bswap_uint32(VHD_FOOTER_FEATURES_RESERVED);
footer->file_format_version = bswap_uint32(VHD_FOOTER_FILE_FORMAT_V1_0); footer->file_format_version = bswap_uint32(VHD_FOOTER_FILE_FORMAT_V1_0);
footer->data_offset = bswap_uint64(VHD_FOOTER_DATA_OFFSET_FIXED_DISK); footer->data_offset = bswap_uint64(VHD_FOOTER_DATA_OFFSET_FIXED_DISK);
footer->timestamp = bswap_uint32(_time32(NULL) - SECONDS_SINCE_JAN_1ST_2000); footer->timestamp = bswap_uint32((uint32_t)(_time64(NULL) - SECONDS_SINCE_JAN_1ST_2000));
memcpy(footer->creator_app, creator_app, sizeof(creator_app)); memcpy(footer->creator_app, creator_app, sizeof(creator_app));
footer->creator_version = bswap_uint32((rufus_version[0]<<16)|rufus_version[1]); footer->creator_version = bswap_uint32((rufus_version[0]<<16)|rufus_version[1]);
memcpy(footer->creator_host_os, creator_os, sizeof(creator_os)); memcpy(footer->creator_host_os, creator_os, sizeof(creator_os));