mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[bb] added status report on status bar
* also changed title to add "(Beta)"
This commit is contained in:
		
							parent
							
								
									192c3d6cc8
								
							
						
					
					
						commit
						f93a85ab83
					
				
					 4 changed files with 23 additions and 14 deletions
				
			
		|  | @ -29,7 +29,8 @@ s/^[ \t]*FILEVERSION[ \t]*\(.*\),\(.*\),\(.*\),.*/ FILEVERSION \1,\2,\3,@@TAGVER | ||||||
| s/^[ \t]*PRODUCTVERSION[ \t]*\(.*\),\(.*\),\(.*\),.*/ PRODUCTVERSION \1,\2,\3,@@TAGVER@@/ | s/^[ \t]*PRODUCTVERSION[ \t]*\(.*\),\(.*\),\(.*\),.*/ PRODUCTVERSION \1,\2,\3,@@TAGVER@@/ | ||||||
| s/^\([ \t]*\)VALUE[ \t]*"FileVersion",[ \t]*"\(.*\)\..*"/\1VALUE "FileVersion", "\2.@@TAGVER@@"/ | s/^\([ \t]*\)VALUE[ \t]*"FileVersion",[ \t]*"\(.*\)\..*"/\1VALUE "FileVersion", "\2.@@TAGVER@@"/ | ||||||
| s/^\([ \t]*\)VALUE[ \t]*"ProductVersion",[ \t]*"\(.*\)\..*"/\1VALUE "ProductVersion", "\2.@@TAGVER@@"/ | s/^\([ \t]*\)VALUE[ \t]*"ProductVersion",[ \t]*"\(.*\)\..*"/\1VALUE "ProductVersion", "\2.@@TAGVER@@"/ | ||||||
| s/^\(.*\)"Rufus v\(.*\)\.\(.*\)"\(.*\)/\1"Rufus v\2.@@TAGVER@@"\4/ | # TODO: revert ' ' to '"' below when out of beta | ||||||
|  | s/^\(.*\)"Rufus v\(.*\)\.\(.*\) \(.*\)/\1"Rufus v\2.@@TAGVER@@ \4/ | ||||||
| s/^\(.*\)"Version \(.*\) (Build \(.*\))"\(.*\)/\1"Version \2 (Build @@TAGVER@@)"\4/ | s/^\(.*\)"Version \(.*\) (Build \(.*\))"\(.*\)/\1"Version \2 (Build @@TAGVER@@)"\4/ | ||||||
| _EOF | _EOF | ||||||
| 
 | 
 | ||||||
|  | @ -44,7 +45,5 @@ sed -f cmd.sed src/rufus.rc > src/rufus.rc~ | ||||||
| sed 's/$/\r/' src/rufus.rc~ > src/rufus.rc | sed 's/$/\r/' src/rufus.rc~ > src/rufus.rc | ||||||
| rm src/rufus.rc~ | rm src/rufus.rc~ | ||||||
| git add src/rufus.rc | git add src/rufus.rc | ||||||
| #sed -f cmd.sed _bm.sh > _bm.sh~ |  | ||||||
| #mv _bm.sh~ _bm.sh |  | ||||||
| 
 | 
 | ||||||
| rm cmd.sed | rm cmd.sed | ||||||
|  |  | ||||||
|  | @ -277,6 +277,8 @@ static int s_flag = 1;					/* show progress of test */ | ||||||
| static int t_flag = 0;					/* number of test patterns */ | static int t_flag = 0;					/* number of test patterns */ | ||||||
| static unsigned int *t_patts = NULL;	/* test patterns */ | static unsigned int *t_patts = NULL;	/* test patterns */ | ||||||
| static int cancel_ops = 0;				/* abort current operation */ | static int cancel_ops = 0;				/* abort current operation */ | ||||||
|  | static int cur_pattern, nr_pattern; | ||||||
|  | static int cur_op; | ||||||
| /* Abort test if more than this number of bad blocks has been encountered */ | /* Abort test if more than this number of bad blocks has been encountered */ | ||||||
| static unsigned int max_bb = EXT2_BAD_BLOCKS_THRESHOLD; | static unsigned int max_bb = EXT2_BAD_BLOCKS_THRESHOLD; | ||||||
| static DWORD time_start; | static DWORD time_start; | ||||||
|  | @ -361,8 +363,11 @@ static void print_status(void) | ||||||
| 	time_end = GetTickCount(); | 	time_end = GetTickCount(); | ||||||
| 	percent = calc_percent((unsigned long) currently_testing, | 	percent = calc_percent((unsigned long) currently_testing, | ||||||
| 					(unsigned long) num_blocks); | 					(unsigned long) num_blocks); | ||||||
| 	uprintf("%6.2f%% done, %4.0fs elapsed. " | 	PrintStatus("%d/%d(%c): %6.2f%% done, %.0fs elapsed. " | ||||||
| 					"(%d/%d/%d errors)", | 					"(%d/%d/%d errors)", | ||||||
|  | 				2*cur_pattern - ((cur_op==OP_WRITE)?1:0), | ||||||
|  | 				2*nr_pattern, | ||||||
|  | 				(cur_op==OP_READ)?'R':'W', | ||||||
| 				percent,  | 				percent,  | ||||||
| 				(time_end - time_start)/1000.0, | 				(time_end - time_start)/1000.0, | ||||||
| 				num_read_errors, | 				num_read_errors, | ||||||
|  | @ -411,6 +416,7 @@ static void pattern_fill(unsigned char *buffer, unsigned int pattern, | ||||||
| 				i--; | 				i--; | ||||||
| 		} | 		} | ||||||
| 		PrintStatus("Testing with pattern 0x%02X", bpattern[i]); | 		PrintStatus("Testing with pattern 0x%02X", bpattern[i]); | ||||||
|  | 		cur_pattern++; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -564,9 +570,9 @@ static unsigned int test_ro (HANDLE hDrive, blk_t last_block, | ||||||
| static unsigned int test_rw(HANDLE hDrive, blk_t last_block, int block_size, blk_t first_block, unsigned int blocks_at_once) | static unsigned int test_rw(HANDLE hDrive, blk_t last_block, int block_size, blk_t first_block, unsigned int blocks_at_once) | ||||||
| { | { | ||||||
| 	unsigned char *buffer = NULL, *read_buffer; | 	unsigned char *buffer = NULL, *read_buffer; | ||||||
| 	const unsigned int patterns[] = {0xaa}; // {0xaa, 0x55, 0xff, 0x00};
 | 	const unsigned int patterns[] = {0xaa, 0x55, 0xff, 0x00}; | ||||||
| 	const unsigned int *pattern; | 	const unsigned int *pattern; | ||||||
| 	int i, tryout, got, nr_pattern, pat_idx; | 	int i, tryout, got, pat_idx; | ||||||
| 	unsigned int bb_count = 0; | 	unsigned int bb_count = 0; | ||||||
| 	blk_t recover_block = ~0; | 	blk_t recover_block = ~0; | ||||||
| 
 | 
 | ||||||
|  | @ -588,6 +594,7 @@ static unsigned int test_rw(HANDLE hDrive, blk_t last_block, int block_size, blk | ||||||
| 		pattern = patterns; | 		pattern = patterns; | ||||||
| 		nr_pattern = ARRAYSIZE(patterns); | 		nr_pattern = ARRAYSIZE(patterns); | ||||||
| 	} | 	} | ||||||
|  | 	cur_pattern = 0; | ||||||
| 
 | 
 | ||||||
| 	for (pat_idx = 0; pat_idx < nr_pattern; pat_idx++) { | 	for (pat_idx = 0; pat_idx < nr_pattern; pat_idx++) { | ||||||
| 		if (cancel_ops) goto out; | 		if (cancel_ops) goto out; | ||||||
|  | @ -596,6 +603,7 @@ static unsigned int test_rw(HANDLE hDrive, blk_t last_block, int block_size, blk | ||||||
| 		currently_testing = first_block; | 		currently_testing = first_block; | ||||||
| 		if (s_flag | v_flag) | 		if (s_flag | v_flag) | ||||||
| 			uprintf("Writing\n"); | 			uprintf("Writing\n"); | ||||||
|  | 		cur_op = OP_WRITE; | ||||||
| 		tryout = blocks_at_once; | 		tryout = blocks_at_once; | ||||||
| 		while (currently_testing < last_block) { | 		while (currently_testing < last_block) { | ||||||
| 			if (max_bb && bb_count >= max_bb) { | 			if (max_bb && bb_count >= max_bb) { | ||||||
|  | @ -630,6 +638,7 @@ static unsigned int test_rw(HANDLE hDrive, blk_t last_block, int block_size, blk | ||||||
| 		num_blocks = 0; | 		num_blocks = 0; | ||||||
| 		if (s_flag | v_flag) | 		if (s_flag | v_flag) | ||||||
| 			uprintf("Reading and comparing\n"); | 			uprintf("Reading and comparing\n"); | ||||||
|  | 		cur_op = OP_READ; | ||||||
| 		num_blocks = last_block; | 		num_blocks = last_block; | ||||||
| 		currently_testing = first_block; | 		currently_testing = first_block; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -43,12 +43,13 @@ typedef struct ext2_struct_u32_iterate      *ext2_u32_iterate; | ||||||
| #define EXT2_SYS_PAGE_SIZE                  4096 | #define EXT2_SYS_PAGE_SIZE                  4096 | ||||||
| #define EXT2_TIMER_ID                       0x1000 | #define EXT2_TIMER_ID                       0x1000 | ||||||
| 
 | 
 | ||||||
| enum test_type { | enum test_types { | ||||||
| 	BADBLOCKS_RO,		/* Read-only */ | 	BADBLOCKS_RO,		/* Read-only */ | ||||||
| 	BADBLOCKS_RW,		/* DESTRUCTIVE read-write */ | 	BADBLOCKS_RW,		/* DESTRUCTIVE read-write */ | ||||||
| 	BADBLOCKS_ND		/* non-destructive read-write */ | 	BADBLOCKS_ND		/* non-destructive read-write */ | ||||||
| }; | }; | ||||||
| enum error_types { READ_ERROR, WRITE_ERROR, CORRUPTION_ERROR }; | enum error_types { READ_ERROR, WRITE_ERROR, CORRUPTION_ERROR }; | ||||||
|  | enum op_type { OP_READ, OP_WRITE }; | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * Badblocks report |  * Badblocks report | ||||||
|  |  | ||||||
							
								
								
									
										14
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 206, 278 | IDD_DIALOG DIALOGEX 12, 12, 206, 278 | ||||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||||
| EXSTYLE WS_EX_APPWINDOW | EXSTYLE WS_EX_APPWINDOW | ||||||
| CAPTION "Rufus v1.0.2.81" | CAPTION "Rufus v1.0.2.82 (Beta)" | ||||||
| FONT 8, "MS Shell Dlg", 400, 0, 0x1 | FONT 8, "MS Shell Dlg", 400, 0, 0x1 | ||||||
| BEGIN | BEGIN | ||||||
|     DEFPUSHBUTTON   "Start",IDC_START,94,236,50,14 |     DEFPUSHBUTTON   "Start",IDC_START,94,236,50,14 | ||||||
|  | @ -50,7 +50,7 @@ BEGIN | ||||||
|     CONTROL         "Create an &MS-DOS startup disk",IDC_DOS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,115,10 |     CONTROL         "Create an &MS-DOS startup disk",IDC_DOS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,115,10 | ||||||
|     LTEXT           "New volume &label",IDC_STATIC,9,121,105,10 |     LTEXT           "New volume &label",IDC_STATIC,9,121,105,10 | ||||||
|     CONTROL         "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,7,210,189,9 |     CONTROL         "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,7,210,189,9 | ||||||
|     CONTROL         "Check device for bad blocks (*ALPHA*)",IDC_BADBLOCKS, |     CONTROL         "Check device for bad blocks",IDC_BADBLOCKS, | ||||||
|                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,171,10 |                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,171,10 | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
|  | @ -65,7 +65,7 @@ BEGIN | ||||||
|     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP |     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP | ||||||
|     CONTROL         "<a href=""https://github.com/pbatard/rufus/wiki/Rufus"">https://github.com/pbatard/rufus</a>",IDC_ABOUT_RUFUS_URL, |     CONTROL         "<a href=""https://github.com/pbatard/rufus/wiki/Rufus"">https://github.com/pbatard/rufus</a>",IDC_ABOUT_RUFUS_URL, | ||||||
|                     "SysLink",WS_TABSTOP,46,47,114,9 |                     "SysLink",WS_TABSTOP,46,47,114,9 | ||||||
|     LTEXT           "Version 1.0.2 (Build 81)",IDC_STATIC,46,19,78,8 |     LTEXT           "Version 1.0.2 (Build 82)",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 | ||||||
|  | @ -164,8 +164,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 1,0,2,81 |  FILEVERSION 1,0,2,82 | ||||||
|  PRODUCTVERSION 1,0,2,81 |  PRODUCTVERSION 1,0,2,82 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -182,13 +182,13 @@ BEGIN | ||||||
|         BEGIN |         BEGIN | ||||||
|             VALUE "CompanyName", "akeo.ie" |             VALUE "CompanyName", "akeo.ie" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "1.0.2.81" |             VALUE "FileVersion", "1.0.2.82" | ||||||
|             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.0.2.81" |             VALUE "ProductVersion", "1.0.2.82" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue