]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Ventoy2Disk.exe update.
authorlongpanda <admin@ventoy.net>
Wed, 16 Nov 2022 12:33:14 +0000 (20:33 +0800)
committerlongpanda <admin@ventoy.net>
Wed, 16 Nov 2022 12:33:14 +0000 (20:33 +0800)
1. Add exFAT/NTFS/FAT32 option when install Ventoy
2. Display Ventoy partition file system in physical disk
3. String "Status x%" is missing for translations (#1667)

20 files changed:
INSTALL/Ventoy2Disk.exe
INSTALL/Ventoy2Disk_ARM.exe
INSTALL/Ventoy2Disk_ARM64.exe
INSTALL/Ventoy2Disk_X64.exe
LANGUAGES/languages.json
Ventoy2Disk/Ventoy2Disk/DiskService.c
Ventoy2Disk/Ventoy2Disk/DiskService.h
Ventoy2Disk/Ventoy2Disk/DiskService_diskpart.c
Ventoy2Disk/Ventoy2Disk/DiskService_vds.c
Ventoy2Disk/Ventoy2Disk/DiskService_wmsa.c
Ventoy2Disk/Ventoy2Disk/Language.c
Ventoy2Disk/Ventoy2Disk/Language.h
Ventoy2Disk/Ventoy2Disk/PartDialog.c
Ventoy2Disk/Ventoy2Disk/PhyDrive.c
Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.aps
Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.c
Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.h
Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.rc
Ventoy2Disk/Ventoy2Disk/WinDialog.c
Ventoy2Disk/Ventoy2Disk/resource.h

index 752803aa2656df920215201b51c6b526122083ef..f6c3ab55eaf44caca0b8c1275c1582cb6ece4048 100644 (file)
Binary files a/INSTALL/Ventoy2Disk.exe and b/INSTALL/Ventoy2Disk.exe differ
index 39978371eab2397e32f72582861bb4bd13fb7d37..d1630163adbfe922870f46b19eb29a48978bfc2b 100644 (file)
Binary files a/INSTALL/Ventoy2Disk_ARM.exe and b/INSTALL/Ventoy2Disk_ARM.exe differ
index 2bbf0ae8b4c7e957050783a79e4a7ee19737e71d..6616dde60642ccc4c42c1651b3b28fbd508bb8d1 100644 (file)
Binary files a/INSTALL/Ventoy2Disk_ARM64.exe and b/INSTALL/Ventoy2Disk_ARM64.exe differ
index abdd455808ea327d848d7de2377ad6cda294235f..ac9f6bfcaf8b53feee18c6939d2414041dccc290 100644 (file)
Binary files a/INSTALL/Ventoy2Disk_X64.exe and b/INSTALL/Ventoy2Disk_X64.exe differ
index 14e9593bad648ce5afb85c2617b319ee11ec9807..d0f1300ce4eccdc0fa24b8a9c6c7daa80b496bea 100644 (file)
@@ -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":""
     },
         "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":""
     },
         "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":""
     },
     {
         "STR_PART_RESIZE_UNSUPPORTED":"条件不满足,无法进行无损安装。详细信息请查阅 log.txt 文件。",
         "STR_INSTALL_YES_TIP1":"警告: 所有数据将会丢失!",
         "STR_INSTALL_YES_TIP2":"请在下面文本框中输入 YES 以确认你是要进行安装而不是升级。",
-
+        "STR_PART_VENTOY_FS":"Ventoy 分区文件系统类型",
+        
         "STRXXX":""
     },
     {
         "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":""
     },
         "STR_VTSI_CREATE_FAILED": "გაფრთხილება: მონაცემები დაიკარგება!",
         "STR_MENU_PART_RESIZE": "გთხოვთ, შეიყვანოთ YES ქვემოთ მოცემულ ტექსტურ ველში, რათა დაადასტუროთ... გსურთ განახლების ნაცვლად განახორციელოთ ახალი ინსტალაცია.",
         "STR_PART_RESIZE_TIP": "Ventoy ჩეეცდება დააყენოს არა-დესტრუქციული რამდენადაც შეეცდება. გსურს გაგრძელება?",
+        "STR_PART_VENTOY_FS":"File System For Ventoy Partition",
+        
         "STRXXX": ""
     },
     {
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":"File System For Ventoy Partition",
         
         "STRXXX":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
     {
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "STR_PART_RESIZE_UNSUPPORTED":"वेंटोय गैर-विनाशकारी स्थापना रोक दी गई, कुछ शर्तों को पूरा नहीं किया जा सकता है। विवरण के लिए log.txt की जाँच करें।",
         "STR_INSTALL_YES_TIP1":"चेतावनी: डेटा खो जाएगा!",
         "STR_INSTALL_YES_TIP2":"यह पुष्टि करने के लिए कि आप वास्तव में अपग्रेड के बजाय एक नया इंस्टॉल करना चाहते हैं, कृपया नीचे दिए टेक्स्ट बॉक्स में Yes दर्ज करें।",
+        "STR_PART_VENTOY_FS":"File System For Ventoy Partition",
         
         "STRXXX":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "STR_PART_RESIZE_UNSUPPORTED":"Ventoy 無損安裝已中止因為未滿足部分條件。詳細訊息請檢視 log.txt 檔案。",
         "STR_INSTALL_YES_TIP1":"警告:資料將會遺失!",
         "STR_INSTALL_YES_TIP2":"請在下方的文字輸入框輸入 YES 來證實您想要進行全新安裝取代升級。",
+        "STR_PART_VENTOY_FS":"Ventoy 分割區文件系統",
         
         "STRXXX":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
     {
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
         "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":""
     },
     {
         "STR_PART_RESIZE_UNSUPPORTED":"சில நிபந்தனைகளை பூர்த்தி செய்ய முடியாததால், வென்டோய் அழிவில்லாத நிறுவல் நிறுத்தப்பட்டது. விவரங்களுக்கு log.txt ஐப் பார்க்கவும்.",
         "STR_INSTALL_YES_TIP1":"எச்சரிக்கை: தரவு தொலைந்து போகும்!",
         "STR_INSTALL_YES_TIP2":"மேம்படுத்துவதற்குப் பதிலாக புதிதாக நிறுவ விரும்புகிறீர்கள் என்பதை உறுதிப்படுத்த, கீழே உள்ள உரைப் பெட்டியில் ஆம் என உள்ளிடவும்.",
+        "STR_PART_VENTOY_FS":"File System For Ventoy Partition",
         
         "STRXXX":""
     }
index 4272d6fef8438c613597073b35b1855efa806787..b73511927aae9a011e5db6423b50ab5ec2f1751b 100644 (file)
@@ -109,3 +109,19 @@ BOOL DISK_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter,
        return ret;\r
 }\r
 \r
+BOOL DISK_FormatVolume(char DriveLetter, int fs)\r
+{\r
+       BOOL ret = FALSE;\r
+\r
+       //ret = VDS_FormatVolume(DriveLetter, fs);\r
+       if (!ret)\r
+       {\r
+               //ret = DSPT_FormatVolume(DriveLetter, fs);\r
+               if (!ret)\r
+               {\r
+                       ret = PSHELL_FormatVolume(DriveLetter, fs);\r
+               }\r
+       }\r
+\r
+       return ret;\r
+}\r
index 78d6ec176ebb0a4c8a558a9a5c71b9ab4658d960..4e197cbcb74bf57052382dd7d78ad549da18209c 100644 (file)
@@ -39,7 +39,7 @@ BOOL DISK_ChangeVtoyEFIAttr(int DriveIndex, UINT64 Offset, UINT64 Attr);
 BOOL DISK_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);\r
 BOOL DISK_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);\r
 BOOL DISK_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);\r
-\r
+BOOL DISK_FormatVolume(char DriveLetter, int fs);\r
 \r
 \r
 //VDS com\r
@@ -51,10 +51,11 @@ BOOL VDS_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);
 BOOL VDS_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);\r
 BOOL VDS_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);\r
 BOOL VDS_IsLastAvaliable(void);\r
-\r
+BOOL VDS_FormatVolume(char DriveLetter, int fs);\r
 \r
 //diskpart.exe\r
 BOOL DSPT_CleanDisk(int DriveIndex);\r
+BOOL DSPT_FormatVolume(char DriveLetter, int fs);\r
 \r
 //powershell.exe\r
 BOOL PSHELL_CleanDisk(int DriveIndex);\r
@@ -62,6 +63,7 @@ BOOL PSHELL_DeleteVtoyEFIPartition(int DriveIndex, UINT64 EfiPartOffset);
 BOOL PSHELL_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);\r
 BOOL PSHELL_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);\r
 BOOL PSHELL_ShrinkVolume(int DriveIndex, const char* VolumeGuid, CHAR DriveLetter, UINT64 OldBytes, UINT64 ReduceBytes);\r
+BOOL PSHELL_FormatVolume(char DriveLetter, int fs);\r
 \r
 //\r
 // Internel define\r
index ca1aa815be3801517b8a3a420b935bcdfc65fea0..6d02e90517e45dd1725c1fe94955797b038f061e 100644 (file)
@@ -85,3 +85,28 @@ BOOL DSPT_CleanDisk(int DriveIndex)
     sprintf_s(CmdBuf, sizeof(CmdBuf), "select disk %d\r\nclean\r\n", DriveIndex);\r
     return DSPT_CommProc(CmdBuf);\r
 }\r
+\r
+BOOL DSPT_FormatVolume(char DriveLetter, int fs)\r
+{\r
+    const char* fsname = NULL;\r
+    CHAR CmdBuf[256];\r
+\r
+    Log("FormatVolumeByDiskpart <%C:>", DriveLetter);\r
+\r
+    if (!IsDiskpartExist())\r
+    {\r
+        return FALSE;\r
+    }\r
+\r
+    if (fs == 1)\r
+    {\r
+        fsname = "NTFS";\r
+    }\r
+    else\r
+    {\r
+        fsname = "FAT32";\r
+    }\r
+\r
+    sprintf_s(CmdBuf, sizeof(CmdBuf), "select volume %C:\r\nformat FS=%s LABEL=Ventoy QUICK OVERRIDE\r\n", DriveLetter, fsname);\r
+    return DSPT_CommProc(CmdBuf);\r
+}\r
index 3a6383031aea65410293283cb64ab0fc77d8bc22..f0ee6f93ef0a33a98c1a2a5e1a7716b4bf9a1137 100644 (file)
@@ -590,6 +590,7 @@ const char *WindowsErrorString(DWORD error_code)
 #define IVdsVolume_QueryInterface(This, riid, ppvObject) (This)->lpVtbl->QueryInterface(This, riid, ppvObject)\r
 #define IVdsVolume_Release(This) (This)->lpVtbl->Release(This)\r
 #define IVdsVolumeMF3_QueryVolumeGuidPathnames(This, pwszPathArray, pulNumberOfPaths) (This)->lpVtbl->QueryVolumeGuidPathnames(This,pwszPathArray,pulNumberOfPaths)\r
+#define IVdsVolumeMF_Format(This, type, pwsszLabel, dwUnitAllocationSize, bForce, bQuickFormat, bEnableCompression, ppAsync) (This)->lpVtbl->Format(This, type, pwsszLabel, dwUnitAllocationSize, bForce, bQuickFormat, bEnableCompression, ppAsync)\r
 #define IVdsVolumeMF3_FormatEx2(This, pwszFileSystemTypeName, usFileSystemRevision, ulDesiredUnitAllocationSize, pwszLabel, Options, ppAsync) (This)->lpVtbl->FormatEx2(This, pwszFileSystemTypeName, usFileSystemRevision, ulDesiredUnitAllocationSize, pwszLabel, Options, ppAsync)\r
 #define IVdsVolumeMF3_Release(This) (This)->lpVtbl->Release(This)\r
 #define IVdsVolume_GetProperties(This, pVolumeProperties) (This)->lpVtbl->GetProperties(This,pVolumeProperties)\r
@@ -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);\r
        Log("VDS_ShrinkVolume %C: ret:%d (%s)", DriveLetter, ret, ret ? "SUCCESS" : "FAIL");\r
        return ret;\r
-}
\ No newline at end of file
+}\r
+\r
+\r
+STATIC BOOL VDS_CallBack_FormatVolume(void* pInterface, VDS_DISK_PROP* pDiskProp, UINT64 data)\r
+{\r
+       HRESULT hr, hr2;\r
+       ULONG completed;\r
+       IVdsAsync* pAsync;\r
+       IVdsVolumeMF3* pVolume = (IVdsVolumeMF3*)pInterface;\r
+       WCHAR* pFs = NULL;\r
+       WCHAR FsNTFS[32] = L"NTFS";\r
+       WCHAR FsFAT32[32] = L"FAT32";\r
+       VDS_PARA* VdsPara = (VDS_PARA*)data;\r
+       \r
+       pFs = (VdsPara->Attr == 1) ? FsNTFS : FsFAT32;\r
+       Log("VDS_CallBack_FormatVolume (%C:) (%llu) ...", VdsPara->DriveLetter, (ULONGLONG)VdsPara->Attr);\r
+\r
+       hr = IVdsVolumeMF3_FormatEx2(pVolume, pFs, 0, 0, L"Ventoy", VDS_FSOF_FORCE | VDS_FSOF_QUICK, &pAsync);\r
+       while (SUCCEEDED(hr))\r
+       {\r
+               hr = IVdsAsync_QueryStatus(pAsync, &hr2, &completed);\r
+               if (SUCCEEDED(hr))\r
+               {\r
+                       hr = hr2;\r
+                       if (hr == S_OK)\r
+                       {\r
+                               Log("FormatVolume QueryStatus OK, %lu%%", completed);\r
+                               break;\r
+                       }\r
+                       else if (hr == VDS_E_OPERATION_PENDING)\r
+                       {\r
+                               Log("FormatVolume: %lu%%", completed);\r
+                               hr = S_OK;\r
+                       }\r
+                       else\r
+                       {\r
+                               Log("FormatVolume invalid status:0x%lx", hr);\r
+                       }\r
+               }\r
+               Sleep(1000);\r
+       }\r
+\r
+       if (hr != S_OK)\r
+       {\r
+               VDS_SET_ERROR(hr);\r
+               Log("Could not FormatVolume, 0x%x err:0x%lx (%s)", hr, LASTERR, WindowsErrorString(hr));\r
+\r
+               VDS_SET_ERROR(hr);\r
+               return FALSE;\r
+       }\r
+\r
+       return TRUE;\r
+}\r
+BOOL VDS_FormatVolume(char DriveLetter, int fs)\r
+{\r
+       int i;\r
+       BOOL ret = FALSE;\r
+       const char* guid = NULL;\r
+       CHAR Drive[32] = { 0 };\r
+       WCHAR wGuid[128] = { 0 };\r
+       CHAR VolumeGuid[128] = { 0 };\r
+       VDS_PARA Para;\r
+\r
+       Drive[0] = DriveLetter;\r
+       Drive[1] = ':';\r
+       Drive[2] = '\\';\r
+       GetVolumeNameForVolumeMountPointA(Drive, VolumeGuid, sizeof(VolumeGuid) / 2);\r
+\r
+       guid = strstr(VolumeGuid, "{");\r
+       if (!guid)\r
+       {\r
+               Log("Can not find volume GUID for %s:", Drive);\r
+               return FALSE;\r
+       }\r
+\r
+       for (i = 0; i < 128 && guid[i]; i++)\r
+       {\r
+               wGuid[i] = guid[i];\r
+       }\r
+       Log("VDS_FormatVolume find GUID %C: <%s> ", DriveLetter, VolumeGuid);\r
+\r
+       Para.Attr = fs;\r
+       Para.DriveLetter = DriveLetter;\r
+\r
+       ret = VDS_VolumeCommProc(INTF_VOLUME_MF3, wGuid, VDS_CallBack_FormatVolume, (UINT64)&Para);\r
+       Log("VDS_FormatVolume %C: <%s> ret:%d (%s)", DriveLetter, VolumeGuid, ret, ret ? "SUCCESS" : "FAIL");\r
+\r
+       return ret;\r
+}\r
index d99e5ac10eb260407b7937ec1a8c11876eb58e00..ac9bd9613e5ef82f41e66871bedc32b8b9a603d4 100644 (file)
@@ -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");\r
        return ret;\r
 }\r
+\r
+BOOL PSHELL_FormatVolume(char DriveLetter, int fs)\r
+{\r
+       BOOL ret;\r
+       const char* fsname = NULL;\r
+       CHAR CmdBuf[512];\r
+\r
+       if (fs == 1)\r
+       {\r
+               fsname = "NTFS";\r
+       }\r
+       else\r
+       {\r
+               fsname = "FAT32";\r
+       }\r
+\r
+       sprintf_s(CmdBuf, sizeof(CmdBuf),\r
+               "format-volume -DriveLetter %C -FileSystem %s -Force -NewFileSystemLabel Ventoy",\r
+               DriveLetter, fsname);\r
+\r
+       ret = PSHELL_CommProc(CmdBuf);\r
+       Log("PSHELL_FormatVolume %C: ret:%d (%s)", DriveLetter, ret, ret ? "SUCCESS" : "FAIL");\r
+       return ret;\r
+}\r
index e8a971242f2146c0b1014822b8fabfd28e688423..80833274cd564ba6260a9881cd66c0a8759f6735 100644 (file)
@@ -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];
-}
+/******************************************************************************\r
+ * Language.c\r
+ *\r
+ * Copyright (c) 2020, longpanda <admin@ventoy.net>\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License as\r
+ * published by the Free Software Foundation; either version 3 of the\r
+ * License, or (at your option) any later version.\r
+ * \r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+ * General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ */\r
\r
+#include <Windows.h>\r
+#include "Ventoy2Disk.h"\r
+#include "Language.h"\r
+\r
+const TCHAR * GetString(enum STR_ID ID)\r
+{\r
+    if (g_cur_lang_data)\r
+    {\r
+        return g_cur_lang_data->MsgString[ID];\r
+    }\r
+    else\r
+    {\r
+        return NULL;\r
+    }\r
+};\r
+\r
+static const UINT16 g_unicode_icon[UNICODE_BUTT][3] =\r
+{\r
+    { 0xD83D, 0xDD12, 0x0000 },\r
+};\r
+\r
+const UINT16 * GetUnicodeIcon(icon)\r
+{\r
+    return g_unicode_icon[icon];\r
+}\r
index 5b0d797f6100b3a2363f54d3324c74e54dc30907..7dbedea5c88b2bbb34468503597ddb9da162973b 100644 (file)
@@ -86,6 +86,8 @@ typedef enum STR_ID
        STR_INSTALL_YES_TIP1,//48\r
        STR_INSTALL_YES_TIP2,//49\r
 \r
+       STR_PART_VENTOY_FS, //50\r
+\r
        STR_ID_MAX\r
 }STR_ID;\r
 \r
index 51a97caefd6e7c13efff2b493ece96f693b9f0d6..e7bccd7dfb213da524817980da065056dc86a7a2 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/PartDialog.c and b/Ventoy2Disk/Ventoy2Disk/PartDialog.c differ
index 485d9ff29a8114ff9e51c229dd8614288e785cf0..c1ebe5e0a58ec9cf4e0a60bb0453ffe54187b63c 100644 (file)
@@ -1337,6 +1337,7 @@ int ClearVentoyFromPhyDrive(HWND hWnd, PHY_DRIVE_INFO *pPhyDrive, char *pDrvLett
 End:\r
     \r
     PROGRESS_BAR_SET_POS(PT_MOUNT_VOLUME);\r
+    PROGRESS_BAR_SET_POS(PT_REFORMAT_FINISH);\r
     \r
     if (pTmpBuf)\r
     {\r
@@ -1608,6 +1609,7 @@ int InstallVentoy2FileImage(PHY_DRIVE_INFO *pPhyDrive, int PartStyle)
 End:\r
 \r
     PROGRESS_BAR_SET_POS(PT_MOUNT_VOLUME);\r
+    PROGRESS_BAR_SET_POS(PT_REFORMAT_FINISH);\r
 \r
     Log("retcode:%d\n", rc);\r
 \r
@@ -1839,6 +1841,7 @@ End:
             else\r
             {\r
                 Log("%s is ventoy part1, already mounted", DriveName);\r
+                MountDrive = DriveName[0];\r
                 state = 1;\r
             }\r
         }\r
@@ -1852,12 +1855,35 @@ End:
                 DriveName[0] = MountDrive;\r
                 bRet = SetVolumeMountPointA(DriveName, DriveLetters);\r
                 Log("SetVolumeMountPoint <%s> <%s> bRet:%u code:%u", DriveName, DriveLetters, bRet, GetLastError());\r
+\r
+                if (bRet)\r
+                {\r
+                    state = 1;\r
+                }\r
             }\r
             else\r
             {\r
                 Log("Failed to find ventoy volume");\r
             }\r
         }\r
+\r
+        if (GetVentoyFsType() > 0)\r
+        {\r
+            if (state)\r
+            {\r
+                Log("Reformat %C:\\ to %s", MountDrive, GetVentoyFsName());\r
+                DISK_FormatVolume(MountDrive, GetVentoyFsType());\r
+            }\r
+            else\r
+            {\r
+                Log("Can not reformat %s to %s", DriveName, GetVentoyFsName());\r
+            }\r
+        }\r
+        else\r
+        {\r
+            Log("No need to reformat ventoy partition");\r
+        }\r
+\r
         Log("OK\n");\r
     }\r
     else\r
index e3149f81b455344ba3d99553681449c0c6c781fd..6e1b9923f378cb2eb4f14f58a30d0c8a135c0847 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.aps and b/Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.aps differ
index 8767e3b61e07c2beddb800a240eb0db6b582efa1..2e0ef2046be66164cf0c69e906d143835872d25b 100644 (file)
@@ -251,6 +251,64 @@ static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes, MBR_HEAD *pMBR, UIN
     return TRUE;\r
 }\r
 \r
+static int GetVentoyFsNameInPhyDrive(PHY_DRIVE_INFO* CurDrive)\r
+{\r
+    int i = 0;\r
+    UINT64 Offset;\r
+    CHAR Volume[128] = { 0 };\r
+    CHAR FsName[MAX_PATH] = { 0 };\r
+\r
+    while (CurDrive->DriveLetters[i])\r
+    {\r
+        if (GetPhyDriveByLogicalDrive(CurDrive->DriveLetters[i], &Offset) >= 0)\r
+        {\r
+            if (Offset == SIZE_1MB)\r
+            {\r
+                sprintf_s(Volume, sizeof(Volume), "%C:\\", CurDrive->DriveLetters[i]);\r
+                Log("Find the partition 1 logical drive is %s", Volume);\r
+                break;\r
+            }\r
+        }\r
+        i++;\r
+    }\r
+\r
+    sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "??");\r
+\r
+    if (Volume[0])\r
+    {\r
+        if (GetVolumeInformationA(Volume, NULL, 0, NULL, NULL, NULL, FsName, MAX_PATH))\r
+        {\r
+            if (_stricmp(FsName, "exFAT") == 0)\r
+            {\r
+                sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "exFAT");\r
+            }\r
+            else if (_stricmp(FsName, "NTFS") == 0)\r
+            {\r
+                sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "NTFS");\r
+            }\r
+            else if (_stricmp(FsName, "FAT") == 0 || _stricmp(FsName, "FAT32") == 0)\r
+            {\r
+                sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "FAT32");\r
+            }\r
+            else\r
+            {\r
+                sprintf_s(CurDrive->VentoyFsType, sizeof(CurDrive->VentoyFsType), "%s", FsName);\r
+            }\r
+\r
+            Log("GetVentoyFsNameInPhyDrive %d %s <%s> <%s>", CurDrive->PhyDrive, Volume, FsName, CurDrive->VentoyFsType);\r
+        }\r
+        else\r
+        {\r
+            Log("GetVolumeInformationA %s failed %u", Volume, LASTERR);\r
+        }\r
+    }\r
+    else\r
+    {\r
+        Log("GetVentoyFsNameInPhyDrive %s not found", Volume);\r
+    }\r
+\r
+    return 0;\r
+}\r
 \r
 static int FilterPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)\r
 {\r
@@ -323,6 +381,8 @@ static int FilterPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)
             GetVentoyVerInPhyDrive(CurDrive, Part2StartSector, CurDrive->VentoyVersion, sizeof(CurDrive->VentoyVersion), &(CurDrive->SecureBootSupport));\r
             Log("PhyDrive %d is Ventoy Disk ver:%s SecureBoot:%u", CurDrive->PhyDrive, CurDrive->VentoyVersion, CurDrive->SecureBootSupport);\r
 \r
+            GetVentoyFsNameInPhyDrive(CurDrive);\r
+\r
             if (CurDrive->VentoyVersion[0] == 0)\r
             {\r
                 CurDrive->VentoyVersion[0] = '?';\r
index beafaa4ab95081b5895f209b3e3459061c665041..0371d176724a54b5cb1f58dbb51df75cbe4a71fa 100644 (file)
@@ -159,7 +159,8 @@ typedef struct PHY_DRIVE_INFO
     STORAGE_BUS_TYPE BusType;\r
 \r
     CHAR DriveLetters[64];\r
-   \r
+    \r
+    CHAR VentoyFsType[16];\r
     CHAR VentoyVersion[32];\r
 \r
     BOOL SecureBootSupport;\r
@@ -193,6 +194,9 @@ typedef enum PROGRESS_POINT
     PT_WRITE_PART_TABLE,\r
     PT_MOUNT_VOLUME,\r
 \r
+    PT_REFORMAT_START,\r
+    PT_REFORMAT_FINISH = PT_REFORMAT_START + 2,\r
+\r
     PT_FINISH\r
 }PROGRESS_POINT;\r
 \r
@@ -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);\r
 int GetReservedSpaceInMB(void);\r
 int IsPartNeed4KBAlign(void);\r
+int GetVentoyFsType(void);\r
+void SetVentoyFsType(int fs);\r
+const char* GetVentoyFsName(void);\r
 int FindProcessOccupyDisk(HANDLE hDrive, PHY_DRIVE_INFO *pPhyDrive);\r
 int VentoyFillMBRLocation(UINT64 DiskSizeInBytes, UINT32 StartSectorId, UINT32 SectorCount, PART_TABLE *Table);\r
 int ClearVentoyFromPhyDrive(HWND hWnd, PHY_DRIVE_INFO *pPhyDrive, char *pDrvLetter);\r
index acf72c871929c90d9ccc327e855e9045b0d5e795..741d9d6c42b4b77fba6a0770e222a898f02c2783 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.rc and b/Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.rc differ
index 05dfa60e6dba8a1f77685deaddc0e54a3309f767..ae8ea4e5d1a79bee6fbd85fc59a53efbc8e7e514 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/WinDialog.c and b/Ventoy2Disk/Ventoy2Disk/WinDialog.c differ
index 037e857fed74ca0e96827fcc3735198d29462b3e..a93eb56704797933fb00b4ae98fa23f923f346d6 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/resource.h and b/Ventoy2Disk/Ventoy2Disk/resource.h differ