mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	
							parent
							
								
									bb76f1f636
								
							
						
					
					
						commit
						937dde6bff
					
				
					 2 changed files with 13 additions and 12 deletions
				
			
		
							
								
								
									
										13
									
								
								src/format.c
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								src/format.c
									
										
									
									
									
								
							|  | @ -476,7 +476,7 @@ static BOOL WriteMBR(HANDLE hPhysicalDrive) | ||||||
| 	} | 	} | ||||||
| 	if (IsChecked(IDC_DOS)) { | 	if (IsChecked(IDC_DOS)) { | ||||||
| 		// Set first partition bootable - masquerade as 0x81 for non /minint WinPE 
 | 		// Set first partition bootable - masquerade as 0x81 for non /minint WinPE 
 | ||||||
| 		buf[0x1be] = (IS_WINPE(iso_report.winpe) && iso_report.uses_minint)?0x80:0x81; | 		buf[0x1be] = ((!IS_WINPE(iso_report.winpe)) || ((IS_WINPE(iso_report.winpe) && iso_report.uses_minint)))?0x80:0x81; | ||||||
| 		uprintf("Set bootable USB partition as 0x%02X\n", buf[0x1be]); | 		uprintf("Set bootable USB partition as 0x%02X\n", buf[0x1be]); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -580,9 +580,8 @@ static BOOL SetupWinPE(char drive_letter) | ||||||
| { | { | ||||||
| 	char src[64], dst[32]; | 	char src[64], dst[32]; | ||||||
| 	const char* basedir[] = { "i386", "minint" }; | 	const char* basedir[] = { "i386", "minint" }; | ||||||
| 	const char* patch_str_org[] = { "\\minint\\txtsetup.sif", "\\minint\\system32\\", "\\ntdetect.com" }; | 	const char* patch_str_org[] = { "\\minint\\txtsetup.sif", "\\minint\\system32\\" }; | ||||||
| 	// NB: that last patched string will overflow onto the "ntdetect.com" used for net, which we don't care about
 | 	const char* patch_str_rep[] = { "\\i386\\txtsetup.sif", "\\i386\\system32\\" }; | ||||||
| 	const char* patch_str_rep[] = { "\\i386\\txtsetup.sif", "\\i386\\system32\\", "\\i386\\ntdetect.com" }; |  | ||||||
| 	const char *win_nt_bt_org = "$win_nt$.~bt", *win_nt_bt_rep = "i386"; | 	const char *win_nt_bt_org = "$win_nt$.~bt", *win_nt_bt_rep = "i386"; | ||||||
| 	const char *rdisk_zero = "rdisk(0)"; | 	const char *rdisk_zero = "rdisk(0)"; | ||||||
| 	// TODO: allow other values than harddisk 1, as per user choice?
 | 	// TODO: allow other values than harddisk 1, as per user choice?
 | ||||||
|  | @ -593,6 +592,10 @@ static BOOL SetupWinPE(char drive_letter) | ||||||
| 	char* buf = NULL; | 	char* buf = NULL; | ||||||
| 
 | 
 | ||||||
| 	index = ((iso_report.winpe&WINPE_I386) == WINPE_I386)?0:1; | 	index = ((iso_report.winpe&WINPE_I386) == WINPE_I386)?0:1; | ||||||
|  | 	// Copy of ntdetect.com in root
 | ||||||
|  | 	safe_sprintf(src, sizeof(src), "%c:\\%s\\ntdetect.com", drive_letter, basedir[index]); | ||||||
|  | 	safe_sprintf(dst, sizeof(dst), "%c:\\ntdetect.com", drive_letter); | ||||||
|  | 	CopyFileA(src, dst, TRUE); | ||||||
| 	if (!iso_report.uses_minint) { | 	if (!iso_report.uses_minint) { | ||||||
| 		// Create a copy of txtsetup.sif, as we want to keep the i386 files unmodified
 | 		// Create a copy of txtsetup.sif, as we want to keep the i386 files unmodified
 | ||||||
| 		safe_sprintf(src, sizeof(src), "%c:\\%s\\txtsetup.sif", drive_letter, basedir[index]); | 		safe_sprintf(src, sizeof(src), "%c:\\%s\\txtsetup.sif", drive_letter, basedir[index]); | ||||||
|  | @ -655,8 +658,6 @@ static BOOL SetupWinPE(char drive_letter) | ||||||
| 	for (i=1; i<size-32; i++) { | 	for (i=1; i<size-32; i++) { | ||||||
| 		for (j=0; j<ARRAYSIZE(patch_str_org); j++) { | 		for (j=0; j<ARRAYSIZE(patch_str_org); j++) { | ||||||
| 			if (safe_strnicmp(&buf[i], patch_str_org[j], strlen(patch_str_org[j])-1) == 0) { | 			if (safe_strnicmp(&buf[i], patch_str_org[j], strlen(patch_str_org[j])-1) == 0) { | ||||||
| 				if ((j == 2) && (buf[i-1] == '6'))	// Avoid patching a later "\i386\ntdetect.com"
 |  | ||||||
| 					continue; |  | ||||||
| 				uprintf("  0x%08X: '%s' -> '%s'\n", i, &buf[i], patch_str_rep[j]); | 				uprintf("  0x%08X: '%s' -> '%s'\n", i, &buf[i], patch_str_rep[j]); | ||||||
| 				strcpy(&buf[i], patch_str_rep[j]); | 				strcpy(&buf[i], patch_str_rep[j]); | ||||||
| 				i += (DWORD)max(strlen(patch_str_org[j]), strlen(patch_str_rep[j]));	// in case org is a substring of rep
 | 				i += (DWORD)max(strlen(patch_str_org[j]), strlen(patch_str_rep[j]));	// in case org is a substring of rep
 | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 206, 289 | IDD_DIALOG DIALOGEX 12, 12, 206, 289 | ||||||
| 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.2.0.165" | CAPTION "Rufus v1.2.0.166" | ||||||
| FONT 8, "MS Shell Dlg", 400, 0, 0x1 | FONT 8, "MS Shell Dlg", 400, 0, 0x1 | ||||||
| BEGIN | BEGIN | ||||||
|     DEFPUSHBUTTON   "Start",IDC_START,94,248,50,14 |     DEFPUSHBUTTON   "Start",IDC_START,94,248,50,14 | ||||||
|  | @ -71,7 +71,7 @@ BEGIN | ||||||
|     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP |     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP | ||||||
|     CONTROL         "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, |     CONTROL         "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, | ||||||
|                     "SysLink",WS_TABSTOP,46,47,114,9 |                     "SysLink",WS_TABSTOP,46,47,114,9 | ||||||
|     LTEXT           "Version 1.2.0 (Build 165)",IDC_STATIC,46,19,78,8 |     LTEXT           "Version 1.2.0 (Build 166)",IDC_STATIC,46,19,78,8 | ||||||
|     PUSHBUTTON      "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP |     PUSHBUTTON      "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP | ||||||
|     EDITTEXT        IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL |     EDITTEXT        IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL | ||||||
|     LTEXT           "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 |     LTEXT           "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 | ||||||
|  | @ -216,8 +216,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 1,2,0,165 |  FILEVERSION 1,2,0,166 | ||||||
|  PRODUCTVERSION 1,2,0,165 |  PRODUCTVERSION 1,2,0,166 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -234,13 +234,13 @@ BEGIN | ||||||
|         BEGIN |         BEGIN | ||||||
|             VALUE "CompanyName", "akeo.ie" |             VALUE "CompanyName", "akeo.ie" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "1.2.0.165" |             VALUE "FileVersion", "1.2.0.166" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011 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.2.0.165" |             VALUE "ProductVersion", "1.2.0.166" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue