mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-01 15:28:25 -04:00
[loc] add an option to force update
* This is meant to be used by translators for testing the UI * Also fix the positioning and centering of boilerplate on the new version dialog * French translation improvements
This commit is contained in:
parent
08799953bf
commit
310ed2fb53
7 changed files with 42 additions and 30 deletions
|
@ -357,6 +357,7 @@ const loc_control_id control_id[] = {
|
|||
LOC_CTRL(MSG_256),
|
||||
LOC_CTRL(MSG_257),
|
||||
LOC_CTRL(MSG_258),
|
||||
LOC_CTRL(MSG_259),
|
||||
LOC_CTRL(IDOK),
|
||||
LOC_CTRL(IDCANCEL),
|
||||
LOC_CTRL(IDABORT),
|
||||
|
|
|
@ -41,8 +41,7 @@
|
|||
/* Default delay between update checks (1 day) */
|
||||
#define DEFAULT_UPDATE_INTERVAL (24*3600)
|
||||
|
||||
|
||||
/* Globals */
|
||||
extern BOOL force_update;
|
||||
static DWORD error_code;
|
||||
static BOOL update_check_in_progress = FALSE;
|
||||
static BOOL force_update_check = FALSE;
|
||||
|
@ -589,7 +588,7 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
|||
vuprintf(" platform_min: %d.%d\n", update.platform_min[0], update.platform_min[1]);
|
||||
vuprintf(" url: %s\n", update.download_url);
|
||||
|
||||
found_new_version = (to_uint64_t(update.version) > to_uint64_t(rufus_version))
|
||||
found_new_version = ((to_uint64_t(update.version) > to_uint64_t(rufus_version)) || (force_update))
|
||||
&& ( (os_version.dwMajorVersion > update.platform_min[0])
|
||||
|| ( (os_version.dwMajorVersion == update.platform_min[0]) && (os_version.dwMinorVersion >= update.platform_min[1])) );
|
||||
uprintf("N%sew %s version found%c\n", found_new_version?"":"o n", channel[k], found_new_version?'!':'.');
|
||||
|
|
|
@ -368,6 +368,7 @@
|
|||
#define MSG_256 3256
|
||||
#define MSG_257 3257
|
||||
#define MSG_258 3258
|
||||
#define MSG_259 3259
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
|
10
src/rufus.c
10
src/rufus.c
|
@ -113,7 +113,7 @@ HWND hDeviceList, hPartitionScheme, hFileSystem, hClusterSize, hLabel, hBootType
|
|||
HWND hISOProgressDlg = NULL, hLogDlg = NULL, hISOProgressBar, hISOFileName, hDiskID;
|
||||
BOOL use_own_c32[NB_OLD_C32] = {FALSE, FALSE}, detect_fakes = TRUE, mbr_selected_by_user = FALSE;
|
||||
BOOL iso_op_in_progress = FALSE, format_op_in_progress = FALSE;
|
||||
BOOL enable_fixed_disks = FALSE, advanced_mode = TRUE;
|
||||
BOOL enable_fixed_disks = FALSE, advanced_mode = TRUE, force_update = FALSE;
|
||||
int dialog_showing = 0;
|
||||
uint16_t rufus_version[4];
|
||||
RUFUS_UPDATE update = { {0,0,0,0}, {0,0}, NULL, NULL};
|
||||
|
@ -2099,6 +2099,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
DeleteRegistryKey(REGKEY_HKCU, COMPANY_NAME);
|
||||
continue;
|
||||
}
|
||||
// Alt U => Force the update check to be successful
|
||||
// This will set the reported current version of Rufus to 0.0.0.0 when performing an update
|
||||
// check, so that it always succeeds. This is useful for translators.
|
||||
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'U')) {
|
||||
force_update = !force_update;
|
||||
PrintStatus2000(lmprintf(MSG_259), force_update);
|
||||
continue;
|
||||
}
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
|
20
src/rufus.rc
20
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.4.0.291"
|
||||
CAPTION "Rufus v1.4.0.292"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||
|
@ -146,7 +146,7 @@ BEGIN
|
|||
END
|
||||
|
||||
IDD_NEW_VERSION DIALOGEX 0, 0, 384, 268
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Check For Updates - Rufus"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x0
|
||||
BEGIN
|
||||
|
@ -155,10 +155,10 @@ BEGIN
|
|||
DEFPUSHBUTTON "Download",IDC_DOWNLOAD,293,211,74,14,WS_GROUP
|
||||
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,15,212,270,11
|
||||
GROUPBOX "Release Notes",IDS_NEW_VERSION_NOTES_GRP,8,63,367,111
|
||||
LTEXT "A newer version is available. Please download the latest version!",IDS_NEW_VERSION_AVAIL_TXT,10,32,229,8
|
||||
LTEXT "[...]",IDC_YOUR_VERSION,10,8,124,8
|
||||
LTEXT "[...]",IDC_LATEST_VERSION,10,19,129,8
|
||||
LTEXT " Click here to go to the website",IDC_WEBSITE,138,49,108,9,SS_NOTIFY
|
||||
LTEXT "A newer version is available. Please download the latest version!",IDS_NEW_VERSION_AVAIL_TXT,10,32,366,8
|
||||
LTEXT "[...]",IDC_YOUR_VERSION,10,8,366,8
|
||||
LTEXT "[...]",IDC_LATEST_VERSION,10,19,366,8
|
||||
CTEXT "Click here to go to the website",IDC_WEBSITE,10,49,366,9,SS_NOTIFY
|
||||
GROUPBOX "Download",IDS_NEW_VERSION_DOWNLOAD_GRP,8,177,367,58
|
||||
EDITTEXT IDC_DOWNLOAD_URL,15,191,351,13,ES_AUTOHSCROLL | ES_READONLY
|
||||
END
|
||||
|
@ -284,8 +284,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,0,291
|
||||
PRODUCTVERSION 1,4,0,291
|
||||
FILEVERSION 1,4,0,292
|
||||
PRODUCTVERSION 1,4,0,292
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -302,13 +302,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.4.0.291"
|
||||
VALUE "FileVersion", "1.4.0.292"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.4.0.291"
|
||||
VALUE "ProductVersion", "1.4.0.292"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue