mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[efi] improve partition scheme details and tooltips
* Also fix automated filesystem selection when switching schemes around
This commit is contained in:
parent
647d9f18ad
commit
09b7314f98
3 changed files with 36 additions and 12 deletions
31
src/rufus.c
31
src/rufus.c
|
@ -433,6 +433,25 @@ void EnableBootOptions(BOOL enable)
|
||||||
EnableWindow(hDiskID, enable);
|
EnableWindow(hDiskID, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SetPartitionSchemeTooltip(void)
|
||||||
|
{
|
||||||
|
int bt, pt;
|
||||||
|
bt = GETBIOSTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme)));
|
||||||
|
pt = GETPARTTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme)));
|
||||||
|
if (bt == BT_BIOS) {
|
||||||
|
CreateTooltip(hPartitionScheme, "Usually the safest choice. If you have an UEFI computer and want to install "
|
||||||
|
"an OS in EFI mode however, you should select one of the options below", 15000);
|
||||||
|
} else {
|
||||||
|
if (pt == PARTITION_STYLE_MBR) {
|
||||||
|
CreateTooltip(hPartitionScheme, "Use this if you want to install an OS in EFI mode, but need to access "
|
||||||
|
"the USB content from Windows XP", 15000);
|
||||||
|
} else {
|
||||||
|
CreateTooltip(hPartitionScheme, "The preferred option to install an OS in EFI mode and when "
|
||||||
|
"USB access is not required for Windows XP", 15000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Populate the UI properties
|
* Populate the UI properties
|
||||||
*/
|
*/
|
||||||
|
@ -471,8 +490,8 @@ static BOOL PopulateProperties(int ComboIndex)
|
||||||
continue;
|
continue;
|
||||||
bt = (j==0)?BT_BIOS:BT_UEFI;
|
bt = (j==0)?BT_BIOS:BT_UEFI;
|
||||||
pt = (j==2)?PARTITION_STYLE_GPT:PARTITION_STYLE_MBR;
|
pt = (j==2)?PARTITION_STYLE_GPT:PARTITION_STYLE_MBR;
|
||||||
safe_sprintf(capacity, sizeof(capacity), "%s/%s (1 Partition of %0.2f %s)",
|
safe_sprintf(capacity, sizeof(capacity), "%s partition scheme for %s%s computer%s",
|
||||||
PartitionTypeLabel[pt], BiosTypeLabel[bt], HumanReadableSize, suffix[i]);
|
PartitionTypeLabel[pt], BiosTypeLabel[bt], (j==0)?" or UEFI":"", (j==0)?"s":"");
|
||||||
IGNORE_RETVAL(ComboBox_SetItemData(hPartitionScheme, ComboBox_AddStringU(hPartitionScheme, capacity), (bt<<16)|pt));
|
IGNORE_RETVAL(ComboBox_SetItemData(hPartitionScheme, ComboBox_AddStringU(hPartitionScheme, capacity), (bt<<16)|pt));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -488,8 +507,7 @@ static BOOL PopulateProperties(int ComboIndex)
|
||||||
j = 0;
|
j = 0;
|
||||||
}
|
}
|
||||||
IGNORE_RETVAL(ComboBox_SetCurSel(hPartitionScheme, j));
|
IGNORE_RETVAL(ComboBox_SetCurSel(hPartitionScheme, j));
|
||||||
CreateTooltip(hPartitionScheme, "When using an EFI bootable image, and if your target system is UEFI based "
|
SetPartitionSchemeTooltip();
|
||||||
"(most post 2011 PCs), you should try to select an UEFI option here.", 15000);
|
|
||||||
CreateTooltip(hDeviceList, DriveID.Table[ComboIndex], -1);
|
CreateTooltip(hDeviceList, DriveID.Table[ComboIndex], -1);
|
||||||
|
|
||||||
// Set a proposed label according to the size (eg: "256MB", "8GB")
|
// Set a proposed label according to the size (eg: "256MB", "8GB")
|
||||||
|
@ -1446,6 +1464,11 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
SetPassesTooltip();
|
SetPassesTooltip();
|
||||||
break;
|
break;
|
||||||
case IDC_PARTITION_SCHEME:
|
case IDC_PARTITION_SCHEME:
|
||||||
|
if (HIWORD(wParam) != CBN_SELCHANGE)
|
||||||
|
break;
|
||||||
|
SetPartitionSchemeTooltip();
|
||||||
|
SetFSFromISO();
|
||||||
|
// fall-through
|
||||||
case IDC_FILESYSTEM:
|
case IDC_FILESYSTEM:
|
||||||
if (HIWORD(wParam) != CBN_SELCHANGE)
|
if (HIWORD(wParam) != CBN_SELCHANGE)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -193,6 +193,7 @@ typedef struct {
|
||||||
char usb_label[192]; /* converted USB label for workaround */
|
char usb_label[192]; /* converted USB label for workaround */
|
||||||
char cfg_path[128]; /* path to the ISO's isolinux.cfg */
|
char cfg_path[128]; /* path to the ISO's isolinux.cfg */
|
||||||
uint64_t projected_size;
|
uint64_t projected_size;
|
||||||
|
// TODO: use a bitmask and #define tests for the following
|
||||||
uint8_t winpe;
|
uint8_t winpe;
|
||||||
BOOL has_4GB_file;
|
BOOL has_4GB_file;
|
||||||
BOOL has_bootmgr;
|
BOOL has_bootmgr;
|
||||||
|
@ -395,7 +396,7 @@ typedef struct {
|
||||||
#define PBM_SETMARQUEE (WM_USER+10)
|
#define PBM_SETMARQUEE (WM_USER+10)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Why oh why does Microsoft has to make everybody suffer with their braindead use of Unicode */
|
/* Why oh why does Microsoft have to make everybody suffer with their braindead use of Unicode? */
|
||||||
#define _RT_ICON MAKEINTRESOURCEA(3)
|
#define _RT_ICON MAKEINTRESOURCEA(3)
|
||||||
#define _RT_RCDATA MAKEINTRESOURCEA(10)
|
#define _RT_RCDATA MAKEINTRESOURCEA(10)
|
||||||
#define _RT_GROUP_ICON MAKEINTRESOURCEA((ULONG_PTR)(MAKEINTRESOURCEA(3) + 11))
|
#define _RT_GROUP_ICON MAKEINTRESOURCEA((ULONG_PTR)(MAKEINTRESOURCEA(3) + 11))
|
||||||
|
|
14
src/rufus.rc
14
src/rufus.rc
|
@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 206, 316
|
IDD_DIALOG DIALOGEX 12, 12, 206, 316
|
||||||
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.2.229"
|
CAPTION "Rufus v1.3.2.230"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "Start",IDC_START,94,278,50,14
|
DEFPUSHBUTTON "Start",IDC_START,94,278,50,14
|
||||||
|
@ -40,14 +40,14 @@ BEGIN
|
||||||
COMBOBOX IDC_FILESYSTEM,8,75,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_FILESYSTEM,8,75,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "File system",IDC_STATIC,9,64,51,10
|
LTEXT "File system",IDC_STATIC,9,64,51,10
|
||||||
COMBOBOX IDC_PARTITION_SCHEME,8,46,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_PARTITION_SCHEME,8,46,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Partition Scheme and Target Type",IDC_STATIC,9,35,176,8
|
LTEXT "Partition scheme and target system type",IDC_STATIC,9,35,176,8
|
||||||
COMBOBOX IDC_CLUSTERSIZE,8,104,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_CLUSTERSIZE,8,104,190,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Cluster size",IDC_STATIC,9,93,105,10
|
LTEXT "Cluster size",IDC_STATIC,9,93,105,10
|
||||||
PUSHBUTTON "About...",IDC_ABOUT,8,278,50,14
|
PUSHBUTTON "About...",IDC_ABOUT,8,278,50,14
|
||||||
GROUPBOX "Format Options ",IDC_STATIC,7,149,192,66
|
GROUPBOX "Format Options ",IDC_STATIC,7,149,192,66
|
||||||
EDITTEXT IDC_LABEL,7,131,190,13,ES_AUTOHSCROLL
|
EDITTEXT IDC_LABEL,7,131,190,13,ES_AUTOHSCROLL
|
||||||
CONTROL "Check device for bad blocks:",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,101,10
|
CONTROL "Check device for bad blocks:",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,101,10
|
||||||
CONTROL "Quick Format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,55,10
|
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,55,10
|
||||||
CONTROL "Create a bootable disk using:",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,104,10
|
CONTROL "Create a bootable disk using:",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,104,10
|
||||||
CONTROL "Create extended label and icon files",IDC_SET_ICON,
|
CONTROL "Create extended label and icon files",IDC_SET_ICON,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,198,131,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,198,131,10
|
||||||
|
@ -274,8 +274,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,3,2,229
|
FILEVERSION 1,3,2,230
|
||||||
PRODUCTVERSION 1,3,2,229
|
PRODUCTVERSION 1,3,2,230
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -292,13 +292,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.2.229"
|
VALUE "FileVersion", "1.3.2.230"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "(c) 2011-2012 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "(c) 2011-2012 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.2.229"
|
VALUE "ProductVersion", "1.3.2.230"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue