1
1
Fork 0
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:
Pete Batard 2011-11-29 22:53:00 +00:00
parent d3d07e97bd
commit 2d8a674b88
5 changed files with 24 additions and 14 deletions

View file

@ -39,14 +39,10 @@ mv cmd.sed~ cmd.sed
# Run sed to update the nano version
# NB: we need to run git add else the modified files may be ignored
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
rm ./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~
#mv _bm.sh~ _bm.sh

View file

@ -7,6 +7,7 @@
#define IDD_ABOUTBOX 103
#define IDD_NOTIFICATION 104
#define IDD_LICENSE 105
#define IDS_VERSION 106
#define IDC_DEVICE 1001
#define IDC_FILESYSTEM 1002
#define IDC_START 1003
@ -34,7 +35,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#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_CONTROL_VALUE 1043
#define _APS_NEXT_SYMED_VALUE 101

View file

@ -954,6 +954,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
int nDeviceIndex;
DWORD DeviceNum;
char str[MAX_PATH], tmp[128];
static char app_version[32];
static uintptr_t format_thid = -1L;
static HWND hProgress;
static LONG ProgressStyle = 0;
@ -983,7 +984,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
// Create the status line
CreateStatusBar();
// 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
ProgressStyle = GetWindowLong(hProgress, GWL_STYLE);
// 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));
pDI->rcItem.top += (int)(2.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;
}
break;

View file

@ -22,7 +22,6 @@
#define RUFUS_DEBUG
#define APP_VERSION "Rufus v1.0.0.47"
#define STR_NO_LABEL "NO_LABEL"
#define RUFUS_CANCELBOX_TITLE "Rufus - Cancellation"
#define DRIVE_INDEX_MIN 0x80

View file

@ -63,7 +63,7 @@ BEGIN
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,
"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
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
@ -162,8 +162,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,47
PRODUCTVERSION 1,0,0,47
FILEVERSION 1,0,0,48
PRODUCTVERSION 1,0,0,48
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -180,13 +180,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.0.0.47"
VALUE "FileVersion", "1.0.0.48"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.0.0.47"
VALUE "ProductVersion", "1.0.0.48"
END
END
BLOCK "VarFileInfo"
@ -204,6 +204,17 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON ICON "rufus.ico"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_VERSION "Rufus v1.0.0.48"
END
#endif // English resources
/////////////////////////////////////////////////////////////////////////////
@ -223,3 +234,4 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "common_controls_and_elevation.ma
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED