mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-02 07:39:54 -04:00
[misc] miscellaneous cleanup
* move Spanish translation to its expected location * set gitattributes for the loc file * update license, factorize is_x64(), remove unwanted messages
This commit is contained in:
parent
5deaddaab7
commit
f97f60d55a
9 changed files with 436 additions and 431 deletions
|
@ -75,7 +75,7 @@ const char* additional_copyrights =
|
|||
"http://svn.reactos.org/svn/reactos/trunk/reactos\\line\n"
|
||||
"GNU General Public License (GPL) v3 compatible\\line\n"
|
||||
"\\line\n"
|
||||
"Some generic function calls from smartmontools:\\line\n"
|
||||
"USB vs HDD and additional functions calls derived from smartmontools:\\line\n"
|
||||
"https://sourceforge.net/projects/smartmontools\\line\n"
|
||||
"GNU General Public License (GPL) v2 or later\\line\n"
|
||||
"\\line\n"
|
||||
|
|
15
src/net.c
15
src/net.c
|
@ -421,7 +421,6 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
|||
SYSTEMTIME ServerTime, LocalTime;
|
||||
FILETIME FileTime;
|
||||
int64_t local_time = 0, reg_time, server_time, update_interval;
|
||||
BOOL is_x64 = FALSE, (__stdcall *pIsWow64Process)(HANDLE, PBOOL) = NULL;
|
||||
|
||||
update_check_in_progress = TRUE;
|
||||
verbose = ReadRegistryKey32(REGKEY_HKCU, REGKEY_VERBOSE_UPDATES);
|
||||
|
@ -465,18 +464,6 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
|||
goto out;
|
||||
}
|
||||
|
||||
// Detect if the OS is 64 bit, without relying on external libs
|
||||
if (sizeof(uintptr_t) < 8) {
|
||||
// This application is not 64 bit, but it might be 32 bit running in WOW64
|
||||
pIsWow64Process = (BOOL (__stdcall *)(HANDLE, PBOOL))
|
||||
GetProcAddress(GetModuleHandleA("KERNEL32"), "IsWow64Process");
|
||||
if (pIsWow64Process != NULL) {
|
||||
(*pIsWow64Process)(GetCurrentProcess(), &is_x64);
|
||||
}
|
||||
} else {
|
||||
is_x64 = TRUE;
|
||||
}
|
||||
|
||||
if ((!InternetCrackUrlA(server_url, (DWORD)safe_strlen(server_url), 0, &UrlParts)) || (!InternetGetConnectedState(&dwFlags, 0)))
|
||||
goto out;
|
||||
hostname[sizeof(hostname)-1] = 0;
|
||||
|
@ -500,7 +487,7 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
|||
// look for rufus_win_x64_6.2.ver (Win8 x64) but only get a match for rufus_win_x64_6.ver (Vista x64 or later)
|
||||
// This allows sunsetting OS versions (eg XP) or providing different downloads for different archs/groups.
|
||||
safe_sprintf(urlpath, sizeof(urlpath), "%s%s%s_%s_%d.%d.ver", APPLICATION_NAME, (k==0)?"":"_",
|
||||
(k==0)?"":channel[k], archname[is_x64?1:0], os_version.dwMajorVersion, os_version.dwMinorVersion);
|
||||
(k==0)?"":channel[k], archname[is_x64()?1:0], os_version.dwMajorVersion, os_version.dwMinorVersion);
|
||||
vuprintf("Base update check: %s\n", urlpath);
|
||||
for (i=0, j=(int)safe_strlen(urlpath)-5; (j>0)&&(i<ARRAYSIZE(verpos)); j--) {
|
||||
if ((urlpath[j] == '.') || (urlpath[j] == '_')) {
|
||||
|
|
|
@ -1579,8 +1579,6 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
case WM_COMMAND:
|
||||
if ((LOWORD(wParam) >= UM_LANGUAGE_MENU) && (LOWORD(wParam) < UM_LANGUAGE_MENU_MAX)) {
|
||||
selected_language = LOWORD(wParam) - UM_LANGUAGE_MENU;
|
||||
uprintf("Got language %d\n", selected_language);
|
||||
|
||||
i = 0;
|
||||
list_for_each_entry(lcmd, &locale_list, loc_cmd, list) {
|
||||
if (i++ == selected_language) {
|
||||
|
|
|
@ -288,6 +288,7 @@ extern int dialog_showing;
|
|||
* Shared prototypes
|
||||
*/
|
||||
extern void GetWindowsVersion(void);
|
||||
extern BOOL is_x64(void);
|
||||
extern const char* PrintWindowsVersion(enum WindowsVersion version);
|
||||
extern const char *WindowsErrorString(void);
|
||||
extern void DumpBufferHex(void *buf, size_t size);
|
||||
|
|
10
src/rufus.rc
10
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.326"
|
||||
CAPTION "Rufus v1.4.0.327"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||
|
@ -288,8 +288,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,0,326
|
||||
PRODUCTVERSION 1,4,0,326
|
||||
FILEVERSION 1,4,0,327
|
||||
PRODUCTVERSION 1,4,0,327
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -306,13 +306,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.4.0.326"
|
||||
VALUE "FileVersion", "1.4.0.327"
|
||||
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.326"
|
||||
VALUE "ProductVersion", "1.4.0.327"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
int nWindowsVersion = WINDOWS_UNDEFINED;
|
||||
char WindowsVersionStr[128] = "Windows ";
|
||||
|
||||
static BOOL is_x64(void)
|
||||
BOOL is_x64(void)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
BOOL (__stdcall *pIsWow64Process)(HANDLE, PBOOL) = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue