mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
parent
f8c6903d21
commit
fe3b1eb6f6
12 changed files with 39 additions and 39 deletions
|
@ -134,7 +134,7 @@ check_timeout:
|
||||||
cmpb ds:counter_timeout, 0x00
|
cmpb ds:counter_timeout, 0x00
|
||||||
jnz wait_for_keyboard
|
jnz wait_for_keyboard
|
||||||
|
|
||||||
boot_fixed_disk: # Timeout occured => boot second bootable disk (non USB)
|
boot_fixed_disk: # Timeout occurred => boot second bootable disk (non USB)
|
||||||
call restore_rtc_vect # Remove our RTC override
|
call restore_rtc_vect # Remove our RTC override
|
||||||
movb ds:partition_table, 0x81 # target we want to swap with 0x80
|
movb ds:partition_table, 0x81 # target we want to swap with 0x80
|
||||||
push 0x0080
|
push 0x0080
|
||||||
|
|
|
@ -154,7 +154,7 @@ static void FatDateTimeToSystemTime(PLARGE_INTEGER SystemTime, PFAT_DATETIME Fat
|
||||||
/* Fix seconds value that might get beyond the bound */
|
/* Fix seconds value that might get beyond the bound */
|
||||||
if (TimeFields.Second > 59) TimeFields.Second = 0;
|
if (TimeFields.Second > 59) TimeFields.Second = 0;
|
||||||
|
|
||||||
/* Perform ceonversion to system time if possible */
|
/* Perform conversion to system time if possible */
|
||||||
if (!RtlTimeFieldsToTime(&TimeFields, SystemTime)) {
|
if (!RtlTimeFieldsToTime(&TimeFields, SystemTime)) {
|
||||||
/* Set to default time if conversion failed */
|
/* Set to default time if conversion failed */
|
||||||
SystemTime->QuadPart = 0;
|
SystemTime->QuadPart = 0;
|
||||||
|
@ -280,7 +280,7 @@ static BOOL ExtractFAT(int entry, const char* path)
|
||||||
}
|
}
|
||||||
|
|
||||||
safe_closehandle(hFile);
|
safe_closehandle(hFile);
|
||||||
uprintf("Succesfully wrote '%s' (%d bytes)\n", filename, filesize);
|
uprintf("Successfully wrote '%s' (%d bytes)\n", filename, filesize);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ BOOL ExtractFreeDOS(const char* path)
|
||||||
// thus we would need to have a separate header with each file's timestamps
|
// thus we would need to have a separate header with each file's timestamps
|
||||||
|
|
||||||
safe_closehandle(hFile);
|
safe_closehandle(hFile);
|
||||||
uprintf("Succesfully wrote '%s' (%d bytes)\n", filename, res_size);
|
uprintf("Successfully wrote '%s' (%d bytes)\n", filename, res_size);
|
||||||
|
|
||||||
if ((i == 4) || (i == 10) || (i == 16) || (i == 22) || (i == ARRAYSIZE(res_name)-1))
|
if ((i == 4) || (i == 10) || (i == 16) || (i == 22) || (i == ARRAYSIZE(res_name)-1))
|
||||||
UpdateProgress(OP_DOS, -1.0f);
|
UpdateProgress(OP_DOS, -1.0f);
|
||||||
|
|
|
@ -639,7 +639,7 @@ static const char* get_kb(void)
|
||||||
case 0x00000440: // Kyrgyz Cyrillic
|
case 0x00000440: // Kyrgyz Cyrillic
|
||||||
return "ky";
|
return "ky";
|
||||||
case 0x00000043:
|
case 0x00000043:
|
||||||
case 0x00000843: // Uzbek Crillic
|
case 0x00000843: // Uzbek Cyrillic
|
||||||
return "uz";
|
return "uz";
|
||||||
case 0x00000042:
|
case 0x00000042:
|
||||||
case 0x00000442: // Turkmen
|
case 0x00000442: // Turkmen
|
||||||
|
@ -970,7 +970,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
|
||||||
fprintf(fd, "set PATH=.;\\;\\LOCALE\n");
|
fprintf(fd, "set PATH=.;\\;\\LOCALE\n");
|
||||||
fprintf(fd, "echo Using %s keyboard with %s codepage [%d]\n", kb_to_hr("us"), cp_to_hr(437), 437);
|
fprintf(fd, "echo Using %s keyboard with %s codepage [%d]\n", kb_to_hr("us"), cp_to_hr(437), 437);
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
uprintf("Succesfully wrote 'AUTOEXEC.BAT'\n");
|
uprintf("Successfully wrote 'AUTOEXEC.BAT'\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -997,7 +997,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
|
||||||
bFreeDOS?"MENU ":"MENUITEM=", bFreeDOS?')':',', kb_to_hr("us"), cp_to_hr(437), 437);
|
bFreeDOS?"MENU ":"MENUITEM=", bFreeDOS?')':',', kb_to_hr("us"), cp_to_hr(437), 437);
|
||||||
fprintf(fd, "%s", bFreeDOS?"MENU\n12?\n":"[1]\ndevice=\\locale\\display.sys con=(ega,,1)\n[2]\n");
|
fprintf(fd, "%s", bFreeDOS?"MENU\n12?\n":"[1]\ndevice=\\locale\\display.sys con=(ega,,1)\n[2]\n");
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
uprintf("Succesfully wrote 'CONFIG.SYS'\n");
|
uprintf("Successfully wrote 'CONFIG.SYS'\n");
|
||||||
|
|
||||||
// AUTOEXEC.BAT
|
// AUTOEXEC.BAT
|
||||||
strcpy(filename, path);
|
strcpy(filename, path);
|
||||||
|
@ -1018,7 +1018,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
|
||||||
fprintf(fd, "keyb %s,,\\locale\\%s\n", kb, kbdrv);
|
fprintf(fd, "keyb %s,,\\locale\\%s\n", kb, kbdrv);
|
||||||
fprintf(fd, ":2\n");
|
fprintf(fd, ":2\n");
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
uprintf("Succesfully wrote 'AUTOEXEC.BAT'\n");
|
uprintf("Successfully wrote 'AUTOEXEC.BAT'\n");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
18
src/format.c
18
src/format.c
|
@ -243,7 +243,7 @@ static void ToValidLabel(WCHAR* name, BOOL bFAT)
|
||||||
if (name[i] == '_') j++;
|
if (name[i] == '_') j++;
|
||||||
if (i<2*j) {
|
if (i<2*j) {
|
||||||
// If the final label is mostly underscore, use the proposed label
|
// If the final label is mostly underscore, use the proposed label
|
||||||
uprintf("FAT label is mostly undercores. Using '%s' label instead.\n", SelectedDrive.proposed_label);
|
uprintf("FAT label is mostly underscores. Using '%s' label instead.\n", SelectedDrive.proposed_label);
|
||||||
for(i=0; SelectedDrive.proposed_label[i]!=0; i++)
|
for(i=0; SelectedDrive.proposed_label[i]!=0; i++)
|
||||||
name[i] = SelectedDrive.proposed_label[i];
|
name[i] = SelectedDrive.proposed_label[i];
|
||||||
name[i] = 0;
|
name[i] = 0;
|
||||||
|
@ -265,7 +265,7 @@ static void ToValidLabel(WCHAR* name, BOOL bFAT)
|
||||||
*
|
*
|
||||||
* Low order word is calculated: Volume Serial Number is:
|
* Low order word is calculated: Volume Serial Number is:
|
||||||
* Month & Day 12/26 0c1ah
|
* Month & Day 12/26 0c1ah
|
||||||
* Sec & Hundrenths 41:94 295eh 3578:1d02
|
* Sec & Hundredths 41:94 295eh 3578:1d02
|
||||||
* -----
|
* -----
|
||||||
* 3578h
|
* 3578h
|
||||||
*
|
*
|
||||||
|
@ -387,7 +387,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
||||||
if (IS_ERROR(FormatStatus)) goto out;
|
if (IS_ERROR(FormatStatus)) goto out;
|
||||||
if (!DeviceIoControl (hLogicalVolume, IOCTL_DISK_GET_PARTITION_INFO, NULL, 0, &piDrive,
|
if (!DeviceIoControl (hLogicalVolume, IOCTL_DISK_GET_PARTITION_INFO, NULL, 0, &piDrive,
|
||||||
sizeof(piDrive), &cbRet, NULL)) {
|
sizeof(piDrive), &cbRet, NULL)) {
|
||||||
die("Failed to get parition info\n", ERROR_NOT_SUPPORTED);
|
die("Failed to get partition info\n", ERROR_NOT_SUPPORTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
BytesPerSect = dgDrive.BytesPerSector;
|
BytesPerSect = dgDrive.BytesPerSector;
|
||||||
|
@ -493,7 +493,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
||||||
// Sector 6 Backup boot sector
|
// Sector 6 Backup boot sector
|
||||||
// Sector 7 Backup FSInfo sector
|
// Sector 7 Backup FSInfo sector
|
||||||
// Sector 8 Backup 'more boot code'
|
// Sector 8 Backup 'more boot code'
|
||||||
// zero'd sectors upto ReservedSectCount
|
// zeroed sectors upto ReservedSectCount
|
||||||
// FAT1 ReservedSectCount to ReservedSectCount + FatSize
|
// FAT1 ReservedSectCount to ReservedSectCount + FatSize
|
||||||
// ...
|
// ...
|
||||||
// FATn ReservedSectCount to ReservedSectCount + FatSize
|
// FATn ReservedSectCount to ReservedSectCount + FatSize
|
||||||
|
@ -525,7 +525,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
||||||
die("This drive is too big for large FAT32 format\n", APPERR(ERROR_INVALID_VOLUME_SIZE));
|
die("This drive is too big for large FAT32 format\n", APPERR(ERROR_INVALID_VOLUME_SIZE));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we're commited - print some info first
|
// Now we're committed - print some info first
|
||||||
uprintf("Size : %s %u sectors\n", SizeToHumanReadable(piDrive.PartitionLength), TotalSectors);
|
uprintf("Size : %s %u sectors\n", SizeToHumanReadable(piDrive.PartitionLength), TotalSectors);
|
||||||
uprintf("Cluster size %d bytes, %d Bytes Per Sector\n", SectorsPerCluster*BytesPerSect, BytesPerSect);
|
uprintf("Cluster size %d bytes, %d Bytes Per Sector\n", SectorsPerCluster*BytesPerSect, BytesPerSect);
|
||||||
uprintf("Volume ID is %x:%x\n", VolumeId>>16, VolumeId&0xffff);
|
uprintf("Volume ID is %x:%x\n", VolumeId>>16, VolumeId&0xffff);
|
||||||
|
@ -534,7 +534,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
||||||
|
|
||||||
// Fix up the FSInfo sector
|
// Fix up the FSInfo sector
|
||||||
pFAT32FsInfo->dFree_Count = (UserAreaSize/SectorsPerCluster) - 1;
|
pFAT32FsInfo->dFree_Count = (UserAreaSize/SectorsPerCluster) - 1;
|
||||||
pFAT32FsInfo->dNxt_Free = 3; // clusters 0-1 resered, we used cluster 2 for the root dir
|
pFAT32FsInfo->dNxt_Free = 3; // clusters 0-1 reserved, we used cluster 2 for the root dir
|
||||||
|
|
||||||
uprintf("%d Free Clusters\n", pFAT32FsInfo->dFree_Count);
|
uprintf("%d Free Clusters\n", pFAT32FsInfo->dFree_Count);
|
||||||
// Work out the Cluster count
|
// Work out the Cluster count
|
||||||
|
@ -560,7 +560,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uprintf ("Initialising reserved sectors and FATs...\n");
|
uprintf ("Initializing reserved sectors and FATs...\n");
|
||||||
// Now we should write the boot sector and fsinfo twice, once at 0 and once at the backup boot sect position
|
// Now we should write the boot sector and fsinfo twice, once at 0 and once at the backup boot sect position
|
||||||
for (i=0; i<2; i++) {
|
for (i=0; i<2; i++) {
|
||||||
int SectorStart = (i==0) ? 0 : BackupBootSect;
|
int SectorStart = (i==0) ? 0 : BackupBootSect;
|
||||||
|
@ -994,7 +994,7 @@ static BOOL SetupWinPE(char drive_letter)
|
||||||
uprintf("Failed to add SetupSourceDevice in %s\n", dst);
|
uprintf("Failed to add SetupSourceDevice in %s\n", dst);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
uprintf("Succesfully added '%s' to %s\n", setupsrcdev, dst);
|
uprintf("Successfully added '%s' to %s\n", setupsrcdev, dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
safe_sprintf(src, sizeof(src), "%c:\\%s\\setupldr.bin", drive_letter, basedir[index]);
|
safe_sprintf(src, sizeof(src), "%c:\\%s\\setupldr.bin", drive_letter, basedir[index]);
|
||||||
|
@ -1104,7 +1104,7 @@ static BOOL RemountVolume(char drive_letter)
|
||||||
uprintf("Successfully remounted %s on %s\n", &drive_guid[4], drive_name);
|
uprintf("Successfully remounted %s on %s\n", &drive_guid[4], drive_name);
|
||||||
} else {
|
} else {
|
||||||
uprintf("Failed to remount %s on %s\n", &drive_guid[4], drive_name);
|
uprintf("Failed to remount %s on %s\n", &drive_guid[4], drive_name);
|
||||||
// This will leave the drive unaccessible and must be flagged as an error
|
// This will leave the drive inaccessible and must be flagged as an error
|
||||||
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_CANT_REMOUNT_VOLUME);
|
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_CANT_REMOUNT_VOLUME);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ typedef unsigned __int64 uintmax_t;
|
||||||
|
|
||||||
/* 7.18.4.1 Macros for minimum-width integer constants
|
/* 7.18.4.1 Macros for minimum-width integer constants
|
||||||
|
|
||||||
Accoding to Douglas Gwyn <gwyn@arl.mil>:
|
According to Douglas Gwyn <gwyn@arl.mil>:
|
||||||
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
|
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
|
||||||
9899:1999 as initially published, the expansion was required
|
9899:1999 as initially published, the expansion was required
|
||||||
to be an integer constant of precisely matching type, which
|
to be an integer constant of precisely matching type, which
|
||||||
|
|
|
@ -314,7 +314,7 @@ BOOL DownloadFile(const char* url, const char* file, HWND hProgressDialog)
|
||||||
HttpQueryInfoA(hRequest, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, (LPVOID)&dwStatus, &dwSize, NULL);
|
HttpQueryInfoA(hRequest, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, (LPVOID)&dwStatus, &dwSize, NULL);
|
||||||
if (dwStatus != 200) {
|
if (dwStatus != 200) {
|
||||||
error_code = ERROR_INTERNET_ITEM_NOT_FOUND;
|
error_code = ERROR_INTERNET_ITEM_NOT_FOUND;
|
||||||
uprintf("Unable to acess file: Server status %d\n", dwStatus);
|
uprintf("Unable to access file: Server status %d\n", dwStatus);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
dwSize = sizeof(dwTotalSize);
|
dwSize = sizeof(dwTotalSize);
|
||||||
|
|
12
src/parser.c
12
src/parser.c
|
@ -90,7 +90,7 @@ static wchar_t* get_token_data_line(const wchar_t* wtoken, wchar_t* wline)
|
||||||
return (wline[r] == 0)?NULL:&wline[r];
|
return (wline[r] == 0)?NULL:&wline[r];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse a file (ANSI or UTF-8 or UTF-16) and return the data for the first occurence of 'token'
|
// Parse a file (ANSI or UTF-8 or UTF-16) and return the data for the first occurrence of 'token'
|
||||||
// The returned string is UTF-8 and MUST be freed by the caller
|
// The returned string is UTF-8 and MUST be freed by the caller
|
||||||
char* get_token_data_file(const char* token, const char* filename)
|
char* get_token_data_file(const char* token, const char* filename)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,7 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse a buffer (ANSI or UTF-8) and return the data for the 'n'th occurence of 'token'
|
// Parse a buffer (ANSI or UTF-8) and return the data for the 'n'th occurrence of 'token'
|
||||||
// The returned string is UTF-8 and MUST be freed by the caller
|
// The returned string is UTF-8 and MUST be freed by the caller
|
||||||
char* get_token_data_buffer(const char* token, unsigned int n, const char* buffer, size_t buffer_size)
|
char* get_token_data_buffer(const char* token, unsigned int n, const char* buffer, size_t buffer_size)
|
||||||
{
|
{
|
||||||
|
@ -345,7 +345,7 @@ out:
|
||||||
if (fd_in != NULL) fclose(fd_in);
|
if (fd_in != NULL) fclose(fd_in);
|
||||||
if (fd_out != NULL) fclose(fd_out);
|
if (fd_out != NULL) fclose(fd_out);
|
||||||
|
|
||||||
// If an insertion occured, delete existing file and use the new one
|
// If an insertion occurred, delete existing file and use the new one
|
||||||
if (ret != NULL) {
|
if (ret != NULL) {
|
||||||
// We're in Windows text mode => Remove CRs if requested
|
// We're in Windows text mode => Remove CRs if requested
|
||||||
fd_in = _wfopen(wtmpname, L"rb");
|
fd_in = _wfopen(wtmpname, L"rb");
|
||||||
|
@ -375,10 +375,10 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search for a specific 'src' substring data for all occurences of 'token', and replace
|
// Search for a specific 'src' substring data for all occurrences of 'token', and replace
|
||||||
// it with 'rep'. File can be ANSI or UNICODE and is overwritten. Parameters are UTF-8.
|
// it with 'rep'. File can be ANSI or UNICODE and is overwritten. Parameters are UTF-8.
|
||||||
// The parsed line is of the form: [ ]token[ ]data
|
// The parsed line is of the form: [ ]token[ ]data
|
||||||
// Returns a pointer to rep if replacement occured, NULL otherwise
|
// Returns a pointer to rep if replacement occurred, NULL otherwise
|
||||||
char* replace_in_token_data(const char* filename, const char* token, const char* src, const char* rep, BOOL dos2unix)
|
char* replace_in_token_data(const char* filename, const char* token, const char* src, const char* rep, BOOL dos2unix)
|
||||||
{
|
{
|
||||||
const wchar_t* outmode[] = { L"w", L"w, ccs=UTF-8", L"w, ccs=UTF-16LE" };
|
const wchar_t* outmode[] = { L"w", L"w, ccs=UTF-8", L"w, ccs=UTF-16LE" };
|
||||||
|
@ -491,7 +491,7 @@ out:
|
||||||
if (fd_in != NULL) fclose(fd_in);
|
if (fd_in != NULL) fclose(fd_in);
|
||||||
if (fd_out != NULL) fclose(fd_out);
|
if (fd_out != NULL) fclose(fd_out);
|
||||||
|
|
||||||
// If a replacement occured, delete existing file and use the new one
|
// If a replacement occurred, delete existing file and use the new one
|
||||||
if (ret != NULL) {
|
if (ret != NULL) {
|
||||||
// We're in Windows text mode => Remove CRs if requested
|
// We're in Windows text mode => Remove CRs if requested
|
||||||
fd_in = _wfopen(wtmpname, L"rb");
|
fd_in = _wfopen(wtmpname, L"rb");
|
||||||
|
|
|
@ -130,7 +130,7 @@ static int64_t last_iso_blocking_status;
|
||||||
/*
|
/*
|
||||||
* The following is used to allocate slots within the progress bar
|
* The following is used to allocate slots within the progress bar
|
||||||
* 0 means unused (no operation or no progress allocated to it)
|
* 0 means unused (no operation or no progress allocated to it)
|
||||||
* +n means allocate exactly n bars (n percents of the progress bar)
|
* +n means allocate exactly n bars (n percent of the progress bar)
|
||||||
* -n means allocate a weighted slot of n from all remaining
|
* -n means allocate a weighted slot of n from all remaining
|
||||||
* bars. Eg if 80 slots remain and the sum of all negative entries
|
* bars. Eg if 80 slots remain and the sum of all negative entries
|
||||||
* is 10, -4 will allocate 4/10*80 = 32 bars (32%) for OP progress
|
* is 10, -4 will allocate 4/10*80 = 32 bars (32%) for OP progress
|
||||||
|
@ -207,7 +207,7 @@ static BOOL DefineClusterSizes(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FAT 32
|
// FAT 32
|
||||||
// > 32GB FAT32 is not supported by MS and FormatEx but is achieved using fat32fomat
|
// > 32GB FAT32 is not supported by MS and FormatEx but is achieved using fat32format
|
||||||
// See: http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm
|
// See: http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm
|
||||||
// < 32 MB FAT32 is not allowed by FormatEx, so we don't bother
|
// < 32 MB FAT32 is not allowed by FormatEx, so we don't bother
|
||||||
|
|
||||||
|
@ -984,7 +984,7 @@ BOOL CALLBACK ISOProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
UpdateWindow(hDlg);
|
UpdateWindow(hDlg);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case UM_ISO_EXIT:
|
case UM_ISO_EXIT:
|
||||||
// Just hide and recentrer the dialog
|
// Just hide and recenter the dialog
|
||||||
ShowWindow(hDlg, SW_HIDE);
|
ShowWindow(hDlg, SW_HIDE);
|
||||||
iso_op_in_progress = FALSE;
|
iso_op_in_progress = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1804,7 +1804,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
||||||
uprintf("\r\n");
|
uprintf("\r\n");
|
||||||
GetUSBDevices(DeviceNum);
|
GetUSBDevices(DeviceNum);
|
||||||
if (!IS_ERROR(FormatStatus)) {
|
if (!IS_ERROR(FormatStatus)) {
|
||||||
// This is the only way to achieve instantenous progress transition to 100%
|
// This is the only way to achieve instantanenous progress transition to 100%
|
||||||
SendMessage(hProgress, PBM_SETRANGE, 0, ((MAX_PROGRESS+1)<<16) & 0xFFFF0000);
|
SendMessage(hProgress, PBM_SETRANGE, 0, ((MAX_PROGRESS+1)<<16) & 0xFFFF0000);
|
||||||
SendMessage(hProgress, PBM_SETPOS, (MAX_PROGRESS+1), 0);
|
SendMessage(hProgress, PBM_SETPOS, (MAX_PROGRESS+1), 0);
|
||||||
SendMessage(hProgress, PBM_SETRANGE, 0, (MAX_PROGRESS<<16) & 0xFFFF0000);
|
SendMessage(hProgress, PBM_SETRANGE, 0, (MAX_PROGRESS<<16) & 0xFFFF0000);
|
||||||
|
|
12
src/rufus.rc
12
src/rufus.rc
|
@ -30,7 +30,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_APPWINDOW
|
EXSTYLE WS_EX_APPWINDOW
|
||||||
CAPTION "Rufus v1.3.4.256"
|
CAPTION "Rufus v1.3.4.257"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||||
|
@ -63,7 +63,7 @@ BEGIN
|
||||||
COMBOBOX IDC_DISK_ID,119,246,73,30,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_DISK_ID,119,246,73,30,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
||||||
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_EXTRA_PARTITION,
|
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_EXTRA_PARTITION,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,235,184,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,235,184,10
|
||||||
CONTROL "List fixed (non-flash) or unpartitionned USB disks",IDC_ENABLE_FIXED_DISKS,
|
CONTROL "List fixed (non-flash) or unpartitioned USB disks",IDC_ENABLE_FIXED_DISKS,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,222,185,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,222,185,10
|
||||||
PUSHBUTTON "Log",IDC_LOG,62,291,18,14
|
PUSHBUTTON "Log",IDC_LOG,62,291,18,14
|
||||||
END
|
END
|
||||||
|
@ -278,8 +278,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,3,4,256
|
FILEVERSION 1,3,4,257
|
||||||
PRODUCTVERSION 1,3,4,256
|
PRODUCTVERSION 1,3,4,257
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -296,13 +296,13 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "1.3.4.256"
|
VALUE "FileVersion", "1.3.4.257"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||||
VALUE "OriginalFilename", "rufus.exe"
|
VALUE "OriginalFilename", "rufus.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "1.3.4.256"
|
VALUE "ProductVersion", "1.3.4.257"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -94,7 +94,7 @@ SysType msdos_systypes[] = {
|
||||||
{ 0x88, N_("Linux Plaintext") },
|
{ 0x88, N_("Linux Plaintext") },
|
||||||
{ 0x8e, N_("Linux LVM") },
|
{ 0x8e, N_("Linux LVM") },
|
||||||
{ 0x93, N_("Amoeba") },
|
{ 0x93, N_("Amoeba") },
|
||||||
/*This guys created a seperate partition for badblocks?! */
|
/*This guys created a separate partition for badblocks?! */
|
||||||
{ 0x94, N_("Amoeba BBT") },
|
{ 0x94, N_("Amoeba BBT") },
|
||||||
{ 0x9f, N_("BSD/OS") },
|
{ 0x9f, N_("BSD/OS") },
|
||||||
{ 0xa0, N_("Thinkpad Hibernation") },
|
{ 0xa0, N_("Thinkpad Hibernation") },
|
||||||
|
|
|
@ -133,7 +133,7 @@ BOOL InstallSyslinux(DWORD drive_index, char drive_letter)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
uprintf("Succesfully wrote '%s'\n", ldlinux_sys);
|
uprintf("Successfully wrote '%s'\n", ldlinux_sys);
|
||||||
if (dt != DT_ISO)
|
if (dt != DT_ISO)
|
||||||
UpdateProgress(OP_DOS, -1.0f);
|
UpdateProgress(OP_DOS, -1.0f);
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ BOOL InstallSyslinux(DWORD drive_index, char drive_letter)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
uprintf("Succesfully wrote Syslinux boot record\n");
|
uprintf("Successfully wrote Syslinux boot record\n");
|
||||||
|
|
||||||
if (dt == DT_SYSLINUX_V5) {
|
if (dt == DT_SYSLINUX_V5) {
|
||||||
fd = fopen(ldlinux_c32, "rb");
|
fd = fopen(ldlinux_c32, "rb");
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
/*
|
/*
|
||||||
* setadv.c
|
* setadv.c
|
||||||
*
|
*
|
||||||
* (Over)write a data item in the auxilliary data vector. To
|
* (Over)write a data item in the auxiliary data vector. To
|
||||||
* delete an item, set its length to zero.
|
* delete an item, set its length to zero.
|
||||||
*
|
*
|
||||||
* Return 0 on success, -1 on error, and set errno.
|
* Return 0 on success, -1 on error, and set errno.
|
||||||
|
|
Loading…
Reference in a new issue