mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-09-17 01:11:19 +00:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
68a9cebe19 | ||
|
cc77c74bf4 | ||
|
ee952e3f69 | ||
|
b11a499939 | ||
|
fdf4693433 | ||
|
ac65c0fb24 | ||
|
ea0afe7c8b | ||
|
f8ca8b13d3 | ||
|
678a2abdf1 | ||
|
e645301713 | ||
|
43b415c032 | ||
|
311d2961ca | ||
|
1d66584190 | ||
|
553c853865 | ||
|
7d90912a09 |
2
.github/ISSUE_TEMPLATE/issue_template.yml
vendored
2
.github/ISSUE_TEMPLATE/issue_template.yml
vendored
@@ -21,7 +21,7 @@ body:
|
||||
attributes:
|
||||
label: Ventoy Version
|
||||
description: What version of ventoy are you running?
|
||||
placeholder: 1.0.80
|
||||
placeholder: 1.0.82
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
@@ -2212,6 +2212,21 @@ ventoy_password_get (char buf[], unsigned buf_size)
|
||||
return (key != GRUB_TERM_ESC);
|
||||
}
|
||||
|
||||
static int ventoy_get_password(char buf[], unsigned buf_size)
|
||||
{
|
||||
const char *env = NULL;
|
||||
|
||||
env = grub_env_get("VTOY_SHOW_PASSWORD_ASTERISK");
|
||||
if (env && env[0] == '0' && env[1] == 0)
|
||||
{
|
||||
return grub_password_get(buf, buf_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ventoy_password_get(buf, buf_size);
|
||||
}
|
||||
}
|
||||
|
||||
int ventoy_check_password(const vtoy_password *pwd, int retry)
|
||||
{
|
||||
int offset;
|
||||
@@ -2227,7 +2242,7 @@ int ventoy_check_password(const vtoy_password *pwd, int retry)
|
||||
|
||||
if (pwd->type == VTOY_PASSWORD_TXT)
|
||||
{
|
||||
ventoy_password_get(input, 128);
|
||||
ventoy_get_password(input, 128);
|
||||
if (grub_strcmp(pwd->text, input) == 0)
|
||||
{
|
||||
return 0;
|
||||
@@ -2235,7 +2250,7 @@ int ventoy_check_password(const vtoy_password *pwd, int retry)
|
||||
}
|
||||
else if (pwd->type == VTOY_PASSWORD_MD5)
|
||||
{
|
||||
ventoy_password_get(input, 128);
|
||||
ventoy_get_password(input, 128);
|
||||
grub_crypto_hash(GRUB_MD_MD5, md5, input, grub_strlen(input));
|
||||
if (grub_memcmp(pwd->md5, md5, 16) == 0)
|
||||
{
|
||||
@@ -2245,7 +2260,7 @@ int ventoy_check_password(const vtoy_password *pwd, int retry)
|
||||
else if (pwd->type == VTOY_PASSWORD_SALT_MD5)
|
||||
{
|
||||
offset = (int)grub_snprintf(input, 128, "%s", pwd->salt);
|
||||
ventoy_password_get(input + offset, 128);
|
||||
ventoy_get_password(input + offset, 128);
|
||||
|
||||
grub_crypto_hash(GRUB_MD_MD5, md5, input, grub_strlen(input));
|
||||
if (grub_memcmp(pwd->md5, md5, 16) == 0)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2344,7 +2344,7 @@ function img_unsupport_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.0.81"
|
||||
set VENTOY_VERSION="1.0.82"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
@@ -2575,6 +2575,7 @@ export VTOY_HELP_CMD
|
||||
export VTOY_CHKSUM_CMD
|
||||
export VTOY_HELP_TXT_LANGUAGE
|
||||
export VTOY_CHKSUM_FILE_PATH
|
||||
export VTOY_HOTKEY_TIP
|
||||
|
||||
|
||||
#colect all image files (iso files)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -55,6 +55,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"توقفت عملية تثبيت Ventoy بدون تهيئة لعدم استيفاء بعض الشروط. تفقد ملف log.txt للتفاصيل.",
|
||||
"STR_INSTALL_YES_TIP1":"تحذير: سيتم فقدان البيانات!",
|
||||
"STR_INSTALL_YES_TIP2":"يرجى إدخال YES في مربع النص في الأسفل للتأكيد بأنك تريد عمل تثبيت جديد بدلاً من التحديث.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -114,6 +115,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"ZƏrərsiz Ventoy quraşdırması dayandırıldı, belə ki, bəzi şərtlər yerinə yetirilə bilməd. Daha ətraflı məlumat üçün.txt jurnal faylına baxın.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -126,8 +128,8 @@
|
||||
"STR_ERROR":"오류",
|
||||
"STR_WARNING":"경고",
|
||||
"STR_INFO":"정보",
|
||||
"STR_INCORRECT_DIR":"올바른 디렉토리에서 실행하십시오!",
|
||||
"STR_INCORRECT_TREE_DIR":"여기서 실행하지 말고, 출시된 설치 패키지를 다운로드한 다음 거기서 실행하십시오.",
|
||||
"STR_INCORRECT_DIR":"올바른 디렉터리에서 실행하십시오!",
|
||||
"STR_INCORRECT_TREE_DIR":"여기서 프로그램 (INSTALL 디렉터리)을 실행하지 말고 설치 패키지를 다운로드하여 압축을 푼 후 그곳에서 실행해 주십시오.",
|
||||
"STR_DEVICE":"장치",
|
||||
"STR_LOCAL_VER":"패키지의 Ventoy 버전",
|
||||
"STR_DISK_VER":"장치 내부의 Ventoy 버전",
|
||||
@@ -173,7 +175,8 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"일부 조건을 충족할 수 없기 때문에 Ventoy 비파괴 설치가 중지되었습니다. 자세한 내용은 log.txt를 확인하십시오.",
|
||||
"STR_INSTALL_YES_TIP1":"경고: 데이터가 손실됩니다!",
|
||||
"STR_INSTALL_YES_TIP2":"업그레이드 대신 새로 설치할지 확인하려면 아래 입력란에 YES를 입력하십시오.",
|
||||
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -232,7 +235,8 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"条件不满足,无法进行无损安装。详细信息请查阅 log.txt 文件。",
|
||||
"STR_INSTALL_YES_TIP1":"警告: 所有数据将会丢失!",
|
||||
"STR_INSTALL_YES_TIP2":"请在下面文本框中输入 YES 以确认你是要进行安装而不是升级。",
|
||||
|
||||
"STR_PART_VENTOY_FS":"Ventoy 分区文件系统类型",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -291,6 +295,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -349,6 +354,8 @@
|
||||
"STR_VTSI_CREATE_FAILED": "გაფრთხილება: მონაცემები დაიკარგება!",
|
||||
"STR_MENU_PART_RESIZE": "გთხოვთ, შეიყვანოთ YES ქვემოთ მოცემულ ტექსტურ ველში, რათა დაადასტუროთ... გსურთ განახლების ნაცვლად განახორციელოთ ახალი ინსტალაცია.",
|
||||
"STR_PART_RESIZE_TIP": "Ventoy ჩეეცდება დააყენოს არა-დესტრუქციული რამდენადაც შეეცდება. გსურს გაგრძელება?",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX": ""
|
||||
},
|
||||
{
|
||||
@@ -407,6 +414,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -466,6 +474,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nieniszcząca instalacja Ventoy została zatrzymana, ponieważ niektóre wymagania nie zostały spełnione. Sprawdź log.txt po szczegóły.",
|
||||
"STR_INSTALL_YES_TIP1":"Ostrzeżenie: Dane zostaną utracone!",
|
||||
"STR_INSTALL_YES_TIP2":"Wpisz YES w poniższym polu tekstowym, aby potwierdzić, że naprawdę chcesz przeprowadzić nową instalację zamiast aktualizacji.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -525,6 +534,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalação não destrutiva do Ventoy interrompida devido fato desconhecido. Cheque o arquivo log.txt para detalhes.",
|
||||
"STR_INSTALL_YES_TIP1":"Aviso: Os dados serão perdidos!",
|
||||
"STR_INSTALL_YES_TIP2":"Por favor, digite YES na caixa de texto abaixo para confirmar que você realmente quer fazer uma nova instalação em vez de atualização.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -584,6 +594,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy Tahribatsız Kurulum, bazı koşullar sağlanmadığı için durduruldu. Ayrıntılı bilgi için log.txt dosyasını kontrol edin.",
|
||||
"STR_INSTALL_YES_TIP1":"Uyarı: Tüm verileriniz kaybolacak!",
|
||||
"STR_INSTALL_YES_TIP2":"Güncelleme yapmak yerine,yeni bir kurulum yapmak istediğinizi doğrulamak için lütfen aşağıdaki metin kutusuna YES yazın.",
|
||||
"STR_PART_VENTOY_FS":"Ventoy bölümü Dosya Sistemi",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -643,6 +654,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Installation ohne vorherige Formatierung wurde auf Grund einiger nicht erfüllbarer Bedingungen gestoppt. Für Details die log.txt prüfen.",
|
||||
"STR_INSTALL_YES_TIP1":"Warnung: Die Daten gehen verloren!",
|
||||
"STR_INSTALL_YES_TIP2":"Bitte bestätigen Sie in der unteren Textbox mit YES, dass Sie anstelle eines Upgrades eine frische Installation durchführen möchten.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -702,6 +714,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -761,6 +774,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"L'installation non destructive de Ventoy s'est arrêtée car certaines conditions ne peuvent pas être remplies. Consultez log.txt pour plus de détails.",
|
||||
"STR_INSTALL_YES_TIP1":"Attention : les données seront perdues !",
|
||||
"STR_INSTALL_YES_TIP2":"Veuillez saisir YES dans la zone de texte ci-dessous pour confirmer que vous souhaitez bien effectuer une nouvelle installation au lieu d'une mise à niveau.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -820,6 +834,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nedestruktivní instalace Ventoy selhala, protože některé podmínky pro ni nemohly být splněny. Pro podrobnosti se podívejte do souboru log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Varování: Data budou ztracena!",
|
||||
"STR_INSTALL_YES_TIP2":"Do níže uvedeného textového pole zadejte YES a potvrďte, že skutečně chcete provést novou instalaci namísto aktualizace.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -878,7 +893,8 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nedeštruktívna inštalácia Ventoy zlyhala, lebo niektoré podmienky nemohli byť splnené. Podrobnosti nájdete v súbore log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Varovanie: Dôjde k strate údajov!",
|
||||
"STR_INSTALL_YES_TIP2":"Prosím, zadajte YES v textovom poli nižšie, čím potvrdíte, že naozaj chcete vykonať novú inštaláciu miesto aktualizácie.",
|
||||
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -937,6 +953,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalación no destructiva de Ventoy detenida porque algunas condiciones no se pueden cumplir. Comprueba log.txt para detalles.",
|
||||
"STR_INSTALL_YES_TIP1":"Advertencia: ¡Los datos se perderán!",
|
||||
"STR_INSTALL_YES_TIP2":"Por favor ingresa YES en el cuadro de texto a continuación para confirmar que realmente quieres realizar una instalación nueva en vez de actualizar.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -996,6 +1013,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"La instalación no destructiva de Ventoy se ha detenido porque no se han cumplido todos los prerrequisitos.#@Compruebe el archivo log.txt para más información.",
|
||||
"STR_INSTALL_YES_TIP1":"Advertencia: ¡Los datos se perderán!",
|
||||
"STR_INSTALL_YES_TIP2":"Por favor, escriba YES en el cuadro de texto a continuación para confirmar que realmente quiere realizar una nueva instalación de Ventoy en vez de actualizarlo.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1003,7 +1021,7 @@
|
||||
"name":"Russian (Pусский)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"BL4CKH47H4CK3R, Teraskull, thehugonote",
|
||||
"Author":"BL4CKH47H4CK3R, Teraskull, thehugonote, wiz64",
|
||||
|
||||
"STR_ERROR":"Ошибка",
|
||||
"STR_WARNING":"Предупреждение",
|
||||
@@ -1053,8 +1071,9 @@
|
||||
"STR_PART_RESIZE_SUCCESS":"Поздравляем!#@Неразрушающая установка Ventoy успешно завершена.",
|
||||
"STR_PART_RESIZE_FAILED":"Не удалось выполнить неразрушающую установку, проверьте файл log.txt для получения подробной информации.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Неразрушающая установка Ventoy остановлена, поскольку некоторые условия не могут быть выполнены. Проверьте файл log.txt для получения подробной информации.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_INSTALL_YES_TIP1":"Предупреждение: Данные будут потеряны!",
|
||||
"STR_INSTALL_YES_TIP2":"Пожалуйста, введите YES в текстовое поле ниже, чтобы подтвердить, что вы действительно хотите выполнить новую установку вместо обновления.",
|
||||
"STR_PART_VENTOY_FS":"Файловая система для Ventoy раздела",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1062,7 +1081,7 @@
|
||||
"name":"Bengali (বাংলা)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"BL4CKH47H4CK3R",
|
||||
"Author":"BL4CKH47H4CK3R, wiz64",
|
||||
|
||||
"STR_ERROR":"ত্রুটি",
|
||||
"STR_WARNING":"সতর্কতা",
|
||||
@@ -1095,25 +1114,26 @@
|
||||
"STR_CLEAR_FAILED":"ডিস্ক থেকে Ventoy সাফ করার সময় একটি ত্রুটি ঘটেছে। আপনি USB পুনরায় প্লাগ করতে পারেন এবং আবার চেষ্টা করতে পারেন। বিস্তারিত জানার জন্য log.txt পরীক্ষা করুন।",
|
||||
"STR_MENU_PART_STYLE":"পার্টিশন স্টাইল",
|
||||
"STR_DISK_2TB_MBR_ERROR":"2TB এর বেশি ডিস্কের জন্য দয়া করে GPT নির্বাচন করুন",
|
||||
"STR_SHOW_ALL_DEV":"Show All Devices",
|
||||
"STR_PART_ALIGN_4KB":"Align partitions with 4KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Communication error:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Communication error: remote abnormal",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Communication error: Request timed out",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Communication error: Service Unavailable",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Daemon status updated, please retry later.",
|
||||
"STR_WEB_SERVICE_BUSY":"Service is busy, please retry later.",
|
||||
"STR_MENU_VTSI_CREATE":"Generate VTSI File",
|
||||
"STR_VTSI_CREATE_TIP":"This time will not write to the device, but only generate a VTSI file#@Continue?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI file created successfully!#@You can use Rufus(3.15+) to write it to the device so as to complete the installation of Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI file created failed.",
|
||||
"STR_MENU_PART_RESIZE":"Non-destructive Install",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy will try non-destructive installation if possible. #@Continue?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Congratulations!#@Ventoy non-destructive installation successfully finished.",
|
||||
"STR_PART_RESIZE_FAILED":"Non-destructive installation failed, Check log.txt for details.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_SHOW_ALL_DEV":"সমস্ত ডিভাইস দেখান",
|
||||
"STR_PART_ALIGN_4KB":"4KB দিয়ে পার্টিশন সারিবদ্ধ করুন",
|
||||
"STR_WEB_COMMUNICATION_ERR":"যোগাযোগে ত্রুটি:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"যোগাযোগ ত্রুটি: দূরবর্তী অস্বাভাবিক",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"যোগাযোগ ত্রুটি: অনুরোধের সময় শেষ হয়েছে৷",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"যোগাযোগ ত্রুটি: পরিষেবা অনুপলব্ধ৷",
|
||||
"STR_WEB_TOKEN_MISMATCH":"ডেমন স্ট্যাটাস আপডেট হয়েছে, অনুগ্রহ করে পরে আবার চেষ্টা করুন।",
|
||||
"STR_WEB_SERVICE_BUSY":"পরিষেবা ব্যস্ত, পরে আবার চেষ্টা করুন।",
|
||||
"STR_MENU_VTSI_CREATE":"VTSI ফাইল তৈরি করুন",
|
||||
"STR_VTSI_CREATE_TIP":"এই সময় ডিভাইসে লিখবেন না, তবে শুধুমাত্র একটি VTSI ফাইল তৈরি করবেন#@চালিয়ে যান?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI ফাইলটি সফলভাবে তৈরি হয়েছে!#@ আপনি Rufus(3.15+) ব্যবহার করে এটিকে ডিভাইসে লিখতে পারেন যাতে Ventoy-এর ইনস্টলেশন সম্পূর্ণ করা যায়।",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI ফাইল তৈরি করা ব্যর্থ হয়েছে৷",
|
||||
"STR_MENU_PART_RESIZE":"অ-ধ্বংসাত্মক ইনস্টল",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy সম্ভব হলে অ-ধ্বংসাত্মক ইনস্টলেশন চেষ্টা করবে। #@চালিয়ে যান?",
|
||||
"STR_PART_RESIZE_SUCCESS":"অভিনন্দন!#@Ventoy অ-ধ্বংসাত্মক ইনস্টলেশন সফলভাবে শেষ হয়েছে।",
|
||||
"STR_PART_RESIZE_FAILED":"অ-ধ্বংসাত্মক ইনস্টলেশন ব্যর্থ হয়েছে, বিস্তারিত জানার জন্য log.txt চেক করুন।",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy অ-ধ্বংসাত্মক ইনস্টলেশন বন্ধ করা হয়েছে কারণ কিছু শর্ত পূরণ করা যাবে না। বিস্তারিত জানার জন্য log.txt দেখুন।",
|
||||
"STR_INSTALL_YES_TIP1":"সতর্কতা: ডেটা হারিয়ে যাবে!",
|
||||
"STR_INSTALL_YES_TIP2":"আপনি আপগ্রেড করার পরিবর্তে একটি নতুন ইনস্টল করতে চান তা নিশ্চিত করতে দয়া করে নীচের পাঠ্য বাক্সে Yes লিখুন৷।",
|
||||
"STR_PART_VENTOY_FS":"Ventoy পার্টিশনের জন্য ফাইল সিস্টেম",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1121,7 +1141,7 @@
|
||||
"name":"Hindi (हिन्दी)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"BL4CKH47H4CK3R",
|
||||
"Author":"BL4CKH47H4CK3R, wiz64",
|
||||
|
||||
"STR_ERROR":"त्रुटि",
|
||||
"STR_WARNING":"चेतावनी",
|
||||
@@ -1154,25 +1174,26 @@
|
||||
"STR_CLEAR_FAILED":"डिस्क से Ventoy को साफ़ करते समय एक त्रुटि हुई। आप USB को पुन: भर सकते हैं और पुनः प्रयास कर सकते हैं। विस्तार के लिए log.txt की जाँच करें।",
|
||||
"STR_MENU_PART_STYLE":"विभाजन शैली",
|
||||
"STR_DISK_2TB_MBR_ERROR":"कृपया 2TB से अधिक डिस्क के लिए GPT का चयन करें",
|
||||
"STR_SHOW_ALL_DEV":"Show All Devices",
|
||||
"STR_PART_ALIGN_4KB":"Align partitions with 4KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Communication error:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Communication error: remote abnormal",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Communication error: Request timed out",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Communication error: Service Unavailable",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Daemon status updated, please retry later.",
|
||||
"STR_WEB_SERVICE_BUSY":"Service is busy, please retry later.",
|
||||
"STR_MENU_VTSI_CREATE":"Generate VTSI File",
|
||||
"STR_VTSI_CREATE_TIP":"This time will not write to the device, but only generate a VTSI file#@Continue?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI file created successfully!#@You can use Rufus(3.15+) to write it to the device so as to complete the installation of Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI file created failed.",
|
||||
"STR_MENU_PART_RESIZE":"Non-destructive Install",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy will try non-destructive installation if possible. #@Continue?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Congratulations!#@Ventoy non-destructive installation successfully finished.",
|
||||
"STR_PART_RESIZE_FAILED":"Non-destructive installation failed, Check log.txt for details.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_SHOW_ALL_DEV":"सभी डिवाइस दिखाएं",
|
||||
"STR_PART_ALIGN_4KB":"4KB के साथ partitions संरेखित करें",
|
||||
"STR_WEB_COMMUNICATION_ERR":"संपर्क त्रुटि:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"संचार त्रुटि: remote असामान्य",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"संचार त्रुटि: अनुरोध समयबाह्य (request timeout)",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"संचार त्रुटि: सेवा अनुपलब्ध",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Daemon की स्थिति अपडेट की गई, कृपया बाद में पुन: प्रयास करें।",
|
||||
"STR_WEB_SERVICE_BUSY":"सेवा व्यस्त है, कृपया बाद में पुनः प्रयास करें।",
|
||||
"STR_MENU_VTSI_CREATE":"VTSI File उत्पन्न करें",
|
||||
"STR_VTSI_CREATE_TIP":"इस बार डिवाइस पर नहीं लिखा जाएगा, लेकिन केवल एक VTSI File उत्पन्न होगी#@जारी रखें?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI फ़ाइल सफलतापूर्वक बनाई गई!#@ आप इसे डिवाइस पर लिखने के लिए Rufus(3.15+) का उपयोग कर सकते हैं ताकि Ventoy की स्थापना को पूरा किया जा सके।",
|
||||
"STR_VTSI_CREATE_FAILED":"बनाई गई VTSI file विफल रही।",
|
||||
"STR_MENU_PART_RESIZE":"गैर-विनाशकारी इंस्टॉल",
|
||||
"STR_PART_RESIZE_TIP":"यदि संभव हो तो Ventoy गैर-विनाशकारी स्थापना का प्रयास करेगा। #@जारी रखना?",
|
||||
"STR_PART_RESIZE_SUCCESS":"बधाई हो!#@Ventoy गैर-विनाशकारी स्थापना सफलतापूर्वक समाप्त हो गई।",
|
||||
"STR_PART_RESIZE_FAILED":"गैर-विनाशकारी स्थापना विफल, विवरण के लिए log.txt की जाँच करें।",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"वेंटोय गैर-विनाशकारी स्थापना रोक दी गई, कुछ शर्तों को पूरा नहीं किया जा सकता है। विवरण के लिए log.txt की जाँच करें।",
|
||||
"STR_INSTALL_YES_TIP1":"चेतावनी: डेटा खो जाएगा!",
|
||||
"STR_INSTALL_YES_TIP2":"यह पुष्टि करने के लिए कि आप वास्तव में अपग्रेड के बजाय एक नया इंस्टॉल करना चाहते हैं, कृपया नीचे दिए टेक्स्ट बॉक्स में Yes दर्ज करें।",
|
||||
"STR_PART_VENTOY_FS":"Ventoy विभाजन के लिए फाइल सिस्टम",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1232,6 +1253,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"De niet-destructieve installatie van Ventoy is gestopt omdat aan sommige voorwaarden niet kan worden voldaan. Controleer log.txt voor details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1291,6 +1313,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1350,6 +1373,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoyを非破壊的に導入できませんでした。非破壊的導入にあたっての要件が満たされていません。詳細な記録はlog.txtにあります。",
|
||||
"STR_INSTALL_YES_TIP1":"警告: データが消去されます",
|
||||
"STR_INSTALL_YES_TIP2":"Ventoyを更新するのではなく新規に導入するということを確認するために,下の入力欄に「YES」と入力してください。",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1409,6 +1433,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"L'installazione non distruttiva di Ventoy è stata interrotta perché alcune condizioni non possono essere soddisfatte.#@Per i dettagli controlla il file log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Attenzione: i dati verranno persi!",
|
||||
"STR_INSTALL_YES_TIP2":"Digita YES nella casella di testo qui sotto per confermare che vuoi davvero eseguire un'installazione pulita anziché un aggiornamento.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1468,6 +1493,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1527,6 +1553,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"A Ventoy rombolásmentes telepítése leállt, mert bizonyos feltételek nem teljesíthetők. A részleteket lásd a log.txt fájlban.",
|
||||
"STR_INSTALL_YES_TIP1":"Figyelmeztetés: Az adatok elvesznek!",
|
||||
"STR_INSTALL_YES_TIP2":"Írja a YES szót az alábbi szövegmezőbe, hogy megerősítse, valóban új telepítést szeretne végrehajtani a frissítés helyett.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1586,6 +1613,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy 無損安裝已中止因為未滿足部分條件。詳細訊息請檢視 log.txt 檔案。",
|
||||
"STR_INSTALL_YES_TIP1":"警告:資料將會遺失!",
|
||||
"STR_INSTALL_YES_TIP2":"請在下方的文字輸入框輸入 YES 來證實您想要進行全新安裝取代升級。",
|
||||
"STR_PART_VENTOY_FS":"Ventoy 分割區文件系統",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1645,6 +1673,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1704,6 +1733,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1763,6 +1793,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1822,6 +1853,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1881,6 +1913,8 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Cài Ventoy theo cách cài đặt không phá hủy đã bị dừng lại vì chưa đúng điều kiện. Xem chi tiết ở tệp log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1939,6 +1973,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1998,6 +2033,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Недеструктивната инсталација на Ventoy е запрена бидејќи некои услови не се исполнети. Проверете го log.txt за детали.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2057,6 +2093,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2116,6 +2153,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2175,6 +2213,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Pemasangan tanpa merusakkan Ventoy terhenti karena beberapa kondisi yang tidak mendukung. Periksa berkas log.txt untuk detil.",
|
||||
"STR_INSTALL_YES_TIP1":"Peringatan: Data akan hilang!",
|
||||
"STR_INSTALL_YES_TIP2":"Silakan ketik YES pada kotak tulis di bawah untuk meyakinkan bahwa anda memang untuk melakukan pemasangan baru ketimbang memperbaruinya",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2234,6 +2273,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2293,6 +2333,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Неруйнівна установка Ventoy зупинена через неможливість виконання деяких умов. Перевірте log.txt для отримання детальної інформації.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2352,6 +2393,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2411,6 +2453,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Icke-förstörande installation stoppades eftersom vissa villkor inte kunde uppfyllas. Mer information finns i log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Varning: Data kommer att gå förlorade!",
|
||||
"STR_INSTALL_YES_TIP2":"Skriv YES i textrutan nedan för att bekräfta att du verkligen vill göra en nyinstallation i stället för att uppgradera.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2470,6 +2513,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy je ustavil inštalacijo ker nekateri pogoji niso zadostni. Preveri log.txt a podrobnosti.",
|
||||
"STR_INSTALL_YES_TIP1":"Pozor: Podatki bodo izbrisani!",
|
||||
"STR_INSTALL_YES_TIP2":"Prosim vtipkajte YES v spodnje okno da potrdite čisto inštalacijo in ne zgolj nadgradnje.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2529,6 +2573,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Неразрушителното инсталиране на Ventoy е спряна, защото някои от условията не могат да бъдат изпълнени. Проверете log.txt за подробности.",
|
||||
"STR_INSTALL_YES_TIP1":"Внимание: Ще има загуба на данни!",
|
||||
"STR_INSTALL_YES_TIP2":"Въведете „YES“ в полето отдолу, за да потвърдите, че искате да извършите нова инсталация вместо обновяване.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2588,6 +2633,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2647,6 +2693,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoyn ei-tuhoisa asennus pysähtyi koska jotkut ehdot eivät täyttyneet. Tarkista log.txt nähdäksesi yksityiskohdat.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2706,6 +2753,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalación non destructiva do Ventoy interrompida porque non se poden cumprir algunhas condicións. Revisa o arquivo log.txt para mais detalles.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2765,6 +2813,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"La instal·lació no destructiva de Ventoy no ha estat possible perquè els requeriments no es compleixen. Comproveu el fitxer log.txt per a més detalls.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2825,7 +2874,8 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -2884,6 +2934,7 @@
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"சில நிபந்தனைகளை பூர்த்தி செய்ய முடியாததால், வென்டோய் அழிவில்லாத நிறுவல் நிறுத்தப்பட்டது. விவரங்களுக்கு log.txt ஐப் பார்க்கவும்.",
|
||||
"STR_INSTALL_YES_TIP1":"எச்சரிக்கை: தரவு தொலைந்து போகும்!",
|
||||
"STR_INSTALL_YES_TIP2":"மேம்படுத்துவதற்குப் பதிலாக புதிதாக நிறுவ விரும்புகிறீர்கள் என்பதை உறுதிப்படுத்த, கீழே உள்ள உரைப் பெட்டியில் ஆம் என உள்ளிடவும்.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
|
||||
"STRXXX":""
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ int ventoy_read_file_to_buf(const char *FileName, int ExtLen, void **Bufer, int
|
||||
const char * ventoy_get_local_version(void);
|
||||
int ventoy_fill_gpt(uint64_t size, uint64_t reserve, int align4k, VTOY_GPT_INFO *gpt);
|
||||
int ventoy_fill_mbr(uint64_t size, uint64_t reserve, int align4k, MBR_HEAD *pMBR);
|
||||
int VentoyGetLocalBootImg(MBR_HEAD *pMBR);
|
||||
|
||||
#endif /* __VENTOY_UTIL_H__ */
|
||||
|
||||
|
@@ -683,10 +683,45 @@ static int ventoy_write_gpt_part_table(int fd, uint64_t disksize, VTOY_GPT_INFO
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ventoy_mbr_need_update(ventoy_disk *disk, MBR_HEAD *mbr)
|
||||
{
|
||||
int update = 0;
|
||||
int partition_style;
|
||||
MBR_HEAD LocalMBR;
|
||||
|
||||
partition_style = disk->vtoydata.partition_style;
|
||||
memcpy(mbr, &(disk->vtoydata.gptinfo.MBR), 512);
|
||||
|
||||
VentoyGetLocalBootImg(&LocalMBR);
|
||||
memcpy(LocalMBR.BootCode + 0x180, mbr->BootCode + 0x180, 16);
|
||||
if (partition_style)
|
||||
{
|
||||
LocalMBR.BootCode[92] = 0x22;
|
||||
}
|
||||
|
||||
if (memcmp(LocalMBR.BootCode, mbr->BootCode, 440))
|
||||
{
|
||||
memcpy(mbr->BootCode, LocalMBR.BootCode, 440);
|
||||
vlog("MBR boot code different, must update it.\n");
|
||||
update = 1;
|
||||
}
|
||||
|
||||
if (partition_style == 0 && mbr->PartTbl[0].Active == 0)
|
||||
{
|
||||
mbr->PartTbl[0].Active = 0x80;
|
||||
mbr->PartTbl[1].Active = 0;
|
||||
mbr->PartTbl[2].Active = 0;
|
||||
mbr->PartTbl[3].Active = 0;
|
||||
vlog("set MBR partition 1 active flag enabled\n");
|
||||
update = 1;
|
||||
}
|
||||
|
||||
return update;
|
||||
}
|
||||
|
||||
static void * ventoy_update_thread(void *data)
|
||||
{
|
||||
int fd;
|
||||
int updateMBR;
|
||||
ssize_t len;
|
||||
off_t offset;
|
||||
MBR_HEAD MBR;
|
||||
@@ -744,34 +779,17 @@ static void * ventoy_update_thread(void *data)
|
||||
len = write(fd, disk->vtoydata.rsvdata, sizeof(disk->vtoydata.rsvdata));
|
||||
vlog("Writing reserve data offset:%llu len:%llu ...\n", (_ull)offset, (_ull)len);
|
||||
|
||||
updateMBR = 0;
|
||||
memcpy(&MBR, &(disk->vtoydata.gptinfo.MBR), 512);
|
||||
|
||||
if (disk->vtoydata.partition_style == 0 && MBR.PartTbl[0].Active == 0)
|
||||
{
|
||||
MBR.PartTbl[0].Active = 0x80;
|
||||
MBR.PartTbl[1].Active = 0;
|
||||
MBR.PartTbl[2].Active = 0;
|
||||
MBR.PartTbl[3].Active = 0;
|
||||
updateMBR = 1;
|
||||
vlog("set MBR partition 1 active flag enabled\n");
|
||||
}
|
||||
|
||||
if (MBR.BootCode[0x190] != 0x56 || MBR.BootCode[0x191] != 0x54)
|
||||
{
|
||||
vlog("set VT data %02x %02x\n", MBR.BootCode[0x190], MBR.BootCode[0x191]);
|
||||
MBR.BootCode[0x190] = 0x56;
|
||||
MBR.BootCode[0x191] = 0x54;
|
||||
updateMBR = 1;
|
||||
}
|
||||
|
||||
if (updateMBR)
|
||||
if (ventoy_mbr_need_update(disk, &MBR))
|
||||
{
|
||||
offset = lseek(fd, 0, SEEK_SET);
|
||||
len = write(fd, &MBR, 512);
|
||||
vlog("update MBR offset:%llu len:%llu\n", (_ull)offset, (_ull)len);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
vlog("No need to update MBR\n");
|
||||
}
|
||||
|
||||
g_current_progress = PT_SYNC_DATA1;
|
||||
|
||||
vlog("fsync data1...\n");
|
||||
|
@@ -5,7 +5,6 @@ hsetroot -fill /usr/share/wallpapers/wallpaper.png
|
||||
INIFILE=/ventoy/Ventoy2Disk.ini
|
||||
|
||||
echo "[Ventoy]" >> $INIFILE
|
||||
echo "Language=Chinese Simplified (简体中文)" >> $INIFILE
|
||||
echo "PartStyle=0" >> $INIFILE
|
||||
echo "ShowAllDevice=0" >> $INIFILE
|
||||
|
||||
|
@@ -513,6 +513,7 @@ void ventoy_data_default_control(data_control *data)
|
||||
{
|
||||
memset(data, 0, sizeof(data_control));
|
||||
|
||||
data->password_asterisk = 1;
|
||||
data->secondary_menu = 1;
|
||||
data->filter_dot_underscore = 1;
|
||||
data->max_search_level = -1;
|
||||
@@ -539,6 +540,7 @@ int ventoy_data_cmp_control(data_control *data1, data_control *data2)
|
||||
data1->filter_vtoy != data2->filter_vtoy ||
|
||||
data1->win11_bypass_check != data2->win11_bypass_check ||
|
||||
data1->linux_remount != data2->linux_remount ||
|
||||
data1->password_asterisk != data2->password_asterisk ||
|
||||
data1->secondary_menu != data2->secondary_menu ||
|
||||
data1->menu_timeout != data2->menu_timeout ||
|
||||
data1->secondary_menu_timeout != data2->secondary_menu_timeout)
|
||||
@@ -587,6 +589,7 @@ int ventoy_data_save_control(data_control *data, const char *title, char *buf, i
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_WIN11_BYPASS_CHECK", win11_bypass_check);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_LINUX_REMOUNT", linux_remount);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECONDARY_BOOT_MENU", secondary_menu);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SHOW_PASSWORD_ASTERISK", password_asterisk);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_MENU_TIMEOUT", menu_timeout);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECONDARY_TIMEOUT", secondary_menu_timeout);
|
||||
|
||||
@@ -634,6 +637,7 @@ int ventoy_data_json_control(data_control *ctrl, char *buf, int buflen)
|
||||
VTOY_JSON_FMT_SINT("win11_bypass_check", ctrl->win11_bypass_check);
|
||||
VTOY_JSON_FMT_SINT("linux_remount", ctrl->linux_remount);
|
||||
VTOY_JSON_FMT_SINT("secondary_menu", ctrl->secondary_menu);
|
||||
VTOY_JSON_FMT_SINT("password_asterisk", ctrl->password_asterisk);
|
||||
VTOY_JSON_FMT_SINT("menu_timeout", ctrl->menu_timeout);
|
||||
VTOY_JSON_FMT_SINT("secondary_menu_timeout", ctrl->secondary_menu_timeout);
|
||||
VTOY_JSON_FMT_STRN("default_kbd_layout", ctrl->default_kbd_layout);
|
||||
@@ -702,6 +706,7 @@ static int ventoy_api_save_control(struct mg_connection *conn, VTOY_JSON *json)
|
||||
VTOY_JSON_INT("win11_bypass_check", ctrl->win11_bypass_check);
|
||||
VTOY_JSON_INT("linux_remount", ctrl->linux_remount);
|
||||
VTOY_JSON_INT("secondary_menu", ctrl->secondary_menu);
|
||||
VTOY_JSON_INT("password_asterisk", ctrl->password_asterisk);
|
||||
VTOY_JSON_INT("menu_timeout", ctrl->menu_timeout);
|
||||
VTOY_JSON_INT("secondary_menu_timeout", ctrl->secondary_menu_timeout);
|
||||
|
||||
@@ -3981,31 +3986,35 @@ static int ventoy_parse_control(VTOY_JSON *json, void *p)
|
||||
|
||||
if (strcmp(child->pcName, "VTOY_DEFAULT_MENU_MODE") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->default_menu_mode);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->default_menu_mode);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_WIN11_BYPASS_CHECK") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->win11_bypass_check);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->win11_bypass_check);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_LINUX_REMOUNT") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->linux_remount);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->linux_remount);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_SECONDARY_BOOT_MENU") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->secondary_menu);
|
||||
CONTROL_PARSE_INT_DEF_1(child, data->secondary_menu);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_SHOW_PASSWORD_ASTERISK") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT_DEF_1(child, data->password_asterisk);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_TREE_VIEW_MENU_STYLE") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->treeview_style);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->treeview_style);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_FILT_DOT_UNDERSCORE_FILE") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->filter_dot_underscore);
|
||||
CONTROL_PARSE_INT_DEF_1(child, data->filter_dot_underscore);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_SORT_CASE_SENSITIVE") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->sort_casesensitive);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->sort_casesensitive);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_MAX_SEARCH_LEVEL") == 0)
|
||||
{
|
||||
@@ -4058,31 +4067,31 @@ static int ventoy_parse_control(VTOY_JSON *json, void *p)
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_VHD_NO_WARNING") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->vhd_no_warning);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->vhd_no_warning);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_FILE_FLT_ISO") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->filter_iso);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->filter_iso);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_FILE_FLT_IMG") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->filter_img);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->filter_img);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_FILE_FLT_EFI") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->filter_efi);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->filter_efi);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_FILE_FLT_WIM") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->filter_wim);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->filter_wim);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_FILE_FLT_VHD") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->filter_vhd);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->filter_vhd);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_FILE_FLT_VTOY") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->filter_vtoy);
|
||||
CONTROL_PARSE_INT_DEF_0(child, data->filter_vtoy);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -79,6 +79,7 @@ typedef struct data_control
|
||||
int secondary_menu_timeout;
|
||||
int linux_remount;
|
||||
int secondary_menu;
|
||||
int password_asterisk;
|
||||
char default_search_root[MAX_PATH];
|
||||
char default_image[MAX_PATH];
|
||||
char default_kbd_layout[32];
|
||||
@@ -402,9 +403,11 @@ else\
|
||||
} \
|
||||
}
|
||||
|
||||
#define CONTROL_PARSE_INT(node, val) \
|
||||
#define CONTROL_PARSE_INT_DEF_0(node, val) \
|
||||
if (node->unData.pcStrVal[0] == '1') val = 1
|
||||
|
||||
#define CONTROL_PARSE_INT_DEF_1(node, val) \
|
||||
if (node->unData.pcStrVal[0] == '0') val = 0
|
||||
|
||||
#define VTOY_JSON_INT(key, val) vtoy_json_get_int(json, key, &val)
|
||||
#define VTOY_JSON_STR(key, buf) vtoy_json_get_string(json, key, sizeof(buf), buf)
|
||||
|
Binary file not shown.
@@ -435,6 +435,49 @@
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SHOW_PASSWORD_ASTERISK
|
||||
<span id="id_span_desc_cn"> —— 输入密码时显示星号</span></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_asterisk_radio0" name="id_ctrl_asterisk_radio" data-type="0" value="0"> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_asterisk_radio1" name="id_ctrl_asterisk_radio" data-type="1" value="1"> <span style="font-weight:bold;">1</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>输入密码时是否显示星号
|
||||
<code style="font-weight: bold;">0</code> 不显示
|
||||
<code style="font-weight: bold;">1</code> 显示
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
Display asterisk when typing password
|
||||
<code style="font-weight: bold;">0</code> Don't display
|
||||
<code style="font-weight: bold;">1</code> Display
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SECONDARY_TIMEOUT
|
||||
@@ -1020,6 +1063,7 @@
|
||||
data.win11_bypass_check = parseInt($('input:radio[name=id_ctrl_bypass_win11_radio]:checked').val());
|
||||
data.linux_remount = parseInt($('input:radio[name=id_ctrl_linux_remount_radio]:checked').val());
|
||||
data.secondary_menu = parseInt($('input:radio[name=id_ctrl_secondary_radio]:checked').val());
|
||||
data.password_asterisk = parseInt($('input:radio[name=id_ctrl_asterisk_radio]:checked').val());
|
||||
data.default_search_root = $('input:text[id=id_ctrl_text_search_root]').val();
|
||||
data.menu_timeout = parseInt($('input:text[id=id_ctrl_text_timeout]').val());
|
||||
data.secondary_menu_timeout = parseInt($('input:text[id=id_ctrl_text_secondary_timeout]').val());
|
||||
@@ -1055,6 +1099,7 @@
|
||||
$('input:radio[name=id_ctrl_bypass_win11_radio]')[data.win11_bypass_check].checked = true;
|
||||
$('input:radio[name=id_ctrl_linux_remount_radio]')[data.linux_remount].checked = true;
|
||||
$('input:radio[name=id_ctrl_secondary_radio]')[data.secondary_menu].checked = true;
|
||||
$('input:radio[name=id_ctrl_asterisk_radio]')[data.password_asterisk].checked = true;
|
||||
|
||||
//VTOY_DEFAULT_SEARCH_ROOT
|
||||
$('input:text[id=id_ctrl_text_search_root]').val(data.default_search_root);
|
||||
@@ -1161,6 +1206,7 @@
|
||||
win11_bypass_check: data.win11_bypass_check,
|
||||
linux_remount:data.linux_remount,
|
||||
secondary_menu:data.secondary_menu,
|
||||
password_asterisk:data.password_asterisk,
|
||||
default_search_root: data.default_search_root,
|
||||
menu_timeout: data.menu_timeout,
|
||||
secondary_menu_timeout: data.secondary_menu_timeout,
|
||||
|
@@ -109,3 +109,19 @@ BOOL DISK_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter,
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL DISK_FormatVolume(char DriveLetter, int fs)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
|
||||
//ret = VDS_FormatVolume(DriveLetter, fs);
|
||||
if (!ret)
|
||||
{
|
||||
//ret = DSPT_FormatVolume(DriveLetter, fs);
|
||||
if (!ret)
|
||||
{
|
||||
ret = PSHELL_FormatVolume(DriveLetter, fs);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ BOOL DISK_ChangeVtoyEFIAttr(int DriveIndex, UINT64 Offset, UINT64 Attr);
|
||||
BOOL DISK_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);
|
||||
BOOL DISK_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);
|
||||
BOOL DISK_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);
|
||||
|
||||
BOOL DISK_FormatVolume(char DriveLetter, int fs);
|
||||
|
||||
|
||||
//VDS com
|
||||
@@ -51,10 +51,11 @@ BOOL VDS_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);
|
||||
BOOL VDS_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);
|
||||
BOOL VDS_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);
|
||||
BOOL VDS_IsLastAvaliable(void);
|
||||
|
||||
BOOL VDS_FormatVolume(char DriveLetter, int fs);
|
||||
|
||||
//diskpart.exe
|
||||
BOOL DSPT_CleanDisk(int DriveIndex);
|
||||
BOOL DSPT_FormatVolume(char DriveLetter, int fs);
|
||||
|
||||
//powershell.exe
|
||||
BOOL PSHELL_CleanDisk(int DriveIndex);
|
||||
@@ -62,6 +63,7 @@ BOOL PSHELL_DeleteVtoyEFIPartition(int DriveIndex, UINT64 EfiPartOffset);
|
||||
BOOL PSHELL_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);
|
||||
BOOL PSHELL_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);
|
||||
BOOL PSHELL_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);
|
||||
BOOL PSHELL_FormatVolume(char DriveLetter, int fs);
|
||||
|
||||
//
|
||||
// Internel define
|
||||
|
@@ -85,3 +85,28 @@ BOOL DSPT_CleanDisk(int DriveIndex)
|
||||
sprintf_s(CmdBuf, sizeof(CmdBuf), "select disk %d\r\nclean\r\n", DriveIndex);
|
||||
return DSPT_CommProc(CmdBuf);
|
||||
}
|
||||
|
||||
BOOL DSPT_FormatVolume(char DriveLetter, int fs)
|
||||
{
|
||||
const char* fsname = NULL;
|
||||
CHAR CmdBuf[256];
|
||||
|
||||
Log("FormatVolumeByDiskpart <%C:>", DriveLetter);
|
||||
|
||||
if (!IsDiskpartExist())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (fs == 1)
|
||||
{
|
||||
fsname = "NTFS";
|
||||
}
|
||||
else
|
||||
{
|
||||
fsname = "FAT32";
|
||||
}
|
||||
|
||||
sprintf_s(CmdBuf, sizeof(CmdBuf), "select volume %C:\r\nformat FS=%s LABEL=Ventoy QUICK OVERRIDE\r\n", DriveLetter, fsname);
|
||||
return DSPT_CommProc(CmdBuf);
|
||||
}
|
||||
|
@@ -590,6 +590,7 @@ const char *WindowsErrorString(DWORD error_code)
|
||||
#define IVdsVolume_QueryInterface(This, riid, ppvObject) (This)->lpVtbl->QueryInterface(This, riid, ppvObject)
|
||||
#define IVdsVolume_Release(This) (This)->lpVtbl->Release(This)
|
||||
#define IVdsVolumeMF3_QueryVolumeGuidPathnames(This, pwszPathArray, pulNumberOfPaths) (This)->lpVtbl->QueryVolumeGuidPathnames(This,pwszPathArray,pulNumberOfPaths)
|
||||
#define IVdsVolumeMF_Format(This, type, pwsszLabel, dwUnitAllocationSize, bForce, bQuickFormat, bEnableCompression, ppAsync) (This)->lpVtbl->Format(This, type, pwsszLabel, dwUnitAllocationSize, bForce, bQuickFormat, bEnableCompression, ppAsync)
|
||||
#define IVdsVolumeMF3_FormatEx2(This, pwszFileSystemTypeName, usFileSystemRevision, ulDesiredUnitAllocationSize, pwszLabel, Options, ppAsync) (This)->lpVtbl->FormatEx2(This, pwszFileSystemTypeName, usFileSystemRevision, ulDesiredUnitAllocationSize, pwszLabel, Options, ppAsync)
|
||||
#define IVdsVolumeMF3_Release(This) (This)->lpVtbl->Release(This)
|
||||
#define IVdsVolume_GetProperties(This, pVolumeProperties) (This)->lpVtbl->GetProperties(This,pVolumeProperties)
|
||||
@@ -1411,4 +1412,92 @@ BOOL VDS_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter,
|
||||
ret = VDS_VolumeCommProc(INTF_VOLUME, wGuid, VDS_CallBack_ShrinkVolume, (UINT64)&Para);
|
||||
Log("VDS_ShrinkVolume %C: ret:%d (%s)", DriveLetter, ret, ret ? "SUCCESS" : "FAIL");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
STATIC BOOL VDS_CallBack_FormatVolume(void* pInterface, VDS_DISK_PROP* pDiskProp, UINT64 data)
|
||||
{
|
||||
HRESULT hr, hr2;
|
||||
ULONG completed;
|
||||
IVdsAsync* pAsync;
|
||||
IVdsVolumeMF3* pVolume = (IVdsVolumeMF3*)pInterface;
|
||||
WCHAR* pFs = NULL;
|
||||
WCHAR FsNTFS[32] = L"NTFS";
|
||||
WCHAR FsFAT32[32] = L"FAT32";
|
||||
VDS_PARA* VdsPara = (VDS_PARA*)data;
|
||||
|
||||
pFs = (VdsPara->Attr == 1) ? FsNTFS : FsFAT32;
|
||||
Log("VDS_CallBack_FormatVolume (%C:) (%llu) ...", VdsPara->DriveLetter, (ULONGLONG)VdsPara->Attr);
|
||||
|
||||
hr = IVdsVolumeMF3_FormatEx2(pVolume, pFs, 0, 0, L"Ventoy", VDS_FSOF_FORCE | VDS_FSOF_QUICK, &pAsync);
|
||||
while (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IVdsAsync_QueryStatus(pAsync, &hr2, &completed);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = hr2;
|
||||
if (hr == S_OK)
|
||||
{
|
||||
Log("FormatVolume QueryStatus OK, %lu%%", completed);
|
||||
break;
|
||||
}
|
||||
else if (hr == VDS_E_OPERATION_PENDING)
|
||||
{
|
||||
Log("FormatVolume: %lu%%", completed);
|
||||
hr = S_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("FormatVolume invalid status:0x%lx", hr);
|
||||
}
|
||||
}
|
||||
Sleep(1000);
|
||||
}
|
||||
|
||||
if (hr != S_OK)
|
||||
{
|
||||
VDS_SET_ERROR(hr);
|
||||
Log("Could not FormatVolume, 0x%x err:0x%lx (%s)", hr, LASTERR, WindowsErrorString(hr));
|
||||
|
||||
VDS_SET_ERROR(hr);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
BOOL VDS_FormatVolume(char DriveLetter, int fs)
|
||||
{
|
||||
int i;
|
||||
BOOL ret = FALSE;
|
||||
const char* guid = NULL;
|
||||
CHAR Drive[32] = { 0 };
|
||||
WCHAR wGuid[128] = { 0 };
|
||||
CHAR VolumeGuid[128] = { 0 };
|
||||
VDS_PARA Para;
|
||||
|
||||
Drive[0] = DriveLetter;
|
||||
Drive[1] = ':';
|
||||
Drive[2] = '\\';
|
||||
GetVolumeNameForVolumeMountPointA(Drive, VolumeGuid, sizeof(VolumeGuid) / 2);
|
||||
|
||||
guid = strstr(VolumeGuid, "{");
|
||||
if (!guid)
|
||||
{
|
||||
Log("Can not find volume GUID for %s:", Drive);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < 128 && guid[i]; i++)
|
||||
{
|
||||
wGuid[i] = guid[i];
|
||||
}
|
||||
Log("VDS_FormatVolume find GUID %C: <%s> ", DriveLetter, VolumeGuid);
|
||||
|
||||
Para.Attr = fs;
|
||||
Para.DriveLetter = DriveLetter;
|
||||
|
||||
ret = VDS_VolumeCommProc(INTF_VOLUME_MF3, wGuid, VDS_CallBack_FormatVolume, (UINT64)&Para);
|
||||
Log("VDS_FormatVolume %C: <%s> ret:%d (%s)", DriveLetter, VolumeGuid, ret, ret ? "SUCCESS" : "FAIL");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -255,3 +255,27 @@ BOOL PSHELL_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLette
|
||||
Log("PSHELL_ShrinkVolume<%d> %C: ret:%d (%s)", DriveIndex, DriveLetter, ret, ret ? "SUCCESS" : "FAIL");
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL PSHELL_FormatVolume(char DriveLetter, int fs)
|
||||
{
|
||||
BOOL ret;
|
||||
const char* fsname = NULL;
|
||||
CHAR CmdBuf[512];
|
||||
|
||||
if (fs == 1)
|
||||
{
|
||||
fsname = "NTFS";
|
||||
}
|
||||
else
|
||||
{
|
||||
fsname = "FAT32";
|
||||
}
|
||||
|
||||
sprintf_s(CmdBuf, sizeof(CmdBuf),
|
||||
"format-volume -DriveLetter %C -FileSystem %s -Force -NewFileSystemLabel Ventoy",
|
||||
DriveLetter, fsname);
|
||||
|
||||
ret = PSHELL_CommProc(CmdBuf);
|
||||
Log("PSHELL_FormatVolume %C: ret:%d (%s)", DriveLetter, ret, ret ? "SUCCESS" : "FAIL");
|
||||
return ret;
|
||||
}
|
||||
|
@@ -1,38 +1,45 @@
|
||||
/******************************************************************************
|
||||
* Language.c
|
||||
*
|
||||
* Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||
*
|
||||
* 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 the Free Software Foundation; either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Windows.h>
|
||||
#include "Ventoy2Disk.h"
|
||||
#include "Language.h"
|
||||
|
||||
const TCHAR * GetString(enum STR_ID ID)
|
||||
{
|
||||
return g_cur_lang_data->MsgString[ID];
|
||||
};
|
||||
|
||||
static const UINT16 g_unicode_icon[UNICODE_BUTT][3] =
|
||||
{
|
||||
{ 0xD83D, 0xDD12, 0x0000 },
|
||||
};
|
||||
|
||||
const UINT16 * GetUnicodeIcon(icon)
|
||||
{
|
||||
return g_unicode_icon[icon];
|
||||
}
|
||||
/******************************************************************************
|
||||
* Language.c
|
||||
*
|
||||
* Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||
*
|
||||
* 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 the Free Software Foundation; either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Windows.h>
|
||||
#include "Ventoy2Disk.h"
|
||||
#include "Language.h"
|
||||
|
||||
const TCHAR * GetString(enum STR_ID ID)
|
||||
{
|
||||
if (g_cur_lang_data)
|
||||
{
|
||||
return g_cur_lang_data->MsgString[ID];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
static const UINT16 g_unicode_icon[UNICODE_BUTT][3] =
|
||||
{
|
||||
{ 0xD83D, 0xDD12, 0x0000 },
|
||||
};
|
||||
|
||||
const UINT16 * GetUnicodeIcon(icon)
|
||||
{
|
||||
return g_unicode_icon[icon];
|
||||
}
|
||||
|
@@ -86,6 +86,8 @@ typedef enum STR_ID
|
||||
STR_INSTALL_YES_TIP1,//48
|
||||
STR_INSTALL_YES_TIP2,//49
|
||||
|
||||
STR_PART_VENTOY_FS, //50
|
||||
|
||||
STR_ID_MAX
|
||||
}STR_ID;
|
||||
|
||||
|
Binary file not shown.
@@ -290,9 +290,9 @@ End:
|
||||
|
||||
int GetPhyDriveByLogicalDrive(int DriveLetter, UINT64 *Offset)
|
||||
{
|
||||
BOOL Ret;
|
||||
DWORD dwSize;
|
||||
HANDLE Handle;
|
||||
BOOL Ret = FALSE;
|
||||
DWORD dwSize = 0;
|
||||
HANDLE Handle = INVALID_HANDLE_VALUE;
|
||||
VOLUME_DISK_EXTENTS DiskExtents;
|
||||
CHAR PhyPath[128];
|
||||
|
||||
@@ -305,6 +305,7 @@ int GetPhyDriveByLogicalDrive(int DriveLetter, UINT64 *Offset)
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(&DiskExtents, 0, sizeof(DiskExtents));
|
||||
Ret = DeviceIoControl(Handle,
|
||||
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
|
||||
NULL,
|
||||
@@ -322,9 +323,10 @@ int GetPhyDriveByLogicalDrive(int DriveLetter, UINT64 *Offset)
|
||||
}
|
||||
CHECK_CLOSE_HANDLE(Handle);
|
||||
|
||||
Log("LogicalDrive:%s PhyDrive:%d Offset:%llu ExtentLength:%llu",
|
||||
Log("LogicalDrive:%s PhyDrive:%d Num:%d Offset:%llu ExtentLength:%llu",
|
||||
PhyPath,
|
||||
DiskExtents.Extents[0].DiskNumber,
|
||||
DiskExtents.NumberOfDiskExtents,
|
||||
DiskExtents.Extents[0].StartingOffset.QuadPart,
|
||||
DiskExtents.Extents[0].ExtentLength.QuadPart
|
||||
);
|
||||
@@ -1335,6 +1337,7 @@ int ClearVentoyFromPhyDrive(HWND hWnd, PHY_DRIVE_INFO *pPhyDrive, char *pDrvLett
|
||||
End:
|
||||
|
||||
PROGRESS_BAR_SET_POS(PT_MOUNT_VOLUME);
|
||||
PROGRESS_BAR_SET_POS(PT_REFORMAT_FINISH);
|
||||
|
||||
if (pTmpBuf)
|
||||
{
|
||||
@@ -1606,6 +1609,7 @@ int InstallVentoy2FileImage(PHY_DRIVE_INFO *pPhyDrive, int PartStyle)
|
||||
End:
|
||||
|
||||
PROGRESS_BAR_SET_POS(PT_MOUNT_VOLUME);
|
||||
PROGRESS_BAR_SET_POS(PT_REFORMAT_FINISH);
|
||||
|
||||
Log("retcode:%d\n", rc);
|
||||
|
||||
@@ -1837,6 +1841,7 @@ End:
|
||||
else
|
||||
{
|
||||
Log("%s is ventoy part1, already mounted", DriveName);
|
||||
MountDrive = DriveName[0];
|
||||
state = 1;
|
||||
}
|
||||
}
|
||||
@@ -1850,12 +1855,35 @@ End:
|
||||
DriveName[0] = MountDrive;
|
||||
bRet = SetVolumeMountPointA(DriveName, DriveLetters);
|
||||
Log("SetVolumeMountPoint <%s> <%s> bRet:%u code:%u", DriveName, DriveLetters, bRet, GetLastError());
|
||||
|
||||
if (bRet)
|
||||
{
|
||||
state = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Failed to find ventoy volume");
|
||||
}
|
||||
}
|
||||
|
||||
if (GetVentoyFsType() > 0)
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
Log("Reformat %C:\\ to %s", MountDrive, GetVentoyFsName());
|
||||
DISK_FormatVolume(MountDrive, GetVentoyFsType());
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Can not reformat %s to %s", DriveName, GetVentoyFsName());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("No need to reformat ventoy partition");
|
||||
}
|
||||
|
||||
Log("OK\n");
|
||||
}
|
||||
else
|
||||
|
Binary file not shown.
@@ -251,6 +251,64 @@ static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes, MBR_HEAD *pMBR, UIN
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int GetVentoyFsNameInPhyDrive(PHY_DRIVE_INFO* CurDrive)
|
||||
{
|
||||
int i = 0;
|
||||
UINT64 Offset;
|
||||
CHAR Volume[128] = { 0 };
|
||||
CHAR FsName[MAX_PATH] = { 0 };
|
||||
|
||||
while (CurDrive->DriveLetters[i])
|
||||
{
|
||||
if (GetPhyDriveByLogicalDrive(CurDrive->DriveLetters[i], &Offset) >= 0)
|
||||
{
|
||||
if (Offset == SIZE_1MB)
|
||||
{
|
||||
sprintf_s(Volume, sizeof(Volume), "%C:\\", CurDrive->DriveLetters[i]);
|
||||
Log("Find the partition 1 logical drive is %s", Volume);
|
||||
break;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "??");
|
||||
|
||||
if (Volume[0])
|
||||
{
|
||||
if (GetVolumeInformationA(Volume, NULL, 0, NULL, NULL, NULL, FsName, MAX_PATH))
|
||||
{
|
||||
if (_stricmp(FsName, "exFAT") == 0)
|
||||
{
|
||||
sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "exFAT");
|
||||
}
|
||||
else if (_stricmp(FsName, "NTFS") == 0)
|
||||
{
|
||||
sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "NTFS");
|
||||
}
|
||||
else if (_stricmp(FsName, "FAT") == 0 || _stricmp(FsName, "FAT32") == 0)
|
||||
{
|
||||
sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "FAT32");
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "%s", FsName);
|
||||
}
|
||||
|
||||
Log("GetVentoyFsNameInPhyDrive %d %s <%s> <%s>", CurDrive->PhyDrive, Volume, FsName, CurDrive->VentoyFsType);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("GetVolumeInformationA %s failed %u", Volume, LASTERR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("GetVentoyFsNameInPhyDrive %s not found", Volume);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int FilterPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)
|
||||
{
|
||||
@@ -323,6 +381,8 @@ static int FilterPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)
|
||||
GetVentoyVerInPhyDrive(CurDrive, Part2StartSector, CurDrive->VentoyVersion, sizeof(CurDrive->VentoyVersion), &(CurDrive->SecureBootSupport));
|
||||
Log("PhyDrive %d is Ventoy Disk ver:%s SecureBoot:%u", CurDrive->PhyDrive, CurDrive->VentoyVersion, CurDrive->SecureBootSupport);
|
||||
|
||||
GetVentoyFsNameInPhyDrive(CurDrive);
|
||||
|
||||
if (CurDrive->VentoyVersion[0] == 0)
|
||||
{
|
||||
CurDrive->VentoyVersion[0] = '?';
|
||||
|
@@ -159,7 +159,8 @@ typedef struct PHY_DRIVE_INFO
|
||||
STORAGE_BUS_TYPE BusType;
|
||||
|
||||
CHAR DriveLetters[64];
|
||||
|
||||
|
||||
CHAR VentoyFsType[16];
|
||||
CHAR VentoyVersion[32];
|
||||
|
||||
BOOL SecureBootSupport;
|
||||
@@ -193,6 +194,9 @@ typedef enum PROGRESS_POINT
|
||||
PT_WRITE_PART_TABLE,
|
||||
PT_MOUNT_VOLUME,
|
||||
|
||||
PT_REFORMAT_START,
|
||||
PT_REFORMAT_FINISH = PT_REFORMAT_START + 2,
|
||||
|
||||
PT_FINISH
|
||||
}PROGRESS_POINT;
|
||||
|
||||
@@ -253,6 +257,9 @@ INT_PTR CALLBACK YesDialogProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lP
|
||||
INT_PTR CALLBACK PartDialogProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||
int GetReservedSpaceInMB(void);
|
||||
int IsPartNeed4KBAlign(void);
|
||||
int GetVentoyFsType(void);
|
||||
void SetVentoyFsType(int fs);
|
||||
const char* GetVentoyFsName(void);
|
||||
int FindProcessOccupyDisk(HANDLE hDrive, PHY_DRIVE_INFO *pPhyDrive);
|
||||
int VentoyFillMBRLocation(UINT64 DiskSizeInBytes, UINT32 StartSectorId, UINT32 SectorCount, PART_TABLE *Table);
|
||||
int ClearVentoyFromPhyDrive(HWND hWnd, PHY_DRIVE_INFO *pPhyDrive, char *pDrvLetter);
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -46,7 +46,7 @@ static CHAR g_prog_name[MAX_PATH];
|
||||
|
||||
#define VTOY_PECMD_PATH "X:\\Windows\\system32\\ventoy\\PECMD.EXE"
|
||||
#define ORG_PECMD_PATH "X:\\Windows\\system32\\PECMD.EXE"
|
||||
#define ORG_PECMD_BK_PATH "X:\\Windows\\system32\\PECMD.EXE_BACK.EXE"
|
||||
#define ORG_PECMD_BK_PATH "X:\\Windows\\system32\\VTOYJUMP.EXE"
|
||||
|
||||
#define WIMBOOT_FILE "X:\\Windows\\system32\\vtoy_wimboot"
|
||||
#define WIMBOOT_DONE "X:\\Windows\\system32\\vtoy_wimboot_done"
|
||||
@@ -128,6 +128,64 @@ static void TrimString(CHAR *String, BOOL TrimLeft)
|
||||
return;
|
||||
}
|
||||
|
||||
static int VentoyProcessRunCmd(const char *Fmt, ...)
|
||||
{
|
||||
int Len = 0;
|
||||
va_list Arg;
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
char szBuf[1024] = { 0 };
|
||||
|
||||
va_start(Arg, Fmt);
|
||||
Len += vsnprintf_s(szBuf + Len, sizeof(szBuf)-Len, sizeof(szBuf)-Len, Fmt, Arg);
|
||||
va_end(Arg);
|
||||
|
||||
GetStartupInfoA(&Si);
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_HIDE;
|
||||
|
||||
Log("Process Run: <%s>", szBuf);
|
||||
CreateProcessA(NULL, szBuf, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CHAR VentoyGetFirstFreeDriveLetter(BOOL Reverse)
|
||||
{
|
||||
int i;
|
||||
CHAR Letter = 'T';
|
||||
DWORD Drives;
|
||||
|
||||
Drives = GetLogicalDrives();
|
||||
|
||||
if (Reverse)
|
||||
{
|
||||
for (i = 25; i >= 2; i--)
|
||||
{
|
||||
if (0 == (Drives & (1 << i)))
|
||||
{
|
||||
Letter = 'A' + i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 2; i < 26; i++)
|
||||
{
|
||||
if (0 == (Drives & (1 << i)))
|
||||
{
|
||||
Letter = 'A' + i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log("FirstFreeDriveLetter %u %C:", Reverse, Letter);
|
||||
return Letter;
|
||||
}
|
||||
|
||||
void Log(const char *Fmt, ...)
|
||||
{
|
||||
va_list Arg;
|
||||
@@ -910,6 +968,84 @@ UINT64 GetVentoyEfiPartStartSector(HANDLE hDrive)
|
||||
return StartSector;
|
||||
}
|
||||
|
||||
static int VentoyCopyImdisk(DWORD PhyDrive, CHAR *ImPath)
|
||||
{
|
||||
int rc = 1;
|
||||
BOOL bRet;
|
||||
DWORD dwBytes;
|
||||
HANDLE hDrive;
|
||||
CHAR PhyPath[MAX_PATH];
|
||||
GET_LENGTH_INFORMATION LengthInfo;
|
||||
|
||||
if (IsFileExist("X:\\Windows\\System32\\imdisk.exe"))
|
||||
{
|
||||
Log("imdisk.exe already exist, no need to copy...");
|
||||
strcpy_s(ImPath, MAX_PATH, "imdisk.exe");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (IsFileExist("X:\\Windows\\System32\\ventoy\\imdisk.exe"))
|
||||
{
|
||||
Log("imdisk.exe already copied, no need to copy...");
|
||||
strcpy_s(ImPath, MAX_PATH, "ventoy\\imdisk.exe");
|
||||
return 0;
|
||||
}
|
||||
|
||||
sprintf_s(PhyPath, sizeof(PhyPath), "\\\\.\\PhysicalDrive%d", PhyDrive);
|
||||
hDrive = CreateFileA(PhyPath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0);
|
||||
if (hDrive == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
Log("Could not open the disk<%s>, error:%u", PhyPath, GetLastError());
|
||||
goto End;
|
||||
}
|
||||
|
||||
bRet = DeviceIoControl(hDrive, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, &LengthInfo, sizeof(LengthInfo), &dwBytes, NULL);
|
||||
if (!bRet)
|
||||
{
|
||||
Log("Could not get phy disk %s size, error:%u", PhyPath, GetLastError());
|
||||
goto End;
|
||||
}
|
||||
|
||||
g_FatPhyDrive = hDrive;
|
||||
g_Part2StartSec = GetVentoyEfiPartStartSector(hDrive);
|
||||
|
||||
Log("Parse FAT fs...");
|
||||
|
||||
fl_init();
|
||||
|
||||
if (0 == fl_attach_media(VentoyFatDiskRead, NULL))
|
||||
{
|
||||
if (g_system_bit == 64)
|
||||
{
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/64/imdisk.sys", "ventoy\\imdisk.sys");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/64/imdisk.exe", "ventoy\\imdisk.exe");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/64/imdisk.cpl", "ventoy\\imdisk.cpl");
|
||||
}
|
||||
else
|
||||
{
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/32/imdisk.sys", "ventoy\\imdisk.sys");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/32/imdisk.exe", "ventoy\\imdisk.exe");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/32/imdisk.cpl", "ventoy\\imdisk.cpl");
|
||||
}
|
||||
|
||||
GetCurrentDirectoryA(sizeof(PhyPath), PhyPath);
|
||||
strcat_s(PhyPath, sizeof(PhyPath), "\\ventoy\\imdisk.sys");
|
||||
|
||||
if (LoadNtDriver(PhyPath) == 0)
|
||||
{
|
||||
strcpy_s(ImPath, MAX_PATH, "ventoy\\imdisk.exe");
|
||||
rc = 0;
|
||||
}
|
||||
}
|
||||
fl_shutdown();
|
||||
|
||||
End:
|
||||
|
||||
SAFE_CLOSE_HANDLE(hDrive);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int VentoyRunImdisk(const char *IsoPath, const char *imdiskexe)
|
||||
{
|
||||
CHAR Letter;
|
||||
@@ -957,73 +1093,16 @@ static int VentoyRunImdisk(const char *IsoPath, const char *imdiskexe)
|
||||
int VentoyMountISOByImdisk(const char *IsoPath, DWORD PhyDrive)
|
||||
{
|
||||
int rc = 1;
|
||||
BOOL bRet;
|
||||
DWORD dwBytes;
|
||||
HANDLE hDrive;
|
||||
CHAR PhyPath[MAX_PATH];
|
||||
GET_LENGTH_INFORMATION LengthInfo;
|
||||
CHAR ImPath[MAX_PATH];
|
||||
|
||||
Log("VentoyMountISOByImdisk %s", IsoPath);
|
||||
|
||||
if (IsFileExist("X:\\Windows\\System32\\imdisk.exe"))
|
||||
if (0 == VentoyCopyImdisk(PhyDrive, ImPath))
|
||||
{
|
||||
Log("imdisk.exe exist, use it directly...");
|
||||
VentoyRunImdisk(IsoPath, "imdisk.exe");
|
||||
return 0;
|
||||
VentoyRunImdisk(IsoPath, ImPath);
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
sprintf_s(PhyPath, sizeof(PhyPath), "\\\\.\\PhysicalDrive%d", PhyDrive);
|
||||
hDrive = CreateFileA(PhyPath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0);
|
||||
if (hDrive == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
Log("Could not open the disk<%s>, error:%u", PhyPath, GetLastError());
|
||||
goto End;
|
||||
}
|
||||
|
||||
bRet = DeviceIoControl(hDrive, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, &LengthInfo, sizeof(LengthInfo), &dwBytes, NULL);
|
||||
if (!bRet)
|
||||
{
|
||||
Log("Could not get phy disk %s size, error:%u", PhyPath, GetLastError());
|
||||
goto End;
|
||||
}
|
||||
|
||||
g_FatPhyDrive = hDrive;
|
||||
g_Part2StartSec = GetVentoyEfiPartStartSector(hDrive);
|
||||
|
||||
Log("Parse FAT fs...");
|
||||
|
||||
fl_init();
|
||||
|
||||
if (0 == fl_attach_media(VentoyFatDiskRead, NULL))
|
||||
{
|
||||
if (g_system_bit == 64)
|
||||
{
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/64/imdisk.sys", "ventoy\\imdisk.sys");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/64/imdisk.exe", "ventoy\\imdisk.exe");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/64/imdisk.cpl", "ventoy\\imdisk.cpl");
|
||||
}
|
||||
else
|
||||
{
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/32/imdisk.sys", "ventoy\\imdisk.sys");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/32/imdisk.exe", "ventoy\\imdisk.exe");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/32/imdisk.cpl", "ventoy\\imdisk.cpl");
|
||||
}
|
||||
|
||||
GetCurrentDirectoryA(sizeof(PhyPath), PhyPath);
|
||||
strcat_s(PhyPath, sizeof(PhyPath), "\\ventoy\\imdisk.sys");
|
||||
|
||||
if (LoadNtDriver(PhyPath) == 0)
|
||||
{
|
||||
VentoyRunImdisk(IsoPath, "ventoy\\imdisk.exe");
|
||||
rc = 0;
|
||||
}
|
||||
}
|
||||
fl_shutdown();
|
||||
|
||||
End:
|
||||
|
||||
SAFE_CLOSE_HANDLE(hDrive);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1863,14 +1942,30 @@ static int UnattendVarExpand(const char *script, const char *tmpfile)
|
||||
|
||||
//#define VAR_DEBUG 1
|
||||
|
||||
static int ProcessUnattendedInstallation(const char *script)
|
||||
static int CreateUnattendRegKey(const char *file)
|
||||
{
|
||||
DWORD dw;
|
||||
HKEY hKey;
|
||||
LSTATUS Ret;
|
||||
|
||||
#ifndef VAR_DEBUG
|
||||
Ret = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "System\\Setup", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dw);
|
||||
if (ERROR_SUCCESS == Ret)
|
||||
{
|
||||
Ret = RegSetValueEx(hKey, "UnattendFile", 0, REG_SZ, file, (DWORD)(strlen(file) + 1));
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ProcessUnattendedInstallation(const char *script, DWORD PhyDrive)
|
||||
{
|
||||
CHAR Letter;
|
||||
CHAR DrvLetter;
|
||||
CHAR TmpFile[MAX_PATH];
|
||||
CHAR CurDir[MAX_PATH];
|
||||
CHAR ImPath[MAX_PATH];
|
||||
|
||||
Log("Copy unattended XML ...");
|
||||
|
||||
@@ -1888,7 +1983,7 @@ static int ProcessUnattendedInstallation(const char *script)
|
||||
#ifdef VAR_DEBUG
|
||||
sprintf_s(CurDir, sizeof(CurDir), "%C:\\AutounattendXXX.xml", Letter);
|
||||
#else
|
||||
sprintf_s(CurDir, sizeof(CurDir), "%C:\\Autounattend.xml", Letter);
|
||||
sprintf_s(CurDir, sizeof(CurDir), "%C:\\Unattend.xml", Letter);
|
||||
#endif
|
||||
|
||||
if (UnattendNeedVarExpand(script))
|
||||
@@ -1897,21 +1992,32 @@ static int ProcessUnattendedInstallation(const char *script)
|
||||
UnattendVarExpand(script, TmpFile);
|
||||
|
||||
Log("Expand Copy file <%s> --> <%s>", script, CurDir);
|
||||
CopyFile(TmpFile, CurDir, FALSE);
|
||||
CopyFileA(TmpFile, CurDir, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("No var expand copy file <%s> --> <%s>", script, CurDir);
|
||||
CopyFile(script, CurDir, FALSE);
|
||||
CopyFileA(script, CurDir, FALSE);
|
||||
}
|
||||
|
||||
#ifndef VAR_DEBUG
|
||||
Ret = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "System\\Setup", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dw);
|
||||
if (ERROR_SUCCESS == Ret)
|
||||
|
||||
VentoyCopyImdisk(PhyDrive, ImPath);
|
||||
DrvLetter = VentoyGetFirstFreeDriveLetter(FALSE);
|
||||
VentoyProcessRunCmd("%s -a -s 64M -m %C: -p \"/fs:FAT32 /q /y\"", ImPath, DrvLetter);
|
||||
|
||||
Sleep(300);
|
||||
|
||||
sprintf_s(TmpFile, sizeof(TmpFile), "%C:\\Unattend.xml", DrvLetter);
|
||||
if (CopyFileA(CurDir, TmpFile, FALSE))
|
||||
{
|
||||
Ret = RegSetValueEx(hKey, "UnattendFile", 0, REG_SZ, CurDir, (DWORD)(strlen(CurDir) + 1));
|
||||
DeleteFileA(CurDir);
|
||||
Log("Move file <%s> ==> <%s>, use the later as unattend XML", CurDir, TmpFile);
|
||||
CreateUnattendRegKey(TmpFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Failed to copy file <%s> ==> <%s>, use OLD", CurDir, TmpFile);
|
||||
CreateUnattendRegKey(CurDir);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2261,7 +2367,7 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
if (IsFileExist("%s", VTOY_AUTO_FILE))
|
||||
{
|
||||
Log("use auto install script %s...", VTOY_AUTO_FILE);
|
||||
ProcessUnattendedInstallation(VTOY_AUTO_FILE);
|
||||
ProcessUnattendedInstallation(VTOY_AUTO_FILE, VtoyDiskNum);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2482,22 +2588,6 @@ End:
|
||||
}
|
||||
|
||||
|
||||
static int vtoy_cmd_delete_file(char *File)
|
||||
{
|
||||
CHAR szCmd[MAX_PATH];
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
|
||||
GetStartupInfoA(&Si);
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_HIDE;
|
||||
sprintf_s(szCmd, sizeof(szCmd), "cmd.exe /c del /F /Q %s", File);
|
||||
CreateProcessA(NULL, szCmd, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int real_main(int argc, char **argv)
|
||||
{
|
||||
int i = 0;
|
||||
@@ -2533,7 +2623,7 @@ int real_main(int argc, char **argv)
|
||||
|
||||
if (_stricmp(g_prog_name, "winpeshl.exe") != 0 && IsFileExist("ventoy\\%s", g_prog_name))
|
||||
{
|
||||
sprintf_s(NewFile, sizeof(NewFile), "%s_BACK.EXE", g_prog_full_path);
|
||||
sprintf_s(NewFile, sizeof(NewFile), "%s\\VTOYJUMP.EXE", g_prog_dir);
|
||||
MoveFileA(g_prog_full_path, NewFile);
|
||||
Log("Move <%s> to <%s>", g_prog_full_path, NewFile);
|
||||
|
||||
@@ -2575,15 +2665,11 @@ int real_main(int argc, char **argv)
|
||||
if (g_os_param_reserved[0] == 4)
|
||||
{
|
||||
Log("Open cmd for debug ...");
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_NORMAL;
|
||||
sprintf_s(LunchFile, sizeof(LunchFile), "%s", "cmd.exe");
|
||||
}
|
||||
|
||||
if (IsFileExist(ORG_PECMD_BK_PATH))
|
||||
{
|
||||
Log("Delete backup file <%s>", ORG_PECMD_BK_PATH);
|
||||
vtoy_cmd_delete_file(ORG_PECMD_BK_PATH);
|
||||
}
|
||||
|
||||
Log("Backup log at this point");
|
||||
CopyFileA(LOG_FILE, "X:\\Windows\\ventoy.backup", TRUE);
|
||||
|
||||
@@ -2730,4 +2816,3 @@ int main(int argc, char **argv)
|
||||
return real_main(argc, argv);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user