mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[wintogo] add an error popup if we can't select the version
This commit is contained in:
		
							parent
							
								
									9950f5c088
								
							
						
					
					
						commit
						3b4b742772
					
				
					 4 changed files with 18 additions and 10 deletions
				
			
		|  | @ -1281,7 +1281,8 @@ out: | |||
| 
 | ||||
| // Checks which versions of Windows are available in an install.wim image
 | ||||
| // to set our extraction index. Asks the user to select one if needed.
 | ||||
| BOOL SetWinToGoIndex(void) | ||||
| // Returns -2 on user cancel, -1 on other error, >=0 on success.
 | ||||
| int SetWinToGoIndex(void) | ||||
| { | ||||
| 	char *mounted_iso, *build, image[128]; | ||||
| 	char tmp_path[MAX_PATH] = "", xml_file[MAX_PATH] = ""; | ||||
|  | @ -1344,7 +1345,7 @@ BOOL SetWinToGoIndex(void) | |||
| 		if ((build_nr < 15000) && (SelectedDrive.MediaType != FixedMedia)) { | ||||
| 			if (MessageBoxExU(hMainDialog, lmprintf(MSG_098), lmprintf(MSG_190), | ||||
| 				MB_YESNO | MB_ICONWARNING | MB_IS_RTL, selected_langid) != IDYES) | ||||
| 				wintogo_index = -1; | ||||
| 				wintogo_index = -2; | ||||
| 		} | ||||
| 	} | ||||
| 	StrArrayDestroy(&version_name); | ||||
|  | @ -1353,7 +1354,7 @@ BOOL SetWinToGoIndex(void) | |||
| out: | ||||
| 	DeleteFileU(xml_file); | ||||
| 	UnMountISO(); | ||||
| 	return (wintogo_index >= 0); | ||||
| 	return wintogo_index; | ||||
| } | ||||
| 
 | ||||
| // http://technet.microsoft.com/en-ie/library/jj721578.aspx
 | ||||
|  |  | |||
|  | @ -1308,8 +1308,15 @@ static BOOL BootCheck(void) | |||
| 				} | ||||
| 			} | ||||
| 			// If multiple versions are available, asks the user to select one before we commit to format the drive
 | ||||
| 			if (!SetWinToGoIndex()) | ||||
| 			switch(SetWinToGoIndex()) { | ||||
| 			case -1: | ||||
| 				MessageBoxExU(hMainDialog, lmprintf(MSG_073), lmprintf(MSG_291), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid); | ||||
| 				// fall through
 | ||||
| 			case -2: | ||||
| 				return FALSE; | ||||
| 			default: | ||||
| 				break; | ||||
| 			} | ||||
| 		} else if (tt == TT_UEFI) { | ||||
| 			if (!IS_EFI_BOOTABLE(img_report)) { | ||||
| 				// Unsupported ISO
 | ||||
|  |  | |||
|  | @ -480,7 +480,7 @@ extern BOOL WimExtractFile_7z(const char* image, int index, const char* src, con | |||
| extern BOOL WimApplyImage(const char* image, int index, const char* dst); | ||||
| extern BOOL IsBootableImage(const char* path); | ||||
| extern BOOL AppendVHDFooter(const char* vhd_path); | ||||
| extern BOOL SetWinToGoIndex(void); | ||||
| extern int SetWinToGoIndex(void); | ||||
| extern int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid); | ||||
| extern char* GetSignatureName(const char* path); | ||||
| extern LONG ValidateSignature(HWND hDlg, const char* path); | ||||
|  |  | |||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | |||
| IDD_DIALOG DIALOGEX 12, 12, 242, 376 | ||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||
| EXSTYLE WS_EX_ACCEPTFILES | ||||
| CAPTION "Rufus 2.15.1102" | ||||
| CAPTION "Rufus 2.15.1103" | ||||
| FONT 8, "Segoe UI Symbol", 400, 0, 0x0 | ||||
| BEGIN | ||||
|     LTEXT           "Device",IDS_DEVICE_TXT,9,6,200,8 | ||||
|  | @ -334,8 +334,8 @@ END | |||
| // | ||||
| 
 | ||||
| VS_VERSION_INFO VERSIONINFO | ||||
|  FILEVERSION 2,15,1102,0 | ||||
|  PRODUCTVERSION 2,15,1102,0 | ||||
|  FILEVERSION 2,15,1103,0 | ||||
|  PRODUCTVERSION 2,15,1103,0 | ||||
|  FILEFLAGSMASK 0x3fL | ||||
| #ifdef _DEBUG | ||||
|  FILEFLAGS 0x1L | ||||
|  | @ -352,13 +352,13 @@ BEGIN | |||
|         BEGIN | ||||
|             VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" | ||||
|             VALUE "FileDescription", "Rufus" | ||||
|             VALUE "FileVersion", "2.15.1102" | ||||
|             VALUE "FileVersion", "2.15.1103" | ||||
|             VALUE "InternalName", "Rufus" | ||||
|             VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)" | ||||
|             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" | ||||
|             VALUE "OriginalFilename", "rufus.exe" | ||||
|             VALUE "ProductName", "Rufus" | ||||
|             VALUE "ProductVersion", "2.15.1102" | ||||
|             VALUE "ProductVersion", "2.15.1103" | ||||
|         END | ||||
|     END | ||||
|     BLOCK "VarFileInfo" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue