mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[misc] handle all versioning in rufus.rc
This commit is contained in:
		
							parent
							
								
									d3d07e97bd
								
							
						
					
					
						commit
						2d8a674b88
					
				
					 5 changed files with 24 additions and 14 deletions
				
			
		|  | @ -39,14 +39,10 @@ mv cmd.sed~ cmd.sed | ||||||
| # Run sed to update the nano version | # Run sed to update the nano version | ||||||
| # NB: we need to run git add else the modified files may be ignored | # NB: we need to run git add else the modified files may be ignored | ||||||
| sed -f cmd.sed ./rufus.rc > ./rufus.rc~ | sed -f cmd.sed ./rufus.rc > ./rufus.rc~ | ||||||
| # MinGW's sed has the bad habit of eating CRLFs | # MinGW's sed has the bad habit of eating CRLFs - make sure we keep 'em | ||||||
| sed 's/$/\r/' ./rufus.rc~ > ./rufus.rc | sed 's/$/\r/' ./rufus.rc~ > ./rufus.rc | ||||||
| rm ./rufus.rc~ | rm ./rufus.rc~ | ||||||
| git add ./rufus.rc | git add ./rufus.rc | ||||||
| sed -f cmd.sed ./rufus.h > ./rufus.h~ |  | ||||||
| sed 's/$/\r/' ./rufus.h~ > ./rufus.h |  | ||||||
| rm ./rufus.h~ |  | ||||||
| git add ./rufus.h |  | ||||||
| #sed -f cmd.sed _bm.sh > _bm.sh~ | #sed -f cmd.sed _bm.sh > _bm.sh~ | ||||||
| #mv _bm.sh~ _bm.sh | #mv _bm.sh~ _bm.sh | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ | ||||||
| #define IDD_ABOUTBOX                    103 | #define IDD_ABOUTBOX                    103 | ||||||
| #define IDD_NOTIFICATION                104 | #define IDD_NOTIFICATION                104 | ||||||
| #define IDD_LICENSE                     105 | #define IDD_LICENSE                     105 | ||||||
|  | #define IDS_VERSION                     106 | ||||||
| #define IDC_DEVICE                      1001 | #define IDC_DEVICE                      1001 | ||||||
| #define IDC_FILESYSTEM                  1002 | #define IDC_FILESYSTEM                  1002 | ||||||
| #define IDC_START                       1003 | #define IDC_START                       1003 | ||||||
|  | @ -34,7 +35,7 @@ | ||||||
| #ifdef APSTUDIO_INVOKED | #ifdef APSTUDIO_INVOKED | ||||||
| #ifndef APSTUDIO_READONLY_SYMBOLS | #ifndef APSTUDIO_READONLY_SYMBOLS | ||||||
| #define _APS_NO_MFC                     1 | #define _APS_NO_MFC                     1 | ||||||
| #define _APS_NEXT_RESOURCE_VALUE        106 | #define _APS_NEXT_RESOURCE_VALUE        107 | ||||||
| #define _APS_NEXT_COMMAND_VALUE         40001 | #define _APS_NEXT_COMMAND_VALUE         40001 | ||||||
| #define _APS_NEXT_CONTROL_VALUE         1043 | #define _APS_NEXT_CONTROL_VALUE         1043 | ||||||
| #define _APS_NEXT_SYMED_VALUE           101 | #define _APS_NEXT_SYMED_VALUE           101 | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								rufus.c
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								rufus.c
									
										
									
									
									
								
							|  | @ -954,6 +954,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA | ||||||
| 	int nDeviceIndex; | 	int nDeviceIndex; | ||||||
| 	DWORD DeviceNum; | 	DWORD DeviceNum; | ||||||
| 	char str[MAX_PATH], tmp[128]; | 	char str[MAX_PATH], tmp[128]; | ||||||
|  | 	static char app_version[32]; | ||||||
| 	static uintptr_t format_thid = -1L; | 	static uintptr_t format_thid = -1L; | ||||||
| 	static HWND hProgress; | 	static HWND hProgress; | ||||||
| 	static LONG ProgressStyle = 0; | 	static LONG ProgressStyle = 0; | ||||||
|  | @ -983,7 +984,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA | ||||||
| 		// Create the status line
 | 		// Create the status line
 | ||||||
| 		CreateStatusBar(); | 		CreateStatusBar(); | ||||||
| 		// Display the version in the right area of the status bar
 | 		// Display the version in the right area of the status bar
 | ||||||
| 		SendMessageA(GetDlgItem(hDlg, IDC_STATUS), SB_SETTEXTA, SBT_OWNERDRAW | 1, (LPARAM)APP_VERSION); | 		LoadStringA(hMainInstance, IDS_VERSION, app_version, sizeof(app_version)); | ||||||
|  | 		SendMessageA(GetDlgItem(hDlg, IDC_STATUS), SB_SETTEXTA, SBT_OWNERDRAW | 1, (LPARAM)app_version); | ||||||
| 		// We'll switch the progressbar to marquee and back => keep a copy of current style
 | 		// We'll switch the progressbar to marquee and back => keep a copy of current style
 | ||||||
| 		ProgressStyle = GetWindowLong(hProgress, GWL_STYLE); | 		ProgressStyle = GetWindowLong(hProgress, GWL_STYLE); | ||||||
| 		// Create the string array
 | 		// Create the string array
 | ||||||
|  | @ -1002,7 +1004,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA | ||||||
| 			SetTextColor(pDI->hDC, GetSysColor(COLOR_3DSHADOW)); | 			SetTextColor(pDI->hDC, GetSysColor(COLOR_3DSHADOW)); | ||||||
| 			pDI->rcItem.top += (int)(2.0f * fScale); | 			pDI->rcItem.top += (int)(2.0f * fScale); | ||||||
| 			pDI->rcItem.left += (int)(4.0f * fScale); | 			pDI->rcItem.left += (int)(4.0f * fScale); | ||||||
| 			DrawTextExA(pDI->hDC, APP_VERSION, -1, &pDI->rcItem, DT_LEFT, NULL); | 			DrawTextExA(pDI->hDC, app_version, -1, &pDI->rcItem, DT_LEFT, NULL); | ||||||
| 			return (INT_PTR)TRUE; | 			return (INT_PTR)TRUE; | ||||||
| 		} | 		} | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								rufus.h
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								rufus.h
									
										
									
									
									
								
							|  | @ -22,7 +22,6 @@ | ||||||
| 
 | 
 | ||||||
| #define RUFUS_DEBUG | #define RUFUS_DEBUG | ||||||
| 
 | 
 | ||||||
| #define APP_VERSION                 "Rufus v1.0.0.47" |  | ||||||
| #define STR_NO_LABEL                "NO_LABEL" | #define STR_NO_LABEL                "NO_LABEL" | ||||||
| #define RUFUS_CANCELBOX_TITLE       "Rufus - Cancellation" | #define RUFUS_CANCELBOX_TITLE       "Rufus - Cancellation" | ||||||
| #define DRIVE_INDEX_MIN             0x80 | #define DRIVE_INDEX_MIN             0x80 | ||||||
|  |  | ||||||
							
								
								
									
										22
									
								
								rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								rufus.rc
									
										
									
									
									
								
							|  | @ -63,7 +63,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.0 (Build 47)",IDC_STATIC,46,19,78,8 |     LTEXT           "Version 1.0.0 (Build 48)",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 | ||||||
|  | @ -162,8 +162,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 1,0,0,47 |  FILEVERSION 1,0,0,48 | ||||||
|  PRODUCTVERSION 1,0,0,47 |  PRODUCTVERSION 1,0,0,48 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -180,13 +180,13 @@ BEGIN | ||||||
|         BEGIN |         BEGIN | ||||||
|             VALUE "CompanyName", "akeo.ie" |             VALUE "CompanyName", "akeo.ie" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "1.0.0.47" |             VALUE "FileVersion", "1.0.0.48" | ||||||
|             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.0.47" |             VALUE "ProductVersion", "1.0.0.48" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  | @ -204,6 +204,17 @@ END | ||||||
| // Icon with lowest ID value placed first to ensure application icon | // Icon with lowest ID value placed first to ensure application icon | ||||||
| // remains consistent on all systems. | // remains consistent on all systems. | ||||||
| IDI_ICON                ICON                    "rufus.ico" | IDI_ICON                ICON                    "rufus.ico" | ||||||
|  | 
 | ||||||
|  | ///////////////////////////////////////////////////////////////////////////// | ||||||
|  | // | ||||||
|  | // String Table | ||||||
|  | // | ||||||
|  | 
 | ||||||
|  | STRINGTABLE | ||||||
|  | BEGIN | ||||||
|  |     IDS_VERSION             "Rufus v1.0.0.48" | ||||||
|  | END | ||||||
|  | 
 | ||||||
| #endif    // English resources | #endif    // English resources | ||||||
| ///////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////// | ||||||
| 
 | 
 | ||||||
|  | @ -223,3 +234,4 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "common_controls_and_elevation.ma | ||||||
| 
 | 
 | ||||||
| ///////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////// | ||||||
| #endif    // not APSTUDIO_INVOKED | #endif    // not APSTUDIO_INVOKED | ||||||
|  | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue