mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
Compare commits
2 commits
14847a1a89
...
2e19b4958b
Author | SHA1 | Date | |
---|---|---|---|
|
2e19b4958b | ||
|
00a802ca1d |
7 changed files with 144 additions and 77 deletions
|
@ -2,8 +2,10 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: 3.14\n"
|
||||
"Report-Msgid-Bugs-To: pete@akeo.ie\n"
|
||||
"POT-Creation-Date: 2021-04-03 17:18+0800\n"
|
||||
"PO-Revision-Date: 2021-04-03 18:47+0800\n"
|
||||
"POT-Creation-Date: 2022-01-10 19:23+0800\n"
|
||||
"PO-Revision-Date: 2022-01-10 20:13+0800\n"
|
||||
"Last-Translator: SiderealArt <admin@siderealart.me>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: zh_TW\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
@ -11,9 +13,7 @@ msgstr ""
|
|||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Rufus-LanguageName: Chinese Traditional (正體中文)\n"
|
||||
"X-Rufus-LCID: 0x0404, 0x0c04, 0x1404, 0x7c04\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"X-Generator: Poedit 2.4.1\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#. • IDD_DIALOG → IDS_DRIVE_PROPERTIES_TXT
|
||||
msgid "Drive Properties"
|
||||
|
@ -282,7 +282,7 @@ msgstr "最新版本: %d.%d (Build %d)"
|
|||
#. • MSG_020
|
||||
#. • MSG_026
|
||||
msgid "bytes"
|
||||
msgstr ""
|
||||
msgstr "位元組"
|
||||
|
||||
#. • MSG_021
|
||||
#.
|
||||
|
@ -316,11 +316,11 @@ msgstr ""
|
|||
|
||||
#. • MSG_027
|
||||
msgid "kilobytes"
|
||||
msgstr ""
|
||||
msgstr "KB"
|
||||
|
||||
#. • MSG_028
|
||||
msgid "megabytes"
|
||||
msgstr ""
|
||||
msgstr "MB"
|
||||
|
||||
#. • MSG_029
|
||||
msgid "Default"
|
||||
|
@ -507,7 +507,7 @@ msgstr "損毀磁區檢查工作未完成。"
|
|||
|
||||
#. • MSG_073
|
||||
msgid "ISO image scan failure."
|
||||
msgstr "檔掃 ISO 映像描失敗。"
|
||||
msgstr "掃描 ISO 映像檔失敗。"
|
||||
|
||||
#. • MSG_074
|
||||
msgid "ISO image extraction failure."
|
||||
|
@ -543,13 +543,13 @@ msgid ""
|
|||
msgstr ""
|
||||
"Rufus 偵測到 Windows 正在排清緩衝區至 USB 裝置。\n"
|
||||
"\n"
|
||||
"此作業可能需要一段時間才完成、視裝置速度及檔案大小而定。\n"
|
||||
"此作業可能需要一段時間才完成,視裝置速度及檔案大小而定。\n"
|
||||
"\n"
|
||||
"我們建議耐心等候操作完成、以免發生資料損毀。但如果不願意等待、可以直接移除裝置..."
|
||||
"我們建議耐心等候操作完成,以免發生資料損毀。但如果不願意等待,可以直接移除裝置..."
|
||||
|
||||
#. • MSG_081
|
||||
msgid "Unsupported image"
|
||||
msgstr "不支援的 ISO 映像檔"
|
||||
msgstr "不支援的映像檔"
|
||||
|
||||
#. • MSG_082
|
||||
msgid "This image is either non-bootable, or it uses a boot or compression method that is not supported by Rufus..."
|
||||
|
@ -866,7 +866,7 @@ msgid ""
|
|||
"You have just created a media that uses the UEFI:NTFS bootloader. Please remember that, to boot this media, YOU MUST DISABLE SECURE BOOT.\n"
|
||||
"For details on why this is necessary, see the 'More Information' button below."
|
||||
msgstr ""
|
||||
"你已建立使用 UEFI:NTFS bootloader 的裝置。如要使用此裝置開機,請記得關閉 SECURE BOOT。\n"
|
||||
"你已建立使用 UEFI:NTFS bootloader 的裝置。如要使用此裝置開機,請記得關閉安全開機。\n"
|
||||
"更多資訊請點選底下 '進階說明' 按鈕。"
|
||||
|
||||
#. • MSG_130
|
||||
|
@ -1068,7 +1068,7 @@ msgid ""
|
|||
"Start the formatting operation.\n"
|
||||
"This will DESTROY any data on the target!"
|
||||
msgstr ""
|
||||
"立即開始格式化作業\n"
|
||||
"立即開始格式化作業。\n"
|
||||
"注意: 裝置上所有的資料將被清除!"
|
||||
|
||||
#. • MSG_172
|
||||
|
@ -1092,7 +1092,7 @@ msgstr "版本 %d.%d (Build %d)"
|
|||
|
||||
#. • MSG_176
|
||||
msgid "English translation: Pete Batard <mailto:pete@akeo.ie>"
|
||||
msgstr "正體中文譯者: 佚 <mailto:mmmeow@gmail.com>\\line Chocobo1 <https://github.com/Chocobo1>"
|
||||
msgstr "正體中文譯者: 佚 <mailto:mmmeow@gmail.com>\\line Chocobo1 <https://github.com/Chocobo1>\\line SiderealArt <https://github.com/SiderealArt>"
|
||||
|
||||
#. • MSG_177
|
||||
msgid "Report bugs or request enhancements at:"
|
||||
|
@ -1533,7 +1533,7 @@ msgstr "計算映像檔總和檢查碼: %s"
|
|||
|
||||
#. • MSG_272
|
||||
msgid "Compute the MD5, SHA1 and SHA256 checksums for the selected image"
|
||||
msgstr "計算已選擇映像檔的 MD5, SHA1 和 SHA256 總和檢查碼"
|
||||
msgstr "計算已選擇映像檔的 MD5、SHA1 和 SHA256 總和檢查碼"
|
||||
|
||||
#. • MSG_273
|
||||
msgid "Change the application language"
|
||||
|
@ -1605,7 +1605,7 @@ msgid ""
|
|||
"This is not a signature we recognize and could indicate some form of malicious activity...\n"
|
||||
"Are you sure you want to run this file?"
|
||||
msgstr ""
|
||||
"下載的檔案簽章者為: '%s'.\n"
|
||||
"下載的檔案簽章者為: '%s'。\n"
|
||||
"本軟體未使用此簽章,代表檔案可能已遭受病毒感染...\n"
|
||||
"是否要執行檔案?"
|
||||
|
||||
|
@ -1615,7 +1615,7 @@ msgstr "正在寫入零: %s"
|
|||
|
||||
#. • MSG_287
|
||||
msgid "Detection of non-USB removable drives"
|
||||
msgstr "偵測非USB可移除磁碟"
|
||||
msgstr "偵測非 USB 可移除磁碟"
|
||||
|
||||
#. • MSG_288
|
||||
msgid "Missing elevated privileges"
|
||||
|
@ -1708,8 +1708,12 @@ msgid "Create a disk image of the selected device"
|
|||
msgstr "建立選擇的裝置的磁碟映像"
|
||||
|
||||
#. • MSG_305
|
||||
msgid "Use this option to indicate whether you want to use this device to install Windows on another disk, or if you want to run Windows directly from this drive (Windows To Go)."
|
||||
msgstr "是否要使用此裝置來安裝 Windows 在另一個磁碟上,或是要直接在此磁碟上執行 Windows (Windows To Go)。"
|
||||
msgid ""
|
||||
"Use this option to indicate if you plan to install Windows to a different disk, or if you want to run Windows directly from this drive (Windows To Go).\r\n"
|
||||
"In 'Extended Windows 11 Installation' mode, Rufus will patch the media so that Windows 11 can be installed on platforms that don't meet the TPM 2.0 or Secure Boot requirements."
|
||||
msgstr ""
|
||||
"是否要使用此裝置來安裝 Windows 在另一個磁碟上,或是要直接在此磁碟上執行 Windows (Windows To Go)。\r\n"
|
||||
"在「擴充 Windows 11 安裝」模式中,Rufus 將修補裝置,以使 Windows 11 能夠安裝在不符合 TPM 2.0 或安全開機要求的系統上。"
|
||||
|
||||
#. • MSG_306
|
||||
#.
|
||||
|
@ -1719,7 +1723,7 @@ msgid "Fast-zeroing drive: %s"
|
|||
msgstr "正在快速寫入零: %s"
|
||||
|
||||
#. • MSG_307
|
||||
msgid "This may take a while"
|
||||
msgid "this may take a while"
|
||||
msgstr "可能需要一段時間"
|
||||
|
||||
#. • MSG_308
|
||||
|
@ -1738,7 +1742,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"你選擇的 ISO 使用 UEFI 可以直接當作 EFI System Partition (ESP)。比起占用整個通用磁區,使用 ESP 有時是更好的選擇。\n"
|
||||
"\n"
|
||||
"請選擇此映象檔的寫入模式:"
|
||||
"請選擇此映像檔的寫入模式:"
|
||||
|
||||
#. • MSG_311
|
||||
msgid "Use %s (in the main application window) to enable."
|
||||
|
@ -1785,5 +1789,21 @@ msgid ""
|
|||
"The image you have selected is an ISOHybrid, but its creators have not made it compatible with ISO/File copy mode.\n"
|
||||
"As a result, DD image writing mode will be enforced."
|
||||
msgstr ""
|
||||
"你選擇的映象檔是 ISOHybrid,但是檔案作者沒有使之與 ISO/檔案複製 模式相容。\n"
|
||||
"因此強制使用 DD 映象寫入模式。"
|
||||
"你選擇的映像檔是 ISOHybrid,但是檔案作者沒有使之與 ISO/檔案複製模式相容。\n"
|
||||
"因此強制使用 DD 映像寫入模式。"
|
||||
|
||||
#. • MSG_322
|
||||
msgid "Standard Windows 11 Installation (TPM 2.0 + Secure Boot)"
|
||||
msgstr "標準 Windows 11 安裝 (TPM 2.0 + 安全開機)"
|
||||
|
||||
#. • MSG_323
|
||||
msgid "Extended Windows 11 Installation (no TPM / no Secure Boot)"
|
||||
msgstr "擴充 Windows 11 安裝 (無 TPM 和安全開機)"
|
||||
|
||||
#. • MSG_324
|
||||
msgid "Removing Windows 11 installation restrictions: %s"
|
||||
msgstr "正在移除 Windows 11 安裝限制: %s"
|
||||
|
||||
#. • MSG_325
|
||||
msgid "Unable to open or read '%s'"
|
||||
msgstr "無法開啟或讀取 '%s'"
|
||||
|
|
|
@ -1785,6 +1785,10 @@ t MSG_016 "每月"
|
|||
t MSG_017 "自訂"
|
||||
t MSG_018 "目前版本: %d.%d (Build %d)"
|
||||
t MSG_019 "最新版本: %d.%d (Build %d)"
|
||||
t MSG_020 "位元組"
|
||||
t MSG_026 "位元組"
|
||||
t MSG_027 "KB"
|
||||
t MSG_028 "MB"
|
||||
t MSG_029 "預設"
|
||||
t MSG_030 "%s (預設)"
|
||||
t MSG_031 "BIOS (或 UEFI-CSM)"
|
||||
|
@ -1829,15 +1833,15 @@ t MSG_069 "無法複製檔案到裝置。"
|
|||
t MSG_070 "工作遭使用者中斷。"
|
||||
t MSG_071 "無法啟動執行緒。"
|
||||
t MSG_072 "損毀磁區檢查工作未完成。"
|
||||
t MSG_073 "檔掃 ISO 映像描失敗。"
|
||||
t MSG_073 "掃描 ISO 映像檔失敗。"
|
||||
t MSG_074 "解壓縮 ISO 映像檔失敗。"
|
||||
t MSG_075 "無法重新裝載磁碟區。"
|
||||
t MSG_076 "無法設置開機檔案。"
|
||||
t MSG_077 "無法指定磁碟機代號。"
|
||||
t MSG_078 "無法裝載 GUID 磁碟區。"
|
||||
t MSG_079 "裝置尚未就緒。"
|
||||
t MSG_080 "Rufus 偵測到 Windows 正在排清緩衝區至 USB 裝置。\n\n此作業可能需要一段時間才完成、視裝置速度及檔案大小而定。\n\n我們建議耐心等候操作完成、以免發生資料損毀。但如果不願意等待、可以直接移除裝置..."
|
||||
t MSG_081 "不支援的 ISO 映像檔"
|
||||
t MSG_080 "Rufus 偵測到 Windows 正在排清緩衝區至 USB 裝置。\n\n此作業可能需要一段時間才完成,視裝置速度及檔案大小而定。\n\n我們建議耐心等候操作完成,以免發生資料損毀。但如果不願意等待,可以直接移除裝置..."
|
||||
t MSG_081 "不支援的映像檔"
|
||||
t MSG_082 "此映像檔無法開機,或是使用 Rufus 不支援的開機、壓縮方式..."
|
||||
t MSG_083 "取代 %s?"
|
||||
t MSG_084 "此 ISO 映像檔似乎使用過時版本的 '%s'。\n開機選單可能因此無法正常運作。\n\nRufus 可下載新版本來修正問題:\n- 選 '是' 將連上網路並下載檔案\n- 選 '否' 保留原始 ISO 內容\n如果你不知道該如何抉擇,建議選擇 '是'。\n\n注意: 檔案會下載至目前資料夾,如果已存在 '%s' 檔案將直接使用。"
|
||||
|
@ -1884,7 +1888,7 @@ t MSG_125 "設定 live USB 的固定磁區大小。大小設定為 0 則移除
|
|||
t MSG_126 "設定磁區大小單位。"
|
||||
t MSG_127 "不要再顯示此訊息"
|
||||
t MSG_128 "重要通知關於 %s"
|
||||
t MSG_129 "你已建立使用 UEFI:NTFS bootloader 的裝置。如要使用此裝置開機,請記得關閉 SECURE BOOT。\n更多資訊請點選底下 '進階說明' 按鈕。"
|
||||
t MSG_129 "你已建立使用 UEFI:NTFS bootloader 的裝置。如要使用此裝置開機,請記得關閉安全開機。\n更多資訊請點選底下 '進階說明' 按鈕。"
|
||||
t MSG_130 "Windows 映像檔選擇"
|
||||
t MSG_131 "此 ISO 包含多個 Windows 映像\n請選擇要安裝的映像:"
|
||||
t MSG_132 "另一個程式或程序正在使用此裝置,要繼續格式化?"
|
||||
|
@ -1925,12 +1929,12 @@ t MSG_167 "於裝置上建立 Rufus 客製化的 MBR,可支援開機選單及
|
|||
t MSG_168 "偽裝第一個可開機的 USB 磁碟為其他序列的磁碟。\n主要適用情境: 於多磁碟系統安裝 Windows XP。"
|
||||
t MSG_169 "建立隱藏磁區分割並嘗試對齊資料分割界限。\n可幫助老舊 BIOS 偵測到開機片。"
|
||||
t MSG_170 "顯示連接到電腦的 USB 外接硬碟。請謹慎使用,後果自負!!!"
|
||||
t MSG_171 "立即開始格式化作業\n注意: 裝置上所有的資料將被清除!"
|
||||
t MSG_171 "立即開始格式化作業。\n注意: 裝置上所有的資料將被清除!"
|
||||
t MSG_172 "下載簽章無效"
|
||||
t MSG_173 "選取內容..."
|
||||
t MSG_174 "Rufus - 快速可靠的 USB 格式化工具"
|
||||
t MSG_175 "版本 %d.%d (Build %d)"
|
||||
t MSG_176 "正體中文譯者: 佚 <mailto:mmmeow@gmail.com>\\line Chocobo1 <https://github.com/Chocobo1>"
|
||||
t MSG_176 "正體中文譯者: 佚 <mailto:mmmeow@gmail.com>\\line Chocobo1 <https://github.com/Chocobo1>\\line SiderealArt <https://github.com/SiderealArt>"
|
||||
t MSG_177 "Bug 回報或請求新功能請至: (英文網頁)"
|
||||
t MSG_178 "其他著作權資訊:"
|
||||
t MSG_179 "線上更新規則:"
|
||||
|
@ -2024,7 +2028,7 @@ t MSG_268 "建置 Windows 映像檔中..."
|
|||
t MSG_269 "保留時間戳記"
|
||||
t MSG_270 "USB 除錯"
|
||||
t MSG_271 "計算映像檔總和檢查碼: %s"
|
||||
t MSG_272 "計算已選擇映像檔的 MD5, SHA1 和 SHA256 總和檢查碼"
|
||||
t MSG_272 "計算已選擇映像檔的 MD5、SHA1 和 SHA256 總和檢查碼"
|
||||
t MSG_273 "更改應用程式語言"
|
||||
t MSG_274 "偵測到 %s 映像檔"
|
||||
t MSG_275 "你選擇的映像檔為 'ISOHybrid' 格式。該檔案格式可以使用以下模式寫入%s (檔案複製) 模式 或 %s (磁碟映像) 模式。\nRufus 建議使用 %s 模式,你將擁有磁碟的完整存取權限。\n如果你在開機時遭遇問題,你可以嘗試使用 %s 模式寫入。\n\n請選擇寫入模式:"
|
||||
|
@ -2037,9 +2041,9 @@ t MSG_281 "%s (請選擇)"
|
|||
t MSG_282 "鎖定 USB 磁碟"
|
||||
t MSG_283 "無效簽章"
|
||||
t MSG_284 "下載的檔案缺少數位簽章。"
|
||||
t MSG_285 "下載的檔案簽章者為: '%s'.\n本軟體未使用此簽章,代表檔案可能已遭受病毒感染...\n是否要執行檔案?"
|
||||
t MSG_285 "下載的檔案簽章者為: '%s'。\n本軟體未使用此簽章,代表檔案可能已遭受病毒感染...\n是否要執行檔案?"
|
||||
t MSG_286 "正在寫入零: %s"
|
||||
t MSG_287 "偵測非USB可移除磁碟"
|
||||
t MSG_287 "偵測非 USB 可移除磁碟"
|
||||
t MSG_288 "缺少較高的權限"
|
||||
t MSG_289 "此程式只能以較高的權限執行"
|
||||
t MSG_290 "檔案索引屬性"
|
||||
|
@ -2057,12 +2061,12 @@ t MSG_301 "顯示應用程式設定"
|
|||
t MSG_302 "顯示此應用程式資訊"
|
||||
t MSG_303 "顯示記錄檔"
|
||||
t MSG_304 "建立選擇的裝置的磁碟映像"
|
||||
t MSG_305 "是否要使用此裝置來安裝 Windows 在另一個磁碟上,或是要直接在此磁碟上執行 Windows (Windows To Go)。"
|
||||
t MSG_305 "是否要使用此裝置來安裝 Windows 在另一個磁碟上,或是要直接在此磁碟上執行 Windows (Windows To Go)。\r\n在「擴充 Windows 11 安裝」模式中,Rufus 將修補裝置,以使 Windows 11 能夠安裝在不符合 TPM 2.0 或安全開機要求的系統上。"
|
||||
t MSG_306 "正在快速寫入零: %s"
|
||||
t MSG_307 "可能需要一段時間"
|
||||
t MSG_308 "虛擬硬碟偵測"
|
||||
t MSG_309 "壓縮檔"
|
||||
t MSG_310 "你選擇的 ISO 使用 UEFI 可以直接當作 EFI System Partition (ESP)。比起占用整個通用磁區,使用 ESP 有時是更好的選擇。\n\n請選擇此映象檔的寫入模式:"
|
||||
t MSG_310 "你選擇的 ISO 使用 UEFI 可以直接當作 EFI System Partition (ESP)。比起占用整個通用磁區,使用 ESP 有時是更好的選擇。\n\n請選擇此映像檔的寫入模式:"
|
||||
t MSG_311 "在主程式視窗按下 %s 以啟用。"
|
||||
t MSG_312 "額外雜湊值 (SHA512)"
|
||||
t MSG_313 "儲存至虛擬硬碟"
|
||||
|
@ -2073,7 +2077,11 @@ t MSG_317 "磁碟 ID"
|
|||
t MSG_318 "預設執行緒優先順序: %d"
|
||||
t MSG_319 "忽略 Boot Marker"
|
||||
t MSG_320 "正在重新整理磁區分割 (%s)..."
|
||||
t MSG_321 "你選擇的映象檔是 ISOHybrid,但是檔案作者沒有使之與 ISO/檔案複製 模式相容。\n因此強制使用 DD 映象寫入模式。"
|
||||
t MSG_321 "你選擇的映像檔是 ISOHybrid,但是檔案作者沒有使之與 ISO/檔案複製模式相容。\n因此強制使用 DD 映像寫入模式。"
|
||||
t MSG_322 "標準 Windows 11 安裝 (TPM 2.0 + 安全開機)"
|
||||
t MSG_323 "擴充 Windows 11 安裝 (無 TPM 和安全開機)"
|
||||
t MSG_324 "正在移除 Windows 11 安裝限制: %s"
|
||||
t MSG_325 "無法開啟或讀取 '%s'"
|
||||
|
||||
#########################################################################
|
||||
l "hr-HR" "Croatian (Hrvatski)" 0x041a, 0x081a, 0x101a
|
||||
|
|
18
src/drive.c
18
src/drive.c
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Rufus: The Reliable USB Formatting Utility
|
||||
* Drive access function calls
|
||||
* Copyright © 2011-2021 Pete Batard <pete@akeo.ie>
|
||||
* Copyright © 2011-2022 Pete Batard <pete@akeo.ie>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1034,6 +1034,22 @@ HANDLE GetLogicalHandle(DWORD DriveIndex, uint64_t PartitionOffset, BOOL bLockDr
|
|||
return hLogical;
|
||||
}
|
||||
|
||||
/* Alternate version of the above, for ESPs */
|
||||
HANDLE AltGetLogicalHandle(DWORD DriveIndex, uint64_t PartitionOffset, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWriteShare)
|
||||
{
|
||||
HANDLE hLogical = INVALID_HANDLE_VALUE;
|
||||
char* LogicalPath = AltGetLogicalName(DriveIndex, PartitionOffset, FALSE, FALSE);
|
||||
|
||||
if (LogicalPath == NULL) {
|
||||
uprintf("No logical drive found");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hLogical = GetHandle(LogicalPath, bLockDrive, bWriteAccess, bWriteShare);
|
||||
free(LogicalPath);
|
||||
return hLogical;
|
||||
}
|
||||
|
||||
/*
|
||||
* Who would have thought that Microsoft would make it so unbelievably hard to
|
||||
* get the frickin' device number for a drive? You have to use TWO different
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Rufus: The Reliable USB Formatting Utility
|
||||
* Drive access function calls
|
||||
* Copyright © 2011-2021 Pete Batard <pete@akeo.ie>
|
||||
* Copyright © 2011-2022 Pete Batard <pete@akeo.ie>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -384,6 +384,7 @@ char* AltGetLogicalName(DWORD DriveIndex, uint64_t PartitionOffset, BOOL bKeepTr
|
|||
char* GetExtPartitionName(DWORD DriveIndex, uint64_t PartitionOffset);
|
||||
BOOL WaitForLogical(DWORD DriveIndex, uint64_t PartitionOffset);
|
||||
HANDLE GetLogicalHandle(DWORD DriveIndex, uint64_t PartitionOffset, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWriteShare);
|
||||
HANDLE AltGetLogicalHandle(DWORD DriveIndex, uint64_t PartitionOffset, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWriteShare);
|
||||
int GetDriveNumber(HANDLE hDrive, char* path);
|
||||
BOOL GetDriveLetters(DWORD DriveIndex, char* drive_letters);
|
||||
UINT GetDriveTypeFromIndex(DWORD DriveIndex);
|
||||
|
|
78
src/format.c
78
src/format.c
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Rufus: The Reliable USB Formatting Utility
|
||||
* Formatting function calls
|
||||
* Copyright © 2011-2021 Pete Batard <pete@akeo.ie>
|
||||
* Copyright © 2011-2022 Pete Batard <pete@akeo.ie>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -2125,11 +2125,20 @@ DWORD WINAPI FormatThread(void* param)
|
|||
// Wait for the logical drive we just created to appear
|
||||
uprintf("Waiting for logical drive to reappear...");
|
||||
Sleep(200);
|
||||
if (!WaitForLogical(DriveIndex, partition_offset[PI_MAIN])) {
|
||||
uprintf("Logical drive was not found - aborting");
|
||||
if (!IS_ERROR(FormatStatus))
|
||||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | ERROR_TIMEOUT;
|
||||
goto out;
|
||||
if (write_as_esp) {
|
||||
// Can't format the ESP unless we mount it ourself
|
||||
volume_name = AltMountVolume(DriveIndex, partition_offset[PI_MAIN], FALSE);
|
||||
if (volume_name == NULL) {
|
||||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | APPERR(ERROR_CANT_ASSIGN_LETTER);
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
if (!WaitForLogical(DriveIndex, partition_offset[PI_MAIN])) {
|
||||
uprintf("Logical drive was not found - aborting");
|
||||
if (!IS_ERROR(FormatStatus))
|
||||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | ERROR_TIMEOUT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
CHECK_FOR_USER_CANCEL;
|
||||
|
||||
|
@ -2190,33 +2199,37 @@ DWORD WINAPI FormatThread(void* param)
|
|||
UpdateProgress(OP_FIX_MBR, -1.0f);
|
||||
}
|
||||
Sleep(200);
|
||||
WaitForLogical(DriveIndex, 0);
|
||||
// Try to continue
|
||||
CHECK_FOR_USER_CANCEL;
|
||||
|
||||
volume_name = GetLogicalName(DriveIndex, partition_offset[PI_MAIN], TRUE, TRUE);
|
||||
if (volume_name == NULL) {
|
||||
uprintf("Could not get volume name");
|
||||
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|ERROR_NO_VOLUME_ID;
|
||||
goto out;
|
||||
}
|
||||
uprintf("Found volume %s", volume_name);
|
||||
if (!write_as_esp) {
|
||||
WaitForLogical(DriveIndex, 0);
|
||||
// Try to continue
|
||||
CHECK_FOR_USER_CANCEL;
|
||||
|
||||
// Windows is really finicky with regards to reassigning drive letters even after
|
||||
// we forcibly removed them, so add yet another explicit call to RemoveDriveLetters()
|
||||
RemoveDriveLetters(DriveIndex, FALSE, TRUE);
|
||||
if (!MountVolume(drive_name, volume_name)) {
|
||||
uprintf("Could not remount %s as %C: %s\n", volume_name, drive_name[0], WindowsErrorString());
|
||||
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_CANT_MOUNT_VOLUME);
|
||||
goto out;
|
||||
}
|
||||
CHECK_FOR_USER_CANCEL;
|
||||
volume_name = GetLogicalName(DriveIndex, partition_offset[PI_MAIN], TRUE, TRUE);
|
||||
if (volume_name == NULL) {
|
||||
uprintf("Could not get volume name");
|
||||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | ERROR_NO_VOLUME_ID;
|
||||
goto out;
|
||||
}
|
||||
uprintf("Found volume %s", volume_name);
|
||||
|
||||
// Disable file indexing, unless it was force-enabled by the user
|
||||
if ((!enable_file_indexing) && ((fs_type == FS_NTFS) || (fs_type == FS_UDF) || (fs_type == FS_REFS))) {
|
||||
uprintf("Disabling file indexing...");
|
||||
if (!SetFileAttributesA(volume_name, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED))
|
||||
uprintf("Could not disable file indexing: %s", WindowsErrorString());
|
||||
|
||||
// Windows is really finicky with regards to reassigning drive letters even after
|
||||
// we forcibly removed them, so add yet another explicit call to RemoveDriveLetters()
|
||||
RemoveDriveLetters(DriveIndex, FALSE, TRUE);
|
||||
if (!MountVolume(drive_name, volume_name)) {
|
||||
uprintf("Could not remount %s as %C: %s\n", volume_name, drive_name[0], WindowsErrorString());
|
||||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | APPERR(ERROR_CANT_MOUNT_VOLUME);
|
||||
goto out;
|
||||
}
|
||||
CHECK_FOR_USER_CANCEL;
|
||||
|
||||
// Disable file indexing, unless it was force-enabled by the user
|
||||
if ((!enable_file_indexing) && ((fs_type == FS_NTFS) || (fs_type == FS_UDF) || (fs_type == FS_REFS))) {
|
||||
uprintf("Disabling file indexing...");
|
||||
if (!SetFileAttributesA(volume_name, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED))
|
||||
uprintf("Could not disable file indexing: %s", WindowsErrorString());
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh the drive label - This is needed as Windows may have altered it from
|
||||
|
@ -2370,11 +2383,14 @@ DWORD WINAPI FormatThread(void* param)
|
|||
}
|
||||
|
||||
out:
|
||||
if (write_as_esp && volume_name != NULL)
|
||||
AltUnmountVolume(volume_name, TRUE);
|
||||
else
|
||||
safe_free(volume_name);
|
||||
if ((boot_type == BT_IMAGE) && write_as_image) {
|
||||
PrintInfo(0, MSG_320, lmprintf(MSG_307));
|
||||
VdsRescan(VDS_RESCAN_REFRESH, 0, TRUE);
|
||||
}
|
||||
safe_free(volume_name);
|
||||
safe_free(buffer);
|
||||
safe_unlockclose(hLogicalVolume);
|
||||
safe_unlockclose(hPhysicalDrive); // This can take a while
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Rufus: The Reliable USB Formatting Utility
|
||||
* Large FAT32 formatting
|
||||
* Copyright © 2007-2009 Tom Thornhill/Ridgecrop
|
||||
* Copyright © 2011-2021 Pete Batard <pete@akeo.ie>
|
||||
* Copyright © 2011-2022 Pete Batard <pete@akeo.ie>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -42,6 +42,8 @@
|
|||
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|err; \
|
||||
goto out; } while(0)
|
||||
|
||||
extern BOOL write_as_esp;
|
||||
|
||||
/* Large FAT32 */
|
||||
#pragma pack(push, 1)
|
||||
typedef struct tagFAT_BOOTSECTOR32
|
||||
|
@ -196,7 +198,9 @@ BOOL FormatLargeFAT32(DWORD DriveIndex, uint64_t PartitionOffset, DWORD ClusterS
|
|||
VolumeId = GetVolumeID();
|
||||
|
||||
// Open the drive and lock it
|
||||
hLogicalVolume = GetLogicalHandle(DriveIndex, PartitionOffset, TRUE, TRUE, FALSE);
|
||||
hLogicalVolume = write_as_esp ?
|
||||
AltGetLogicalHandle(DriveIndex, PartitionOffset, TRUE, TRUE, FALSE) :
|
||||
GetLogicalHandle(DriveIndex, PartitionOffset, TRUE, TRUE, FALSE);
|
||||
if (IS_ERROR(FormatStatus))
|
||||
goto out;
|
||||
if ((hLogicalVolume == INVALID_HANDLE_VALUE) || (hLogicalVolume == NULL))
|
||||
|
@ -450,7 +454,9 @@ BOOL FormatLargeFAT32(DWORD DriveIndex, uint64_t PartitionOffset, DWORD ClusterS
|
|||
uprintf("Setting label...");
|
||||
// Handle must be closed for SetVolumeLabel to work
|
||||
safe_closehandle(hLogicalVolume);
|
||||
VolumeName = GetLogicalName(DriveIndex, PartitionOffset, TRUE, TRUE);
|
||||
VolumeName = write_as_esp ?
|
||||
AltGetLogicalName(DriveIndex, PartitionOffset, TRUE, TRUE) :
|
||||
GetLogicalName(DriveIndex, PartitionOffset, TRUE, TRUE);
|
||||
if ((VolumeName == NULL) || (!SetVolumeLabelA(VolumeName, Label))) {
|
||||
uprintf("Could not set label: %s", WindowsErrorString());
|
||||
// Non fatal error
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_ACCEPTFILES
|
||||
CAPTION "Rufus 3.18.1862"
|
||||
CAPTION "Rufus 3.18.1864"
|
||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||
|
@ -395,8 +395,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,18,1862,0
|
||||
PRODUCTVERSION 3,18,1862,0
|
||||
FILEVERSION 3,18,1864,0
|
||||
PRODUCTVERSION 3,18,1864,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -414,13 +414,13 @@ BEGIN
|
|||
VALUE "Comments", "https://rufus.ie"
|
||||
VALUE "CompanyName", "Akeo Consulting"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "3.18.1862"
|
||||
VALUE "FileVersion", "3.18.1864"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
||||
VALUE "OriginalFilename", "rufus-3.18.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "3.18.1862"
|
||||
VALUE "ProductVersion", "3.18.1864"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue