mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-30 14:35:21 -04:00
parent
61d2efc6b7
commit
1c322aba56
12 changed files with 154 additions and 163 deletions
|
@ -1294,7 +1294,6 @@ BOOL SetupWinToGo(const char* drive_name, BOOL use_ms_efi)
|
|||
wVolumeName[0] = ms_efi[0];
|
||||
|
||||
// Boy do you *NOT* want to specify a label here, and spend HOURS figuring out why your EFI partition cannot boot...
|
||||
// TODO: Can we avoid resetting the progress bar here?
|
||||
pfFormatEx(wVolumeName, SelectedDrive.Geometry.MediaType, L"FAT32", L"", TRUE, cluster_size, FormatExCallback);
|
||||
if (IS_ERROR(FormatStatus)) {
|
||||
uprintf("Failed to format EFI partition");
|
||||
|
@ -1303,7 +1302,6 @@ BOOL SetupWinToGo(const char* drive_name, BOOL use_ms_efi)
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Don't use ALL but adjust to what we effectively support
|
||||
static_sprintf(cmd, "%s\\Windows\\System32\\bcdboot.exe %s\\Windows /f ALL /s %s",
|
||||
drive_name, drive_name, (use_ms_efi)?ms_efi:drive_name);
|
||||
uprintf("Enabling boot: '%s'", cmd);
|
||||
|
|
11
src/net.c
11
src/net.c
|
@ -297,8 +297,8 @@ DWORD DownloadFile(const char* url, const char* file, HWND hProgressDialog)
|
|||
uprintf("Network is unavailable: %s\n", WinInetErrorString());
|
||||
goto out;
|
||||
}
|
||||
_snprintf(agent, ARRAYSIZE(agent), APPLICATION_NAME "/%d.%d.%d.%d (WinNT %d.%d%s)",
|
||||
rufus_version[0], rufus_version[1], rufus_version[2], rufus_version[3],
|
||||
_snprintf(agent, ARRAYSIZE(agent), APPLICATION_NAME "/%d.%d.%d (WinNT %d.%d%s)",
|
||||
rufus_version[0], rufus_version[1], rufus_version[2],
|
||||
nWindowsVersion>>4, nWindowsVersion&0x0F, is_x64()?"; WOW64":"");
|
||||
hSession = InternetOpenA(agent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
|
||||
if (hSession == NULL) {
|
||||
|
@ -412,7 +412,7 @@ HANDLE DownloadFileThreaded(const char* url, const char* file, HWND hProgressDia
|
|||
static __inline uint64_t to_uint64_t(uint16_t x[4]) {
|
||||
int i;
|
||||
uint64_t ret = 0;
|
||||
for (i=0; i<4; i++)
|
||||
for (i=0; i<3; i++)
|
||||
ret = (ret<<16) + x[i];
|
||||
return ret;
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
|||
goto out;
|
||||
hostname[sizeof(hostname)-1] = 0;
|
||||
|
||||
safe_sprintf(agent, ARRAYSIZE(agent), APPLICATION_NAME "/%d.%d.%d.%d", rufus_version[0], rufus_version[1], rufus_version[2], rufus_version[3]);
|
||||
safe_sprintf(agent, ARRAYSIZE(agent), APPLICATION_NAME "/%d.%d.%d", rufus_version[0], rufus_version[1], rufus_version[2]);
|
||||
hSession = InternetOpenA(agent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
|
||||
if (hSession == NULL)
|
||||
goto out;
|
||||
|
@ -591,8 +591,7 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
|||
parse_update(buf, dwTotalSize+1);
|
||||
|
||||
vuprintf("UPDATE DATA:\n");
|
||||
vuprintf(" version: %d.%d.%d.%d (%s)\n", update.version[0], update.version[1],
|
||||
update.version[2], update.version[3], channel[k]);
|
||||
vuprintf(" version: %d.%d.%d (%s)\n", update.version[0], update.version[1], update.version[2], channel[k]);
|
||||
vuprintf(" platform_min: %d.%d\n", update.platform_min[0], update.platform_min[1]);
|
||||
vuprintf(" url: %s\n", update.download_url);
|
||||
|
||||
|
|
|
@ -927,14 +927,14 @@ void parse_update(char* buf, size_t len)
|
|||
}
|
||||
}
|
||||
|
||||
for (i=0; i<4; i++)
|
||||
for (i=0; i<3; i++)
|
||||
update.version[i] = 0;
|
||||
update.platform_min[0] = 5;
|
||||
update.platform_min[1] = 2; // XP or later
|
||||
safe_free(update.download_url);
|
||||
safe_free(update.release_notes);
|
||||
if ((data = get_sanitized_token_data_buffer("version", 1, buf, len)) != NULL) {
|
||||
for (i=0; (i<4) && ((token = strtok((i==0)?data:NULL, ".")) != NULL); i++) {
|
||||
for (i=0; (i<3) && ((token = strtok((i==0)?data:NULL, ".")) != NULL); i++) {
|
||||
update.version[i] = (uint16_t)atoi(token);
|
||||
}
|
||||
safe_free(data);
|
||||
|
|
17
src/rufus.c
17
src/rufus.c
|
@ -133,12 +133,12 @@ BOOL iso_op_in_progress = FALSE, format_op_in_progress = FALSE, right_to_left_mo
|
|||
BOOL enable_HDDs = FALSE, advanced_mode = TRUE, force_update = FALSE, use_fake_units = TRUE;
|
||||
BOOL allow_dual_uefi_bios = FALSE, enable_vmdk = FALSE, togo_mode = TRUE;
|
||||
int dialog_showing = 0;
|
||||
uint16_t rufus_version[4], embedded_sl_version[2];
|
||||
uint16_t rufus_version[3], embedded_sl_version[2];
|
||||
char embedded_sl_version_str[2][12] = { "?.??", "?.??" };
|
||||
char embedded_sl_version_ext[2][32];
|
||||
char embedded_grub_version[] = GRUB4DOS_VERSION;
|
||||
char embedded_grub2_version[] = GRUB2_PACKAGE_VERSION;
|
||||
RUFUS_UPDATE update = { {0,0,0,0}, {0,0}, NULL, NULL};
|
||||
RUFUS_UPDATE update = { {0,0,0}, {0,0}, NULL, NULL};
|
||||
StrArray DriveID, DriveLabel;
|
||||
extern char* szStatusMessage;
|
||||
|
||||
|
@ -978,7 +978,6 @@ DWORD WINAPI ISOScanThread(LPVOID param)
|
|||
r = ExtractISO(image_path, "", TRUE) || IsHDImage(image_path);
|
||||
EnableControls(TRUE);
|
||||
if (!r) {
|
||||
// TODO: is that needed?
|
||||
SendMessage(hMainDialog, UM_PROGRESS_EXIT, 0, 0);
|
||||
PrintInfoDebug(0, MSG_203);
|
||||
safe_free(image_path);
|
||||
|
@ -1489,7 +1488,7 @@ static __inline const char* IsAlphaOrBeta(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK InfoCallback(HWND hCtrl, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK InfoCallback(HWND hCtrl, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
RECT rect;
|
||||
|
@ -1515,7 +1514,7 @@ INT_PTR CALLBACK InfoCallback(HWND hCtrl, UINT message, WPARAM wParam, LPARAM lP
|
|||
SetBkColor(hdc, GetSysColor(COLOR_BTNFACE));
|
||||
SetTextAlign(hdc , TA_CENTER | TA_BASELINE);
|
||||
GetClientRect(hCtrl , &rect);
|
||||
TextOutW(hdc, rect.right/2, rect.bottom/2 + (int)(5.0f * fScale), winfo, wcslen(winfo));
|
||||
TextOutW(hdc, rect.right/2, rect.bottom/2 + (int)(5.0f * fScale), winfo, (int)wcslen(winfo));
|
||||
EndPaint(hCtrl, &ps);
|
||||
return (INT_PTR)TRUE;
|
||||
}
|
||||
|
@ -1581,17 +1580,17 @@ void InitDialog(HWND hDlg)
|
|||
// Count of Microsoft for making it more attractive to read a
|
||||
// version using strtok() than using GetFileVersionInfo()
|
||||
token = strtok(tmp, " ");
|
||||
for (i=0; (i<4) && ((token = strtok(NULL, ".")) != NULL); i++)
|
||||
for (i=0; (i<3) && ((token = strtok(NULL, ".")) != NULL); i++)
|
||||
rufus_version[i] = (uint16_t)atoi(token);
|
||||
|
||||
// Redefine the title to be able to add "Alpha" or "Beta" and get the version in the right order for RTL
|
||||
if (!right_to_left_mode) {
|
||||
static_sprintf(tmp, APPLICATION_NAME " %d.%d.%d.%d%s", rufus_version[0], rufus_version[1], rufus_version[2], rufus_version[3], IsAlphaOrBeta());
|
||||
static_sprintf(tmp, APPLICATION_NAME " %d.%d.%d%s", rufus_version[0], rufus_version[1], rufus_version[2], IsAlphaOrBeta());
|
||||
} else {
|
||||
static_sprintf(tmp, "%s%d.%d.%d.%d " APPLICATION_NAME, IsAlphaOrBeta(), rufus_version[0], rufus_version[1], rufus_version[2], rufus_version[3]);
|
||||
static_sprintf(tmp, "%s%d.%d.%d " APPLICATION_NAME, IsAlphaOrBeta(), rufus_version[0], rufus_version[1], rufus_version[2]);
|
||||
}
|
||||
SetWindowTextU(hDlg, tmp);
|
||||
uprintf(APPLICATION_NAME " version: %d.%d.%d.%d%s", rufus_version[0], rufus_version[1], rufus_version[2], rufus_version[3], IsAlphaOrBeta());
|
||||
uprintf(APPLICATION_NAME " version: %d.%d.%d%s", rufus_version[0], rufus_version[1], rufus_version[2], IsAlphaOrBeta());
|
||||
for (i=0; i<ARRAYSIZE(resource); i++) {
|
||||
buf = (char*)GetResource(hMainInstance, resource[i], _RT_RCDATA, "ldlinux_sys", &len, TRUE);
|
||||
if (buf == NULL) {
|
||||
|
|
|
@ -276,7 +276,7 @@ typedef struct {
|
|||
#define SL_MINOR(x) ((uint8_t)(x))
|
||||
|
||||
typedef struct {
|
||||
uint16_t version[4];
|
||||
uint16_t version[3];
|
||||
uint32_t platform_min[2]; // minimum platform version required
|
||||
char* download_url;
|
||||
char* release_notes;
|
||||
|
@ -350,7 +350,7 @@ extern BOOL use_own_c32[NB_OLD_C32], detect_fakes, iso_op_in_progress, format_op
|
|||
extern BOOL allow_dual_uefi_bios, togo_mode;
|
||||
extern RUFUS_ISO_REPORT iso_report;
|
||||
extern int64_t iso_blocking_status;
|
||||
extern uint16_t rufus_version[4], embedded_sl_version[2];
|
||||
extern uint16_t rufus_version[3], embedded_sl_version[2];
|
||||
extern int nWindowsVersion;
|
||||
extern char WindowsVersionStr[128];
|
||||
extern char embedded_sl_version_str[2][12];
|
||||
|
|
16
src/rufus.rc
16
src/rufus.rc
|
@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
|
||||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Rufus 2.0.0.608"
|
||||
CAPTION "Rufus 2.0.609"
|
||||
FONT 8, "Segoe UI", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
|
||||
|
@ -157,7 +157,7 @@ END
|
|||
|
||||
IDD_DIALOG_XP DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Rufus 2.0.0.608"
|
||||
CAPTION "Rufus 2.0.609"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
|
||||
|
@ -283,7 +283,7 @@ END
|
|||
IDD_DIALOG_RTL DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
|
||||
CAPTION "Rufus 2.0.0.608"
|
||||
CAPTION "Rufus 2.0.609"
|
||||
FONT 8, "Segoe UI", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
|
||||
|
@ -415,7 +415,7 @@ END
|
|||
IDD_DIALOG_RTL_XP DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
|
||||
CAPTION "Rufus 2.0.0.608"
|
||||
CAPTION "Rufus 2.0.609"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
|
||||
|
@ -671,8 +671,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,0,0,608
|
||||
PRODUCTVERSION 2,0,0,608
|
||||
FILEVERSION 2,0,609,0
|
||||
PRODUCTVERSION 2,0,609,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -689,13 +689,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.0.0.608"
|
||||
VALUE "FileVersion", "2.0.609"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "2.0.0.608"
|
||||
VALUE "ProductVersion", "2.0.609"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -522,7 +522,7 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
if (settings_commcheck)
|
||||
ShowWindow(GetDlgItem(hDlg, IDC_ABOUT_UPDATES), SW_SHOW);
|
||||
safe_sprintf(about_blurb, sizeof(about_blurb), about_blurb_format, lmprintf(MSG_174),
|
||||
lmprintf(MSG_175, rufus_version[0], rufus_version[1], rufus_version[2], rufus_version[3]),
|
||||
lmprintf(MSG_175, rufus_version[0], rufus_version[1], rufus_version[2]),
|
||||
right_to_left_mode?"Akeo \\\\ Pete Batard 2011-2015 © Copyright":"Copyright © 2011-2015 Pete Batard / Akeo",
|
||||
lmprintf(MSG_176), lmprintf(MSG_177), lmprintf(MSG_178));
|
||||
for (i=0; i<ARRAYSIZE(hEdit); i++) {
|
||||
|
@ -1203,9 +1203,9 @@ INT_PTR CALLBACK NewVersionCallback(HWND hDlg, UINT message, WPARAM wParam, LPAR
|
|||
SendMessage(hNotes, EM_SETSEL, -1, -1);
|
||||
SendMessage(hNotes, EM_SETEVENTMASK, 0, ENM_LINK);
|
||||
SetWindowTextU(GetDlgItem(hDlg, IDC_YOUR_VERSION), lmprintf(MSG_018,
|
||||
rufus_version[0], rufus_version[1], rufus_version[2], rufus_version[3]));
|
||||
rufus_version[0], rufus_version[1], rufus_version[2]));
|
||||
SetWindowTextU(GetDlgItem(hDlg, IDC_LATEST_VERSION), lmprintf(MSG_019,
|
||||
update.version[0], update.version[1], update.version[2], update.version[3]));
|
||||
update.version[0], update.version[1], update.version[2]));
|
||||
SetWindowTextU(GetDlgItem(hDlg, IDC_DOWNLOAD_URL), update.download_url);
|
||||
SendMessage(GetDlgItem(hDlg, IDC_PROGRESS), PBM_SETRANGE, 0, (MAX_PROGRESS<<16) & 0xFFFF0000);
|
||||
if (update.download_url == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue