1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[net] disable BETA version check for anything but x86_32

This commit is contained in:
Pete Batard 2019-02-05 17:49:27 +00:00
parent 5247ffa6ab
commit 078aaf7714
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
4 changed files with 15 additions and 11 deletions

View file

@ -46,7 +46,7 @@
DWORD DownloadStatus; DWORD DownloadStatus;
extern BOOL force_update; extern BOOL force_update, is_x86_32;
static DWORD error_code; static DWORD error_code;
static BOOL update_check_in_progress = FALSE; static BOOL update_check_in_progress = FALSE;
static BOOL force_update_check = FALSE; static BOOL force_update_check = FALSE;
@ -526,7 +526,7 @@ static __inline uint64_t to_uint64_t(uint16_t x[4]) {
*/ */
static DWORD WINAPI CheckForUpdatesThread(LPVOID param) static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
{ {
BOOL releases_only, found_new_version = FALSE; BOOL releases_only = TRUE, found_new_version = FALSE;
int status = 0; int status = 0;
const char* server_url = RUFUS_URL "/"; const char* server_url = RUFUS_URL "/";
int i, j, k, max_channel, verbose = 0, verpos[4]; int i, j, k, max_channel, verbose = 0, verpos[4];
@ -623,7 +623,9 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
goto out; goto out;
status++; // 2 status++; // 2
releases_only = !ReadSettingBool(SETTING_INCLUDE_BETAS); // BETAs are only made available for x86_32
if (is_x86_32)
releases_only = !ReadSettingBool(SETTING_INCLUDE_BETAS);
// Test releases get their own distribution channel (and also force beta checks) // Test releases get their own distribution channel (and also force beta checks)
#if defined(TEST) #if defined(TEST)

View file

@ -98,7 +98,7 @@ WORD selected_langid = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
DWORD MainThreadId; DWORD MainThreadId;
HWND hDeviceList, hPartitionScheme, hTargetSystem, hFileSystem, hClusterSize, hLabel, hBootType, hNBPasses, hLog = NULL; HWND hDeviceList, hPartitionScheme, hTargetSystem, hFileSystem, hClusterSize, hLabel, hBootType, hNBPasses, hLog = NULL;
HWND hLogDialog = NULL, hProgress = NULL, hDiskID; HWND hLogDialog = NULL, hProgress = NULL, hDiskID;
BOOL use_own_c32[NB_OLD_C32] = { FALSE, FALSE }, mbr_selected_by_user = FALSE; BOOL is_x86_32, use_own_c32[NB_OLD_C32] = { FALSE, FALSE }, mbr_selected_by_user = FALSE;
BOOL iso_op_in_progress = FALSE, format_op_in_progress = FALSE, right_to_left_mode = FALSE, has_uefi_csm; BOOL iso_op_in_progress = FALSE, format_op_in_progress = FALSE, right_to_left_mode = FALSE, has_uefi_csm;
BOOL enable_HDDs = FALSE, force_update = FALSE, enable_ntfs_compression = FALSE, no_confirmation_on_cancel = FALSE, lock_drive = TRUE; BOOL enable_HDDs = FALSE, force_update = FALSE, enable_ntfs_compression = FALSE, no_confirmation_on_cancel = FALSE, lock_drive = TRUE;
BOOL advanced_mode_device, advanced_mode_format, allow_dual_uefi_bios, detect_fakes, enable_vmdk, force_large_fat32, usb_debug; BOOL advanced_mode_device, advanced_mode_format, allow_dual_uefi_bios, detect_fakes, enable_vmdk, force_large_fat32, usb_debug;
@ -2800,6 +2800,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
pfSetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32); pfSetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32);
uprintf("*** " APPLICATION_NAME " init ***\n"); uprintf("*** " APPLICATION_NAME " init ***\n");
is_x86_32 = (strcmp(APPLICATION_ARCH, "x86") == 0);
// We have to process the arguments before we acquire the lock and process the locale // We have to process the arguments before we acquire the lock and process the locale
PF_INIT(__wgetmainargs, Msvcrt); PF_INIT(__wgetmainargs, Msvcrt);

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326 IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.5.1444" CAPTION "Rufus 3.5.1445"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0 FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -394,8 +394,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,5,1444,0 FILEVERSION 3,5,1445,0
PRODUCTVERSION 3,5,1444,0 PRODUCTVERSION 3,5,1445,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -413,13 +413,13 @@ BEGIN
VALUE "Comments", "https://akeo.ie" VALUE "Comments", "https://akeo.ie"
VALUE "CompanyName", "Akeo Consulting" VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.5.1444" VALUE "FileVersion", "3.5.1445"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus-3.5.exe" VALUE "OriginalFilename", "rufus-3.5.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.5.1444" VALUE "ProductVersion", "3.5.1445"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -45,6 +45,7 @@
#include "license.h" #include "license.h"
/* Globals */ /* Globals */
extern BOOL is_x86_32;
static HICON hMessageIcon = (HICON)INVALID_HANDLE_VALUE; static HICON hMessageIcon = (HICON)INVALID_HANDLE_VALUE;
static char* szMessageText = NULL; static char* szMessageText = NULL;
static char* szMessageTitle = NULL; static char* szMessageTitle = NULL;
@ -1419,7 +1420,7 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
IGNORE_RETVAL(ComboBox_SetItemData(hFrequency, ComboBox_AddStringU(hFrequency, lmprintf(MSG_016)), 2629800)); IGNORE_RETVAL(ComboBox_SetItemData(hFrequency, ComboBox_AddStringU(hFrequency, lmprintf(MSG_016)), 2629800));
freq = ReadSetting32(SETTING_UPDATE_INTERVAL); freq = ReadSetting32(SETTING_UPDATE_INTERVAL);
EnableWindow(GetDlgItem(hDlg, IDC_CHECK_NOW), (freq != 0)); EnableWindow(GetDlgItem(hDlg, IDC_CHECK_NOW), (freq != 0));
EnableWindow(hBeta, (freq >= 0)); EnableWindow(hBeta, (freq >= 0) && is_x86_32);
switch(freq) { switch(freq) {
case -1: case -1:
IGNORE_RETVAL(ComboBox_SetCurSel(hFrequency, 0)); IGNORE_RETVAL(ComboBox_SetCurSel(hFrequency, 0));
@ -1441,7 +1442,7 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
} }
IGNORE_RETVAL(ComboBox_AddStringU(hBeta, lmprintf(MSG_008))); IGNORE_RETVAL(ComboBox_AddStringU(hBeta, lmprintf(MSG_008)));
IGNORE_RETVAL(ComboBox_AddStringU(hBeta, lmprintf(MSG_009))); IGNORE_RETVAL(ComboBox_AddStringU(hBeta, lmprintf(MSG_009)));
IGNORE_RETVAL(ComboBox_SetCurSel(hBeta, ReadSettingBool(SETTING_INCLUDE_BETAS)?0:1)); IGNORE_RETVAL(ComboBox_SetCurSel(hBeta, (ReadSettingBool(SETTING_INCLUDE_BETAS) && is_x86_32) ? 0 : 1));
hPolicy = GetDlgItem(hDlg, IDC_POLICY); hPolicy = GetDlgItem(hDlg, IDC_POLICY);
SendMessage(hPolicy, EM_AUTOURLDETECT, 1, 0); SendMessage(hPolicy, EM_AUTOURLDETECT, 1, 0);
static_sprintf(update_policy_text, update_policy, lmprintf(MSG_179|MSG_RTF), static_sprintf(update_policy_text, update_policy, lmprintf(MSG_179|MSG_RTF),