mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-09-16 17:11:13 +00:00
Compare commits
66 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b3869b6894 | ||
|
563214ed40 | ||
|
b67f738b00 | ||
|
a9c539572b | ||
|
32602a79ab | ||
|
863eafd2cc | ||
|
0f135b6646 | ||
|
675c24ffa3 | ||
|
cd309eb663 | ||
|
5cdd6540a4 | ||
|
fde2e4430c | ||
|
9a471f4956 | ||
|
1f3b3afa35 | ||
|
6947f2a047 | ||
|
0a15e4e427 | ||
|
e763d7590f | ||
|
f842d46f90 | ||
|
cc1cc6c301 | ||
|
9f3d209798 | ||
|
fc742244ab | ||
|
3e66227dae | ||
|
f32d342f66 | ||
|
09d7ae68e7 | ||
|
68fefbc1fc | ||
|
8d893d4c94 | ||
|
84798a4f7a | ||
|
87f88eeb2b | ||
|
7b2615744c | ||
|
d7faff4438 | ||
|
f15dfd7409 | ||
|
09162e8d97 | ||
|
eb8fcc8f30 | ||
|
5fcb3971bc | ||
|
e47e4484ce | ||
|
7e26decb31 | ||
|
e713946fd0 | ||
|
a93b0f6656 | ||
|
836e1aa11e | ||
|
154bbc6e5f | ||
|
d151e74336 | ||
|
df87cafdfb | ||
|
09494a5b23 | ||
|
e15a1c5ece | ||
|
f5843f576b | ||
|
be5bc6f3b7 | ||
|
f3b65452f4 | ||
|
ec4b6c2a2c | ||
|
be8b6e8976 | ||
|
82b1faa132 | ||
|
52ae65f54d | ||
|
ee104bfa97 | ||
|
9cfd05811b | ||
|
0c66908935 | ||
|
f53de3bdb0 | ||
|
8516786b31 | ||
|
f7c78879c7 | ||
|
f3e267a09e | ||
|
7c1370dcb0 | ||
|
1b5aa9c61d | ||
|
d6eba15d71 | ||
|
734c7b8ac4 | ||
|
0fa25c4526 | ||
|
1473be0e4c | ||
|
cd9aa16b20 | ||
|
a9be2fd4d9 | ||
|
f354d2b733 |
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ['https://www.ventoy.net/en/donation.html'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
custom: ['https://www.paypal.me/ventoy', 'https://www.ventoy.net/en/donation.html'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
|
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.51
|
||||
placeholder: 1.0.59
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
101
.github/ISSUE_TEMPLATE/success_image_report.yml
vendored
Normal file
101
.github/ISSUE_TEMPLATE/success_image_report.yml
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
name: Success Image Report
|
||||
description: To report an image file that boot successfully in Ventoy and is not yet listed in https://www.ventoy.net/en/isolist.html
|
||||
title: "[Success Image Report]: "
|
||||
assignees:
|
||||
- octocat
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
I list all the successfully tested image files in the official website: https://www.ventoy.net/en/isolist.html
|
||||
If you successfully test an image file which is not listed in the above page, you can tell me and I will be very glad to add it to the tested list.
|
||||
- type: checkboxes
|
||||
id: faq
|
||||
attributes:
|
||||
label: Official Website List
|
||||
description: Have you checked the list at [https://www.ventoy.net/en/isolist.html](https://www.ventoy.net/en/isolist.html) and the image file is not listed?
|
||||
options:
|
||||
- label: I have checked the list in official website and the image file is not listed there.
|
||||
required: true
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Ventoy Version
|
||||
description: What version of ventoy did you test with the image file.
|
||||
placeholder: 1.0.57
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: bios
|
||||
attributes:
|
||||
label: BIOS Mode
|
||||
description: In which BIOS mode did you successfully test the image file? (It's recommended to test in both mode)
|
||||
options:
|
||||
- Legacy BIOS Mode
|
||||
- UEFI Mode
|
||||
- Both
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: partstyle
|
||||
attributes:
|
||||
label: Partition Style
|
||||
description: Which partition style did you use with Ventoy?
|
||||
options:
|
||||
- MBR
|
||||
- GPT
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: filename
|
||||
attributes:
|
||||
label: Image file name
|
||||
description: The successfully tested image file name.
|
||||
placeholder: xxxx.iso
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: checksum
|
||||
attributes:
|
||||
label: Image file checksum type
|
||||
description:
|
||||
options:
|
||||
- MD5
|
||||
- SHA1
|
||||
- SHA256
|
||||
- SHA512
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: checkvalue
|
||||
attributes:
|
||||
label: Image file checksum value
|
||||
description: What is the image file checksum value corresponding to the above checksum type?
|
||||
placeholder: xxxx
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: link
|
||||
attributes:
|
||||
label: Image file download link (if applicable)
|
||||
description: What is the image file download link?
|
||||
placeholder: https://xxx
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: testenv
|
||||
attributes:
|
||||
label: Test envrionment
|
||||
description: The manufacturer/model and other details about your computer (or VM).
|
||||
placeholder: Lenovo Thinkpad T420 laptop
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: details
|
||||
attributes:
|
||||
label: More Details?
|
||||
description: You can give more details here.
|
||||
value: "This image file booted successfully in Ventoy."
|
||||
validations:
|
||||
required: false
|
||||
|
@@ -59,6 +59,9 @@ static grub_env_set_pf grub_env_set = NULL;
|
||||
ventoy_grub_param_file_replace *g_file_replace_list = NULL;
|
||||
ventoy_efi_file_replace g_efi_file_replace;
|
||||
|
||||
ventoy_grub_param_file_replace *g_img_replace_list = NULL;
|
||||
ventoy_efi_file_replace g_img_file_replace;
|
||||
|
||||
CONST CHAR16 gIso9660EfiDriverPath[] = ISO9660_EFI_DRIVER_PATH;
|
||||
CONST CHAR16 gUdfEfiDriverPath[] = UDF_EFI_DRIVER_PATH;
|
||||
|
||||
@@ -707,6 +710,35 @@ STATIC EFI_STATUS EFIAPI ventoy_load_isoefi_driver(IN EFI_HANDLE ImageHandle)
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS ventoy_proc_img_replace_name(ventoy_grub_param_file_replace *replace)
|
||||
{
|
||||
UINT32 i;
|
||||
char tmp[256];
|
||||
|
||||
if (replace->magic != GRUB_IMG_REPLACE_MAGIC)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
if (replace->old_file_name[0][0] == 0)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
AsciiStrCpyS(tmp, sizeof(tmp), replace->old_file_name[0]);
|
||||
|
||||
for (i = 0; i < 256 && tmp[i]; i++)
|
||||
{
|
||||
if (tmp[i] == '/')
|
||||
{
|
||||
tmp[i] = '\\';
|
||||
}
|
||||
}
|
||||
|
||||
AsciiStrCpyS(replace->old_file_name[0], 256, tmp);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
||||
{
|
||||
UINT32 i = 0;
|
||||
@@ -817,6 +849,19 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
||||
old_cnt > 3 ? g_file_replace_list->old_file_name[3] : ""
|
||||
);
|
||||
|
||||
g_img_replace_list = &pGrubParam->img_replace;
|
||||
ventoy_proc_img_replace_name(g_img_replace_list);
|
||||
old_cnt = g_img_replace_list->old_file_cnt;
|
||||
debug("img replace: magic:0x%x virtid:%u name count:%u <%a> <%a> <%a> <%a>",
|
||||
g_img_replace_list->magic,
|
||||
g_img_replace_list->new_file_virtual_id,
|
||||
old_cnt,
|
||||
old_cnt > 0 ? g_img_replace_list->old_file_name[0] : "",
|
||||
old_cnt > 1 ? g_img_replace_list->old_file_name[1] : "",
|
||||
old_cnt > 2 ? g_img_replace_list->old_file_name[2] : "",
|
||||
old_cnt > 3 ? g_img_replace_list->old_file_name[3] : ""
|
||||
);
|
||||
|
||||
pPos = StrStr(pCmdLine, L"mem:");
|
||||
chain = (ventoy_chain_head *)StrHexToUintn(pPos + 4);
|
||||
|
||||
@@ -1050,7 +1095,8 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
||||
gST->ConIn->Reset(gST->ConIn, FALSE);
|
||||
}
|
||||
|
||||
if (g_file_replace_list && g_file_replace_list->magic == GRUB_FILE_REPLACE_MAGIC)
|
||||
if ((g_file_replace_list && g_file_replace_list->magic == GRUB_FILE_REPLACE_MAGIC) ||
|
||||
(g_img_replace_list && g_img_replace_list->magic == GRUB_IMG_REPLACE_MAGIC))
|
||||
{
|
||||
ventoy_wrapper_push_openvolume(pFile->OpenVolume);
|
||||
pFile->OpenVolume = ventoy_wrapper_open_volume;
|
||||
|
@@ -243,6 +243,7 @@ typedef int (*grub_env_printf_pf)(const char *fmt, ...);
|
||||
#pragma pack(1)
|
||||
|
||||
#define GRUB_FILE_REPLACE_MAGIC 0x1258BEEF
|
||||
#define GRUB_IMG_REPLACE_MAGIC 0x1259BEEF
|
||||
|
||||
typedef struct ventoy_efi_file_replace
|
||||
{
|
||||
@@ -267,6 +268,7 @@ typedef struct ventoy_grub_param
|
||||
grub_env_get_pf grub_env_get;
|
||||
grub_env_set_pf grub_env_set;
|
||||
ventoy_grub_param_file_replace file_replace;
|
||||
ventoy_grub_param_file_replace img_replace;
|
||||
grub_env_printf_pf grub_env_printf;
|
||||
}ventoy_grub_param;
|
||||
|
||||
@@ -396,6 +398,7 @@ extern ventoy_virt_chunk *g_virt_chunk;
|
||||
extern UINT32 g_virt_chunk_num;
|
||||
extern vtoy_block_data gBlockData;
|
||||
extern ventoy_efi_file_replace g_efi_file_replace;
|
||||
extern ventoy_efi_file_replace g_img_file_replace;
|
||||
extern ventoy_sector_flag *g_sector_flag;
|
||||
extern UINT32 g_sector_flag_num;
|
||||
extern BOOLEAN gMemdiskMode;
|
||||
@@ -403,6 +406,7 @@ extern BOOLEAN gSector512Mode;
|
||||
extern UINTN g_iso_buf_size;
|
||||
extern UINT8 *g_iso_data_buf;
|
||||
extern ventoy_grub_param_file_replace *g_file_replace_list;
|
||||
extern ventoy_grub_param_file_replace *g_img_replace_list;
|
||||
extern BOOLEAN g_fixup_iso9660_secover_enable;
|
||||
extern EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *g_con_simple_input_ex;
|
||||
extern BOOLEAN g_fix_windows_1st_cdrom_issue;
|
||||
|
@@ -37,6 +37,9 @@
|
||||
#include <Protocol/DriverBinding.h>
|
||||
#include <Ventoy.h>
|
||||
|
||||
#define ASSIGN_REPLACE(This, replace) \
|
||||
replace = (This->FlushEx == ventoy_wrapper_file_flush_ex) ? &g_efi_file_replace : &g_img_file_replace
|
||||
|
||||
UINT8 *g_iso_data_buf = NULL;
|
||||
UINTN g_iso_buf_size = 0;
|
||||
BOOLEAN gMemdiskMode = FALSE;
|
||||
@@ -1245,6 +1248,15 @@ ventoy_wrapper_file_flush_ex(EFI_FILE_HANDLE This, EFI_FILE_IO_TOKEN *Token)
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/* Ex version */
|
||||
STATIC EFI_STATUS EFIAPI
|
||||
ventoy_wrapper_file_flush_ex_img(EFI_FILE_HANDLE This, EFI_FILE_IO_TOKEN *Token)
|
||||
{
|
||||
(VOID)This;
|
||||
(VOID)Token;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
STATIC EFI_STATUS EFIAPI
|
||||
ventoy_wrapper_file_write(EFI_FILE_HANDLE This, UINTN *Len, VOID *Data)
|
||||
@@ -1270,19 +1282,20 @@ ventoy_wrapper_file_close(EFI_FILE_HANDLE This)
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
STATIC EFI_STATUS EFIAPI
|
||||
ventoy_wrapper_file_set_pos(EFI_FILE_HANDLE This, UINT64 Position)
|
||||
{
|
||||
(VOID)This;
|
||||
|
||||
if (Position <= g_efi_file_replace.FileSizeBytes)
|
||||
ventoy_efi_file_replace *replace = NULL;
|
||||
|
||||
ASSIGN_REPLACE(This, replace);
|
||||
|
||||
if (Position <= replace->FileSizeBytes)
|
||||
{
|
||||
g_efi_file_replace.CurPos = Position;
|
||||
replace->CurPos = Position;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_efi_file_replace.CurPos = g_efi_file_replace.FileSizeBytes;
|
||||
replace->CurPos = replace->FileSizeBytes;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -1291,9 +1304,11 @@ ventoy_wrapper_file_set_pos(EFI_FILE_HANDLE This, UINT64 Position)
|
||||
STATIC EFI_STATUS EFIAPI
|
||||
ventoy_wrapper_file_get_pos(EFI_FILE_HANDLE This, UINT64 *Position)
|
||||
{
|
||||
(VOID)This;
|
||||
ventoy_efi_file_replace *replace = NULL;
|
||||
|
||||
*Position = g_efi_file_replace.CurPos;
|
||||
ASSIGN_REPLACE(This, replace);
|
||||
|
||||
*Position = replace->CurPos;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -1303,6 +1318,9 @@ STATIC EFI_STATUS EFIAPI
|
||||
ventoy_wrapper_file_get_info(EFI_FILE_HANDLE This, EFI_GUID *Type, UINTN *Len, VOID *Data)
|
||||
{
|
||||
EFI_FILE_INFO *Info = (EFI_FILE_INFO *) Data;
|
||||
ventoy_efi_file_replace *replace = NULL;
|
||||
|
||||
ASSIGN_REPLACE(This, replace);
|
||||
|
||||
debug("ventoy_wrapper_file_get_info ... %u", *Len);
|
||||
|
||||
@@ -1320,8 +1338,8 @@ ventoy_wrapper_file_get_info(EFI_FILE_HANDLE This, EFI_GUID *Type, UINTN *Len, V
|
||||
ZeroMem(Data, sizeof(EFI_FILE_INFO));
|
||||
|
||||
Info->Size = sizeof(EFI_FILE_INFO);
|
||||
Info->FileSize = g_efi_file_replace.FileSizeBytes;
|
||||
Info->PhysicalSize = g_efi_file_replace.FileSizeBytes;
|
||||
Info->FileSize = replace->FileSizeBytes;
|
||||
Info->PhysicalSize = replace->FileSizeBytes;
|
||||
Info->Attribute = EFI_FILE_READ_ONLY;
|
||||
//Info->FileName = EFI_FILE_READ_ONLY;
|
||||
|
||||
@@ -1335,23 +1353,24 @@ ventoy_wrapper_file_read(EFI_FILE_HANDLE This, UINTN *Len, VOID *Data)
|
||||
{
|
||||
EFI_LBA Lba;
|
||||
UINTN ReadLen = *Len;
|
||||
|
||||
(VOID)This;
|
||||
ventoy_efi_file_replace *replace = NULL;
|
||||
|
||||
ASSIGN_REPLACE(This, replace);
|
||||
|
||||
debug("ventoy_wrapper_file_read ... %u", *Len);
|
||||
|
||||
if (g_efi_file_replace.CurPos + ReadLen > g_efi_file_replace.FileSizeBytes)
|
||||
if (replace->CurPos + ReadLen > replace->FileSizeBytes)
|
||||
{
|
||||
ReadLen = g_efi_file_replace.FileSizeBytes - g_efi_file_replace.CurPos;
|
||||
ReadLen = replace->FileSizeBytes - replace->CurPos;
|
||||
}
|
||||
|
||||
Lba = g_efi_file_replace.CurPos / 2048 + g_efi_file_replace.BlockIoSectorStart;
|
||||
Lba = replace->CurPos / 2048 + replace->BlockIoSectorStart;
|
||||
|
||||
ventoy_block_io_read(NULL, 0, Lba, ReadLen, Data);
|
||||
|
||||
*Len = ReadLen;
|
||||
|
||||
g_efi_file_replace.CurPos += ReadLen;
|
||||
replace->CurPos += ReadLen;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -1362,7 +1381,7 @@ ventoy_wrapper_file_read_ex(IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN
|
||||
return ventoy_wrapper_file_read(This, &(Token->BufferSize), Token->Buffer);
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_procotol(EFI_FILE_PROTOCOL *File)
|
||||
STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_procotol(EFI_FILE_PROTOCOL *File, BOOLEAN Img)
|
||||
{
|
||||
File->Revision = EFI_FILE_PROTOCOL_REVISION2;
|
||||
File->Open = ventoy_wrapper_fs_open;
|
||||
@@ -1378,7 +1397,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_procotol(EFI_FILE_PROTOCOL *File)
|
||||
File->OpenEx = ventoy_wrapper_file_open_ex;
|
||||
File->ReadEx = ventoy_wrapper_file_read_ex;
|
||||
File->WriteEx = ventoy_wrapper_file_write_ex;
|
||||
File->FlushEx = ventoy_wrapper_file_flush_ex;
|
||||
File->FlushEx = Img ? ventoy_wrapper_file_flush_ex_img : ventoy_wrapper_file_flush_ex;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -1397,6 +1416,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
UINT64 Sectors = 0;
|
||||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
CHAR8 TmpName[256];
|
||||
CHAR8 OldName[256];
|
||||
ventoy_virt_chunk *virt = NULL;
|
||||
|
||||
debug("## ventoy_wrapper_file_open <%s> ", Name);
|
||||
@@ -1417,6 +1437,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
if (g_file_replace_list && g_file_replace_list->magic == GRUB_FILE_REPLACE_MAGIC &&
|
||||
g_file_replace_list->new_file_virtual_id < g_virt_chunk_num)
|
||||
{
|
||||
@@ -1427,7 +1448,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
{
|
||||
g_original_fclose(*New);
|
||||
*New = &g_efi_file_replace.WrapperHandle;
|
||||
ventoy_wrapper_file_procotol(*New);
|
||||
ventoy_wrapper_file_procotol(*New, FALSE);
|
||||
|
||||
virt = g_virt_chunk + g_file_replace_list->new_file_virtual_id;
|
||||
|
||||
@@ -1453,6 +1474,49 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (g_img_replace_list && g_img_replace_list->magic == GRUB_IMG_REPLACE_MAGIC &&
|
||||
g_img_replace_list->new_file_virtual_id < g_virt_chunk_num)
|
||||
{
|
||||
AsciiSPrint(TmpName, sizeof(TmpName), "%s", Name);
|
||||
for (j = 0; j < g_img_replace_list->old_file_cnt; j++)
|
||||
{
|
||||
AsciiStrCpyS(OldName, sizeof(OldName), g_img_replace_list[i].old_file_name[j]);
|
||||
if ((0 == AsciiStrCmp(OldName, TmpName)) ||
|
||||
(AsciiStrnCmp(OldName, "\\loader\\entries\\", 16) == 0 &&
|
||||
AsciiStrCmp(OldName + 16, TmpName) == 0
|
||||
)
|
||||
)
|
||||
{
|
||||
g_original_fclose(*New);
|
||||
*New = &g_img_file_replace.WrapperHandle;
|
||||
ventoy_wrapper_file_procotol(*New, TRUE);
|
||||
|
||||
virt = g_virt_chunk + g_img_replace_list->new_file_virtual_id;
|
||||
|
||||
Sectors = (virt->mem_sector_end - virt->mem_sector_start) + (virt->remap_sector_end - virt->remap_sector_start);
|
||||
|
||||
g_img_file_replace.BlockIoSectorStart = virt->mem_sector_start;
|
||||
g_img_file_replace.FileSizeBytes = Sectors * 2048;
|
||||
|
||||
if (gDebugPrint)
|
||||
{
|
||||
debug("## ventoy_wrapper_file_open2 <%s> BlockStart:%lu Sectors:%lu Bytes:%lu", Name,
|
||||
g_img_file_replace.BlockIoSectorStart, Sectors, Sectors * 2048);
|
||||
sleep(3);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
if (StrCmp(Name, L"\\loader\\entries") == 0)
|
||||
{
|
||||
(*New)->Open = ventoy_wrapper_file_open;
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@@ -41,6 +41,7 @@ typedef struct ventoy_grub_param
|
||||
grub_env_get_pf grub_env_get;
|
||||
grub_env_set_pf grub_env_set;
|
||||
ventoy_grub_param_file_replace file_replace;
|
||||
ventoy_grub_param_file_replace img_replace;
|
||||
grub_env_printf_pf grub_env_printf;
|
||||
}ventoy_grub_param;
|
||||
#pragma pack()
|
||||
|
@@ -94,7 +94,7 @@ hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result)
|
||||
{
|
||||
total += r;
|
||||
div = grub_divmod64(total * 100, (grub_uint64_t)file->size, &ro);
|
||||
grub_printf("\rCalculating %d%% ", (int)div);
|
||||
grub_printf("\rCalculating %s %d%% ", hash->name, (int)div);
|
||||
grub_refresh();
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result)
|
||||
grub_free (context);
|
||||
if (progress)
|
||||
{
|
||||
grub_printf("\rCalculating 100%% \n\r\n");
|
||||
grub_printf("\rCalculating %s 100%% \n\r\n", hash->name);
|
||||
grub_refresh();
|
||||
}
|
||||
return GRUB_ERR_NONE;
|
||||
@@ -224,6 +224,8 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
|
||||
int keep = state[3].set;
|
||||
int uncompress = state[4].set;
|
||||
unsigned unread = 0;
|
||||
int len = 0;
|
||||
char hashsum[256];
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE (aliases); i++)
|
||||
if (grub_strcmp (ctxt->extcmd->cmd->name, aliases[i].name) == 0)
|
||||
@@ -282,8 +284,12 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
|
||||
continue;
|
||||
}
|
||||
for (j = 0; j < hash->mdlen; j++)
|
||||
grub_printf ("%02x", ((grub_uint8_t *) result)[j]);
|
||||
{
|
||||
grub_printf ("%02x", ((grub_uint8_t *) result)[j]);
|
||||
len += grub_snprintf(hashsum + len, sizeof(hashsum) - len, "%02x", ((grub_uint8_t *) result)[j]);
|
||||
}
|
||||
grub_printf (" %s\n", args[i]);
|
||||
grub_env_set("VT_LAST_CHECK_SUM", hashsum);
|
||||
}
|
||||
|
||||
if (unread)
|
||||
|
@@ -45,10 +45,24 @@ int g_ventoy_wimboot_mode = 0;
|
||||
int g_ventoy_iso_uefi_drv = 0;
|
||||
int g_ventoy_last_entry = -1;
|
||||
int g_ventoy_suppress_esc = 0;
|
||||
int g_ventoy_suppress_esc_default = 1;
|
||||
int g_ventoy_menu_esc = 0;
|
||||
int g_ventoy_fn_mutex = 0;
|
||||
int g_ventoy_terminal_output = 0;
|
||||
|
||||
#define VTOY_COMM_HOTKEY(cmdkey) \
|
||||
if (0 == g_ventoy_fn_mutex) { \
|
||||
cmdstr = grub_env_get(cmdkey); \
|
||||
if (cmdstr) \
|
||||
{ \
|
||||
menu_fini (); \
|
||||
g_ventoy_fn_mutex = 1; \
|
||||
grub_script_execute_sourcecode(cmdstr); \
|
||||
g_ventoy_fn_mutex = 0; \
|
||||
goto refresh; \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Time to delay after displaying an error message about a default/fallback
|
||||
entry failing to boot. */
|
||||
#define DEFAULT_ENTRY_ERROR_DELAY_MS 2500
|
||||
@@ -388,7 +402,7 @@ int g_menu_update_mode = 0;
|
||||
int g_ventoy_tip_label_enable = 0;
|
||||
const char * g_ventoy_tip_msg1 = NULL;
|
||||
const char * g_ventoy_tip_msg2 = NULL;
|
||||
|
||||
static const char *g_ventoy_cur_img_path = NULL;
|
||||
static void menu_set_chosen_tip(grub_menu_t menu, int entry)
|
||||
{
|
||||
img_info *img;
|
||||
@@ -402,6 +416,7 @@ static void menu_set_chosen_tip(grub_menu_t menu, int entry)
|
||||
{
|
||||
g_ventoy_tip_msg1 = img->tip1;
|
||||
g_ventoy_tip_msg2 = img->tip2;
|
||||
g_ventoy_cur_img_path = img->path;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -625,7 +640,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
||||
default_entry = get_entry_number (menu, "default");
|
||||
|
||||
if (g_ventoy_suppress_esc)
|
||||
default_entry = 1;
|
||||
default_entry = g_ventoy_suppress_esc_default;
|
||||
else if (g_ventoy_last_entry >= 0 && g_ventoy_last_entry < menu->size) {
|
||||
default_entry = g_ventoy_last_entry;
|
||||
}
|
||||
@@ -835,71 +850,23 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
||||
|
||||
case GRUB_TERM_KEY_F2:
|
||||
case '2':
|
||||
if (0 == g_ventoy_fn_mutex) {
|
||||
cmdstr = grub_env_get("VTOY_F2_CMD");
|
||||
if (cmdstr)
|
||||
{
|
||||
menu_fini ();
|
||||
g_ventoy_fn_mutex = 1;
|
||||
grub_script_execute_sourcecode(cmdstr);
|
||||
g_ventoy_fn_mutex = 0;
|
||||
goto refresh;
|
||||
}
|
||||
}
|
||||
VTOY_COMM_HOTKEY("VTOY_F2_CMD");
|
||||
break;
|
||||
case GRUB_TERM_KEY_F3:
|
||||
case '3':
|
||||
if (0 == g_ventoy_fn_mutex) {
|
||||
cmdstr = grub_env_get("VTOY_F3_CMD");
|
||||
if (cmdstr)
|
||||
{
|
||||
menu_fini ();
|
||||
grub_script_execute_sourcecode(cmdstr);
|
||||
goto refresh;
|
||||
}
|
||||
}
|
||||
VTOY_COMM_HOTKEY("VTOY_F3_CMD");
|
||||
break;
|
||||
case GRUB_TERM_KEY_F4:
|
||||
case '4':
|
||||
if (0 == g_ventoy_fn_mutex) {
|
||||
cmdstr = grub_env_get("VTOY_F4_CMD");
|
||||
if (cmdstr)
|
||||
{
|
||||
menu_fini ();
|
||||
g_ventoy_fn_mutex = 1;
|
||||
grub_script_execute_sourcecode(cmdstr);
|
||||
g_ventoy_fn_mutex = 0;
|
||||
goto refresh;
|
||||
}
|
||||
}
|
||||
VTOY_COMM_HOTKEY("VTOY_F4_CMD");
|
||||
break;
|
||||
case GRUB_TERM_KEY_F5:
|
||||
case '5':
|
||||
if (0 == g_ventoy_fn_mutex) {
|
||||
cmdstr = grub_env_get("VTOY_F5_CMD");
|
||||
if (cmdstr)
|
||||
{
|
||||
menu_fini ();
|
||||
g_ventoy_fn_mutex = 1;
|
||||
grub_script_execute_sourcecode(cmdstr);
|
||||
g_ventoy_fn_mutex = 0;
|
||||
goto refresh;
|
||||
}
|
||||
}
|
||||
VTOY_COMM_HOTKEY("VTOY_F5_CMD");
|
||||
break;
|
||||
case GRUB_TERM_KEY_F6:
|
||||
case '6':
|
||||
if (0 == g_ventoy_fn_mutex) {
|
||||
cmdstr = grub_env_get("VTOY_F6_CMD");
|
||||
if (cmdstr)
|
||||
{
|
||||
menu_fini ();
|
||||
g_ventoy_fn_mutex = 1;
|
||||
grub_script_execute_sourcecode(cmdstr);
|
||||
g_ventoy_fn_mutex = 0;
|
||||
goto refresh;
|
||||
}
|
||||
}
|
||||
VTOY_COMM_HOTKEY("VTOY_F6_CMD");
|
||||
break;
|
||||
case GRUB_TERM_KEY_F7:
|
||||
menu_fini ();
|
||||
@@ -945,6 +912,40 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
||||
g_ventoy_menu_refresh = 1;
|
||||
goto refresh;
|
||||
|
||||
case (GRUB_TERM_CTRL | 'h'):
|
||||
case 'h':
|
||||
{
|
||||
cmdstr = grub_env_get("VTOY_HELP_CMD");
|
||||
if (cmdstr)
|
||||
{
|
||||
grub_script_execute_sourcecode(cmdstr);
|
||||
while (grub_getkey() != GRUB_TERM_ESC)
|
||||
;
|
||||
menu_fini ();
|
||||
goto refresh;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (GRUB_TERM_CTRL | 'm'):
|
||||
case 'm':
|
||||
{
|
||||
if (g_ventoy_cur_img_path)
|
||||
{
|
||||
grub_env_set("VTOY_CHKSUM_FILE_PATH", g_ventoy_cur_img_path);
|
||||
cmdstr = grub_env_get("VTOY_CHKSUM_CMD");
|
||||
if (cmdstr)
|
||||
{
|
||||
menu_fini();
|
||||
grub_script_execute_sourcecode(cmdstr);
|
||||
goto refresh;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_env_set("VTOY_CHKSUM_FILE_PATH", "X");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
int entry;
|
||||
@@ -1038,6 +1039,11 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
||||
break;
|
||||
}
|
||||
|
||||
if (autobooted == 0 && g_ventoy_menu_esc && auto_boot) {
|
||||
g_ventoy_last_entry = boot_entry;
|
||||
break;
|
||||
}
|
||||
|
||||
e = grub_menu_get_entry (menu, boot_entry);
|
||||
if (! e)
|
||||
continue; /* Menu is empty. */
|
||||
|
113
GRUB2/MOD_SRC/grub-2.04/grub-core/script/function.c
Normal file
113
GRUB2/MOD_SRC/grub-2.04/grub-core/script/function.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2005,2007,2009,2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/misc.h>
|
||||
#include <grub/script_sh.h>
|
||||
#include <grub/parser.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/charset.h>
|
||||
|
||||
grub_script_function_t grub_script_function_list;
|
||||
|
||||
grub_script_function_t
|
||||
grub_script_function_create (struct grub_script_arg *functionname_arg,
|
||||
struct grub_script *cmd)
|
||||
{
|
||||
grub_script_function_t func;
|
||||
grub_script_function_t *p;
|
||||
|
||||
func = (grub_script_function_t) grub_malloc (sizeof (*func));
|
||||
if (! func)
|
||||
return 0;
|
||||
|
||||
func->name = grub_strdup (functionname_arg->str);
|
||||
if (! func->name)
|
||||
{
|
||||
grub_free (func);
|
||||
return 0;
|
||||
}
|
||||
|
||||
func->func = cmd;
|
||||
|
||||
/* Keep the list sorted for simplicity. */
|
||||
p = &grub_script_function_list;
|
||||
while (*p)
|
||||
{
|
||||
if (grub_strcmp ((*p)->name, func->name) >= 0)
|
||||
break;
|
||||
|
||||
p = &((*p)->next);
|
||||
}
|
||||
|
||||
/* If the function already exists, overwrite the old function. */
|
||||
if (*p && grub_strcmp ((*p)->name, func->name) == 0)
|
||||
{
|
||||
grub_script_function_t q;
|
||||
|
||||
q = *p;
|
||||
grub_script_free (q->func);
|
||||
q->func = cmd;
|
||||
grub_free (func);
|
||||
func = q;
|
||||
}
|
||||
else
|
||||
{
|
||||
func->next = *p;
|
||||
*p = func;
|
||||
}
|
||||
|
||||
return func;
|
||||
}
|
||||
|
||||
void
|
||||
grub_script_function_remove (const char *name)
|
||||
{
|
||||
grub_script_function_t *p, q;
|
||||
|
||||
for (p = &grub_script_function_list, q = *p; q; p = &(q->next), q = q->next)
|
||||
if (grub_strcmp (name, q->name) == 0)
|
||||
{
|
||||
*p = q->next;
|
||||
grub_free (q->name);
|
||||
grub_script_free (q->func);
|
||||
grub_free (q);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
grub_script_function_t
|
||||
grub_script_function_find (char *functionname)
|
||||
{
|
||||
grub_script_function_t func;
|
||||
|
||||
for (func = grub_script_function_list; func; func = func->next)
|
||||
if (grub_strcmp (functionname, func->name) == 0)
|
||||
break;
|
||||
|
||||
if (! func)
|
||||
{
|
||||
char tmp[64];
|
||||
grub_strncpy (tmp, functionname, 63);
|
||||
tmp[63] = 0;
|
||||
/* Avoid truncating inside UTF-8 character. */
|
||||
tmp[grub_getend (tmp, tmp + grub_strlen (tmp))] = 0;
|
||||
grub_error (GRUB_ERR_UNKNOWN_COMMAND, N_("can't find command `%s'"), tmp);
|
||||
}
|
||||
|
||||
return func;
|
||||
}
|
@@ -51,6 +51,37 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static grub_uint8_t g_check_mbr_data[440] = {
|
||||
0xEB, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFA, 0x90, 0x90, 0xF6, 0xC2, 0x80, 0x74, 0x05, 0xF6, 0xC2, 0x70,
|
||||
0x74, 0x02, 0xB2, 0x80, 0xEA, 0x79, 0x7C, 0x00, 0x00, 0x31, 0xC0, 0x8E, 0xD8, 0x8E, 0xD0, 0xBC,
|
||||
0x00, 0x20, 0xFB, 0xA0, 0x64, 0x7C, 0x3C, 0xFF, 0x74, 0x02, 0x88, 0xC2, 0x52, 0xBE, 0x90, 0x7D,
|
||||
0xE8, 0x16, 0x01, 0xBE, 0x05, 0x7C, 0xB4, 0x41, 0xBB, 0xAA, 0x55, 0xCD, 0x13, 0x5A, 0x52, 0x72,
|
||||
0x3D, 0x81, 0xFB, 0x55, 0xAA, 0x75, 0x37, 0x83, 0xE1, 0x01, 0x74, 0x32, 0x31, 0xC0, 0x89, 0x44,
|
||||
0x04, 0x40, 0x88, 0x44, 0xFF, 0x89, 0x44, 0x02, 0xC7, 0x04, 0x10, 0x00, 0x66, 0x8B, 0x1E, 0x5C,
|
||||
0x7C, 0x66, 0x89, 0x5C, 0x08, 0x66, 0x8B, 0x1E, 0x60, 0x7C, 0x66, 0x89, 0x5C, 0x0C, 0xC7, 0x44,
|
||||
0x06, 0x00, 0x70, 0xB4, 0x42, 0xCD, 0x13, 0x72, 0x05, 0xBB, 0x00, 0x70, 0xEB, 0x76, 0xB4, 0x08,
|
||||
0xCD, 0x13, 0x73, 0x0D, 0x5A, 0x84, 0xD2, 0x0F, 0x83, 0xD8, 0x00, 0xBE, 0x96, 0x7D, 0xE9, 0x82,
|
||||
0x00, 0x66, 0x0F, 0xB6, 0xC6, 0x88, 0x64, 0xFF, 0x40, 0x66, 0x89, 0x44, 0x04, 0x0F, 0xB6, 0xD1,
|
||||
0xC1, 0xE2, 0x02, 0x88, 0xE8, 0x88, 0xF4, 0x40, 0x89, 0x44, 0x08, 0x0F, 0xB6, 0xC2, 0xC0, 0xE8,
|
||||
0x02, 0x66, 0x89, 0x04, 0x66, 0xA1, 0x60, 0x7C, 0x66, 0x09, 0xC0, 0x75, 0x4E, 0x66, 0xA1, 0x5C,
|
||||
0x7C, 0x66, 0x31, 0xD2, 0x66, 0xF7, 0x34, 0x88, 0xD1, 0x31, 0xD2, 0x66, 0xF7, 0x74, 0x04, 0x3B,
|
||||
0x44, 0x08, 0x7D, 0x37, 0xFE, 0xC1, 0x88, 0xC5, 0x30, 0xC0, 0xC1, 0xE8, 0x02, 0x08, 0xC1, 0x88,
|
||||
0xD0, 0x5A, 0x88, 0xC6, 0xBB, 0x00, 0x70, 0x8E, 0xC3, 0x31, 0xDB, 0xB8, 0x01, 0x02, 0xCD, 0x13,
|
||||
0x72, 0x1E, 0x8C, 0xC3, 0x60, 0x1E, 0xB9, 0x00, 0x01, 0x8E, 0xDB, 0x31, 0xF6, 0xBF, 0x00, 0x80,
|
||||
0x8E, 0xC6, 0xFC, 0xF3, 0xA5, 0x1F, 0x61, 0xFF, 0x26, 0x5A, 0x7C, 0xBE, 0x93, 0x7D, 0xEB, 0x03,
|
||||
0xBE, 0x99, 0x7D, 0xE8, 0x33, 0x00, 0xBE, 0x9C, 0x7D, 0xE8, 0x2D, 0x00, 0xCD, 0x18, 0xEB, 0xFE,
|
||||
0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
|
||||
0x56, 0x54, 0x00, 0x47, 0x65, 0x00, 0x48, 0x44, 0x00, 0x52, 0x64, 0x00, 0x20, 0x45, 0x72, 0x0D,
|
||||
0x0A, 0x00, 0xBB, 0x01, 0x00, 0xB4, 0x0E, 0xCD, 0x10, 0xAC, 0x3C, 0x00, 0x75, 0xF4, 0xC3, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
initrd_info *g_initrd_img_list = NULL;
|
||||
initrd_info *g_initrd_img_tail = NULL;
|
||||
int g_initrd_img_count = 0;
|
||||
@@ -479,7 +510,7 @@ static int ventoy_set_check_result(int ret)
|
||||
grub_printf(VTOY_WARNING"\n");
|
||||
grub_printf(VTOY_WARNING"\n\n\n");
|
||||
|
||||
grub_printf("This is NOT a standard Ventoy device and is NOT supported (0x%x).\n\n", ret);
|
||||
grub_printf("This is NOT a standard Ventoy device and is NOT supported (%d).\n\n", ret);
|
||||
grub_printf("You should follow the instructions in https://www.ventoy.net to use Ventoy.\n");
|
||||
|
||||
grub_printf("\n\nWill exit after 10 seconds ...... ");
|
||||
@@ -497,6 +528,8 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
grub_uint64_t offset;
|
||||
char devname[64];
|
||||
grub_fs_t fs;
|
||||
grub_uint8_t mbr[512];
|
||||
grub_disk_t disk;
|
||||
grub_device_t dev2;
|
||||
char *label = NULL;
|
||||
struct grub_partition *partition;
|
||||
@@ -611,7 +644,27 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
|
||||
grub_device_close(dev2);
|
||||
}
|
||||
|
||||
|
||||
/* MBR check */
|
||||
disk = grub_disk_open(dev->disk->name);
|
||||
if (!disk)
|
||||
{
|
||||
return ventoy_set_check_result(11);
|
||||
}
|
||||
|
||||
grub_memset(mbr, 0, 512);
|
||||
grub_disk_read(disk, 0, 0, 512, mbr);
|
||||
grub_disk_close(disk);
|
||||
|
||||
g_check_mbr_data[92] = mbr[92];
|
||||
g_check_mbr_data[102] = mbr[102];
|
||||
g_check_mbr_data[103] = mbr[103];
|
||||
grub_memcpy(g_check_mbr_data + 0x180, mbr + 0x180, 16);
|
||||
if (grub_memcmp(g_check_mbr_data, mbr, 440))
|
||||
{
|
||||
return ventoy_set_check_result(12);
|
||||
}
|
||||
|
||||
return ventoy_set_check_result(0);
|
||||
}
|
||||
|
||||
@@ -865,6 +918,38 @@ static grub_err_t ventoy_cmd_strbegin(grub_extcmd_context_t ctxt, int argc, char
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_strcasebegin(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
char *c0, *c1;
|
||||
|
||||
(void)ctxt;
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
c0 = args[0];
|
||||
c1 = args[1];
|
||||
|
||||
while (*c0 && *c1)
|
||||
{
|
||||
if ((*c0 != *c1) && (*c0 != grub_toupper(*c1)))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
c0++;
|
||||
c1++;
|
||||
}
|
||||
|
||||
if (*c1)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_incr(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
long value_long = 0;
|
||||
@@ -2616,6 +2701,22 @@ grub_uint32_t ventoy_get_iso_boot_catlog(grub_file_t file)
|
||||
return desc.sector;
|
||||
}
|
||||
|
||||
static grub_uint32_t ventoy_get_bios_eltorito_rba(grub_file_t file, grub_uint32_t sector)
|
||||
{
|
||||
grub_uint8_t buf[512];
|
||||
|
||||
grub_file_seek(file, sector * 2048);
|
||||
grub_file_read(file, buf, sizeof(buf));
|
||||
|
||||
if (buf[0] == 0x01 && buf[1] == 0x00 &&
|
||||
buf[30] == 0x55 && buf[31] == 0xaa && buf[32] == 0x88)
|
||||
{
|
||||
return *((grub_uint32_t *)(buf + 40));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ventoy_has_efi_eltorito(grub_file_t file, grub_uint32_t sector)
|
||||
{
|
||||
int i;
|
||||
@@ -2893,6 +2994,7 @@ static grub_err_t ventoy_cmd_img_sector(grub_extcmd_context_t ctxt, int argc, ch
|
||||
}
|
||||
|
||||
grub_memset(&g_grub_param->file_replace, 0, sizeof(g_grub_param->file_replace));
|
||||
grub_memset(&g_grub_param->img_replace, 0, sizeof(g_grub_param->img_replace));
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
@@ -2924,15 +3026,21 @@ static grub_err_t ventoy_select_conf_replace(grub_extcmd_context_t ctxt, int arg
|
||||
debug("Find conf replace for %s\n", args[1]);
|
||||
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "(loop)%s", node->orgconf);
|
||||
if (!file)
|
||||
if (file)
|
||||
{
|
||||
offset = grub_iso9660_get_last_file_dirent_pos(file);
|
||||
grub_file_close(file);
|
||||
}
|
||||
else if (node->img > 0)
|
||||
{
|
||||
offset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("<(loop)%s> NOT exist\n", node->orgconf);
|
||||
goto end;
|
||||
}
|
||||
|
||||
offset = grub_iso9660_get_last_file_dirent_pos(file);
|
||||
grub_file_close(file);
|
||||
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s%s", args[0], node->newconf);
|
||||
if (!file)
|
||||
{
|
||||
@@ -2955,6 +3063,13 @@ static grub_err_t ventoy_select_conf_replace(grub_extcmd_context_t ctxt, int arg
|
||||
g_conf_replace_node = node;
|
||||
g_conf_replace_offset = offset + 2;
|
||||
|
||||
if (node->img > 0)
|
||||
{
|
||||
g_grub_param->img_replace.magic = GRUB_IMG_REPLACE_MAGIC;
|
||||
g_grub_param->img_replace.old_name_cnt = 1;
|
||||
grub_snprintf(g_grub_param->img_replace.old_file_name[0], 256, "%s", node->orgconf);
|
||||
}
|
||||
|
||||
debug("conf_replace OK: newlen: %d\n", g_conf_replace_new_len);
|
||||
|
||||
end:
|
||||
@@ -2969,6 +3084,7 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
|
||||
{
|
||||
int i = 0;
|
||||
int pos = 0;
|
||||
int defidx = 1;
|
||||
char *buf = NULL;
|
||||
char configfile[128];
|
||||
install_template *node = NULL;
|
||||
@@ -2993,9 +3109,13 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
|
||||
|
||||
if (node->autosel >= 0 && node->autosel <= node->templatenum)
|
||||
{
|
||||
node->cursel = node->autosel - 1;
|
||||
debug("Auto install template auto select %d\n", node->autosel);
|
||||
return 0;
|
||||
defidx = node->autosel;
|
||||
if (node->timeout < 0)
|
||||
{
|
||||
node->cursel = node->autosel - 1;
|
||||
debug("Auto install template auto select %d\n", node->autosel);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
buf = (char *)grub_malloc(VTOY_MAX_SCRIPT_BUF);
|
||||
@@ -3004,24 +3124,31 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (node->timeout > 0)
|
||||
{
|
||||
vtoy_ssprintf(buf, pos, "set timeout=%d\n", node->timeout);
|
||||
}
|
||||
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot without auto installation template\" {\n"
|
||||
" echo %s\n}\n", "123");
|
||||
" echo %s\n}\n", "");
|
||||
|
||||
for (i = 0; i < node->templatenum; i++)
|
||||
{
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot with %s\" {\n"
|
||||
" echo 123\n}\n",
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot with %s\"{\n"
|
||||
" echo \"\"\n}\n",
|
||||
node->templatepath[i].path);
|
||||
}
|
||||
|
||||
g_ventoy_menu_esc = 1;
|
||||
g_ventoy_suppress_esc = 1;
|
||||
g_ventoy_suppress_esc_default = defidx;
|
||||
|
||||
grub_snprintf(configfile, sizeof(configfile), "configfile mem:0x%llx:size:%d", (ulonglong)(ulong)buf, pos);
|
||||
grub_script_execute_sourcecode(configfile);
|
||||
|
||||
g_ventoy_menu_esc = 0;
|
||||
g_ventoy_suppress_esc = 0;
|
||||
g_ventoy_suppress_esc_default = 1;
|
||||
|
||||
grub_free(buf);
|
||||
|
||||
@@ -3034,6 +3161,7 @@ static grub_err_t ventoy_cmd_sel_persistence(grub_extcmd_context_t ctxt, int arg
|
||||
{
|
||||
int i = 0;
|
||||
int pos = 0;
|
||||
int defidx = 1;
|
||||
char *buf = NULL;
|
||||
char configfile[128];
|
||||
persistence_config *node;
|
||||
@@ -3058,9 +3186,13 @@ static grub_err_t ventoy_cmd_sel_persistence(grub_extcmd_context_t ctxt, int arg
|
||||
|
||||
if (node->autosel >= 0 && node->autosel <= node->backendnum)
|
||||
{
|
||||
node->cursel = node->autosel - 1;
|
||||
debug("Persistence image auto select %d\n", node->autosel);
|
||||
return 0;
|
||||
defidx = node->autosel;
|
||||
if (node->timeout < 0)
|
||||
{
|
||||
node->cursel = node->autosel - 1;
|
||||
debug("Persistence image auto select %d\n", node->autosel);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
buf = (char *)grub_malloc(VTOY_MAX_SCRIPT_BUF);
|
||||
@@ -3069,25 +3201,32 @@ static grub_err_t ventoy_cmd_sel_persistence(grub_extcmd_context_t ctxt, int arg
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (node->timeout > 0)
|
||||
{
|
||||
vtoy_ssprintf(buf, pos, "set timeout=%d\n", node->timeout);
|
||||
}
|
||||
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot without persistence\" {\n"
|
||||
" echo %s\n}\n", "123");
|
||||
" echo %s\n}\n", "");
|
||||
|
||||
for (i = 0; i < node->backendnum; i++)
|
||||
{
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot with %s\" {\n"
|
||||
" echo 123\n}\n",
|
||||
" echo \"\"\n}\n",
|
||||
node->backendpath[i].path);
|
||||
|
||||
}
|
||||
|
||||
g_ventoy_menu_esc = 1;
|
||||
g_ventoy_suppress_esc = 1;
|
||||
|
||||
g_ventoy_suppress_esc_default = defidx;
|
||||
|
||||
grub_snprintf(configfile, sizeof(configfile), "configfile mem:0x%llx:size:%d", (ulonglong)(ulong)buf, pos);
|
||||
grub_script_execute_sourcecode(configfile);
|
||||
|
||||
g_ventoy_menu_esc = 0;
|
||||
g_ventoy_suppress_esc = 0;
|
||||
g_ventoy_suppress_esc_default = 1;
|
||||
|
||||
grub_free(buf);
|
||||
|
||||
@@ -4743,7 +4882,7 @@ static int ventoy_chk_case_file(const char *filename, const struct grub_dirhook_
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0 == info->dir && grub_strncasecmp(filename, "ventoy.json", 11) == 0)
|
||||
if (0 == info->dir && grub_strcasecmp(filename, "ventoy.json") == 0)
|
||||
{
|
||||
grub_snprintf(g_json_case_mis_path, 32, "%s/%s", (char *)data, filename);
|
||||
return 1;
|
||||
@@ -4763,7 +4902,7 @@ static int ventoy_chk_case_dir(const char *filename, const struct grub_dirhook_i
|
||||
|
||||
if (info->dir && (filename[0] == 'v' || filename[0] == 'V'))
|
||||
{
|
||||
if (grub_strncasecmp(filename, "ventoy", 6) == 0)
|
||||
if (grub_strcasecmp(filename, "ventoy") == 0)
|
||||
{
|
||||
grub_snprintf(path, sizeof(path), "/%s", filename);
|
||||
fs_dir->fs->fs_dir(fs_dir->dev, path, ventoy_chk_case_file, path);
|
||||
@@ -4884,26 +5023,71 @@ static grub_err_t grub_cmd_gptpriority(grub_extcmd_context_t ctxt, int argc, cha
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* <BEGIN>: Deleted by longpanda, 20210916 PN:XX LABEL:XX */
|
||||
#if 0
|
||||
void ventoy_tip_set_menu_label(const char *vid)
|
||||
static grub_err_t grub_cmd_syslinux_nojoliet(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
img_info *node;
|
||||
int ret = 1;
|
||||
int joliet = 0;
|
||||
grub_file_t file = NULL;
|
||||
grub_uint32_t loadrba = 0;
|
||||
grub_uint32_t boot_catlog = 0;
|
||||
grub_uint8_t sector[512];
|
||||
boot_info_table *info = NULL;
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
|
||||
g_ventoy_tip_msg1 = g_ventoy_tip_msg2 = NULL;
|
||||
if (vid)
|
||||
/* This also trigger a iso9660 fs parse */
|
||||
if (ventoy_check_file_exist("(loop)/isolinux/isolinux.cfg"))
|
||||
{
|
||||
node = (img_info *)(void *)grub_strtoul(vid + 4, NULL, 16);
|
||||
if (node)
|
||||
{
|
||||
g_ventoy_tip_msg1 = node->tip1;
|
||||
g_ventoy_tip_msg2 = node->tip2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
joliet = grub_iso9660_is_joliet();
|
||||
if (joliet == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
file = grub_file_open(args[0], VENTOY_FILE_TYPE);
|
||||
if (!file)
|
||||
{
|
||||
debug("failed to open %s\n", args[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
boot_catlog = ventoy_get_iso_boot_catlog(file);
|
||||
if (boot_catlog == 0)
|
||||
{
|
||||
debug("no bootcatlog found %u\n", boot_catlog);
|
||||
goto out;
|
||||
}
|
||||
|
||||
loadrba = ventoy_get_bios_eltorito_rba(file, boot_catlog);
|
||||
if (loadrba == 0)
|
||||
{
|
||||
debug("no bios eltorito rba found %u\n", loadrba);
|
||||
goto out;
|
||||
}
|
||||
|
||||
grub_file_seek(file, loadrba * 2048);
|
||||
grub_file_read(file, sector, 512);
|
||||
|
||||
info = (boot_info_table *)sector;
|
||||
if (info->bi_data0 == 0x7c6ceafa &&
|
||||
info->bi_data1 == 0x90900000 &&
|
||||
info->bi_PrimaryVolumeDescriptor == 16 &&
|
||||
info->bi_BootFileLocation == loadrba)
|
||||
{
|
||||
debug("bootloader is syslinux, %u.\n", loadrba);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
grub_file_close(file);
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
return ret;
|
||||
}
|
||||
#endif /* #if 0 */
|
||||
/* <END> : Deleted by longpanda, 20210916 PN:XX LABEL:XX */
|
||||
|
||||
int ventoy_env_init(void)
|
||||
{
|
||||
@@ -4960,6 +5144,7 @@ static cmd_para ventoy_cmds[] =
|
||||
{ "vt_mod", ventoy_cmd_mod, 0, NULL, "{Int} {Int} {Var}", "mod integer variable", NULL },
|
||||
{ "vt_strstr", ventoy_cmd_strstr, 0, NULL, "", "", NULL },
|
||||
{ "vt_str_begin", ventoy_cmd_strbegin, 0, NULL, "", "", NULL },
|
||||
{ "vt_str_casebegin", ventoy_cmd_strcasebegin, 0, NULL, "", "", NULL },
|
||||
{ "vt_debug", ventoy_cmd_debug, 0, NULL, "{on|off}", "turn debug on/off", NULL },
|
||||
{ "vtdebug", ventoy_cmd_debug, 0, NULL, "{on|off}", "turn debug on/off", NULL },
|
||||
{ "vtbreak", ventoy_cmd_break, 0, NULL, "{level}", "set debug break", NULL },
|
||||
@@ -5087,6 +5272,7 @@ static cmd_para ventoy_cmds[] =
|
||||
{ "vt_check_json_path_case", ventoy_cmd_chk_json_pathcase, 0, NULL, "", "", NULL },
|
||||
{ "vt_append_extra_sector", ventoy_cmd_append_ext_sector, 0, NULL, "", "", NULL },
|
||||
{ "gptpriority", grub_cmd_gptpriority, 0, NULL, "", "", NULL },
|
||||
{ "vt_syslinux_need_nojoliet", grub_cmd_syslinux_nojoliet, 0, NULL, "", "", NULL },
|
||||
};
|
||||
|
||||
int ventoy_register_all_cmd(void)
|
||||
|
@@ -21,6 +21,8 @@
|
||||
#ifndef __VENTOY_DEF_H__
|
||||
#define __VENTOY_DEF_H__
|
||||
|
||||
#define VTOY_MAX_DIR_DEPTH 32
|
||||
|
||||
#define VTOY_MAX_SCRIPT_BUF (4 * 1024 * 1024)
|
||||
|
||||
#define VTOY_PART_BUF_LEN (128 * 1024)
|
||||
@@ -197,6 +199,18 @@ typedef struct ventoy_iso9660_vd
|
||||
grub_uint32_t space;
|
||||
}ventoy_iso9660_vd;
|
||||
|
||||
/* https://wiki.osdev.org/El-Torito */
|
||||
typedef struct boot_info_table
|
||||
{
|
||||
grub_uint32_t bi_data0;
|
||||
grub_uint32_t bi_data1;
|
||||
grub_uint32_t bi_PrimaryVolumeDescriptor;
|
||||
grub_uint32_t bi_BootFileLocation;
|
||||
grub_uint32_t bi_BootFileLength;
|
||||
grub_uint32_t bi_Checksum;
|
||||
grub_uint8_t bi_Reserved[40];
|
||||
}boot_info_table;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#define img_type_start 0
|
||||
@@ -548,6 +562,7 @@ typedef struct plugin_entry
|
||||
const char *key;
|
||||
ventoy_plugin_entry_pf entryfunc;
|
||||
ventoy_plugin_check_pf checkfunc;
|
||||
int flag;
|
||||
}plugin_entry;
|
||||
|
||||
typedef struct replace_fs_dir
|
||||
@@ -827,6 +842,7 @@ typedef struct install_template
|
||||
int pathlen;
|
||||
char isopath[256];
|
||||
|
||||
int timeout;
|
||||
int autosel;
|
||||
int cursel;
|
||||
int templatenum;
|
||||
@@ -858,6 +874,7 @@ typedef struct persistence_config
|
||||
int pathlen;
|
||||
char isopath[256];
|
||||
|
||||
int timeout;
|
||||
int autosel;
|
||||
int cursel;
|
||||
int backendnum;
|
||||
@@ -921,6 +938,7 @@ typedef struct custom_boot
|
||||
typedef struct conf_replace
|
||||
{
|
||||
int pathlen;
|
||||
int img;
|
||||
char isopath[256];
|
||||
char orgconf[256];
|
||||
char newconf[256];
|
||||
@@ -985,6 +1003,7 @@ typedef struct menu_password
|
||||
|
||||
extern int g_ventoy_menu_esc;
|
||||
extern int g_ventoy_suppress_esc;
|
||||
extern int g_ventoy_suppress_esc_default;
|
||||
extern int g_ventoy_last_entry;
|
||||
extern int g_ventoy_memdisk_mode;
|
||||
extern int g_ventoy_iso_raw;
|
||||
@@ -1104,5 +1123,7 @@ int ventoy_chain_file_read(const char *path, int offset, int len, void *buf);
|
||||
|
||||
#define ret_goto_end(a) ret = a; goto end;
|
||||
|
||||
extern ventoy_grub_param *g_grub_param;
|
||||
|
||||
#endif /* __VENTOY_DEF_H__ */
|
||||
|
||||
|
@@ -691,6 +691,7 @@ static grub_uint32_t ventoy_linux_get_virt_chunk_size(void)
|
||||
static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_head *chain)
|
||||
{
|
||||
int id = 0;
|
||||
int virtid = 0;
|
||||
initrd_info *node;
|
||||
grub_uint64_t sector;
|
||||
grub_uint32_t offset;
|
||||
@@ -738,6 +739,7 @@ static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_
|
||||
offset += g_ventoy_cpio_size;
|
||||
sector += cpio_secs + initrd_secs;
|
||||
cur++;
|
||||
virtid++;
|
||||
}
|
||||
|
||||
/* Lenovo EasyStartup need an addional sector for boundary check */
|
||||
@@ -759,6 +761,7 @@ static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_
|
||||
offset += VTOY_APPEND_EXT_SIZE;
|
||||
sector += cpio_secs;
|
||||
cur++;
|
||||
virtid++;
|
||||
}
|
||||
|
||||
if (g_conf_replace_offset > 0)
|
||||
@@ -776,9 +779,15 @@ static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_
|
||||
|
||||
chain->virt_img_size_in_bytes += g_conf_replace_new_len_align;
|
||||
|
||||
if (g_grub_param->img_replace.magic == GRUB_IMG_REPLACE_MAGIC)
|
||||
{
|
||||
g_grub_param->img_replace.new_file_virtual_id = virtid;
|
||||
}
|
||||
|
||||
offset += g_conf_replace_new_len_align;
|
||||
sector += cpio_secs;
|
||||
cur++;
|
||||
virtid++;
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -978,6 +987,12 @@ static grub_err_t ventoy_linux_locate_initrd(int filt, int *filtcnt)
|
||||
}
|
||||
}
|
||||
|
||||
/* skip hdt.img */
|
||||
if (file->size <= VTOY_SIZE_1MB && grub_strcmp(node->name, "/boot/hdt.img") == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (grub_strcmp(file->fs->name, "iso9660") == 0)
|
||||
{
|
||||
node->iso_type = 0;
|
||||
|
@@ -602,6 +602,7 @@ static int ventoy_plugin_auto_install_check(VTOY_JSON *json, const char *isodisk
|
||||
{
|
||||
int pathnum = 0;
|
||||
int autosel = 0;
|
||||
int timeout = 0;
|
||||
char *pos = NULL;
|
||||
const char *iso = NULL;
|
||||
VTOY_JSON *pNode = NULL;
|
||||
@@ -638,6 +639,18 @@ static int ventoy_plugin_auto_install_check(VTOY_JSON *json, const char *isodisk
|
||||
grub_printf("autosel: %d [FAIL]\n", autosel);
|
||||
}
|
||||
}
|
||||
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "timeout", &timeout))
|
||||
{
|
||||
if (timeout >= 0)
|
||||
{
|
||||
grub_printf("timeout: %d [OK]\n", timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_printf("timeout: %d [FAIL]\n", timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -662,6 +675,18 @@ static int ventoy_plugin_auto_install_check(VTOY_JSON *json, const char *isodisk
|
||||
grub_printf("autosel: %d [FAIL]\n", autosel);
|
||||
}
|
||||
}
|
||||
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "timeout", &timeout))
|
||||
{
|
||||
if (timeout >= 0)
|
||||
{
|
||||
grub_printf("timeout: %d [OK]\n", timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_printf("timeout: %d [FAIL]\n", timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -682,6 +707,7 @@ static int ventoy_plugin_auto_install_entry(VTOY_JSON *json, const char *isodisk
|
||||
int type = 0;
|
||||
int pathnum = 0;
|
||||
int autosel = 0;
|
||||
int timeout = 0;
|
||||
const char *iso = NULL;
|
||||
VTOY_JSON *pNode = NULL;
|
||||
install_template *node = NULL;
|
||||
@@ -729,6 +755,7 @@ static int ventoy_plugin_auto_install_entry(VTOY_JSON *json, const char *isodisk
|
||||
node->templatenum = pathnum;
|
||||
|
||||
node->autosel = -1;
|
||||
node->timeout = -1;
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "autosel", &autosel))
|
||||
{
|
||||
if (autosel >= 0 && autosel <= pathnum)
|
||||
@@ -736,6 +763,14 @@ static int ventoy_plugin_auto_install_entry(VTOY_JSON *json, const char *isodisk
|
||||
node->autosel = autosel;
|
||||
}
|
||||
}
|
||||
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "timeout", &timeout))
|
||||
{
|
||||
if (timeout >= 0)
|
||||
{
|
||||
node->timeout = timeout;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_install_template_head)
|
||||
{
|
||||
@@ -1175,6 +1210,7 @@ static int ventoy_plugin_pwd_check(VTOY_JSON *json, const char *isodisk)
|
||||
static int ventoy_plugin_persistence_check(VTOY_JSON *json, const char *isodisk)
|
||||
{
|
||||
int autosel = 0;
|
||||
int timeout = 0;
|
||||
int pathnum = 0;
|
||||
char *pos = NULL;
|
||||
const char *iso = NULL;
|
||||
@@ -1213,6 +1249,18 @@ static int ventoy_plugin_persistence_check(VTOY_JSON *json, const char *isodisk)
|
||||
grub_printf("autosel: %d [FAIL]\n", autosel);
|
||||
}
|
||||
}
|
||||
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "timeout", &timeout))
|
||||
{
|
||||
if (timeout >= 0)
|
||||
{
|
||||
grub_printf("timeout: %d [OK]\n", timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_printf("timeout: %d [FAIL]\n", timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1231,6 +1279,7 @@ static int ventoy_plugin_persistence_check(VTOY_JSON *json, const char *isodisk)
|
||||
static int ventoy_plugin_persistence_entry(VTOY_JSON *json, const char *isodisk)
|
||||
{
|
||||
int autosel = 0;
|
||||
int timeout = 0;
|
||||
int pathnum = 0;
|
||||
const char *iso = NULL;
|
||||
VTOY_JSON *pNode = NULL;
|
||||
@@ -1273,6 +1322,7 @@ static int ventoy_plugin_persistence_entry(VTOY_JSON *json, const char *isodisk)
|
||||
node->backendnum = pathnum;
|
||||
|
||||
node->autosel = -1;
|
||||
node->timeout = -1;
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "autosel", &autosel))
|
||||
{
|
||||
if (autosel >= 0 && autosel <= pathnum)
|
||||
@@ -1280,6 +1330,14 @@ static int ventoy_plugin_persistence_entry(VTOY_JSON *json, const char *isodisk)
|
||||
node->autosel = autosel;
|
||||
}
|
||||
}
|
||||
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "timeout", &timeout))
|
||||
{
|
||||
if (timeout >= 0)
|
||||
{
|
||||
node->timeout = timeout;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_persistence_head)
|
||||
{
|
||||
@@ -1947,6 +2005,7 @@ static int ventoy_plugin_custom_boot_check(VTOY_JSON *json, const char *isodisk)
|
||||
|
||||
static int ventoy_plugin_conf_replace_entry(VTOY_JSON *json, const char *isodisk)
|
||||
{
|
||||
int img = 0;
|
||||
const char *isof = NULL;
|
||||
const char *orgf = NULL;
|
||||
const char *newf = NULL;
|
||||
@@ -1984,6 +2043,11 @@ static int ventoy_plugin_conf_replace_entry(VTOY_JSON *json, const char *isodisk
|
||||
node = grub_zalloc(sizeof(conf_replace));
|
||||
if (node)
|
||||
{
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "img", &img))
|
||||
{
|
||||
node->img = img;
|
||||
}
|
||||
|
||||
node->pathlen = grub_snprintf(node->isopath, sizeof(node->isopath), "%s", isof);
|
||||
grub_snprintf(node->orgconf, sizeof(node->orgconf), "%s", orgf);
|
||||
grub_snprintf(node->newconf, sizeof(node->newconf), "%s", newf);
|
||||
@@ -2006,6 +2070,7 @@ static int ventoy_plugin_conf_replace_entry(VTOY_JSON *json, const char *isodisk
|
||||
|
||||
static int ventoy_plugin_conf_replace_check(VTOY_JSON *json, const char *isodisk)
|
||||
{
|
||||
int img = 0;
|
||||
const char *isof = NULL;
|
||||
const char *orgf = NULL;
|
||||
const char *newf = NULL;
|
||||
@@ -2075,7 +2140,7 @@ static int ventoy_plugin_conf_replace_check(VTOY_JSON *json, const char *isodisk
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_printf("new:<%s> [OK]\n", newf);
|
||||
grub_printf("new1:<%s> [OK]\n", newf);
|
||||
}
|
||||
grub_file_close(file);
|
||||
}
|
||||
@@ -2083,6 +2148,12 @@ static int ventoy_plugin_conf_replace_check(VTOY_JSON *json, const char *isodisk
|
||||
{
|
||||
grub_printf("new:<%s> [NOT Exist]\n", newf);
|
||||
}
|
||||
|
||||
if (JSON_SUCCESS == vtoy_json_get_int(pNode->pstChild, "img", &img))
|
||||
{
|
||||
grub_printf("img:<%d>\n", img);
|
||||
}
|
||||
|
||||
grub_printf("\n");
|
||||
}
|
||||
}
|
||||
@@ -2267,45 +2338,59 @@ static int ventoy_plugin_image_list_check(VTOY_JSON *json, const char *isodisk)
|
||||
|
||||
static plugin_entry g_plugin_entries[] =
|
||||
{
|
||||
{ "control", ventoy_plugin_control_entry, ventoy_plugin_control_check },
|
||||
{ "theme", ventoy_plugin_theme_entry, ventoy_plugin_theme_check },
|
||||
{ "auto_install", ventoy_plugin_auto_install_entry, ventoy_plugin_auto_install_check },
|
||||
{ "persistence", ventoy_plugin_persistence_entry, ventoy_plugin_persistence_check },
|
||||
{ "menu_alias", ventoy_plugin_menualias_entry, ventoy_plugin_menualias_check },
|
||||
{ "menu_tip", ventoy_plugin_menutip_entry, ventoy_plugin_menutip_check },
|
||||
{ "menu_class", ventoy_plugin_menuclass_entry, ventoy_plugin_menuclass_check },
|
||||
{ "injection", ventoy_plugin_injection_entry, ventoy_plugin_injection_check },
|
||||
{ "auto_memdisk", ventoy_plugin_auto_memdisk_entry, ventoy_plugin_auto_memdisk_check },
|
||||
{ "image_list", ventoy_plugin_image_list_entry, ventoy_plugin_image_list_check },
|
||||
{ "image_blacklist", ventoy_plugin_image_list_entry, ventoy_plugin_image_list_check },
|
||||
{ "conf_replace", ventoy_plugin_conf_replace_entry, ventoy_plugin_conf_replace_check },
|
||||
{ "dud", ventoy_plugin_dud_entry, ventoy_plugin_dud_check },
|
||||
{ "password", ventoy_plugin_pwd_entry, ventoy_plugin_pwd_check },
|
||||
{ "custom_boot", ventoy_plugin_custom_boot_entry, ventoy_plugin_custom_boot_check },
|
||||
{ "control", ventoy_plugin_control_entry, ventoy_plugin_control_check, 0 },
|
||||
{ "theme", ventoy_plugin_theme_entry, ventoy_plugin_theme_check, 0 },
|
||||
{ "auto_install", ventoy_plugin_auto_install_entry, ventoy_plugin_auto_install_check, 0 },
|
||||
{ "persistence", ventoy_plugin_persistence_entry, ventoy_plugin_persistence_check, 0 },
|
||||
{ "menu_alias", ventoy_plugin_menualias_entry, ventoy_plugin_menualias_check, 0 },
|
||||
{ "menu_tip", ventoy_plugin_menutip_entry, ventoy_plugin_menutip_check, 0 },
|
||||
{ "menu_class", ventoy_plugin_menuclass_entry, ventoy_plugin_menuclass_check, 0 },
|
||||
{ "injection", ventoy_plugin_injection_entry, ventoy_plugin_injection_check, 0 },
|
||||
{ "auto_memdisk", ventoy_plugin_auto_memdisk_entry, ventoy_plugin_auto_memdisk_check, 0 },
|
||||
{ "image_list", ventoy_plugin_image_list_entry, ventoy_plugin_image_list_check, 0 },
|
||||
{ "image_blacklist", ventoy_plugin_image_list_entry, ventoy_plugin_image_list_check, 0 },
|
||||
{ "conf_replace", ventoy_plugin_conf_replace_entry, ventoy_plugin_conf_replace_check, 0 },
|
||||
{ "dud", ventoy_plugin_dud_entry, ventoy_plugin_dud_check, 0 },
|
||||
{ "password", ventoy_plugin_pwd_entry, ventoy_plugin_pwd_check, 0 },
|
||||
{ "custom_boot", ventoy_plugin_custom_boot_entry, ventoy_plugin_custom_boot_check, 0 },
|
||||
};
|
||||
|
||||
static int ventoy_parse_plugin_config(VTOY_JSON *json, const char *isodisk)
|
||||
{
|
||||
int i;
|
||||
char key[128];
|
||||
VTOY_JSON *cur = json;
|
||||
VTOY_JSON *cur = NULL;
|
||||
|
||||
grub_snprintf(g_iso_disk_name, sizeof(g_iso_disk_name), "%s", isodisk);
|
||||
|
||||
while (cur)
|
||||
for (cur = json; cur; cur = cur->pstNext)
|
||||
{
|
||||
for (i = 0; i < (int)ARRAY_SIZE(g_plugin_entries); i++)
|
||||
{
|
||||
grub_snprintf(key, sizeof(key), "%s_%s", g_plugin_entries[i].key, g_arch_mode_suffix);
|
||||
if (grub_strcmp(g_plugin_entries[i].key, cur->pcName) == 0 || grub_strcmp(key, cur->pcName) == 0)
|
||||
if (g_plugin_entries[i].flag == 0 && grub_strcmp(key, cur->pcName) == 0)
|
||||
{
|
||||
debug("Plugin entry for %s\n", g_plugin_entries[i].key);
|
||||
g_plugin_entries[i].entryfunc(cur, isodisk);
|
||||
g_plugin_entries[i].flag = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cur = cur->pstNext;
|
||||
for (cur = json; cur; cur = cur->pstNext)
|
||||
{
|
||||
for (i = 0; i < (int)ARRAY_SIZE(g_plugin_entries); i++)
|
||||
{
|
||||
if (g_plugin_entries[i].flag == 0 && grub_strcmp(g_plugin_entries[i].key, cur->pcName) == 0)
|
||||
{
|
||||
debug("Plugin entry for %s\n", g_plugin_entries[i].key);
|
||||
g_plugin_entries[i].entryfunc(cur, isodisk);
|
||||
g_plugin_entries[i].flag = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2314,7 +2399,9 @@ static int ventoy_parse_plugin_config(VTOY_JSON *json, const char *isodisk)
|
||||
grub_err_t ventoy_cmd_load_plugin(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int ret = 0;
|
||||
int offset = 0;
|
||||
char *buf = NULL;
|
||||
grub_uint8_t *code = NULL;
|
||||
grub_file_t file;
|
||||
VTOY_JSON *json = NULL;
|
||||
|
||||
@@ -2351,9 +2438,25 @@ grub_err_t ventoy_cmd_load_plugin(grub_extcmd_context_t ctxt, int argc, char **a
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
code = (grub_uint8_t *)buf;
|
||||
if (code[0] == 0xef && code[1] == 0xbb && code[2] == 0xbf)
|
||||
{
|
||||
offset = 3; /* Skip UTF-8 BOM */
|
||||
}
|
||||
else if ((code[0] == 0xff && code[1] == 0xfe) || (code[0] == 0xfe && code[1] == 0xff))
|
||||
{
|
||||
grub_env_set("VTOY_PLUGIN_SYNTAX_ERROR", "1");
|
||||
grub_env_export("VTOY_PLUGIN_SYNTAX_ERROR");
|
||||
|
||||
ret = vtoy_json_parse(json, buf);
|
||||
grub_env_set("VTOY_PLUGIN_ENCODE_ERROR", "1");
|
||||
grub_env_export("VTOY_PLUGIN_ENCODE_ERROR");
|
||||
|
||||
debug("Failed to parse json string %d\n", ret);
|
||||
grub_free(buf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = vtoy_json_parse(json, buf + offset);
|
||||
if (ret)
|
||||
{
|
||||
grub_env_set("VTOY_PLUGIN_SYNTAX_ERROR", "1");
|
||||
@@ -3099,7 +3202,7 @@ grub_err_t ventoy_cmd_plugin_check_json(grub_extcmd_context_t ctxt, int argc, ch
|
||||
grub_snprintf(key, sizeof(key), "%s_%s", args[1], g_arch_mode_suffix);
|
||||
for (node = json->pstChild; node; node = node->pstNext)
|
||||
{
|
||||
if (grub_strcmp(node->pcName, args[1]) == 0 || grub_strcmp(node->pcName, key) == 0)
|
||||
if (grub_strcmp(node->pcName, key) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -3107,8 +3210,19 @@ grub_err_t ventoy_cmd_plugin_check_json(grub_extcmd_context_t ctxt, int argc, ch
|
||||
|
||||
if (!node)
|
||||
{
|
||||
grub_printf("%s is NOT found in ventoy.json\n", args[1]);
|
||||
goto end;
|
||||
for (node = json->pstChild; node; node = node->pstNext)
|
||||
{
|
||||
if (grub_strcmp(node->pcName, args[1]) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!node)
|
||||
{
|
||||
grub_printf("%s is NOT found in ventoy.json\n", args[1]);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (int)ARRAY_SIZE(g_plugin_entries); i++)
|
||||
|
@@ -375,6 +375,7 @@ grub_err_t ventoy_cmd_sel_wimboot(grub_extcmd_context_t ctxt, int argc, char **a
|
||||
|
||||
g_ventoy_menu_esc = 1;
|
||||
g_ventoy_suppress_esc = 1;
|
||||
g_ventoy_suppress_esc_default = 1;
|
||||
|
||||
grub_snprintf(configfile, sizeof(configfile), "configfile mem:0x%llx:size:%d", (ulonglong)(ulong)buf, size);
|
||||
grub_script_execute_sourcecode(configfile);
|
||||
@@ -776,6 +777,67 @@ end:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int parse_custom_setup_path(char *cmdline, const char **path, char *exefile)
|
||||
{
|
||||
int i = 0;
|
||||
int len = 0;
|
||||
char *pos1 = NULL;
|
||||
char *pos2 = NULL;
|
||||
|
||||
if ((cmdline[0] == 'x' || cmdline[0] == 'X') && cmdline[1] == ':')
|
||||
{
|
||||
pos1 = pos2 = cmdline + 3;
|
||||
|
||||
while (i < VTOY_MAX_DIR_DEPTH && *pos2)
|
||||
{
|
||||
while (*pos2 && *pos2 != '\\' && *pos2 != '/')
|
||||
{
|
||||
pos2++;
|
||||
}
|
||||
|
||||
path[i++] = pos1;
|
||||
|
||||
if (*pos2 == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
*pos2 = 0;
|
||||
pos1 = pos2 + 1;
|
||||
pos2 = pos1;
|
||||
}
|
||||
|
||||
if (i == 0 || i >= VTOY_MAX_DIR_DEPTH)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
path[i++] = "Windows";
|
||||
path[i++] = "System32";
|
||||
path[i++] = cmdline;
|
||||
}
|
||||
|
||||
pos1 = (char *)path[i - 1];
|
||||
while (*pos1 != ' ' && *pos1 != '\t' && *pos1)
|
||||
{
|
||||
pos1++;
|
||||
}
|
||||
*pos1 = 0;
|
||||
|
||||
len = (int)grub_strlen(path[i - 1]);
|
||||
if (len < 4 || grub_strcasecmp(path[i - 1] + len - 4, ".exe") != 0)
|
||||
{
|
||||
grub_snprintf(exefile, 256, "%s.exe", path[i - 1]);
|
||||
path[i - 1] = exefile;
|
||||
}
|
||||
|
||||
|
||||
debug("custom setup: %d <%s>\n", i, path[i - 1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static wim_directory_entry * search_replace_wim_dirent
|
||||
(
|
||||
grub_file_t file,
|
||||
@@ -786,38 +848,44 @@ static wim_directory_entry * search_replace_wim_dirent
|
||||
)
|
||||
{
|
||||
int ret;
|
||||
char exefile[256] = {0};
|
||||
char cmdline[256] = {0};
|
||||
wim_directory_entry *wim_dirent = NULL;
|
||||
wim_directory_entry *pecmd_dirent = NULL;
|
||||
const char *peset_path[] = { "Windows", "System32", "peset.exe", NULL };
|
||||
const char *pecmd_path[] = { "Windows", "System32", "pecmd.exe", NULL };
|
||||
const char *winpeshl_path[] = { "Windows", "System32", "winpeshl.exe", NULL };
|
||||
const char *custom_path[VTOY_MAX_DIR_DEPTH + 1] = { NULL };
|
||||
|
||||
pecmd_dirent = search_full_wim_dirent(meta_data, dir, pecmd_path);
|
||||
debug("search pecmd.exe %p\n", pecmd_dirent);
|
||||
|
||||
if (pecmd_dirent)
|
||||
{
|
||||
ret = parse_registry_setup_cmdline(file, head, lookup, meta_data, dir, cmdline, sizeof(cmdline));
|
||||
ret = parse_registry_setup_cmdline(file, head, lookup, meta_data, dir, cmdline, sizeof(cmdline) - 1);
|
||||
if (0 == ret)
|
||||
{
|
||||
debug("registry setup cmdline:<%s>\n", cmdline);
|
||||
ventoy_str_toupper(cmdline);
|
||||
|
||||
if (grub_strncmp(cmdline, "PECMD", 5) == 0)
|
||||
if (grub_strncasecmp(cmdline, "PECMD", 5) == 0)
|
||||
{
|
||||
wim_dirent = pecmd_dirent;
|
||||
}
|
||||
else if (grub_strncmp(cmdline, "PESET", 5) == 0)
|
||||
else if (grub_strncasecmp(cmdline, "PESET", 5) == 0)
|
||||
{
|
||||
wim_dirent = search_full_wim_dirent(meta_data, dir, peset_path);
|
||||
debug("search peset.exe %p\n", wim_dirent);
|
||||
}
|
||||
else if (grub_strncmp(cmdline, "WINPESHL", 8) == 0)
|
||||
else if (grub_strncasecmp(cmdline, "WINPESHL", 8) == 0)
|
||||
{
|
||||
wim_dirent = search_full_wim_dirent(meta_data, dir, winpeshl_path);
|
||||
debug("search winpeshl.exe %p\n", wim_dirent);
|
||||
}
|
||||
else if (0 == parse_custom_setup_path(cmdline, custom_path, exefile))
|
||||
{
|
||||
wim_dirent = search_full_wim_dirent(meta_data, dir, custom_path);
|
||||
debug("search custom path %p\n", wim_dirent);
|
||||
}
|
||||
|
||||
if (wim_dirent)
|
||||
{
|
||||
@@ -982,6 +1050,7 @@ int ventoy_fill_windows_rtdata(void *buf, char *isopath)
|
||||
{
|
||||
char *pos = NULL;
|
||||
char *script = NULL;
|
||||
const char *env = NULL;
|
||||
ventoy_windows_data *data = (ventoy_windows_data *)buf;
|
||||
|
||||
grub_memset(data, 0, sizeof(ventoy_windows_data));
|
||||
@@ -1020,7 +1089,13 @@ int ventoy_fill_windows_rtdata(void *buf, char *isopath)
|
||||
{
|
||||
debug("injection archive not configed %s\n", pos);
|
||||
}
|
||||
|
||||
|
||||
env = grub_env_get("VTOY_WIN11_BYPASS_CHECK");
|
||||
if (env && env[0] == '1' && env[1] == 0)
|
||||
{
|
||||
data->windows11_bypass_check = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -135,7 +135,8 @@ typedef struct ventoy_windows_data
|
||||
{
|
||||
char auto_install_script[384];
|
||||
char injection_archive[384];
|
||||
grub_uint8_t reserved[256];
|
||||
grub_uint8_t windows11_bypass_check;
|
||||
grub_uint8_t reserved[255];
|
||||
}ventoy_windows_data;
|
||||
|
||||
|
||||
@@ -241,6 +242,7 @@ typedef struct ventoy_img_chunk_list
|
||||
#pragma pack(1)
|
||||
|
||||
#define GRUB_FILE_REPLACE_MAGIC 0x1258BEEF
|
||||
#define GRUB_IMG_REPLACE_MAGIC 0x1259BEEF
|
||||
|
||||
typedef const char * (*grub_env_get_pf)(const char *name);
|
||||
typedef int (*grub_env_set_pf)(const char *name, const char *val);
|
||||
@@ -259,6 +261,7 @@ typedef struct ventoy_grub_param
|
||||
grub_env_get_pf grub_env_get;
|
||||
grub_env_set_pf grub_env_set;
|
||||
ventoy_grub_param_file_replace file_replace;
|
||||
ventoy_grub_param_file_replace img_replace;
|
||||
grub_env_printf_pf grub_env_printf;
|
||||
}ventoy_grub_param;
|
||||
|
||||
|
@@ -22,9 +22,16 @@ porteus_hook() {
|
||||
$SED "/searching *for *\$CFG *file/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/porteus-disk.sh" -i $1
|
||||
}
|
||||
|
||||
if $GREP -q exfat /proc/filesystems; then
|
||||
vtPath=$($VTOY_PATH/tool/vtoydump -p $VTOY_PATH/ventoy_os_param)
|
||||
|
||||
vtPath=$($VTOY_PATH/tool/vtoydump -p $VTOY_PATH/ventoy_os_param)
|
||||
echo $vtPath | $GREP -q " "
|
||||
_vtRet1=$?
|
||||
|
||||
$GREP -q exfat /proc/filesystems
|
||||
_vtRet2=$?
|
||||
|
||||
echo "_vtRet1=$_vtRet1 _vtRet2=$_vtRet2 ..." >> $VTLOG
|
||||
|
||||
if [ $_vtRet1 -ne 0 -a $_vtRet2 -eq 0 ]; then
|
||||
vtFindFlag=0
|
||||
$GREP '`value from`' /usr/* -r | $AWK -F: '{print $1}' | while read vtline; do
|
||||
echo "hooking $vtline ..." >> $VTLOG
|
||||
@@ -34,11 +41,19 @@ if $GREP -q exfat /proc/filesystems; then
|
||||
|
||||
if [ $vtFindFlag -eq 0 ]; then
|
||||
if $GREP -q '`value from`' /linuxrc; then
|
||||
echo "hooking linuxrc ..." >> $VTLOG
|
||||
$SED "/searching *for *\$CFG *file/i$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/porteus-path.sh" -i /linuxrc
|
||||
$SED "/searching *for *\$CFG *file/iFROM=\$(cat /porteus-from)" -i /linuxrc
|
||||
$SED "/searching *for *\$CFG *file/iISO=\$(cat /porteus-from)" -i /linuxrc
|
||||
vtFindFlag=1
|
||||
if $GREP -q "searching *for *\$CFG *file" /linuxrc; then
|
||||
echo "hooking linuxrc CFG..." >> $VTLOG
|
||||
$SED "/searching *for *\$CFG *file/i$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/porteus-path.sh" -i /linuxrc
|
||||
$SED "/searching *for *\$CFG *file/iFROM=\$(cat /porteus-from)" -i /linuxrc
|
||||
$SED "/searching *for *\$CFG *file/iISO=\$(cat /porteus-from)" -i /linuxrc
|
||||
vtFindFlag=1
|
||||
else
|
||||
echo "hooking linuxrc SGN..." >> $VTLOG
|
||||
$SED "/searching *for *\$SGN *file/i$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/porteus-path.sh" -i /linuxrc
|
||||
$SED "/searching *for *\$SGN *file/iFROM=\$(cat /porteus-from)" -i /linuxrc
|
||||
$SED "/searching *for *\$SGN *file/iISO=\$(cat /porteus-from)" -i /linuxrc
|
||||
vtFindFlag=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -46,7 +61,7 @@ else
|
||||
for vtfile in '/linuxrc' '/init'; do
|
||||
if [ -e $vtfile ]; then
|
||||
if ! $GREP -q ventoy $vtfile; then
|
||||
echo "hooking $vtfile ..." >> $VTLOG
|
||||
echo "hooking disk $vtfile ..." >> $VTLOG
|
||||
porteus_hook $vtfile
|
||||
fi
|
||||
fi
|
||||
|
91
IMG/cpio/ventoy/hook/debian/pyabr-disk.sh
Normal file
91
IMG/cpio/ventoy/hook/debian/pyabr-disk.sh
Normal file
@@ -0,0 +1,91 @@
|
||||
#!/ventoy/busybox/sh
|
||||
#************************************************************************************
|
||||
# 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/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
. /ventoy/hook/ventoy-hook-lib.sh
|
||||
|
||||
if is_ventoy_hook_finished; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
vtlog "####### $0 $* ########"
|
||||
|
||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
ventoy_os_install_dmsetup_by_fuse() {
|
||||
vtlog "ventoy_os_install_dmsetup_by_fuse $*"
|
||||
|
||||
mkdir -p $VTOY_PATH/mnt/fuse $VTOY_PATH/mnt/iso $VTOY_PATH/mnt/squashfs
|
||||
|
||||
vtoydm -p -f $VTOY_PATH/ventoy_image_map -d $1 > $VTOY_PATH/ventoy_dm_table
|
||||
vtoy_fuse_iso -f $VTOY_PATH/ventoy_dm_table -m $VTOY_PATH/mnt/fuse
|
||||
|
||||
mount -t iso9660 $VTOY_PATH/mnt/fuse/ventoy.iso $VTOY_PATH/mnt/iso
|
||||
mount -t squashfs $VTOY_PATH/mnt/iso/pyabr/01-core.sb $VTOY_PATH/mnt/squashfs
|
||||
|
||||
KoName=$(ls $VTOY_PATH/mnt/squashfs/lib/modules/$2/kernel/drivers/md/dm-mod.ko*)
|
||||
vtlog "insmod $KoName"
|
||||
insmod $KoName
|
||||
|
||||
umount $VTOY_PATH/mnt/squashfs
|
||||
umount $VTOY_PATH/mnt/iso
|
||||
umount $VTOY_PATH/mnt/fuse
|
||||
}
|
||||
|
||||
while [ -n "Y" ]; do
|
||||
vtdiskname=$(get_ventoy_disk_name)
|
||||
if [ "$vtdiskname" = "unknown" ]; then
|
||||
vtlog "ventoy disk not found"
|
||||
if [ -r /proc/sys/kernel/hotplug ]; then
|
||||
echo /sbin/mdev > /proc/sys/kernel/hotplug
|
||||
fi
|
||||
mdev -s
|
||||
sleep 1
|
||||
else
|
||||
if check_usb_disk_ready "$vtdiskname"; then
|
||||
vtlog "check_usb_disk_ready $vtdiskname ok"
|
||||
break
|
||||
else
|
||||
vtlog "check_usb_disk_ready $vtdiskname error"
|
||||
if [ -r /proc/sys/kernel/hotplug ]; then
|
||||
echo /sbin/mdev > /proc/sys/kernel/hotplug
|
||||
fi
|
||||
mdev -s
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
vtdiskname=$(get_ventoy_disk_name)
|
||||
if [ "$vtdiskname" = "unknown" ]; then
|
||||
vtlog "ventoy disk not found"
|
||||
PATH=$VTPATH_OLD
|
||||
exit 0
|
||||
fi
|
||||
|
||||
modprobe fuse
|
||||
modprobe cuse
|
||||
|
||||
vtKver=$(uname -r)
|
||||
ventoy_os_install_dmsetup_by_fuse $vtdiskname $vtKver
|
||||
|
||||
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
||||
set_ventoy_hook_finish
|
20
IMG/cpio/ventoy/hook/debian/pyabr-hook.sh
Normal file
20
IMG/cpio/ventoy/hook/debian/pyabr-hook.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/ventoy/busybox/sh
|
||||
#************************************************************************************
|
||||
# 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/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
$SED "/find_data/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/pyabr-disk.sh" -i /init
|
@@ -23,6 +23,11 @@ $SED "s#.*livefs_root=.*find_livefs.*#$BUSYBOX_PATH/mount -t iso9660 /dev/mapper
|
||||
if [ -e /init ] && $GREP -q '^mountroot$' /init; then
|
||||
echo "Here before mountroot ..." >> $VTLOG
|
||||
$SED "/^mountroot$/i\\$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/disk_mount_hook.sh" -i /init
|
||||
|
||||
if [ -f /scripts/init-premount/ORDER ]; then
|
||||
$SED "/\/scripts\/init-premount\/partitioning/,+1d" -i /scripts/init-premount/ORDER
|
||||
fi
|
||||
|
||||
else
|
||||
echo "Use default hook ..." >> $VTLOG
|
||||
ventoy_systemd_udevd_work_around
|
||||
|
@@ -94,6 +94,10 @@ ventoy_get_debian_distro() {
|
||||
echo 'mocaccino'; return
|
||||
fi
|
||||
|
||||
if $GREP -q '/pyabr/' /proc/cmdline; then
|
||||
echo 'pyabr'; return
|
||||
fi
|
||||
|
||||
echo 'default'
|
||||
}
|
||||
|
||||
|
47
IMG/cpio/ventoy/loop/esysrescue/ventoy-disk.sh
Normal file
47
IMG/cpio/ventoy/loop/esysrescue/ventoy-disk.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/ventoy/busybox/sh
|
||||
#************************************************************************************
|
||||
# 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/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
. /ventoy/hook/ventoy-hook-lib.sh
|
||||
|
||||
if is_ventoy_hook_finished; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
vtlog "####### $0 $* ########"
|
||||
|
||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
wait_for_usb_disk_ready
|
||||
|
||||
vtdiskname=$(get_ventoy_disk_name)
|
||||
if [ "$vtdiskname" = "unknown" ]; then
|
||||
vtlog "ventoy disk not found"
|
||||
PATH=$VTPATH_OLD
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||
|
||||
ventoy_create_dev_ventoy_part
|
||||
|
||||
ln -s "../../ventoy1" /dev/disk/by-label/ESYSRESCUE
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
||||
set_ventoy_hook_finish
|
26
IMG/cpio/ventoy/loop/esysrescue/ventoy-hook.sh
Normal file
26
IMG/cpio/ventoy/loop/esysrescue/ventoy-hook.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/ventoy/busybox/sh
|
||||
#************************************************************************************
|
||||
# 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/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||
|
||||
$SED "/maybe_break premount/i\ $BUSYBOX_PATH/sh $VTOY_PATH/loop/esysrescue/ventoy-disk.sh" -i /init
|
||||
|
||||
if [ -f /scripts/casper-bottom/09format_esr_data_partition ]; then
|
||||
$SED '/mkfs.vfat.*edev.3/icp -a /dev/dm-3 /dev/ventoy3' -i /scripts/casper-bottom/09format_esr_data_partition
|
||||
fi
|
12
INSTALL/FOR_X64_ARM.txt
Normal file
12
INSTALL/FOR_X64_ARM.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
============ Ventoy2Disk.exe for x86_64/ARM/ARM64 =================
|
||||
Ventoy2Disk.exe is a x86_32 application and supports both 32-bit and 64-bit Windows PC with intel/amd processor.
|
||||
Since 1.0.58, Ventoy also provides Ventoy2Disk_X64.exe/Ventoy2Disk_ARM.exe/Ventoy2Disk_ARM64.exe you can use them if needed.
|
||||
These exe files are in altexe directory of the installation package.
|
||||
You must copy them to the upper directory to use them. (The same location with Ventoy2Disk.exe)
|
||||
|
||||
|
||||
============ x86_64/ARM/ARM64 版本 Ventoy2Disk.exe =================
|
||||
默认的 Ventoy2Disk.exe 是32位x86程序,同时支持最常见的32位和64位Windows系统,绝大部分情况下使用它就可以。
|
||||
从1.0.58版本开始,Ventoy还同时提供了 Ventoy2Disk_X64.exe/Ventoy2Disk_ARM.exe/Ventoy2Disk_ARM64.exe 可以根据需要使用。
|
||||
这些文件位于安装包内的altexe目录下,使用时需要将其拷贝到上一层目录(即和 Ventoy2Disk.exe 同一位置)。
|
||||
|
Binary file not shown.
BIN
INSTALL/Ventoy2Disk_ARM.exe
Normal file
BIN
INSTALL/Ventoy2Disk_ARM.exe
Normal file
Binary file not shown.
BIN
INSTALL/Ventoy2Disk_ARM64.exe
Normal file
BIN
INSTALL/Ventoy2Disk_ARM64.exe
Normal file
Binary file not shown.
BIN
INSTALL/Ventoy2Disk_X64.exe
Normal file
BIN
INSTALL/Ventoy2Disk_X64.exe
Normal file
Binary file not shown.
117
INSTALL/grub/checksum.cfg
Normal file
117
INSTALL/grub/checksum.cfg
Normal file
@@ -0,0 +1,117 @@
|
||||
|
||||
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.md5" ]; then
|
||||
set default=0
|
||||
menuentry "Calculate and check md5sum" --class=checksum_md5 {
|
||||
md5sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.md5" vtReadChecksum
|
||||
|
||||
if vt_str_casebegin "$vtReadChecksum" "$VT_LAST_CHECK_SUM"; then
|
||||
echo -e "\n\nCheck MD5 value with .md5 file. [ OK ]"
|
||||
else
|
||||
echo -e "\n\nCheck MD5 value with .md5 file. [ FAIL ]"
|
||||
echo "The MD5 value in .md5 file is:"
|
||||
echo "$vtReadChecksum"
|
||||
fi
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
else
|
||||
menuentry "Calculate md5sum" --class=checksum_md5 {
|
||||
md5sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
fi
|
||||
|
||||
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha1" ]; then
|
||||
set default=1
|
||||
menuentry "Calculate and check sha1sum" --class=checksum_sha1 {
|
||||
sha1sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha1" vtReadChecksum
|
||||
|
||||
if vt_str_casebegin "$vtReadChecksum" "$VT_LAST_CHECK_SUM"; then
|
||||
echo -e "\n\nCheck SHA1 value with .sha1 file. [ OK ]"
|
||||
else
|
||||
echo -e "\n\nCheck SHA1 value with .sha1 file. [ FAIL ]"
|
||||
echo "The SHA1 value in .sha1 file is:"
|
||||
echo "$vtReadChecksum"
|
||||
fi
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
else
|
||||
menuentry "Calculate sha1sum" --class=checksum_sha1 {
|
||||
sha1sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha256" ]; then
|
||||
set default=2
|
||||
menuentry "Calculate and check sha256sum" --class=checksum_sha256 {
|
||||
sha256sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha256" vtReadChecksum
|
||||
|
||||
if vt_str_casebegin "$vtReadChecksum" "$VT_LAST_CHECK_SUM"; then
|
||||
echo -e "\n\nCheck SHA256 value with .sha256 file. [ OK ]"
|
||||
else
|
||||
echo -e "\n\nCheck SHA256 value with .sha256 file. [ FAIL ]"
|
||||
echo "The SHA256 value in .sha256 file is:"
|
||||
echo "$vtReadChecksum"
|
||||
fi
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
else
|
||||
menuentry "Calculate sha256sum" --class=checksum_sha256 {
|
||||
sha256sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ -e "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha512" ]; then
|
||||
set default=3
|
||||
menuentry "Calculate and check sha512sum" --class=checksum_sha512{
|
||||
sha512sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
vt_1st_line "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha512" vtReadChecksum
|
||||
|
||||
if vt_str_casebegin "$vtReadChecksum" "$VT_LAST_CHECK_SUM"; then
|
||||
echo -e "\n\nCheck SHA512 value with .sha512 file. [ OK ]"
|
||||
else
|
||||
echo -e "\n\nCheck SHA512 value with .sha512 file. [ FAIL ]"
|
||||
echo "The SHA512 value in .sha512 file is:"
|
||||
echo "$vtReadChecksum"
|
||||
fi
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
else
|
||||
menuentry "Calculate sha512sum" --class=checksum_sha512{
|
||||
sha512sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
|
||||
|
||||
echo -e "\n\npress ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
menuentry 'Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
|
||||
echo 'Return ...'
|
||||
}
|
@@ -90,6 +90,28 @@ function ventoy_ext_menu {
|
||||
fi
|
||||
}
|
||||
|
||||
function ventoy_checksum {
|
||||
if [ -f "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}" ]; then
|
||||
configfile $prefix/checksum.cfg
|
||||
fi
|
||||
}
|
||||
|
||||
function ventoy_show_help {
|
||||
if [ -f $prefix/help.tar.gz ]; then
|
||||
if [ -z "$vtoy_help_txt_mem_addr" ]; then
|
||||
vt_load_file_to_mem "auto" $prefix/help.tar.gz vtoy_help_txt_mem
|
||||
fi
|
||||
|
||||
loopback vt_help_tarfs mem:${vtoy_help_txt_mem_addr}:size:${vtoy_help_txt_mem_size}
|
||||
if [ -f "(vt_help_tarfs)/help/${VTOY_HELP_TXT_LANGUAGE}.txt" ]; then
|
||||
cat "(vt_help_tarfs)/help/${VTOY_HELP_TXT_LANGUAGE}.txt"
|
||||
else
|
||||
cat "(vt_help_tarfs)/help/en_US.txt"
|
||||
fi
|
||||
loopback -d vt_help_tarfs
|
||||
fi
|
||||
}
|
||||
|
||||
function get_os_type {
|
||||
set vtoy_os=Linux
|
||||
|
||||
@@ -133,6 +155,8 @@ function vt_check_compatible_pe {
|
||||
#set compatible if ISO file is less than 80MB
|
||||
if [ $vt_chosen_size -gt 33554432 -a $vt_chosen_size -le 83886080 ]; then
|
||||
set ventoy_compatible=YES
|
||||
elif [ -e $1/WEPE/WEPE.INI ]; then
|
||||
set ventoy_compatible=YES
|
||||
fi
|
||||
|
||||
return
|
||||
@@ -223,7 +247,8 @@ function distro_specify_initrd_file {
|
||||
vt_linux_specify_initrd_file /boot/initramfs-x86_64.img
|
||||
elif [ -f (loop)/boot/isolinux/initramfs_data64.cpio.gz ]; then
|
||||
vt_linux_specify_initrd_file /boot/isolinux/initramfs_data64.cpio.gz
|
||||
|
||||
elif [ -f (loop)/boot/initrd.img ]; then
|
||||
vt_linux_specify_initrd_file /boot/initrd.img
|
||||
|
||||
fi
|
||||
|
||||
@@ -328,6 +353,10 @@ function distro_specify_initrd_file_phase2 {
|
||||
vt_linux_specify_initrd_file /360Disk/initrd.gz
|
||||
elif [ -f (loop)/porteus/initrd.xz ]; then
|
||||
vt_linux_specify_initrd_file /porteus/initrd.xz
|
||||
elif [ -f (loop)/pyabr/boot/initrfs.img ]; then
|
||||
vt_linux_specify_initrd_file /pyabr/boot/initrfs.img
|
||||
elif [ -f (loop)/initrd0.img ]; then
|
||||
vt_linux_specify_initrd_file /initrd0.img
|
||||
|
||||
fi
|
||||
}
|
||||
@@ -988,14 +1017,13 @@ function legacy_linux_menu_func {
|
||||
loopback loop "$1$2"
|
||||
fi
|
||||
|
||||
if [ -f (loop)/isolinux/isolinux.cfg ]; then
|
||||
if vt_iso9660_isjoliet; then
|
||||
vt_iso9660_nojoliet 1
|
||||
loopback -d loop
|
||||
loopback loop "$1$2"
|
||||
fi
|
||||
|
||||
if vt_syslinux_need_nojoliet "$1$2"; then
|
||||
vt_iso9660_nojoliet 1
|
||||
loopback -d loop
|
||||
loopback loop "$1$2"
|
||||
fi
|
||||
|
||||
|
||||
vt_load_cpio $vtoy_path "$2" "$1" "busybox=$ventoy_busybox_ver"
|
||||
|
||||
vt_linux_clear_initrd
|
||||
@@ -1664,6 +1692,23 @@ function ventoy_img_recalbox {
|
||||
vt_unset_boot_opt
|
||||
}
|
||||
|
||||
function ventoy_img_esysrescue {
|
||||
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
|
||||
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
|
||||
|
||||
ventoy_debug_pause
|
||||
|
||||
#boot image file
|
||||
vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=esysrescue
|
||||
vt_img_hook_root
|
||||
|
||||
set root=(vtimghd,1)
|
||||
configfile (vtimghd,1)/boot/grub/grub.cfg
|
||||
|
||||
vt_img_unhook_root
|
||||
vt_unset_boot_opt
|
||||
}
|
||||
|
||||
function ventoy_img_batocera {
|
||||
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
|
||||
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
|
||||
@@ -1916,6 +1961,8 @@ function img_common_menuentry {
|
||||
ventoy_img_tails
|
||||
elif [ "$vtImgHd2Label" = "RECALBOX" ]; then
|
||||
ventoy_img_recalbox
|
||||
elif [ "$vtImgHd1Label" = "ESYSRESCUE" ]; then
|
||||
ventoy_img_esysrescue
|
||||
elif [ -e (vtimghd,1)/easy.sfs ]; then
|
||||
ventoy_img_easyos
|
||||
elif [ -e (vtimghd,1)/volumio.initrd ]; then
|
||||
@@ -1963,7 +2010,7 @@ function img_unsupport_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.0.54"
|
||||
set VENTOY_VERSION="1.0.59"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
@@ -1983,6 +2030,11 @@ set VTOY_F2_CMD="ventoy_power"
|
||||
set VTOY_F4_CMD="ventoy_localboot"
|
||||
set VTOY_F5_CMD="ventoy_diagnosis"
|
||||
set VTOY_F6_CMD="ventoy_ext_menu"
|
||||
set VTOY_HELP_CMD="ventoy_show_help"
|
||||
set VTOY_CHKSUM_CMD="ventoy_checksum"
|
||||
set VTOY_HELP_TXT_LANGUAGE="en_US"
|
||||
set VTOY_CHKSUM_FILE_PATH="X"
|
||||
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
set VTOY_TEXT_MENU_VER="Ventoy $VENTOY_VERSION BIOS www.ventoy.net"
|
||||
@@ -2072,10 +2124,10 @@ fi
|
||||
|
||||
if [ $VTOY_DEFAULT_MENU_MODE -eq 0 ]; then
|
||||
set VTOY_F3_CMD="vt_dynamic_menu 1 1"
|
||||
set VTOY_HOTKEY_TIP="F1:Memdisk F2:Power F3:TreeView F4:Localboot F5:Tools F6:ExMenu"
|
||||
set VTOY_HOTKEY_TIP="h:Help F1:Memdisk F2:Power F3:TreeView F4:Localboot F5:Tools F6:ExMenu"
|
||||
else
|
||||
set VTOY_F3_CMD="vt_dynamic_menu 1 0"
|
||||
set VTOY_HOTKEY_TIP="F1:Memdisk F2:Power F3:ListView F4:Localboot F5:Tools F6:ExMenu"
|
||||
set VTOY_HOTKEY_TIP="h:Help F1:Memdisk F2:Power F3:ListView F4:Localboot F5:Tools F6:ExMenu"
|
||||
fi
|
||||
|
||||
|
||||
@@ -2126,12 +2178,19 @@ fi
|
||||
|
||||
if [ -n "$VTOY_PLUGIN_SYNTAX_ERROR" ]; then
|
||||
clear
|
||||
echo -e "\n Syntax error detected in ventoy.json, please check! \n"
|
||||
echo -e " ventoy.json 文件中有语法错误,所有配置都不会生效,请检查!\n"
|
||||
if [ -n "$VTOY_PLUGIN_ENCODE_ERROR" ]; then
|
||||
echo -e "\n Encoding type for ventoy.json is not supported, please convert to UTF-8.\n"
|
||||
echo -e " ventoy.json 文件编码格式不支持,请转换为 UTF-8 编码格式!\n"
|
||||
else
|
||||
echo -e "\n Syntax error detected in ventoy.json, please check! \n"
|
||||
echo -e " ventoy.json 文件中有语法错误,所有配置都不会生效,请检查!\n"
|
||||
fi
|
||||
|
||||
echo -e "\n press ENTER to continue (请按 回车 键继续) ..."
|
||||
read vtInputKey
|
||||
read vtInputKey
|
||||
fi
|
||||
|
||||
|
||||
for vtTFile in ventoy.json ventoy_grub.cfg; do
|
||||
if [ -f $vtoy_efi_part/ventoy/$vtTFile ]; then
|
||||
clear
|
||||
@@ -2163,6 +2222,14 @@ export VTOY_ISO_RAW_STR
|
||||
export VTOY_GRUB2_MODE_STR
|
||||
export VTOY_WIMBOOT_MODE_STR
|
||||
export VTOY_ISO_UEFI_DRV_STR
|
||||
export VTOY_F2_CMD
|
||||
export VTOY_F4_CMD
|
||||
export VTOY_F5_CMD
|
||||
export VTOY_F6_CMD
|
||||
export VTOY_HELP_CMD
|
||||
export VTOY_CHKSUM_CMD
|
||||
export VTOY_HELP_TXT_LANGUAGE
|
||||
export VTOY_CHKSUM_FILE_PATH
|
||||
|
||||
|
||||
#special VTOY_DEFAULT_IMAGE process
|
||||
|
18
INSTALL/grub/help/en_US.txt
Normal file
18
INSTALL/grub/help/en_US.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
h - Display this help information
|
||||
F1 - Memdisk Mode (Only for small WinPE/LiveCD ISO/IMG)
|
||||
F2 - Reboot/Power off
|
||||
F3 - Switch menu mode between Treeview <-> ListView
|
||||
F4 - Boot Windows/Linux in local disk
|
||||
F5 - Utilities
|
||||
F6 - Load Custom Grub2 Menu
|
||||
F7 - Switch between GUI Mode <-> TEXT Mode
|
||||
|
||||
m - Checksum image files (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOT Mode (Only for standard Windows ISO)
|
||||
Ctrl+r - Grub2 Mode (Only for some Linux distros)
|
||||
Ctrl+i - Compatible Mode (Just only for debug)
|
||||
Ctrl+u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
|
||||
|
||||
|
||||
Press ESC to return ......
|
16
INSTALL/grub/help/fr_FR.txt
Normal file
16
INSTALL/grub/help/fr_FR.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
h - Afficher cette aide
|
||||
F1 - Mode Memdisk (Seulement pour WinPE/LiveCD ISO/IMG)
|
||||
F2 - Redémarrer/arrêter
|
||||
F3 - Basculer l'affichage 'Vue en arbre' <-> 'Vue en liste'
|
||||
F4 - Démarrer le système Windows/Linux local
|
||||
F5 - Utilitaires
|
||||
F6 - Charger le menu Grub2 personnalisé
|
||||
F7 - Basculer entre le mode graphique <-> mode texte
|
||||
|
||||
m - Somme de contrôle des images (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - Mode WIMBOOT (seulement pour les images standards Windows)
|
||||
Ctrl+r - Mode Grub2 (seulement pour quelques Linux)
|
||||
Ctrl+i - Mode Compatible (seulement à fins de tests)
|
||||
Ctrl+u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
|
||||
Appuyer sur Echap pour sortir ......
|
17
INSTALL/grub/help/hr_HR.txt
Normal file
17
INSTALL/grub/help/hr_HR.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
h - Prikazuje ove informacije
|
||||
F1 - Memdisk način rada (samo za male WinPE/LiveCD imidž fajlove)
|
||||
F2 - Ponovno pokretanje/isključivanje
|
||||
F3 - Mijenja meni između TreeView <-> ListView
|
||||
F4 - Pokreće Windows/Linux na lokalnom disku
|
||||
F5 - Postavke
|
||||
F6 - Učitava prilagođen GRUB2 meni
|
||||
F7 - Mijenja između GUI načina rada <-> TEXT načina rada
|
||||
|
||||
m - Generira kontrolnu sumu odabranog imidž fajla (md5/sha1/sha256/sha512)
|
||||
Ctrl + w - WIMBOOT način rada (samo za standardne Windows imidž fajlove)
|
||||
Ctrl + r - GRUB2 način rada (samo za neke Linux distribucije)
|
||||
Ctrl + i - Kompatibilni način rada (samo za testiranje)
|
||||
Ctrl + u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
|
||||
|
||||
Pritisnite ESC za povratak...
|
18
INSTALL/grub/help/id_ID.txt
Normal file
18
INSTALL/grub/help/id_ID.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
h - Tampilkan bantuan informasi ini
|
||||
F1 - Mode Memdisk (Hanya untuk ukuran WinPE/LiveCD ISO/IMG yang kecil)
|
||||
F2 - Mulai ulang/Matikan
|
||||
F3 - Beralih mode menu antara Treeview <-> ListView
|
||||
F4 - Jalankan (boot) Windows/Linux pada disk lokal
|
||||
F5 - Alat Utilitas
|
||||
F6 - Memuat ubah suai Grub2 Menu
|
||||
F7 - Beralih antara mode GUI <-> Mode TEXT
|
||||
|
||||
m - Periksa berkas files (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - Mode WIMBOOT (Hanya untuk berkas ISO Windows standar)
|
||||
Ctrl+r - Mode Grub2 (Hanya untuk distro Linux tertentu)
|
||||
Ctrl+i - Mode Kompatibel/Compatible (Hanya untuk debug saja)
|
||||
Ctrl+u - Memuat ISO efi driver (Hanya untuk debug saja, tidak dapat dipakai secara umum)
|
||||
|
||||
|
||||
|
||||
Tekan ESC untuk kembali ......
|
17
INSTALL/grub/help/pt_PT.txt
Normal file
17
INSTALL/grub/help/pt_PT.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
h - Mostra esta informação de ajuda
|
||||
F1 - Modo Memdisk (Apenas para pequenos WinPE/LiveCD ISO/IMG)
|
||||
F2 - Reiniciar/Desligar
|
||||
F3 - Alternar o modo menu entre Vista de árvore <-> Vista de lista
|
||||
F4 - Arrancar o Windows/Linux em disco local
|
||||
F5 - Utilitários
|
||||
F6 - Carregar menu Grub2 personalizado
|
||||
F7 - Alternar entre Modo GUI <-> Modo TEXTO
|
||||
|
||||
m - Checksum ficheiros de imagem (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - Modo WIMBOOT (Apenas para Windows ISO padrão)
|
||||
Ctrl+r - Modo Grub2 (Apenas para algumas distros Linux)
|
||||
Ctrl+i - Modo Compatível (Apenas para depuração)
|
||||
Ctrl+u - Carregar o controlador ISO efi (Apenas para depuração, não pode ser utilizado oficialmente)
|
||||
|
||||
|
||||
Prima ESC para voltar ......
|
17
INSTALL/grub/help/sr_CY.txt
Normal file
17
INSTALL/grub/help/sr_CY.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
h - Приказује ове информације
|
||||
F1 - Memdisk начин рада (само за мале WinPE/LiveCD имиџ фајлове)
|
||||
F2 - Поновно покретање/искључивање
|
||||
F3 - Мијења мени између TreeView <-> ListView
|
||||
F4 - Покреће Windows/Linux на локалном диску
|
||||
F5 - Поставке
|
||||
F6 - Учитава прилагођен GRUB2 мени
|
||||
F7 - Мијења између GUI начина рада <-> TEXT начина рада
|
||||
|
||||
m - Генерира контролну суму одабраног имиџ фајла (md5/sha1/sha256/sha512)
|
||||
Ctrl + w - WIMBOOT начин рада (само за стандардне Windows имиџ фајлове)
|
||||
Ctrl + r - GRUB2 начин рада (само за неке Linux дистрибуције)
|
||||
Ctrl + i - Компатибилни начин рада (само за тестиранје)
|
||||
Ctrl + u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
|
||||
|
||||
Притисните ESC за повратак...
|
17
INSTALL/grub/help/sr_SR.txt
Normal file
17
INSTALL/grub/help/sr_SR.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
h - Prikazuje ove informacije
|
||||
F1 - Memdisk način rada (samo za male WinPE/LiveCD imidž fajlove)
|
||||
F2 - Ponovno pokretanje/isključivanje
|
||||
F3 - Mijenja meni između TreeView <-> ListView
|
||||
F4 - Pokreće Windows/Linux na lokalnom disku
|
||||
F5 - Postavke
|
||||
F6 - Učitava prilagođen GRUB2 meni
|
||||
F7 - Mijenja između GUI načina rada <-> TEXT načina rada
|
||||
|
||||
m - Generira kontrolnu sumu odabranog imidž fajla (md5/sha1/sha256/sha512)
|
||||
Ctrl + w - WIMBOOT način rada (samo za standardne Windows imidž fajlove)
|
||||
Ctrl + r - GRUB2 način rada (samo za neke Linux distribucije)
|
||||
Ctrl + i - Kompatibilni način rada (samo za testiranje)
|
||||
Ctrl+u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
|
||||
|
||||
Pritisnite ESC za povratak...
|
17
INSTALL/grub/help/tr_TR.txt
Normal file
17
INSTALL/grub/help/tr_TR.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
h - Yardım bilgilerini göster
|
||||
F1 - Memdisk Modu başlatır(Yalnızca küçük WinPE/LiveCD ISO/IMG ler için bu modu kullanabilirsiniz)
|
||||
F2 - Bilgisayarı Yeniden Başlat/Kapat
|
||||
F3 - Ventoy Menü modu olarak,Klasör görünümü(Treeview) ile Liste görünümü(ListView) arasında geçiş yapmayı sağlar.
|
||||
F4 - Bilgisayarınızda yüklü olan Windows yada Linux işletim sistemini, sabit diskten başlatır.
|
||||
F5 - Ventoy Araçlar menüsü
|
||||
F6 - Özelleştirilmiş Grub2 menüsünü yükler
|
||||
F7 - Grafik Modu(GUI Mode) ile Metin Modu(Text Mode) arasında geçiş yapmayı sağlar
|
||||
|
||||
m - İndirilen imaj dosyalarının hatasız indirildiğini teyit etmek için "md5/sha1/sha256/sha512" değerlerini kontrol etmeyi sağlar
|
||||
Ctrl+w - WIMBOOT Modu çalıştırmayı sağlar(Sadece normal Windows ISO ları için)
|
||||
Ctrl+r - Grub2 Modu çalıştırmayı sağlar (Sadece bazı Linux dağıtımları için)
|
||||
Ctrl+i - Uyumluluk Modu'nu (Compatible Mode) çalıştırmayı sağlar (Sadece hata ayıklama için bu modu kullanabilirsiniz)
|
||||
Ctrl+u - ISO efi sürücüsünü yükler(Sadece hata ayıklama için bu mod kullanılabilir, resmi olarak kullanılamaz)
|
||||
|
||||
|
||||
Geriye dönmek için ESC tuşuna basınız......
|
17
INSTALL/grub/help/zh_CN.txt
Normal file
17
INSTALL/grub/help/zh_CN.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
h - 显示本帮助信息
|
||||
F1 - 把文件加载到内存启动(只适用于文件很小的 WinPE/LiveCD等)
|
||||
F2 - 电源操作 (重启、关机)
|
||||
F3 - 菜单显示模式切换。可在列表模式和目录模式之间自由切换。
|
||||
F4 - 启动本地硬盘上的 Windows/Linux 等系统。
|
||||
F5 - 各类工具
|
||||
F6 - 加载自定义 GRUB2 菜单。
|
||||
F7 - 界面在文本模式和图形模式之间切换。
|
||||
|
||||
m - 计算文件校验值(md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOT 模式 (只适用于标准的 Windows ISO文件)
|
||||
Ctrl+r - Grub2 模式 (只适用于常见的一些 Linux 系统ISO文件)
|
||||
Ctrl+i - 兼容模式 (只用作调试目的,不能正式使用)
|
||||
Ctrl+u - 加载 ISO efi 驱动(只用作调试目的,不能正式使用)
|
||||
|
||||
|
||||
按 ESC 键返回 ......
|
@@ -46,7 +46,7 @@ terminal-box: "terminal_box_*.png"
|
||||
}
|
||||
|
||||
+ hbox{
|
||||
left = 30%
|
||||
left = 28%
|
||||
top = 95%
|
||||
width = 10%
|
||||
height = 25
|
||||
|
Binary file not shown.
Binary file not shown.
@@ -72,6 +72,13 @@ ls -1 ./grub/ | grep -v 'grub\.cfg' | while read line; do
|
||||
cp $OPT ./grub/$line $tmpmnt/grub/
|
||||
done
|
||||
|
||||
#tar help txt
|
||||
cd $tmpmnt/grub/
|
||||
tar czf help.tar.gz ./help/
|
||||
rm -rf ./help
|
||||
cd ../../
|
||||
|
||||
|
||||
cp $OPT ./ventoy $tmpmnt/
|
||||
cp $OPT ./EFI $tmpmnt/
|
||||
cp $OPT ./tool/ENROLL_THIS_KEY_IN_MOKMANAGER.cer $tmpmnt/
|
||||
@@ -165,7 +172,14 @@ tar -czvf ventoy-${curver}-linux.tar.gz $tmpdir
|
||||
|
||||
|
||||
rm -f ventoy-${curver}-windows.zip
|
||||
cp $OPT Ventoy2Disk*.exe $tmpdir/
|
||||
|
||||
cp $OPT Ventoy2Disk.exe $tmpdir/
|
||||
cp $OPT FOR_X64_ARM.txt $tmpdir/
|
||||
mkdir -p $tmpdir/altexe
|
||||
cp $OPT Ventoy2Disk_*.exe $tmpdir/altexe/
|
||||
|
||||
|
||||
|
||||
cp $OPT $LANG_DIR/languages.json $tmpdir/ventoy/
|
||||
rm -rf $tmpdir/tool
|
||||
rm -f $tmpdir/*.sh
|
||||
|
@@ -48,6 +48,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -99,6 +105,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"이번에는 장치에 쓰지 않고 VTSI 파일#@만 생성합니다.#@계속하시겠습니까?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI 파일이 성공적으로 생성되었습니다!#@Rufus(3.15+)를 사용하여 장치에 기록하여 Ventoy 설치를 완료할 수 있습니다.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI 파일을 생성하지 못했습니다.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -150,6 +162,12 @@
|
||||
"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":"Ventoy 无损安装失败。详细信息请查阅 log.txt 文件。",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"条件不满足,无法进行无损安装。详细信息请查阅 log.txt 文件。",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -201,6 +219,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -252,6 +276,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -303,6 +333,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -354,6 +390,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -405,6 +447,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"Şu an aygıta yazılmayacak,sadece bir VTSI dosyası oluşturulacak#@Devam edilsin mi?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI dosyası başarılı bir şekilde oluşturuldu!#@Ventoy'un aygıta kurulumunu tamamlamak için Rufus(3.15+) programını kullanabilirsiniz.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI dosyası oluşturma başarısız oldu!",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -456,6 +504,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -507,6 +561,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"Aqueste còp cap d’escritura al disc, generacion del fichiet VTSI sonque#@Contunhar ?",
|
||||
"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":"Fracàs de la creacion del fichièr VTSI.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -558,6 +618,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -609,6 +675,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -660,6 +732,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"Esta vez no se escribirá al dispositivo, pero solo generará un archivo VTSI#@¿Continuar?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"¡Archivo VTSI creado exitosamente!#@Puedes usar Rufus(3.15+) para escribirlo al dispositivo a fin de completar la instalación de Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Fallo en el archivo VTSI creado.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -711,6 +789,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"На этот раз Ventoy не будет установлен на устройство, а будет только создан файл VTSI#@Продолжить?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Файл VTSI создан успешно!#@Вы можете использовать Rufus(3.15+), чтобы записать его на устройство, для завершения установки Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Ошибка создания файла VTSI.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -762,6 +846,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -813,6 +903,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -864,6 +960,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"Deze keer wordt er niet naar het apparaat geschreven, maar wordt er alleen een VTSI-bestand gegenereerd#@Doorgaan?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI-bestand met succes aangemaakt!#@U kunt Rufus(3.15+) gebruiken om het bestand naar het apparaat te schrijven om de installatie van Ventoy te voltooien.",
|
||||
"STR_VTSI_CREATE_FAILED":"Aanmaken van VTSI-bestand mislukt.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -915,6 +1017,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -966,6 +1074,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"VTSIファイルを生成し,記憶装置への書き込みは行いません。#@続行しますか?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSIファイルが生成されました。#@Rufus(3.15以上の版)を使って記憶装置に書き込んで,Ventoyの導入を完遂しましょう。",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSIファイルを生成できませんでした。",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -980,29 +1094,29 @@
|
||||
"STR_INCORRECT_DIR":"Si prega di eseguire nella cartella corretta",
|
||||
"STR_INCORRECT_TREE_DIR":"Non eseguire qui, scarica il pacchetto di installazione ed avvialo",
|
||||
"STR_DEVICE":"Dispositivo",
|
||||
"STR_LOCAL_VER":"Versione Locale di Ventoy",
|
||||
"STR_LOCAL_VER":"Versione locale di Ventoy",
|
||||
"STR_DISK_VER":"Ventoy nel dispositivo",
|
||||
"STR_STATUS":"Stato - PRONTO",
|
||||
"STR_INSTALL":"Installa",
|
||||
"STR_UPDATE":"Aggiorna",
|
||||
"STR_UPDATE_TIP":"L'aggiornamento è sicuro, i file presenti nel dispositivo rimarranno invariati.#@Continuare?",
|
||||
"STR_INSTALL_TIP":"Il disco verrà formattato e tutti i dati saranno persi.#@Continuare?",
|
||||
"STR_INSTALL_TIP2":"Il disco verrà formattato e tutti i dati saranno persi.#@Continuare?' (Seconda Verifica)",
|
||||
"STR_INSTALL_TIP2":"Il disco verrà formattato e tutti i dati saranno persi.#@Continuare?' (seconda verifica)",
|
||||
"STR_INSTALL_SUCCESS":"Congratulazioni!#@Ventoy è stato installato con successo nel dispositivo",
|
||||
"STR_INSTALL_FAILED":"Si è verificato un errore durante l'installazione. Reinserisci il dispostivo e riprova. Controlla il file log.txt per i dettagli.",
|
||||
"STR_INSTALL_FAILED":"Si è verificato un errore durante l'installazione. Riconnetti il dispostivo e riprova. Controlla il file log.txt per i dettagli.",
|
||||
"STR_UPDATE_SUCCESS":"Congratulazioni!#@Ventoy è stato aggiornato con successo nel dispositivo",
|
||||
"STR_UPDATE_FAILED":"Si è verificato un errore durante l'aggiornamento. Reinserisci il dispostivo e riprova. Controlla il file log.txt per i dettagli.",
|
||||
"STR_UPDATE_FAILED":"Si è verificato un errore durante l'aggiornamento. Riconnetti il dispostivo e riprova. Controlla il file log.txt per i dettagli.",
|
||||
"STR_WAIT_PROCESS":"Un processo è in esecuzione, attendere prego...",
|
||||
"STR_MENU_OPTION":"Opzioni",
|
||||
"STR_MENU_SECURE_BOOT":"Avvio protetto (secure boot)",
|
||||
"STR_MENU_PART_CFG":"Configurazione della partizione",
|
||||
"STR_BTN_OK":"OK",
|
||||
"STR_BTN_CANCEL":"Annulla",
|
||||
"STR_PRESERVE_SPACE":"Conserva spazio nella parte finale del disco",
|
||||
"STR_PRESERVE_SPACE":"Riserva spazio nella parte finale del disco",
|
||||
"STR_SPACE_VAL_INVALID":"Quantità di spazio da riservare non valida",
|
||||
"STR_MENU_CLEAR":"Rimuovi Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy è stato rimosso con successo dal dispositivo.",
|
||||
"STR_CLEAR_FAILED":"Si è verificato un errore durante la rimozione di Ventoy dal dispositivo. Reinserisci il dispositivo e riprova. Controlla il file log.txt per maggiori dettagli",
|
||||
"STR_CLEAR_FAILED":"Si è verificato un errore durante la rimozione di Ventoy dal dispositivo. Riconnetti il dispositivo e riprova. Controlla il file log.txt per maggiori dettagli",
|
||||
"STR_MENU_PART_STYLE":"Stile Tabella delle partizioni",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Seleziona GPT per dischi con dimensioni maggiori di 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Mostra tutti i dispositivi",
|
||||
@@ -1015,8 +1129,14 @@
|
||||
"STR_WEB_SERVICE_BUSY":"Il servizio è occupato, riprova più tardi.",
|
||||
"STR_MENU_VTSI_CREATE":"Genera file VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"Questa volta non scriverà sul dispositivo, ma genererà solo un file VTSI#@Continuare?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"File VTSI creato con successo!#@Puoiusare Rufus(3.15+)per scrivere sul dispositivo in modo da completare l'installazione di Ventoy.",
|
||||
"STR_VTSI_CREATE_SUCCESS":"File VTSI creato con successo!#@Puoi usare Rufus (versione 3.15 o successiva) per scrivere sul dispositivo in modo da completare l'installazione di Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Creazione File VTSI non riuscito.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1068,6 +1188,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1119,6 +1245,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1170,6 +1302,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1221,6 +1359,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1272,6 +1416,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1323,6 +1473,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1374,6 +1530,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1421,10 +1583,16 @@
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Lỗi giao tiếp: Dịch vụ không sẵn có",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Đã cập nhật trạng thái Daemon, vui lòng thử lại sau.",
|
||||
"STR_WEB_SERVICE_BUSY":"Dịch vụ bận, vui lòng thử lại sau.",
|
||||
"STR_MENU_VTSI_CREATE":"Tạo tệp VTSI",
|
||||
"STR_MENU_VTSI_CREATE":"Tạo tệp VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"Lần này sẽ không ghi vào thiết bị, chỉ tạo một tệp VTSI#@Bạn muốn tiếp tục?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Tạo tệp VTSI thành công!#@Để hoàn thành cài đặt Ventoy, bạn có thể dùng Rufus (3.15+) để ghi tệp này vào thiết bị.",
|
||||
"STR_VTSI_CREATE_FAILED":"Tạo tệp VTSI đã gặp lỗi.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1476,6 +1644,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1527,6 +1701,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"Овој пат ништо нема да се запише на уредот туку само ќе се генерира VTSI датотека#@Продолжи?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Успешно креирана VTSI датотека!#@Можете да го користите Rufus(3.15+) за да ја запишете на уредот како и да ја комплетирате инсталацијата на Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Креирањето на VTSI датотека е неуспешно.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1578,19 +1758,25 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
"name":"Portuguese (Português de Portugal)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"Eskiso",
|
||||
"Author":"Eskiso, Hugo Carvalho",
|
||||
|
||||
"STR_ERROR":"Erro",
|
||||
"STR_WARNING":"Aviso",
|
||||
"STR_INFO":"Info",
|
||||
"STR_INCORRECT_DIR":"Por favor, execute na pasta correta!",
|
||||
"STR_INCORRECT_TREE_DIR":"Não me execute aqui, por favor transfira o pacote de instalação, e execute lá.",
|
||||
"STR_INCORRECT_DIR":"Execute na pasta correta!",
|
||||
"STR_INCORRECT_TREE_DIR":"Não me execute aqui, transfira o pacote de instalação e execute lá.",
|
||||
"STR_DEVICE":"Dispositivo",
|
||||
"STR_LOCAL_VER":"Ventoy em pacote",
|
||||
"STR_DISK_VER":"Ventoy no dispositivo",
|
||||
@@ -1601,34 +1787,40 @@
|
||||
"STR_INSTALL_TIP":"O disco será formatado e todos os dados serão perdidos.#@Continuar?",
|
||||
"STR_INSTALL_TIP2":"O disco será formatado e todos os dados serão perdidos.#@Continuar? (Confirmação)",
|
||||
"STR_INSTALL_SUCCESS":"Parabéns!#@Ventoy foi instalado com sucesso no dispositivo.",
|
||||
"STR_INSTALL_FAILED":"Um erro ocorreu durante a instalação. Pode reconectar o dispositivo USB e tentar novamente. Verifique o ficheiro log.txt para mais detalhes.",
|
||||
"STR_INSTALL_FAILED":"Ocorreu um erro durante a instalação. Pode voltar a ligar o dispositivo USB e tentar novamente. Verifique o ficheiro log.txt para mais detalhes.",
|
||||
"STR_UPDATE_SUCCESS":"Parabéns!#@Ventoy foi atualizado com sucesso no dispositivo.",
|
||||
"STR_UPDATE_FAILED":"Um erro ocorreu durante a atualização. Pode reconectar o dispositivo USB e tentar novamente. Verifique o ficheiro log.txt para mais detalhes.",
|
||||
"STR_WAIT_PROCESS":"Uma thread está em execução, por favor espere...",
|
||||
"STR_UPDATE_FAILED":"Ocorreu um erro durante a atualização. Pode voltar a ligar o dispositivo USB e tentar novamente. Verifique o ficheiro log.txt para mais detalhes.",
|
||||
"STR_WAIT_PROCESS":"Uma thread está em execução, aguarde...",
|
||||
"STR_MENU_OPTION":"Opção",
|
||||
"STR_MENU_SECURE_BOOT":"Boot seguro",
|
||||
"STR_MENU_PART_CFG":"Configuração da Partição",
|
||||
"STR_BTN_OK":"OK",
|
||||
"STR_MENU_SECURE_BOOT":"Arranque seguro",
|
||||
"STR_MENU_PART_CFG":"Configuração da partição",
|
||||
"STR_BTN_OK":"Aceitar",
|
||||
"STR_BTN_CANCEL":"Cancelar",
|
||||
"STR_PRESERVE_SPACE":"Preservar algum espaço no final do disco",
|
||||
"STR_SPACE_VAL_INVALID":"Valor invalido para o espaço reservado",
|
||||
"STR_PRESERVE_SPACE":"Reservar algum espaço no final do disco",
|
||||
"STR_SPACE_VAL_INVALID":"Valor inválido para o espaço reservado",
|
||||
"STR_MENU_CLEAR":"Remover o Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"O Ventoy foi removido deste dispositivo com sucesso.",
|
||||
"STR_CLEAR_FAILED":"Um erro ocorreu ao remover o Ventoy do disco. Pode reconectar o dispositivo USB e tentar novamente. Verifique o ficheiro log.txt para mais detalhes.",
|
||||
"STR_MENU_PART_STYLE":"Estilo de Partição",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Por favor selecione GPT para discos maiores que 2TB",
|
||||
"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_CLEAR_FAILED":"Um erro ocorreu ao remover o Ventoy do disco. Pode voltar a ligar o dispositivo USB e tentar novamente. Verifique o ficheiro log.txt para mais detalhes.",
|
||||
"STR_MENU_PART_STYLE":"Estilo de partição",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Selecione GPT para discos maiores que 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Mostrar todos os dispositivos",
|
||||
"STR_PART_ALIGN_4KB":"Alinhar as partições com 4KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Erro de comunicação:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Erro de comunicação: Anomalia remota",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Erro de comunicação: Pedido de tempo limite",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Erro de comunicação: Serviço indisponível",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Estado do daemon atualizado, tente novamente mais tarde.",
|
||||
"STR_WEB_SERVICE_BUSY":"Serviço está ocupado, tente novamente mais tarde.",
|
||||
"STR_MENU_VTSI_CREATE":"Gerar ficheiro VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"Desta vez não irá gravar no dispositivo, mas apenas gerar um ficheiro VTSI#@Continuar?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Ficheiro VTSI criado com sucesso!#@Pode utilizar o Rufus(3.15+) para o gravar no dispositivo de modo a completar a instalação do Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Falha no ficheiro VTSI criado.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1668,7 +1860,7 @@
|
||||
"STR_CLEAR_FAILED":"Terjadi kesalahan ketika penghapusan berlangsung. Anda perlu mencabut-pasang ulang USB dan coba lagi. Cek log.txt untuk detil.",
|
||||
"STR_MENU_PART_STYLE":"Gaya Partisi",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Silakan pilih GPT untuk disk yang lebih dari 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Show All Devices",
|
||||
"STR_SHOW_ALL_DEV":"Tampilkan semua perangkat",
|
||||
"STR_PART_ALIGN_4KB":"Meluruskan dengan partisi 4KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Kesalahan komunikasi:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Kesalahan komunikasi: tidak normalnya kendali",
|
||||
@@ -1680,6 +1872,69 @@
|
||||
"STR_VTSI_CREATE_TIP":"Saat ini tidak akan menuliskan di perangkat, tetapi hanya membuat berkas VTSI #@Lanjutkan?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Berkas VTSI berhasil dibuat#@Anda bisa menggunakan Rufus(3.15+) untuk menulisnya ke perangkat untuk menyelesaikan instalasi Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Berkas VTSI gagal dibuat.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
"name":"Norwegian Bokmål (Norsk Bokmål)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"Allan Nordhøy",
|
||||
|
||||
"STR_ERROR":"Feil",
|
||||
"STR_WARNING":"Advarsel",
|
||||
"STR_INFO":"Info",
|
||||
"STR_INCORRECT_DIR":"Start programmet i rett mappe først.",
|
||||
"STR_INCORRECT_TREE_DIR":"Ikke kjør meg her. Last ned utgitt installasjonspakke og kjør det der.",
|
||||
"STR_DEVICE":"Enhet",
|
||||
"STR_LOCAL_VER":"Ventoy i pakke",
|
||||
"STR_DISK_VER":"Ventoy i enhet",
|
||||
"STR_STATUS":"Status — Klar",
|
||||
"STR_INSTALL":"Installer",
|
||||
"STR_UPDATE":"Updater",
|
||||
"STR_UPDATE_TIP":"Oppgradering er trygt. ISO-filer vil forbli uendret.#@Fortsett?",
|
||||
"STR_INSTALL_TIP":"Enheten vil bli formatert og all data på den vil gå tapt.#@Fortsett?",
|
||||
"STR_INSTALL_TIP2":"Enheten vil bli formatert og all data på den vil gå tapt.#@Fortsett? (Dobbeltsjekk)",
|
||||
"STR_INSTALL_SUCCESS":"Gratulerer!#@Ventoy har blitt installert på enheten.",
|
||||
"STR_INSTALL_FAILED":"Noe gikk galt under installasjonen. Du kan plugge ut og inn USB-enheten og prøve igjen. Sjekk log.txt for detaljer. Hvis feilen vedvarer kan du sjekke O-S-S på nettsiden.",
|
||||
"STR_UPDATE_SUCCESS":"Gratulerer!#@Ventoy har blitt installert på enheten.",
|
||||
"STR_UPDATE_FAILED":"Noe gikk galt under oppdateringen. Du kan plugge ut og inn USB-enheten og prøve igjen. Sjekk log.txt for detaljer. Hvis feilen vedvarer kan du sjekke O-S-S på nettsiden.",
|
||||
"STR_WAIT_PROCESS":"Vent mens en tråd kjører …",
|
||||
"STR_MENU_OPTION":"Alternativ",
|
||||
"STR_MENU_SECURE_BOOT":"Secure Boot-støtte",
|
||||
"STR_MENU_PART_CFG":"Partisjonsoppsett",
|
||||
"STR_BTN_OK":"OK",
|
||||
"STR_BTN_CANCEL":"Avbryt",
|
||||
"STR_PRESERVE_SPACE":"Hold av litt plass på slutten av disken",
|
||||
"STR_SPACE_VAL_INVALID":"Ugyldig verdi for avholdt plass",
|
||||
"STR_MENU_CLEAR":"Tøm Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy har blitt fjernet fra enheten.",
|
||||
"STR_CLEAR_FAILED":"Noe gikk galt ved fjerning av Ventoy fra disken. Du kan plugge ut og inn USB-enheten og prøve igjen. Sjekk log.txt for detaljer.",
|
||||
"STR_MENU_PART_STYLE":"Partisjonsstil",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Velg «GPT» for enheter over 2 TB",
|
||||
"STR_SHOW_ALL_DEV":"Vis alle enheter",
|
||||
"STR_PART_ALIGN_4KB":"Juster partisjoner til 4 KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Kommunikasjonsfeil:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Kommunikasjonsfeil: Noe er galt annensteds hen",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Kommunikasjonsfeil: Tidsavbrudd for forespørsel",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Kommunikasjonsfeil: Utilgjengelig tjeneste",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Nisse-status oppdatert. Prøv igjen senere.",
|
||||
"STR_WEB_SERVICE_BUSY":"Tjensten er opptatt. Prøv igjen senere.",
|
||||
"STR_MENU_VTSI_CREATE":"Generer VTSI-fil",
|
||||
"STR_VTSI_CREATE_TIP":"Dette vil ikke skrive til enheten, men kun generere en VTSIfil#@Fortsett?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI-fil opprettet.#@Du kan bruke Rufus(3.15+) til å skrive den til enheten for å fullføre installasjonen av Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Noe gikk galt under opprettelse av VTSI-fil.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1731,6 +1986,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"Цього разу Ventoy не буде встановлено на пристрій, а лише буде створено файл VTSI#@Продовжити?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Файл VTSI створено успішно!#@Ви можете використати Rufus(3.15+), щоб записати його на пристрій, для завершення встановлення Ventoy",
|
||||
"STR_VTSI_CREATE_FAILED":"Не вдалося створити файл VTSI.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1782,6 +2043,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1828,11 +2095,17 @@
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Kommunikationsfel: Begäran tog för lång tid",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Kommunikationsfel: Tjänsten är inte tillgänglig",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Daemon-status uppdaterad. Försök igen senare.",
|
||||
"STR_WEB_SERVICE_BUSY":"Tjänster är upptagen. Försök igen senare.",
|
||||
"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_WEB_SERVICE_BUSY":"Tjänsten är upptagen. Försök igen senare.",
|
||||
"STR_MENU_VTSI_CREATE":"Skapa VTSI-fil",
|
||||
"STR_VTSI_CREATE_TIP":"Den här gången skrivs det inget till enheten, utan det skapas endast en VTSI-fil#@Fortsätta?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI-filen skapad!#@Använd Rufus (3.15+) till att skriva till enheten för att slutföra installationen av Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Misslyckades med att skapa VTSI-filen.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1884,6 +2157,12 @@
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1935,6 +2214,12 @@
|
||||
"STR_VTSI_CREATE_TIP":"Сега няма да се записва на диска, само ще се генерира VTSI файл#@Продължаваме?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI файла бе създаден успешно!#@Може да използвате Rufus(3.15+) да го запишете на устройството за инсталацията с Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI файла създаване се провали.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
@@ -1986,6 +2271,69 @@
|
||||
"STR_VTSI_CREATE_TIP":"Այս անգամ չի գրվի կրիչի վրա, այլ միայն կստեղծվի VTSI ֆայլ#@Շարունակել?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI ֆայլը հաջողությամբ ստեղծվեց!#@Դուք կարող եք օգտագործել Rufus (3.15+) կրիչում ձայնագրելու համար, որպեսզի ավարտեք Ventoy-ի տեղադրումը:",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI ֆայլի ստեղծումը ձախողվեց։",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
"name":"Finnish (suomi)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"heidi.wenger",
|
||||
|
||||
"STR_ERROR":"Virhe",
|
||||
"STR_WARNING":"Varoitus",
|
||||
"STR_INFO":"Tiedot",
|
||||
"STR_INCORRECT_DIR":"Ole hyvä ja aja oikean kansion alla!",
|
||||
"STR_INCORRECT_TREE_DIR":"Älä aja minua tässä, ole hyvä ja lataa julkaistu asennuspaketti, ja suorita ajo siellä.",
|
||||
"STR_DEVICE":"Laite",
|
||||
"STR_LOCAL_VER":"Ventoy paketissa",
|
||||
"STR_DISK_VER":"Ventoy laitteessa",
|
||||
"STR_STATUS":"Tila - VALMIS",
|
||||
"STR_INSTALL":"Asenna",
|
||||
"STR_UPDATE":"Päivitä",
|
||||
"STR_UPDATE_TIP":"Päivytystoiminto on turvallinen, ISO -tiedostot pysyvät muuttumattomana.#@Jatketaanko?",
|
||||
"STR_INSTALL_TIP":"Laite tullaan alustamaan ja tämän johdosta kaikki tieto sen sisällä menetetään.#@Jatketaanko?",
|
||||
"STR_INSTALL_TIP2":"Laite tullaan alustamaan ja tämän johdosta kaikki tieto sen sisällä menetetään.#@Jatketaanko? (Kaksoistarkistus)",
|
||||
"STR_INSTALL_SUCCESS":"Onnittelut!#@Ventoy on asennettu laitteeseen onnistuneesti.",
|
||||
"STR_INSTALL_FAILED":"Asennuksen yhteydessä ilmeni virhe. Voit nypätä USB-laitteen irti ja koettaa uudelleen. Katso log.txt nähdäksesi yksityiskohdat. Mikäli toimi epäonnistuu aina, lue usein kysytyt kysymykset (FAQ) virallisella sivustolla.",
|
||||
"STR_UPDATE_SUCCESS":"Onnittelut!#@Ventoy päivitettiin laitteeseen onnistuneesti.",
|
||||
"STR_UPDATE_FAILED":"Päivityksen aikana ilmeni virhe. Voit nypätä USB-laitteen irti ja koettaa uudelleen. Katso log.txt nähdäksesi yksityiskohdat. Mikäli toimi epäonnistuu aina, lue usein kysytyt kysymykset (FAQ) virallisella sivustolla.",
|
||||
"STR_WAIT_PROCESS":"Toimi on ajossa juuri nyt, ole hyvä ja odota...",
|
||||
"STR_MENU_OPTION":"Vaihtoehto",
|
||||
"STR_MENU_SECURE_BOOT":"Secure Boot (turvakäynnistys) -tuki",
|
||||
"STR_MENU_PART_CFG":"Osioasetukset",
|
||||
"STR_BTN_OK":"SELVÄ",
|
||||
"STR_BTN_CANCEL":"Peruuta",
|
||||
"STR_PRESERVE_SPACE":"Jätä hiukan vapaata tilaa levyn loppuun",
|
||||
"STR_SPACE_VAL_INVALID":"Epäkelpo määrä tilavaraukselle",
|
||||
"STR_MENU_CLEAR":"Poista Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy on nyt poistettu laitteesta onnistuneesti.",
|
||||
"STR_CLEAR_FAILED":"Ilmeni virhe poistettaessa Ventoyta levyltä. Voit nypätä laitteen irti ja koettaa uudelleen. Katso log.txt nähdäksesi yksityiskohdat.",
|
||||
"STR_MENU_PART_STYLE":"Osiotyyli",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Ole hyvä ja valitse GPT laitteille joissa on tilavuutta yli 2 teratavua",
|
||||
"STR_SHOW_ALL_DEV":"Näytä kaikki laitteet",
|
||||
"STR_PART_ALIGN_4KB":"Järjestä osiot 4Kt mukaisesti",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Kommunikaatiovirhe:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Kommunikaatiovirhe: epätavanomainen etävaste",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Kommunikaatiovirhe: pyynnön aikavaste ylittyi",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Kommunikaatiovirhe: palvelu on tavoittamattomissa",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Taustaohjelman tila päivittyi, ole hyvä ja yritä myöhemmin uudelleen.",
|
||||
"STR_WEB_SERVICE_BUSY":"Palvelu ruuhkautunut, ole hyvä ja yritä myöhemmin uudelleen.",
|
||||
"STR_MENU_VTSI_CREATE":"Luo VTSI -tiedosto",
|
||||
"STR_VTSI_CREATE_TIP":"Tällä kerralla laitteeseen ei kirjoiteta, vaan luodaan ainoastaan VTSI -tiedosto#@Jatketaanko?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI -tiedosto luotiin onnistuneesti!#@Voit käyttää Rufus-ohjelmaa(3.15+) kirjoittaaksesi sen laitteeseen viimeistelläksesi Ventoy-asennuksen.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI -tiedoston luominen epäonnistui.",
|
||||
"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.",
|
||||
|
||||
"STRXXX":""
|
||||
}
|
||||
]
|
||||
]
|
@@ -157,7 +157,9 @@ if [ "$1" = "VENTOY_I386_QT_BUILD" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f /opt/CentOS8/LinuxGUI/build.sh ]; then
|
||||
mount --bind /home/share/Ventoy/LinuxGUI /opt/CentOS8/LinuxGUI
|
||||
fi
|
||||
|
||||
chroot /opt/CentOS8 sh /buildqt.sh
|
||||
force_copy ./Ventoy2Disk.qt5_32 ../INSTALL/tool/i386/Ventoy2Disk.qt5
|
||||
|
36
README.md
36
README.md
@@ -16,19 +16,19 @@ You can copy many image files at a time and ventoy will give you a boot menu to
|
||||
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/>
|
||||
Both MBR and GPT partition style are supported in the same way.<br/>
|
||||
Most type of OS supported(Windows/WinPE/Linux/Unix/ChromeOS/Vmware/Xen...) <br/>
|
||||
730+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported (<a href="https://www.ventoy.net/en/distrowatch.html">Details</a>). <br/>
|
||||
770+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported (<a href="https://www.ventoy.net/en/distrowatch.html">Details</a>). <br/>
|
||||
<br/>Official Website: <a href=https://www.ventoy.net>https://www.ventoy.net</a>
|
||||
</h4>
|
||||
|
||||
# Tested OS
|
||||
**Windows**
|
||||
Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, WinPE
|
||||
Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, Windows Server 2022, WinPE
|
||||
|
||||
**Linux**
|
||||
Debian, Ubuntu, CentOS, RHEL, Deepin, Fedora, Rocky Linux, SLES, openSUSE, MX Linux, Manjaro, Linux Mint, Endless OS, openEuler, Elementary OS, Solus, Linx, Zorin, antiX, PClinuxOS, Arch, ArcoLinux, ArchLabs, BackArch, Obarun, Artix Linux, Puppy Linux, Tails, Slax, Kali, Mageia, Slackware, Q4OS, Archman, Gentoo, Pentoo, NixOS, Ubuntu Kylin, Lubuntu, Xubuntu, Kubuntu, Ubuntu MATE, Ubuntu Budgie, Ubuntu Studio, Bluestar, OpenMandriva, ExTiX, Netrunner, ALT Linux, Nitrux, Peppermint, KDE neon, Linux Lite, Parrot OS, Qubes, Pop OS, ROSA, Void Linux, Star Linux, EndeavourOS, MakuluLinux, Voyager, Feren, ArchBang, LXLE, Knoppix, Robolinux, Calculate Linux, Clear Linux, Pure OS, Oracle Linux, Trident, Septor, Porteus, Devuan, GoboLinux, 4MLinux, Simplicity Linux, Zeroshell, Android-x86, netboot.xyz, Slitaz, SuperGrub2Disk, Proxmox VE, Kaspersky Rescue, SystemRescueCD, MemTest86, MiniTool Partition Wizard, Parted Magic, veket, Sabayon, Scientific, alpine, ClearOS, CloneZilla, Berry Linux, Trisquel, Ataraxia Linux, Minimal Linux Live, BackBox Linux, Emmabuntüs, ESET SysRescue Live,Nova Linux, AV Linux, RoboLinux, NuTyX, IPFire, SELKS, ZStack, Enso Linux, Security Onion, Network Security Toolkit, Absolute Linux, TinyCore, Springdale Linux, Frost Linux, Shark Linux, LinuxFX, Snail Linux, Astra Linux, Namib Linux, Resilient Linux, Virage Linux, Blackweb Security OS, R-DriveImage, O-O.DiskImage, Macrium, ToOpPy LINUX, GNU Guix, YunoHost, foxclone, siduction, Adelie Linux, Elive, Pardus, CDlinux, AcademiX, Austrumi, Zenwalk, Anarchy, DuZeru, BigLinux, OpenMediaVault, Ubuntu DP, Exe GNU/Linux, 3CX Phone System, KANOTIX, Grml, Karoshi, PrimTux, ArchStrike, CAELinux, Refracta, Cucumber, Fatdog, ForLEx, Hanthana, Kwort, MiniNo, Redcore, Runtu, Asianux, Clu Linux Live, Uruk, OB2D, BlueOnyx, Finnix, HamoniKR, Parabola, LinHES, LinuxConsole, BEE free, Untangle, Pearl, Thinstation, TurnKey, tuxtrans, Neptune, HefftorLinux, GeckoLinux, Mabox Linux, Zentyal, Maui, Reborn OS, SereneLinux , SkyWave Linux, Kaisen Linux, Regata OS, TROM-Jaro, DRBL Linux, Chalet OS, Chapeau, Desa OS, BlankOn, OpenMamba, Frugalware, Kibojoe Linux, Revenge OS, Tsurugi Linux, Drauger OS, Hash Linux, gNewSense, Ikki Boot, SteamOS, Hyperbola, VyOS, EasyNAS, SuperGamer, Live Raizo, Swift Linux, RebeccaBlackOS, Daphile, CRUX, Univention, Ufficio Zero, Rescuezilla, Phoenix OS, Garuda Linux, Mll, NethServer, OSGeoLive, Easy OS, Volumio, FreedomBox, paldo, UBOS, Recalbox, batocera, Lakka, LibreELEC, Pardus Topluluk, Pinguy, KolibriOS, Elastix, Arya, Omoikane, Omarine, Endian Firewall, Hamara, Rocks Cluster, MorpheusArch, Redo, Slackel, SME Server, APODIO, Smoothwall, Dragora, Linspire, Secure-K OS, Peach OSI, Photon, Plamo, SuperX, Bicom, Ploplinux, HP SPP, LliureX, Freespire, DietPi, BOSS, Webconverger, Lunar, TENS, Source Mage, RancherOS, T2, Vine, Pisi, blackPanther, mAid, Acronis, Active.Boot, AOMEI, Boot.Repair, CAINE, DaRT, EasyUEFI, R-Drive, PrimeOS, Avira Rescue System, bitdefender, Checkra1n Linux, Lenovo Diagnostics, Clover, Bliss-OS, Lenovo BIOS Update, Arcabit Rescue Disk, MiyoLinux, TeLOS, Kerio Control, RED OS, OpenWrt, MocaccinoOS, EasyStartup, ......
|
||||
Debian, Ubuntu, CentOS, RHEL, Deepin, Fedora, Rocky Linux, SLES, openSUSE, MX Linux, Manjaro, Linux Mint, Endless OS, openEuler, Elementary OS, Solus, Linx, Zorin, antiX, PClinuxOS, Arch, ArcoLinux, ArchLabs, BackArch, Obarun, Artix Linux, Puppy Linux, Tails, Slax, Kali, Mageia, Slackware, Q4OS, Archman, Gentoo, Pentoo, NixOS, Ubuntu Kylin, Lubuntu, Xubuntu, Kubuntu, Ubuntu MATE, Ubuntu Budgie, Ubuntu Studio, Bluestar, OpenMandriva, ExTiX, Netrunner, ALT Linux, Nitrux, Peppermint, KDE neon, Linux Lite, Parrot OS, Qubes, Pop OS, ROSA, Void Linux, Star Linux, EndeavourOS, MakuluLinux, Voyager, Feren, ArchBang, LXLE, Knoppix, Robolinux, Calculate Linux, Clear Linux, Pure OS, Oracle Linux, Trident, Septor, Porteus, Devuan, GoboLinux, 4MLinux, Simplicity Linux, Zeroshell, Android-x86, netboot.xyz, Slitaz, SuperGrub2Disk, Proxmox VE, Kaspersky Rescue, SystemRescueCD, MemTest86, MiniTool Partition Wizard, Parted Magic, veket, Sabayon, Scientific, alpine, ClearOS, CloneZilla, Berry Linux, Trisquel, Ataraxia Linux, Minimal Linux Live, BackBox Linux, Emmabuntüs, ESET SysRescue Live,Nova Linux, AV Linux, RoboLinux, NuTyX, IPFire, SELKS, ZStack, Enso Linux, Security Onion, Network Security Toolkit, Absolute Linux, TinyCore, Springdale Linux, Frost Linux, Shark Linux, LinuxFX, Snail Linux, Astra Linux, Namib Linux, Resilient Linux, Virage Linux, Blackweb Security OS, R-DriveImage, O-O.DiskImage, Macrium, ToOpPy LINUX, GNU Guix, YunoHost, foxclone, siduction, Adelie Linux, Elive, Pardus, CDlinux, AcademiX, Austrumi, Zenwalk, Anarchy, DuZeru, BigLinux, OpenMediaVault, Ubuntu DP, Exe GNU/Linux, 3CX Phone System, KANOTIX, Grml, Karoshi, PrimTux, ArchStrike, CAELinux, Refracta, Cucumber, Fatdog, ForLEx, Hanthana, Kwort, MiniNo, Redcore, Runtu, Asianux, Clu Linux Live, Uruk, OB2D, BlueOnyx, Finnix, HamoniKR, Parabola, LinHES, LinuxConsole, BEE free, Untangle, Pearl, Thinstation, TurnKey, tuxtrans, Neptune, HefftorLinux, GeckoLinux, Mabox Linux, Zentyal, Maui, Reborn OS, SereneLinux , SkyWave Linux, Kaisen Linux, Regata OS, TROM-Jaro, DRBL Linux, Chalet OS, Chapeau, Desa OS, BlankOn, OpenMamba, Frugalware, Kibojoe Linux, Revenge OS, Tsurugi Linux, Drauger OS, Hash Linux, gNewSense, Ikki Boot, SteamOS, Hyperbola, VyOS, EasyNAS, SuperGamer, Live Raizo, Swift Linux, RebeccaBlackOS, Daphile, CRUX, Univention, Ufficio Zero, Rescuezilla, Phoenix OS, Garuda Linux, Mll, NethServer, OSGeoLive, Easy OS, Volumio, FreedomBox, paldo, UBOS, Recalbox, batocera, Lakka, LibreELEC, Pardus Topluluk, Pinguy, KolibriOS, Elastix, Arya, Omoikane, Omarine, Endian Firewall, Hamara, Rocks Cluster, MorpheusArch, Redo, Slackel, SME Server, APODIO, Smoothwall, Dragora, Linspire, Secure-K OS, Peach OSI, Photon, Plamo, SuperX, Bicom, Ploplinux, HP SPP, LliureX, Freespire, DietPi, BOSS, Webconverger, Lunar, TENS, Source Mage, RancherOS, T2, Vine, Pisi, blackPanther, mAid, Acronis, Active.Boot, AOMEI, Boot.Repair, CAINE, DaRT, EasyUEFI, R-Drive, PrimeOS, Avira Rescue System, bitdefender, Checkra1n Linux, Lenovo Diagnostics, Clover, Bliss-OS, Lenovo BIOS Update, Arcabit Rescue Disk, MiyoLinux, TeLOS, Kerio Control, RED OS, OpenWrt, MocaccinoOS, EasyStartup, Pyabr, Refracta, Eset SysRescue, Linpack Xtreme, Archcraft, ......
|
||||
|
||||
**Unix**
|
||||
DragonFly FreeBSD pfSense GhostBSD FreeNAS TrueNAS XigmaNAS FuryBSD OPNsense HardenedBSD MidnightBSD ClonOS
|
||||
DragonFly FreeBSD pfSense GhostBSD FreeNAS TrueNAS XigmaNAS FuryBSD OPNsense HardenedBSD MidnightBSD ClonOS EmergencyBootKit
|
||||
|
||||
**ChromeOS**
|
||||
FydeOS, CloudReady
|
||||
@@ -36,6 +36,10 @@ FydeOS, CloudReady
|
||||
**Other**
|
||||
VMware ESXi, Citrix XenServer, Xen XCP-ng
|
||||
|
||||
# Tested Image Report
|
||||
[【How to report a successfully tested image file】](https://github.com/ventoy/Ventoy/issues/1195)
|
||||
|
||||
|
||||
# Features
|
||||
* 100% open source
|
||||
* Simple to use
|
||||
@@ -52,7 +56,7 @@ VMware ESXi, Citrix XenServer, Xen XCP-ng
|
||||
* FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition
|
||||
* ISO files larger than 4GB supported
|
||||
* Native boot menu style for Legacy & UEFI
|
||||
* Most type of OS supported, 730+ iso files tested
|
||||
* Most type of OS supported, 770+ iso files tested
|
||||
* Linux vDisk boot supported
|
||||
* Not only boot but also complete installation process
|
||||
* Menu dynamically switchable between List/TreeView mode
|
||||
@@ -109,4 +113,26 @@ See [https://www.ventoy.net/en/faq.html](https://www.ventoy.net/en/faq.html) for
|
||||
# Forum
|
||||
[https://forums.ventoy.net](https://forums.ventoy.net)
|
||||
|
||||
# Donation
|
||||
It would be much appreciated if you want to make a small donation to support my work!
|
||||
Alipay, WeChat Pay, PayPal and Bitcoin are avaliable for donation. You can chose any of them.
|
||||
|
||||
**Alipay**
|
||||
[https://www.ventoy.net/static/img/AliPay.png](https://www.ventoy.net/static/img/AliPay.png)
|
||||
|
||||
**WeChat Pay**
|
||||
[https://www.ventoy.net/static/img/WeChatPay.png](https://www.ventoy.net/static/img/WeChatPay.png)
|
||||
|
||||
**PayPal**
|
||||
You can transfer to my paypal account `admin@ventoy.net` or just click [https://www.paypal.me/ventoy](https://www.paypal.me/ventoy)
|
||||
|
||||
**Bitcoin**
|
||||
Bitcoin Address `19mZDWzZgzkHCi9YX9H3fYCUuCHq3W6wfT`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,22 +1,43 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ventoy2Disk", "Ventoy2Disk\Ventoy2Disk.vcxproj", "{8D231B30-65B1-48A2-A720-F659E61DD390}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31729.503
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ventoy2Disk", "Ventoy2Disk\Ventoy2Disk.vcxproj", "{8D231B30-65B1-48A2-A720-F659E61DD390}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Debug|x64.Build.0 = Debug|x64
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|ARM.Build.0 = Release|ARM
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|Win32.Build.0 = Release|Win32
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|x64.ActiveCfg = Release|x64
|
||||
{8D231B30-65B1-48A2-A720-F659E61DD390}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {46BA90D6-AD88-4760-A9BF-5B05B7941467}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
58
Ventoy2Disk/Ventoy2Disk/DiskService.h
Normal file
58
Ventoy2Disk/Ventoy2Disk/DiskService.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/******************************************************************************
|
||||
* DiskService.h
|
||||
*
|
||||
* Copyright (c) 2021, 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DISKSERVICE_H__
|
||||
#define __DISKSERVICE_H__
|
||||
|
||||
typedef struct VDS_PARA
|
||||
{
|
||||
UINT64 Attr;
|
||||
GUID Type;
|
||||
GUID Id;
|
||||
WCHAR Name[36];
|
||||
ULONG NameLen;
|
||||
ULONGLONG Offset;
|
||||
}VDS_PARA;
|
||||
|
||||
|
||||
//VDS com
|
||||
int VDS_Init(void);
|
||||
BOOL VDS_CleanDisk(int DriveIndex);
|
||||
BOOL VDS_DeleteAllPartitions(int DriveIndex);
|
||||
BOOL VDS_DeleteVtoyEFIPartition(int DriveIndex);
|
||||
BOOL VDS_ChangeVtoyEFIAttr(int DriveIndex, UINT64 Attr);
|
||||
BOOL VDS_CreateVtoyEFIPart(int DriveIndex, UINT64 Offset);
|
||||
BOOL VDS_ChangeVtoyEFI2ESP(int DriveIndex, UINT64 Offset);
|
||||
BOOL VDS_ChangeVtoyEFI2Basic(int DriveIndex, UINT64 Offset);
|
||||
BOOL VDS_FormatVtoyEFIPart(int DriveIndex, UINT64 Offset);
|
||||
BOOL VDS_ShrinkVolume(const char* VolumeGuid, UINT64 ReduceBytes);
|
||||
|
||||
//diskpart.exe
|
||||
BOOL DSPT_CleanDisk(int DriveIndex);
|
||||
|
||||
|
||||
//
|
||||
// Internel define
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
84
Ventoy2Disk/Ventoy2Disk/DiskService_diskpart.c
Normal file
84
Ventoy2Disk/Ventoy2Disk/DiskService_diskpart.c
Normal file
@@ -0,0 +1,84 @@
|
||||
/******************************************************************************
|
||||
* DiskService_diskpart.c
|
||||
*
|
||||
* Copyright (c) 2021, 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 <winternl.h>
|
||||
#include <commctrl.h>
|
||||
#include <initguid.h>
|
||||
#include <vds.h>
|
||||
#include "Ventoy2Disk.h"
|
||||
#include "DiskService.h"
|
||||
|
||||
STATIC BOOL IsDiskpartExist(void)
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
ret = IsFileExist("C:\\Windows\\system32\\diskpart.exe");
|
||||
if (!ret)
|
||||
{
|
||||
Log("diskpart.exe not exist");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
STATIC BOOL DSPT_CommProc(const char *Cmd)
|
||||
{
|
||||
CHAR CmdBuf[MAX_PATH];
|
||||
CHAR CmdFile[MAX_PATH];
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
|
||||
GetCurrentDirectoryA(sizeof(CmdBuf), CmdBuf);
|
||||
sprintf_s(CmdFile, sizeof(CmdFile), "%s\\ventoy\\diskpart_%u.txt", CmdBuf, GetCurrentProcessId());
|
||||
|
||||
SaveBufToFile(CmdFile, Cmd, (int)strlen(Cmd));
|
||||
|
||||
GetStartupInfoA(&Si);
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_HIDE;
|
||||
|
||||
sprintf_s(CmdBuf, sizeof(CmdBuf), "C:\\Windows\\system32\\diskpart.exe /s \"%s\"", CmdFile);
|
||||
|
||||
Log("CreateProcess <%s>", CmdBuf);
|
||||
CreateProcessA(NULL, CmdBuf, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
|
||||
Log("Wair process ...");
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
Log("Process finished...");
|
||||
|
||||
DeleteFileA(CmdFile);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL DSPT_CleanDisk(int DriveIndex)
|
||||
{
|
||||
CHAR CmdBuf[128];
|
||||
|
||||
Log("CleanDiskByDiskpart <%d>", DriveIndex);
|
||||
|
||||
if (!IsDiskpartExist())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
sprintf_s(CmdBuf, sizeof(CmdBuf), "select disk %d\r\nclean\r\n", DriveIndex);
|
||||
return DSPT_CommProc(CmdBuf);
|
||||
}
|
1457
Ventoy2Disk/Ventoy2Disk/DiskService_vds.c
Normal file
1457
Ventoy2Disk/Ventoy2Disk/DiskService_vds.c
Normal file
File diff suppressed because it is too large
Load Diff
27
Ventoy2Disk/Ventoy2Disk/DiskService_wmsa.c
Normal file
27
Ventoy2Disk/Ventoy2Disk/DiskService_wmsa.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/******************************************************************************
|
||||
* DiskService_wsma.c
|
||||
*
|
||||
* Copyright (c) 2021, 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 <winternl.h>
|
||||
#include <commctrl.h>
|
||||
#include <initguid.h>
|
||||
#include <vds.h>
|
||||
#include "Ventoy2Disk.h"
|
||||
#include "DiskService.h"
|
@@ -77,6 +77,12 @@ typedef enum STR_ID
|
||||
STR_VTSI_CREATE_SUCCESS, //41
|
||||
STR_VTSI_CREATE_FAILED, //42
|
||||
|
||||
STR_MENU_PART_RESIZE,//43
|
||||
STR_PART_RESIZE_TIP,//44
|
||||
STR_PART_RESIZE_SUCCESS,//45
|
||||
STR_PART_RESIZE_FAILED,//46
|
||||
STR_PART_RESIZE_UNSUPPORTED,//47
|
||||
|
||||
STR_ID_MAX
|
||||
}STR_ID;
|
||||
|
||||
@@ -90,6 +96,7 @@ extern BOOL g_SecureBoot;
|
||||
#define VTOY_MENU_PART_GPT 0xA005
|
||||
#define VTOY_MENU_ALL_DEV 0xA006
|
||||
#define VTOY_MENU_VTSI 0xA007
|
||||
#define VTOY_MENU_PART_RESIZE 0xA008
|
||||
|
||||
|
||||
typedef enum OPT_SUBMENU
|
||||
@@ -100,6 +107,7 @@ typedef enum OPT_SUBMENU
|
||||
OPT_SUBMENU_CLEAR,
|
||||
OPT_SUBMENU_ALL_DEV,
|
||||
OPT_SUBMENU_VTSI,
|
||||
OPT_SUBMENU_PART_RESIZE,
|
||||
|
||||
OPT_SUBMENU_MAX
|
||||
}OPT_SUBMENU;
|
||||
@@ -123,8 +131,8 @@ typedef enum OPT_SUBMENU
|
||||
|
||||
typedef struct VENTOY_LANGUAGE
|
||||
{
|
||||
WCHAR Name[128];
|
||||
WCHAR FontFamily[64];
|
||||
WCHAR Name[256];
|
||||
WCHAR FontFamily[128];
|
||||
int FontSize;
|
||||
|
||||
WCHAR StrId[STR_ID_MAX][64];
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,8 @@
|
||||
/******************************************************************************
|
||||
* Utility.c
|
||||
*
|
||||
* Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||
* Copyright (c) 2021, longpanda <admin@ventoy.net>
|
||||
* Copyright (c) 2011-2020, Pete Batard <pete@akeo.ie>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -20,6 +21,25 @@
|
||||
#include <Windows.h>
|
||||
#include "Ventoy2Disk.h"
|
||||
|
||||
void TraceOut(const char *Fmt, ...)
|
||||
{
|
||||
va_list Arg;
|
||||
int Len = 0;
|
||||
FILE *File = NULL;
|
||||
char szBuf[1024];
|
||||
|
||||
va_start(Arg, Fmt);
|
||||
Len += vsnprintf_s(szBuf + Len, sizeof(szBuf)-Len, sizeof(szBuf)-Len, Fmt, Arg);
|
||||
va_end(Arg);
|
||||
|
||||
fopen_s(&File, VENTOY_FILE_LOG, "a+");
|
||||
if (File)
|
||||
{
|
||||
fwrite(szBuf, 1, Len, File);
|
||||
fclose(File);
|
||||
}
|
||||
}
|
||||
|
||||
void Log(const char *Fmt, ...)
|
||||
{
|
||||
va_list Arg;
|
||||
@@ -92,6 +112,22 @@ BOOL IsPathExist(BOOL Dir, const char *Fmt, ...)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int SaveBufToFile(const CHAR *FileName, const void *Buffer, int BufLen)
|
||||
{
|
||||
FILE *File = NULL;
|
||||
void *Data = NULL;
|
||||
|
||||
fopen_s(&File, FileName, "wb");
|
||||
if (File == NULL)
|
||||
{
|
||||
Log("Failed to open file %s", FileName);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fwrite(Buffer, 1, BufLen, File);
|
||||
fclose(File);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ReadWholeFileToBuf(const CHAR *FileName, int ExtLen, void **Bufer, int *BufLen)
|
||||
{
|
||||
@@ -205,73 +241,263 @@ BOOL IsWow64(void)
|
||||
return bIsWow64;
|
||||
}
|
||||
|
||||
void DumpWindowsVersion(void)
|
||||
/*
|
||||
* Some code and functions in the file are copied from rufus.
|
||||
* https://github.com/pbatard/rufus
|
||||
*/
|
||||
|
||||
/* Windows versions */
|
||||
enum WindowsVersion {
|
||||
WINDOWS_UNDEFINED = -1,
|
||||
WINDOWS_UNSUPPORTED = 0,
|
||||
WINDOWS_XP = 0x51,
|
||||
WINDOWS_2003 = 0x52, // Also XP_64
|
||||
WINDOWS_VISTA = 0x60, // Also Server 2008
|
||||
WINDOWS_7 = 0x61, // Also Server 2008_R2
|
||||
WINDOWS_8 = 0x62, // Also Server 2012
|
||||
WINDOWS_8_1 = 0x63, // Also Server 2012_R2
|
||||
WINDOWS_10_PREVIEW1 = 0x64,
|
||||
WINDOWS_10 = 0xA0, // Also Server 2016, also Server 2019
|
||||
WINDOWS_11 = 0xB0, // Also Server 2022
|
||||
WINDOWS_MAX
|
||||
};
|
||||
|
||||
static const char* GetEdition(DWORD ProductType)
|
||||
{
|
||||
int Bit;
|
||||
BOOL WsVer;
|
||||
DWORD Major, Minor;
|
||||
ULONGLONG MajorEqual, MinorEqual;
|
||||
OSVERSIONINFOEXA Ver1, Ver2;
|
||||
const CHAR *Ver = NULL;
|
||||
CHAR WinVer[256] = { 0 };
|
||||
// From: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo
|
||||
// These values can be found in the winnt.h header.
|
||||
switch (ProductType) {
|
||||
case 0x00000000: return ""; // Undefined
|
||||
case 0x00000001: return "Ultimate";
|
||||
case 0x00000002: return "Home Basic";
|
||||
case 0x00000003: return "Home Premium";
|
||||
case 0x00000004: return "Enterprise";
|
||||
case 0x00000005: return "Home Basic N";
|
||||
case 0x00000006: return "Business";
|
||||
case 0x00000007: return "Server Standard";
|
||||
case 0x00000008: return "Server Datacenter";
|
||||
case 0x00000009: return "Smallbusiness Server";
|
||||
case 0x0000000A: return "Server Enterprise";
|
||||
case 0x0000000B: return "Starter";
|
||||
case 0x0000000C: return "Server Datacenter (Core)";
|
||||
case 0x0000000D: return "Server Standard (Core)";
|
||||
case 0x0000000E: return "Server Enterprise (Core)";
|
||||
case 0x00000010: return "Business N";
|
||||
case 0x00000011: return "Web Server";
|
||||
case 0x00000012: return "HPC Edition";
|
||||
case 0x00000013: return "Storage Server (Essentials)";
|
||||
case 0x0000001A: return "Home Premium N";
|
||||
case 0x0000001B: return "Enterprise N";
|
||||
case 0x0000001C: return "Ultimate N";
|
||||
case 0x00000022: return "Home Server";
|
||||
case 0x00000024: return "Server Standard without Hyper-V";
|
||||
case 0x00000025: return "Server Datacenter without Hyper-V";
|
||||
case 0x00000026: return "Server Enterprise without Hyper-V";
|
||||
case 0x00000027: return "Server Datacenter without Hyper-V (Core)";
|
||||
case 0x00000028: return "Server Standard without Hyper-V (Core)";
|
||||
case 0x00000029: return "Server Enterprise without Hyper-V (Core)";
|
||||
case 0x0000002A: return "Hyper-V Server";
|
||||
case 0x0000002F: return "Starter N";
|
||||
case 0x00000030: return "Pro";
|
||||
case 0x00000031: return "Pro N";
|
||||
case 0x00000034: return "Server Solutions Premium";
|
||||
case 0x00000035: return "Server Solutions Premium (Core)";
|
||||
case 0x00000040: return "Server Hyper Core V";
|
||||
case 0x00000042: return "Starter E";
|
||||
case 0x00000043: return "Home Basic E";
|
||||
case 0x00000044: return "Premium E";
|
||||
case 0x00000045: return "Pro E";
|
||||
case 0x00000046: return "Enterprise E";
|
||||
case 0x00000047: return "Ultimate E";
|
||||
case 0x00000048: return "Enterprise (Eval)";
|
||||
case 0x0000004F: return "Server Standard (Eval)";
|
||||
case 0x00000050: return "Server Datacenter (Eval)";
|
||||
case 0x00000054: return "Enterprise N (Eval)";
|
||||
case 0x00000057: return "Thin PC";
|
||||
case 0x00000058: case 0x00000059: case 0x0000005A: case 0x0000005B: case 0x0000005C: return "Embedded";
|
||||
case 0x00000062: return "Home N";
|
||||
case 0x00000063: return "Home China";
|
||||
case 0x00000064: return "Home Single Language";
|
||||
case 0x00000065: return "Home";
|
||||
case 0x00000067: return "Pro with Media Center";
|
||||
case 0x00000069: case 0x0000006A: case 0x0000006B: case 0x0000006C: return "Embedded";
|
||||
case 0x0000006F: return "Home Connected";
|
||||
case 0x00000070: return "Pro Student";
|
||||
case 0x00000071: return "Home Connected N";
|
||||
case 0x00000072: return "Pro Student N";
|
||||
case 0x00000073: return "Home Connected Single Language";
|
||||
case 0x00000074: return "Home Connected China";
|
||||
case 0x00000079: return "Education";
|
||||
case 0x0000007A: return "Education N";
|
||||
case 0x0000007D: return "Enterprise LTSB";
|
||||
case 0x0000007E: return "Enterprise LTSB N";
|
||||
case 0x0000007F: return "Pro S";
|
||||
case 0x00000080: return "Pro S N";
|
||||
case 0x00000081: return "Enterprise LTSB (Eval)";
|
||||
case 0x00000082: return "Enterprise LTSB N (Eval)";
|
||||
case 0x0000008A: return "Pro Single Language";
|
||||
case 0x0000008B: return "Pro China";
|
||||
case 0x0000008C: return "Enterprise Subscription";
|
||||
case 0x0000008D: return "Enterprise Subscription N";
|
||||
case 0x00000091: return "Server Datacenter SA (Core)";
|
||||
case 0x00000092: return "Server Standard SA (Core)";
|
||||
case 0x00000095: return "Utility VM";
|
||||
case 0x000000A1: return "Pro for Workstations";
|
||||
case 0x000000A2: return "Pro for Workstations N";
|
||||
case 0x000000A4: return "Pro for Education";
|
||||
case 0x000000A5: return "Pro for Education N";
|
||||
case 0x000000AB: return "Enterprise G"; // I swear Microsoft are just making up editions...
|
||||
case 0x000000AC: return "Enterprise G N";
|
||||
case 0x000000B6: return "Home OS";
|
||||
case 0x000000B7: return "Cloud E";
|
||||
case 0x000000B8: return "Cloud E N";
|
||||
case 0x000000BD: return "Lite";
|
||||
case 0xABCDABCD: return "(Unlicensed)";
|
||||
default: return "(Unknown Edition)";
|
||||
}
|
||||
}
|
||||
|
||||
memset(&Ver1, 0, sizeof(Ver1));
|
||||
memset(&Ver2, 0, sizeof(Ver2));
|
||||
#define is_x64 IsWow64
|
||||
#define static_strcpy safe_strcpy
|
||||
#define REGKEY_HKCU HKEY_CURRENT_USER
|
||||
#define REGKEY_HKLM HKEY_LOCAL_MACHINE
|
||||
static int nWindowsVersion = WINDOWS_UNDEFINED;
|
||||
static int nWindowsBuildNumber = -1;
|
||||
static char WindowsVersionStr[128] = "";
|
||||
|
||||
/* Helpers for 32 bit registry operations */
|
||||
|
||||
/*
|
||||
* Read a generic registry key value. If a short key_name is used, assume that
|
||||
* it belongs to the application and create the app subkey if required
|
||||
*/
|
||||
static __inline BOOL _GetRegistryKey(HKEY key_root, const char* key_name, DWORD reg_type,
|
||||
LPBYTE dest, DWORD dest_size)
|
||||
{
|
||||
const char software_prefix[] = "SOFTWARE\\";
|
||||
char long_key_name[MAX_PATH] = { 0 };
|
||||
BOOL r = FALSE;
|
||||
size_t i;
|
||||
LONG s;
|
||||
HKEY hSoftware = NULL, hApp = NULL;
|
||||
DWORD dwType = -1, dwSize = dest_size;
|
||||
|
||||
memset(dest, 0, dest_size);
|
||||
|
||||
if (key_name == NULL)
|
||||
return FALSE;
|
||||
|
||||
for (i = strlen(key_name); i>0; i--) {
|
||||
if (key_name[i] == '\\')
|
||||
break;
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
// Prefix with "SOFTWARE" if needed
|
||||
if (_strnicmp(key_name, software_prefix, sizeof(software_prefix)-1) != 0) {
|
||||
if (i + sizeof(software_prefix) >= sizeof(long_key_name))
|
||||
return FALSE;
|
||||
strcpy_s(long_key_name, sizeof(long_key_name), software_prefix);
|
||||
strcat_s(long_key_name, sizeof(long_key_name), key_name);
|
||||
long_key_name[sizeof(software_prefix)+i - 1] = 0;
|
||||
}
|
||||
else {
|
||||
if (i >= sizeof(long_key_name))
|
||||
return FALSE;
|
||||
static_strcpy(long_key_name, key_name);
|
||||
long_key_name[i] = 0;
|
||||
}
|
||||
i++;
|
||||
if (RegOpenKeyExA(key_root, long_key_name, 0, KEY_READ, &hApp) != ERROR_SUCCESS) {
|
||||
hApp = NULL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (RegOpenKeyExA(key_root, "SOFTWARE", 0, KEY_READ | KEY_CREATE_SUB_KEY, &hSoftware) != ERROR_SUCCESS) {
|
||||
hSoftware = NULL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
s = RegQueryValueExA(hApp, &key_name[i], NULL, &dwType, (LPBYTE)dest, &dwSize);
|
||||
// No key means default value of 0 or empty string
|
||||
if ((s == ERROR_FILE_NOT_FOUND) || ((s == ERROR_SUCCESS) && (dwType == reg_type) && (dwSize > 0))) {
|
||||
r = TRUE;
|
||||
}
|
||||
out:
|
||||
if (hSoftware != NULL)
|
||||
RegCloseKey(hSoftware);
|
||||
if (hApp != NULL)
|
||||
RegCloseKey(hApp);
|
||||
return r;
|
||||
}
|
||||
|
||||
#define GetRegistryKey32(root, key, pval) _GetRegistryKey(root, key, REG_DWORD, (LPBYTE)pval, sizeof(DWORD))
|
||||
static __inline INT32 ReadRegistryKey32(HKEY root, const char* key) {
|
||||
DWORD val;
|
||||
GetRegistryKey32(root, key, &val);
|
||||
return (INT32)val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Modified from smartmontools' os_win32.cpp
|
||||
*/
|
||||
void GetWindowsVersion(void)
|
||||
{
|
||||
OSVERSIONINFOEXA vi, vi2;
|
||||
DWORD dwProductType;
|
||||
const char* w = 0;
|
||||
const char* w64 = "32 bit";
|
||||
char *vptr;
|
||||
size_t vlen;
|
||||
unsigned major, minor;
|
||||
ULONGLONG major_equal, minor_equal;
|
||||
BOOL ws;
|
||||
|
||||
nWindowsVersion = WINDOWS_UNDEFINED;
|
||||
static_strcpy(WindowsVersionStr, "Windows Undefined");
|
||||
|
||||
Ver1.dwOSVersionInfoSize = sizeof(Ver1);
|
||||
|
||||
// suppress the C4996 warning for GetVersionExA
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4996)
|
||||
if (!GetVersionExA((OSVERSIONINFOA *)&Ver1))
|
||||
{
|
||||
memset(&Ver1, 0, sizeof(Ver1));
|
||||
Ver1.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
||||
if (!GetVersionExA((OSVERSIONINFOA *)&Ver1))
|
||||
{
|
||||
|
||||
memset(&vi, 0, sizeof(vi));
|
||||
vi.dwOSVersionInfoSize = sizeof(vi);
|
||||
if (!GetVersionExA((OSVERSIONINFOA *)&vi)) {
|
||||
memset(&vi, 0, sizeof(vi));
|
||||
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
||||
if (!GetVersionExA((OSVERSIONINFOA *)&vi))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
if (Ver1.dwPlatformId == VER_PLATFORM_WIN32_NT)
|
||||
{
|
||||
if (Ver1.dwMajorVersion > 6 || (Ver1.dwMajorVersion == 6 && Ver1.dwMinorVersion >= 2))
|
||||
{
|
||||
// GetVersionEx() has problem on some Windows version
|
||||
if (vi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
|
||||
|
||||
MajorEqual = VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL);
|
||||
for (Major = Ver1.dwMajorVersion; Major <= 9; Major++)
|
||||
{
|
||||
memset(&Ver2, 0, sizeof(Ver2));
|
||||
Ver2.dwOSVersionInfoSize = sizeof(Ver2);
|
||||
Ver2.dwMajorVersion = Major;
|
||||
if (vi.dwMajorVersion > 6 || (vi.dwMajorVersion == 6 && vi.dwMinorVersion >= 2)) {
|
||||
// Starting with Windows 8.1 Preview, GetVersionEx() does no longer report the actual OS version
|
||||
// See: http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx
|
||||
// And starting with Windows 10 Preview 2, Windows enforces the use of the application/supportedOS
|
||||
// manifest in order for VerSetConditionMask() to report the ACTUAL OS major and minor...
|
||||
|
||||
if (!VerifyVersionInfoA(&Ver2, VER_MAJORVERSION, MajorEqual))
|
||||
{
|
||||
major_equal = VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL);
|
||||
for (major = vi.dwMajorVersion; major <= 9; major++) {
|
||||
memset(&vi2, 0, sizeof(vi2));
|
||||
vi2.dwOSVersionInfoSize = sizeof(vi2); vi2.dwMajorVersion = major;
|
||||
if (!VerifyVersionInfoA(&vi2, VER_MAJORVERSION, major_equal))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Ver1.dwMajorVersion < Major)
|
||||
{
|
||||
Ver1.dwMajorVersion = Major;
|
||||
Ver1.dwMinorVersion = 0;
|
||||
if (vi.dwMajorVersion < major) {
|
||||
vi.dwMajorVersion = major; vi.dwMinorVersion = 0;
|
||||
}
|
||||
|
||||
MinorEqual = VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL);
|
||||
for (Minor = Ver1.dwMinorVersion; Minor <= 9; Minor++)
|
||||
{
|
||||
memset(&Ver2, 0, sizeof(Ver2));
|
||||
|
||||
Ver2.dwOSVersionInfoSize = sizeof(Ver2);
|
||||
Ver2.dwMinorVersion = Minor;
|
||||
|
||||
if (!VerifyVersionInfoA(&Ver2, VER_MINORVERSION, MinorEqual))
|
||||
{
|
||||
minor_equal = VerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL);
|
||||
for (minor = vi.dwMinorVersion; minor <= 9; minor++) {
|
||||
memset(&vi2, 0, sizeof(vi2)); vi2.dwOSVersionInfoSize = sizeof(vi2);
|
||||
vi2.dwMinorVersion = minor;
|
||||
if (!VerifyVersionInfoA(&vi2, VER_MINORVERSION, minor_equal))
|
||||
continue;
|
||||
}
|
||||
|
||||
Ver1.dwMinorVersion = Minor;
|
||||
vi.dwMinorVersion = minor;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -279,87 +505,85 @@ void DumpWindowsVersion(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (Ver1.dwMajorVersion <= 0xF && Ver1.dwMinorVersion <= 0xF)
|
||||
{
|
||||
WsVer = (Ver1.wProductType <= VER_NT_WORKSTATION);
|
||||
switch ((Ver1.dwMajorVersion << 4) | Ver2.dwMinorVersion)
|
||||
{
|
||||
case 0x51:
|
||||
{
|
||||
Ver = "XP";
|
||||
break;
|
||||
}
|
||||
case 0x52:
|
||||
{
|
||||
Ver = GetSystemMetrics(89) ? "Server 2003 R2" : "Server 2003";
|
||||
break;
|
||||
}
|
||||
case 0x60:
|
||||
{
|
||||
Ver = WsVer ? "Vista" : "Server 2008";
|
||||
break;
|
||||
}
|
||||
case 0x61:
|
||||
{
|
||||
Ver = WsVer ? "7" : "Server 2008 R2";
|
||||
break;
|
||||
}
|
||||
case 0x62:
|
||||
{
|
||||
Ver = WsVer ? "8" : "Server 2012";
|
||||
break;
|
||||
}
|
||||
case 0x63:
|
||||
{
|
||||
Ver = WsVer ? "8.1" : "Server 2012 R2";
|
||||
break;
|
||||
}
|
||||
case 0x64:
|
||||
{
|
||||
Ver = WsVer ? "10 (Preview 1)" : "Server 10 (Preview 1)";
|
||||
break;
|
||||
}
|
||||
case 0xA0:
|
||||
{
|
||||
Ver = WsVer ? "10" : ((Ver1.dwBuildNumber > 15000) ? "Server 2019" : "Server 2016");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Ver = "10 or later";
|
||||
if (vi.dwMajorVersion <= 0xf && vi.dwMinorVersion <= 0xf) {
|
||||
ws = (vi.wProductType <= VER_NT_WORKSTATION);
|
||||
nWindowsVersion = vi.dwMajorVersion << 4 | vi.dwMinorVersion;
|
||||
switch (nWindowsVersion) {
|
||||
case WINDOWS_XP: w = "XP";
|
||||
break;
|
||||
case WINDOWS_2003: w = (ws ? "XP_64" : (!GetSystemMetrics(89) ? "Server 2003" : "Server 2003_R2"));
|
||||
break;
|
||||
case WINDOWS_VISTA: w = (ws ? "Vista" : "Server 2008");
|
||||
break;
|
||||
case WINDOWS_7: w = (ws ? "7" : "Server 2008_R2");
|
||||
break;
|
||||
case WINDOWS_8: w = (ws ? "8" : "Server 2012");
|
||||
break;
|
||||
case WINDOWS_8_1: w = (ws ? "8.1" : "Server 2012_R2");
|
||||
break;
|
||||
case WINDOWS_10_PREVIEW1: w = (ws ? "10 (Preview 1)" : "Server 10 (Preview 1)");
|
||||
break;
|
||||
// Starting with Windows 10 Preview 2, the major is the same as the public-facing version
|
||||
case WINDOWS_10:
|
||||
if (vi.dwBuildNumber < 20000) {
|
||||
w = (ws ? "10" : ((vi.dwBuildNumber < 17763) ? "Server 2016" : "Server 2019"));
|
||||
break;
|
||||
}
|
||||
nWindowsVersion = WINDOWS_11;
|
||||
// Fall through
|
||||
case WINDOWS_11: w = (ws ? "11" : "Server 2022");
|
||||
break;
|
||||
default:
|
||||
if (nWindowsVersion < WINDOWS_XP)
|
||||
nWindowsVersion = WINDOWS_UNSUPPORTED;
|
||||
else
|
||||
w = "12 or later";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Bit = IsWow64() ? 64 : 32;
|
||||
if (is_x64())
|
||||
w64 = "64-bit";
|
||||
|
||||
if (Ver1.wServicePackMinor)
|
||||
{
|
||||
safe_sprintf(WinVer, "Windows %s SP%u.%u %d-bit", Ver, Ver1.wServicePackMajor, Ver1.wServicePackMinor, Bit);
|
||||
}
|
||||
else if (Ver1.wServicePackMajor)
|
||||
{
|
||||
safe_sprintf(WinVer, "Windows %s SP%u %d-bit", Ver, Ver1.wServicePackMajor, Bit);
|
||||
}
|
||||
GetProductInfo(vi.dwMajorVersion, vi.dwMinorVersion, vi.wServicePackMajor, vi.wServicePackMinor, &dwProductType);
|
||||
vptr = WindowsVersionStr;
|
||||
vlen = sizeof(WindowsVersionStr) - 1;
|
||||
|
||||
if (!w)
|
||||
sprintf_s(vptr, vlen, "%s %u.%u %s", (vi.dwPlatformId == VER_PLATFORM_WIN32_NT ? "NT" : "??"),
|
||||
(unsigned)vi.dwMajorVersion, (unsigned)vi.dwMinorVersion, w64);
|
||||
else if (vi.wServicePackMinor)
|
||||
sprintf_s(vptr, vlen, "%s SP%u.%u %s", w, vi.wServicePackMajor, vi.wServicePackMinor, w64);
|
||||
else if (vi.wServicePackMajor)
|
||||
sprintf_s(vptr, vlen, "%s SP%u %s", w, vi.wServicePackMajor, w64);
|
||||
else
|
||||
{
|
||||
safe_sprintf(WinVer, "Windows %s %d-bit", Ver, Bit);
|
||||
}
|
||||
sprintf_s(vptr, vlen, "%s%s%s, %s",
|
||||
w, (dwProductType != PRODUCT_UNDEFINED) ? " " : "", GetEdition(dwProductType), w64);
|
||||
|
||||
if (((Ver1.dwMajorVersion << 4) | Ver2.dwMinorVersion) >= 0x62)
|
||||
{
|
||||
Log("Windows Version : %s (Build %u)", WinVer, Ver1.dwBuildNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Windows Version : %s", WinVer);
|
||||
// Add the build number (including UBR if available) for Windows 8.0 and later
|
||||
nWindowsBuildNumber = vi.dwBuildNumber;
|
||||
if (nWindowsVersion >= 0x62) {
|
||||
int nUbr = ReadRegistryKey32(REGKEY_HKLM, "Software\\Microsoft\\Windows NT\\CurrentVersion\\UBR");
|
||||
vptr = WindowsVersionStr + strlen(WindowsVersionStr);
|
||||
vlen = sizeof(WindowsVersionStr) - strlen(WindowsVersionStr) - 1;
|
||||
if (nUbr > 0)
|
||||
sprintf_s(vptr, vlen, " (Build %d.%d)", nWindowsBuildNumber, nUbr);
|
||||
else
|
||||
sprintf_s(vptr, vlen, " (Build %d)", nWindowsBuildNumber);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DumpWindowsVersion(void)
|
||||
{
|
||||
GetWindowsVersion();
|
||||
Log("Windows Version: <<Windows %s>>", WindowsVersionStr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
BOOL IsVentoyLogicalDrive(CHAR DriveLetter)
|
||||
{
|
||||
int i;
|
||||
@@ -443,6 +667,7 @@ int VentoyFillMBR(UINT64 DiskSizeBytes, MBR_HEAD *pMBR, int PartStyle)
|
||||
Log("Disk signature: 0x%08x", DiskSignature);
|
||||
|
||||
*((UINT32 *)(pMBR->BootCode + 0x1B8)) = DiskSignature;
|
||||
memcpy(pMBR->BootCode + 0x180, &Guid, 16);
|
||||
|
||||
if (DiskSizeBytes / 512 > 0xFFFFFFFF)
|
||||
{
|
||||
@@ -519,6 +744,7 @@ static int VentoyFillProtectMBR(UINT64 DiskSizeBytes, MBR_HEAD *pMBR)
|
||||
Log("Disk signature: 0x%08x", DiskSignature);
|
||||
|
||||
*((UINT32 *)(pMBR->BootCode + 0x1B8)) = DiskSignature;
|
||||
memcpy(pMBR->BootCode + 0x180, &Guid, 16);
|
||||
|
||||
DiskSectorCount = DiskSizeBytes / 512 - 1;
|
||||
if (DiskSectorCount > 0xFFFFFFFF)
|
||||
|
Binary file not shown.
@@ -71,7 +71,7 @@ int ParseCmdLineOption(LPSTR lpCmdLine)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes, MBR_HEAD *pMBR, UINT64 *Part2StartSector)
|
||||
static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes, MBR_HEAD *pMBR, UINT64 *Part2StartSector, UINT64 *GptPart2Attr)
|
||||
{
|
||||
int i;
|
||||
BOOL bRet;
|
||||
@@ -110,7 +110,7 @@ static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes, MBR_HEAD *pMBR, UIN
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
Log("=========== Partition Table %d ============", i + 1);
|
||||
Log("=========== Disk%d Partition Table %d ============", PhyDrive, i + 1);
|
||||
Log("PartTbl.Active = 0x%x", MBR.PartTbl[i].Active);
|
||||
Log("PartTbl.FsFlag = 0x%x", MBR.PartTbl[i].FsFlag);
|
||||
Log("PartTbl.StartSectorId = %u", MBR.PartTbl[i].StartSectorId);
|
||||
@@ -149,7 +149,15 @@ static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes, MBR_HEAD *pMBR, UIN
|
||||
|
||||
if (memcmp(pGpt->PartTbl[1].Name, L"VTOYEFI", 7 * 2))
|
||||
{
|
||||
Log("Invalid ventoy efi part name");
|
||||
if (pGpt->PartTbl[1].Name[0])
|
||||
{
|
||||
Log("Invalid ventoy efi part name <%S>", pGpt->PartTbl[1].Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Invalid ventoy efi part name <null>");
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -170,6 +178,7 @@ static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes, MBR_HEAD *pMBR, UIN
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*GptPart2Attr = pGpt->PartTbl[1].Attr;
|
||||
*Part2StartSector = pGpt->PartTbl[1].StartLBA;
|
||||
|
||||
memcpy(pMBR, &(pGpt->MBR), sizeof(MBR_HEAD));
|
||||
@@ -225,6 +234,7 @@ static int FilterPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)
|
||||
int Letter = 'A';
|
||||
int Id = 0;
|
||||
int LetterCount = 0;
|
||||
UINT64 Part2GPTAttr = 0;
|
||||
UINT64 Part2StartSector = 0;
|
||||
PHY_DRIVE_INFO *CurDrive;
|
||||
MBR_HEAD MBR;
|
||||
@@ -236,7 +246,7 @@ static int FilterPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)
|
||||
if (LogDrive & 0x01)
|
||||
{
|
||||
LogLetter[LetterCount] = Letter;
|
||||
PhyDriveId[LetterCount] = GetPhyDriveByLogicalDrive(Letter);
|
||||
PhyDriveId[LetterCount] = GetPhyDriveByLogicalDrive(Letter, NULL);
|
||||
|
||||
Log("Logical Drive:%C ===> PhyDrive:%d", LogLetter[LetterCount], PhyDriveId[LetterCount]);
|
||||
LetterCount++;
|
||||
@@ -247,6 +257,7 @@ static int FilterPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)
|
||||
|
||||
for (i = 0; i < DriveCount; i++)
|
||||
{
|
||||
Part2GPTAttr = 0;
|
||||
CurDrive = pDriveList + i;
|
||||
|
||||
CurDrive->Id = -1;
|
||||
@@ -278,10 +289,11 @@ static int FilterPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)
|
||||
}
|
||||
}
|
||||
|
||||
if (IsVentoyPhyDrive(CurDrive->PhyDrive, CurDrive->SizeInBytes, &MBR, &Part2StartSector))
|
||||
if (IsVentoyPhyDrive(CurDrive->PhyDrive, CurDrive->SizeInBytes, &MBR, &Part2StartSector, &Part2GPTAttr))
|
||||
{
|
||||
memcpy(&(CurDrive->MBR), &MBR, sizeof(MBR));
|
||||
CurDrive->PartStyle = (MBR.PartTbl[0].FsFlag == 0xEE) ? 1 : 0;
|
||||
CurDrive->Part2GPTAttr = Part2GPTAttr;
|
||||
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);
|
||||
|
||||
@@ -320,6 +332,23 @@ PHY_DRIVE_INFO * GetPhyDriveInfoById(int Id)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
PHY_DRIVE_INFO * GetPhyDriveInfoByPhyDrive(int PhyDrive)
|
||||
{
|
||||
DWORD i;
|
||||
for (i = 0; i < g_PhyDriveCount; i++)
|
||||
{
|
||||
if (g_PhyDriveList[i].PhyDrive == PhyDrive)
|
||||
{
|
||||
return g_PhyDriveList + i;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int SortPhysicalDrive(PHY_DRIVE_INFO *pDriveList, DWORD DriveCount)
|
||||
{
|
||||
DWORD i, j;
|
||||
@@ -386,5 +415,8 @@ int Ventoy2DiskInit(void)
|
||||
int Ventoy2DiskDestroy(void)
|
||||
{
|
||||
free(g_PhyDriveList);
|
||||
g_PhyDriveList = NULL;
|
||||
g_PhyDriveCount = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define SIZE_1GB (1024 * 1024 * 1024)
|
||||
#define SIZE_1MB (1024 * 1024)
|
||||
#define SIZE_2MB (2048 * 1024)
|
||||
#define VENTOY_EFI_PART_SIZE (32 * SIZE_1MB)
|
||||
@@ -43,6 +44,15 @@
|
||||
#define safe_sprintf(dst, fmt, ...) sprintf_s(dst, sizeof(dst), fmt, __VA_ARGS__)
|
||||
#define safe_strcpy(dst, src) strcpy_s(dst, sizeof(dst), src)
|
||||
|
||||
#define CHECK_FREE(p) \
|
||||
{\
|
||||
if (p)\
|
||||
{\
|
||||
free(p); \
|
||||
(p) = NULL; \
|
||||
}\
|
||||
}
|
||||
|
||||
#define CHECK_CLOSE_HANDLE(Handle) \
|
||||
{\
|
||||
if (Handle != INVALID_HANDLE_VALUE) \
|
||||
@@ -53,6 +63,7 @@
|
||||
}
|
||||
|
||||
#define LASTERR GetLastError()
|
||||
#define RET_LASTERR (ret ? 0 : LASTERR)
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct PART_TABLE
|
||||
@@ -153,12 +164,20 @@ typedef struct PHY_DRIVE_INFO
|
||||
|
||||
BOOL SecureBootSupport;
|
||||
MBR_HEAD MBR;
|
||||
UINT64 Part2GPTAttr;
|
||||
|
||||
BOOL ResizeNoShrink;
|
||||
CHAR ResizeVolumeGuid[64];
|
||||
CHAR FsName[64];
|
||||
UINT64 ResizePart2StartSector;
|
||||
VTOY_GPT_INFO Gpt;
|
||||
|
||||
}PHY_DRIVE_INFO;
|
||||
|
||||
typedef enum PROGRESS_POINT
|
||||
{
|
||||
PT_START = 0,
|
||||
PT_LOCK_FOR_CLEAN,
|
||||
PT_LOCK_FOR_CLEAN = 8,
|
||||
PT_DEL_ALL_PART,
|
||||
PT_LOCK_FOR_WRITE,
|
||||
PT_FORMAT_PART1,
|
||||
@@ -185,6 +204,9 @@ extern HFONT g_language_normal_font;
|
||||
extern HFONT g_language_bold_font;
|
||||
extern int g_FilterUSB;
|
||||
|
||||
|
||||
|
||||
void TraceOut(const char *Fmt, ...);
|
||||
void Log(const char *Fmt, ...);
|
||||
BOOL IsPathExist(BOOL Dir, const char *Fmt, ...);
|
||||
void DumpWindowsVersion(void);
|
||||
@@ -201,17 +223,20 @@ BOOL IsVentoyLogicalDrive(CHAR DriveLetter);
|
||||
int GetRegDwordValue(HKEY Key, LPCSTR SubKey, LPCSTR ValueName, DWORD *pValue);
|
||||
int GetPhysicalDriveCount(void);
|
||||
int GetAllPhysicalDriveInfo(PHY_DRIVE_INFO *pDriveList, DWORD *pDriveCount);
|
||||
int GetPhyDriveByLogicalDrive(int DriveLetter);
|
||||
int GetPhyDriveByLogicalDrive(int DriveLetter, UINT64*Offset);
|
||||
int GetVentoyVerInPhyDrive(const PHY_DRIVE_INFO *pDriveInfo, UINT64 Part2StartSector, CHAR *VerBuf, size_t BufLen, BOOL *pSecureBoot);
|
||||
int Ventoy2DiskInit(void);
|
||||
int Ventoy2DiskDestroy(void);
|
||||
PHY_DRIVE_INFO * GetPhyDriveInfoById(int Id);
|
||||
PHY_DRIVE_INFO * GetPhyDriveInfoByPhyDrive(int PhyDrive);
|
||||
int ParseCmdLineOption(LPSTR lpCmdLine);
|
||||
int InstallVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive, int PartStyle);
|
||||
int UpdateVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive);
|
||||
int InstallVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive, int PartStyle, int TryId);
|
||||
int PartitionResizeForVentoy(PHY_DRIVE_INFO *pPhyDrive);
|
||||
int UpdateVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive, int TryId);
|
||||
int VentoyFillBackupGptHead(VTOY_GPT_INFO *pInfo, VTOY_GPT_HDR *pHead);
|
||||
int VentoyFillWholeGpt(UINT64 DiskSizeBytes, VTOY_GPT_INFO *pInfo);
|
||||
void SetProgressBarPos(int Pos);
|
||||
int SaveBufToFile(const CHAR *FileName, const void *Buffer, int BufLen);
|
||||
int ReadWholeFileToBuf(const CHAR *FileName, int ExtLen, void **Bufer, int *BufLen);
|
||||
int INIT unxz(unsigned char *in, int in_size,
|
||||
int(*fill)(void *dest, unsigned int size),
|
||||
@@ -226,6 +251,7 @@ 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);
|
||||
UINT32 VentoyCrc32(void *Buffer, UINT32 Length);
|
||||
BOOL PartResizePreCheck(PHY_DRIVE_INFO** ppPhyDrive);
|
||||
|
||||
#define SET_FILE_POS(pos) \
|
||||
liCurrentPosition.QuadPart = pos; \
|
||||
@@ -284,12 +310,15 @@ typedef struct {
|
||||
#pragma pack()
|
||||
extern int __static_assert__[sizeof(VTSI_FOOTER) == 512 ? 1 : -1];
|
||||
|
||||
extern HWND g_DialogHwnd;
|
||||
|
||||
#define SAFE_FREE(ptr) if (ptr) { free(ptr); (ptr) = NULL; }
|
||||
int InstallVentoy2FileImage(PHY_DRIVE_INFO *pPhyDrive, int PartStyle);
|
||||
void disk_io_set_imghook(FILE *fp, VTSI_SEGMENT *segment, int maxseg, UINT64 data_offset);
|
||||
void disk_io_reset_imghook(int *psegnum, UINT64 *pDataOffset);
|
||||
|
||||
HANDLE GetPhysicalHandle(int Drive, BOOLEAN bLockDrive, BOOLEAN bWriteAccess, BOOLEAN bWriteShare);
|
||||
void InitComboxCtrl(HWND hWnd, int PhyDrive);
|
||||
|
||||
#define VTSI_SUPPORT 1
|
||||
|
||||
|
Binary file not shown.
@@ -1,31 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{8D231B30-65B1-48A2-A720-F659E61DD390}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Ventoy2Disk</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -35,18 +99,71 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
<IncludePath>$(ProjectDir)\fat_io_lib\;$(ProjectDir)\xz-embedded-20130513\linux\include;$(ProjectDir)\xz-embedded-20130513\linux\include\linux;$(ProjectDir)\xz-embedded-20130513\userspace;$(ProjectDir)\ff14\source;$(IncludePath)</IncludePath>
|
||||
<TargetName>Ventoy2Disk</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
<IncludePath>$(ProjectDir)\fat_io_lib\;$(ProjectDir)\xz-embedded-20130513\linux\include;$(ProjectDir)\xz-embedded-20130513\linux\include\linux;$(ProjectDir)\xz-embedded-20130513\userspace;$(ProjectDir)\ff14\source;$(IncludePath)</IncludePath>
|
||||
<TargetName>Ventoy2Disk_ARM</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
<IncludePath>$(ProjectDir)\fat_io_lib\;$(ProjectDir)\xz-embedded-20130513\linux\include;$(ProjectDir)\xz-embedded-20130513\linux\include\linux;$(ProjectDir)\xz-embedded-20130513\userspace;$(ProjectDir)\ff14\source;$(IncludePath)</IncludePath>
|
||||
<TargetName>Ventoy2Disk_ARM64</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<EmbedManifest>true</EmbedManifest>
|
||||
<IncludePath>$(ProjectDir)\fat_io_lib\;$(ProjectDir)\xz-embedded-20130513\linux\include;$(ProjectDir)\xz-embedded-20130513\linux\include\linux;$(ProjectDir)\xz-embedded-20130513\userspace;$(ProjectDir)\ff14\source;$(IncludePath)</IncludePath>
|
||||
<TargetName>Ventoy2Disk_X64</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)\fat_io_lib\;$(ProjectDir)\xz-embedded-20130513\linux\include;$(ProjectDir)\xz-embedded-20130513\linux\include\linux;$(ProjectDir)\xz-embedded-20130513\userspace;$(ProjectDir)\ff14\source;$(IncludePath)</IncludePath>
|
||||
<TargetName>Ventoy2Disk</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)\fat_io_lib\;$(ProjectDir)\xz-embedded-20130513\linux\include;$(ProjectDir)\xz-embedded-20130513\linux\include\linux;$(ProjectDir)\xz-embedded-20130513\userspace;$(ProjectDir)\ff14\source;$(IncludePath)</IncludePath>
|
||||
<TargetName>Ventoy2Disk_ARM</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)\fat_io_lib\;$(ProjectDir)\xz-embedded-20130513\linux\include;$(ProjectDir)\xz-embedded-20130513\linux\include\linux;$(ProjectDir)\xz-embedded-20130513\userspace;$(ProjectDir)\ff14\source;$(IncludePath)</IncludePath>
|
||||
<TargetName>Ventoy2Disk_ARM64</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)\fat_io_lib\;$(ProjectDir)\xz-embedded-20130513\linux\include;$(ProjectDir)\xz-embedded-20130513\linux\include\linux;$(ProjectDir)\xz-embedded-20130513\userspace;$(ProjectDir)\ff14\source;$(IncludePath)</IncludePath>
|
||||
<TargetName>Ventoy2Disk_X64</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -54,7 +171,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>VTARCH_X86;VTBIT=32;FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -64,7 +181,64 @@
|
||||
<AdditionalDependencies>version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2Disk.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2Disk32.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>VTARCH_ARM;VTBIT=32;FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalDependencies>version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2DiskArm.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>VTARCH_ARM64;VTBIT=64;FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalDependencies>version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2DiskArm64.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>VTARCH_X64;VTBIT=64;FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalDependencies>version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2Disk64.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -75,7 +249,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>VTARCH_X86;VTBIT=32;FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -87,11 +261,83 @@
|
||||
<AdditionalDependencies>version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2Disk.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2Disk32.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>VTARCH_ARM;VTBIT=32;FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalDependencies>version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2DiskArm.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>VTARCH_ARM64;VTBIT=64;FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalDependencies>version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2DiskArm64.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>VTARCH_X64;VTBIT=64;FATFS_INC_FORMAT_SUPPORT=0;STATIC=static;INIT=;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
<AdditionalDependencies>version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>$(ProjectDir)\Res\Ventoy2Disk64.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="crc32.c" />
|
||||
<ClCompile Include="DiskService_diskpart.c" />
|
||||
<ClCompile Include="DiskService_vds.c" />
|
||||
<ClCompile Include="DiskService_wmsa.c" />
|
||||
<ClCompile Include="fat_io_lib\fat_access.c" />
|
||||
<ClCompile Include="fat_io_lib\fat_cache.c" />
|
||||
<ClCompile Include="fat_io_lib\fat_filelib.c" />
|
||||
@@ -115,6 +361,7 @@
|
||||
<ClCompile Include="xz-embedded-20130513\linux\lib\decompress_unxz.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="DiskService.h" />
|
||||
<ClInclude Include="fat_io_lib\fat_access.h" />
|
||||
<ClInclude Include="fat_io_lib\fat_cache.h" />
|
||||
<ClInclude Include="fat_io_lib\fat_defs.h" />
|
||||
|
@@ -81,6 +81,15 @@
|
||||
<ClCompile Include="VentoyJson.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DiskService_diskpart.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DiskService_vds.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DiskService_wmsa.c">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Ventoy2Disk.h">
|
||||
@@ -143,6 +152,9 @@
|
||||
<ClInclude Include="VentoyJson.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DiskService.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Ventoy2Disk.rc">
|
||||
|
@@ -6,10 +6,40 @@
|
||||
<LocalDebuggerCommandArguments>
|
||||
</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<LocalDebuggerWorkingDirectory>C:\share\ventoy-1.0.03</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<LocalDebuggerWorkingDirectory>C:\share\ventoy-1.0.03</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>C:\share\ventoy-1.0.03</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>K:\test\ventoy\ventoy-1.0.57</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>
|
||||
</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<LocalDebuggerWorkingDirectory>C:\share\ventoy-1.0.03</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<LocalDebuggerWorkingDirectory>C:\share\ventoy-1.0.03</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>K:\test\ventoy\ventoy-1.0.57</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments />
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -403,7 +403,7 @@ int vtoy_json_parse(VTOY_JSON *pstJson, const char *szJsonData)
|
||||
char *pcNewBuf = NULL;
|
||||
const char *pcEnd = NULL;
|
||||
|
||||
uiMemSize = strlen(szJsonData) + 1;
|
||||
uiMemSize = (UINT32)strlen(szJsonData) + 1;
|
||||
pcNewBuf = (char *)malloc(uiMemSize);
|
||||
if (NULL == pcNewBuf)
|
||||
{
|
||||
|
Binary file not shown.
@@ -25,6 +25,7 @@
|
||||
|
||||
|
||||
#include <Windows.h>
|
||||
#include <time.h>
|
||||
#include <winternl.h>
|
||||
#include <commctrl.h>
|
||||
#include <initguid.h>
|
||||
@@ -471,6 +472,7 @@ int FindProcessOccupyDisk(HANDLE hDrive, PHY_DRIVE_INFO *pPhyDrive)
|
||||
char cmdline[MAX_PATH] = { 0 };
|
||||
wchar_t wexe_path[MAX_PATH], *wcmdline;
|
||||
int cur_pid;
|
||||
time_t starttime, curtime;
|
||||
|
||||
|
||||
Log("FindProcessOccupyDisk for PhyDrive %d", pPhyDrive->PhyDrive);
|
||||
@@ -504,11 +506,30 @@ int FindProcessOccupyDisk(HANDLE hDrive, PHY_DRIVE_INFO *pPhyDrive)
|
||||
if (buffer == NULL)
|
||||
goto out;
|
||||
|
||||
for (i = 0;; i++) {
|
||||
Log("handles->NumberOfHandles = %lu", (ULONG)handles->NumberOfHandles);
|
||||
|
||||
if (handles->NumberOfHandles > 10000)
|
||||
{
|
||||
goto out;
|
||||
}
|
||||
|
||||
starttime = time(NULL);
|
||||
|
||||
for (i = 0; i < handles->NumberOfHandles; i++) {
|
||||
ULONG attempts = 8;
|
||||
PSYSTEM_HANDLE_TABLE_ENTRY_INFO_EX handleInfo =
|
||||
(i < handles->NumberOfHandles) ? &handles->Handles[i] : NULL;
|
||||
|
||||
//limit the search time
|
||||
if ((i % 100) == 0)
|
||||
{
|
||||
curtime = time(NULL);
|
||||
if (curtime - starttime > 10)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((dupHandle != NULL) && (processHandle != NtCurrentProcess())) {
|
||||
pfNtClose(dupHandle);
|
||||
dupHandle = NULL;
|
||||
@@ -663,8 +684,12 @@ out:
|
||||
else
|
||||
Log("NOTE: Could not identify the process(es) or service(s) accessing %S", _wHandleName);
|
||||
|
||||
PhFree(buffer);
|
||||
PhFree(handles);
|
||||
if (buffer)
|
||||
PhFree(buffer);
|
||||
|
||||
if (handles)
|
||||
PhFree(handles);
|
||||
|
||||
PhDestroyHeap();
|
||||
|
||||
return 0;
|
||||
|
@@ -365,11 +365,12 @@ if ((pf##proc == NULL) && (NT_SUCCESS(status))) status = STATUS_NOT_IMPLEMENTED;
|
||||
#define GB 1073741824LL
|
||||
#define TB 1099511627776LL
|
||||
|
||||
#ifndef _WINTERNL_
|
||||
typedef struct _CLIENT_ID {
|
||||
HANDLE UniqueProcess;
|
||||
HANDLE UniqueThread;
|
||||
} CLIENT_ID;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
@@ -302,7 +302,7 @@ int INIT unxz(unsigned char *in, int in_size,
|
||||
do {
|
||||
if (b.in_pos == b.in_size && fill != NULL) {
|
||||
if (in_used != NULL)
|
||||
*in_used += b.in_pos;
|
||||
*in_used += (int)(b.in_pos);
|
||||
|
||||
b.in_pos = 0;
|
||||
|
||||
@@ -329,7 +329,7 @@ int INIT unxz(unsigned char *in, int in_size,
|
||||
* returned by xz_dec_run(), but probably
|
||||
* it's not too bad.
|
||||
*/
|
||||
if (flush(b.out, b.out_pos) != (int)b.out_pos)
|
||||
if (flush(b.out, (unsigned int)(b.out_pos)) != (int)b.out_pos)
|
||||
ret = XZ_BUF_ERROR;
|
||||
|
||||
b.out_pos = 0;
|
||||
@@ -344,7 +344,7 @@ int INIT unxz(unsigned char *in, int in_size,
|
||||
}
|
||||
|
||||
if (in_used != NULL)
|
||||
*in_used += b.in_pos;
|
||||
*in_used += (int)(b.in_pos);
|
||||
|
||||
xz_dec_end(s);
|
||||
|
||||
|
@@ -351,7 +351,7 @@ static bool dict_repeat(struct dictionary *dict, uint32_t *len, uint32_t dist)
|
||||
if (dist >= dict->full || dist >= dict->size)
|
||||
return false;
|
||||
|
||||
left = min_t(size_t, dict->limit - dict->pos, *len);
|
||||
left = (uint32_t)min_t(size_t, dict->limit - dict->pos, *len);
|
||||
*len -= left;
|
||||
|
||||
back = dict->pos - dist - 1;
|
||||
@@ -385,7 +385,7 @@ static void dict_uncompressed(struct dictionary *dict, struct xz_buf *b,
|
||||
if (copy_size > *left)
|
||||
copy_size = *left;
|
||||
|
||||
*left -= copy_size;
|
||||
*left -= (uint32_t)copy_size;
|
||||
|
||||
memcpy(dict->buf + dict->pos, b->in + b->in_pos, copy_size);
|
||||
dict->pos += copy_size;
|
||||
@@ -427,7 +427,7 @@ static uint32_t dict_flush(struct dictionary *dict, struct xz_buf *b)
|
||||
|
||||
dict->start = dict->pos;
|
||||
b->out_pos += copy_size;
|
||||
return copy_size;
|
||||
return (uint32_t)copy_size;
|
||||
}
|
||||
|
||||
/*****************
|
||||
@@ -854,7 +854,7 @@ static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)
|
||||
if (tmp > s->lzma2.compressed - s->temp.size)
|
||||
tmp = s->lzma2.compressed - s->temp.size;
|
||||
if (tmp > in_avail)
|
||||
tmp = in_avail;
|
||||
tmp = (uint32_t)in_avail;
|
||||
|
||||
memcpy(s->temp.buf + s->temp.size, b->in + b->in_pos, tmp);
|
||||
|
||||
@@ -877,10 +877,10 @@ static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)
|
||||
if (!lzma_main(s) || s->rc.in_pos > s->temp.size + tmp)
|
||||
return false;
|
||||
|
||||
s->lzma2.compressed -= s->rc.in_pos;
|
||||
s->lzma2.compressed -= (uint32_t)(s->rc.in_pos);
|
||||
|
||||
if (s->rc.in_pos < s->temp.size) {
|
||||
s->temp.size -= s->rc.in_pos;
|
||||
s->temp.size -= (uint32_t)(s->rc.in_pos);
|
||||
memmove(s->temp.buf, s->temp.buf + s->rc.in_pos,
|
||||
s->temp.size);
|
||||
return true;
|
||||
@@ -907,7 +907,7 @@ static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)
|
||||
if (in_avail > s->lzma2.compressed)
|
||||
return false;
|
||||
|
||||
s->lzma2.compressed -= in_avail;
|
||||
s->lzma2.compressed -= (uint32_t)in_avail;
|
||||
b->in_pos = s->rc.in_pos;
|
||||
}
|
||||
|
||||
@@ -917,7 +917,7 @@ static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)
|
||||
in_avail = s->lzma2.compressed;
|
||||
|
||||
memcpy(s->temp.buf, b->in + b->in_pos, in_avail);
|
||||
s->temp.size = in_avail;
|
||||
s->temp.size = (uint32_t)in_avail;
|
||||
b->in_pos += in_avail;
|
||||
}
|
||||
|
||||
|
@@ -435,6 +435,24 @@ static int vtoy_printf_iso_path(ventoy_os_param *param)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vtoy_printf_fs(ventoy_os_param *param)
|
||||
{
|
||||
const char *fs[] =
|
||||
{
|
||||
"exfat", "ntfs", "ext", "xfs", "udf", "fat"
|
||||
};
|
||||
|
||||
if (param->vtoy_disk_part_type < 6)
|
||||
{
|
||||
printf("%s\n", fs[param->vtoy_disk_part_type]);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("unknown\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vtoy_check_device(ventoy_os_param *param, const char *device)
|
||||
{
|
||||
unsigned long long size;
|
||||
@@ -551,12 +569,13 @@ int vtoydump_main(int argc, char **argv)
|
||||
int rc;
|
||||
int ch;
|
||||
int print_path = 0;
|
||||
int print_fs = 0;
|
||||
char filename[256] = {0};
|
||||
char diskname[256] = {0};
|
||||
char device[64] = {0};
|
||||
ventoy_os_param *param = NULL;
|
||||
|
||||
while ((ch = getopt(argc, argv, "c:f:p:v::")) != -1)
|
||||
while ((ch = getopt(argc, argv, "c:f:p:s:v::")) != -1)
|
||||
{
|
||||
if (ch == 'f')
|
||||
{
|
||||
@@ -575,6 +594,11 @@ int vtoydump_main(int argc, char **argv)
|
||||
print_path = 1;
|
||||
strncpy(filename, optarg, sizeof(filename) - 1);
|
||||
}
|
||||
else if (ch == 's')
|
||||
{
|
||||
print_fs = 1;
|
||||
strncpy(filename, optarg, sizeof(filename) - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Usage: %s -f datafile [ -v ] \n", argv[0]);
|
||||
@@ -627,6 +651,10 @@ int vtoydump_main(int argc, char **argv)
|
||||
{
|
||||
rc = vtoy_printf_iso_path(param);
|
||||
}
|
||||
else if (print_fs)
|
||||
{
|
||||
rc = vtoy_printf_fs(param);
|
||||
}
|
||||
else if (device[0])
|
||||
{
|
||||
rc = vtoy_check_device(param, device);
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
* vtoyjump.c
|
||||
*
|
||||
* Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||
* Copyright (c) 2021, 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
|
||||
@@ -31,22 +31,58 @@
|
||||
static ventoy_os_param g_os_param;
|
||||
static ventoy_windows_data g_windows_data;
|
||||
static UINT8 g_os_param_reserved[32];
|
||||
static BOOL g_64bit_system = FALSE;
|
||||
static INT g_system_bit = VTOY_BIT;
|
||||
static ventoy_guid g_ventoy_guid = VENTOY_GUID;
|
||||
static HANDLE g_vtoylog_mutex = NULL;
|
||||
static HANDLE g_vtoyins_mutex = NULL;
|
||||
|
||||
//Unicode "CmdLine"
|
||||
static BOOL g_PecmdHasCmdLine = FALSE;
|
||||
static UCHAR g_aucCmdLineHex[] =
|
||||
{
|
||||
0x43, 0x00, 0x6D, 0x00, 0x64, 0x00, 0x4C, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x65, 0x00
|
||||
};
|
||||
static CHAR g_prog_full_path[MAX_PATH];
|
||||
static CHAR g_prog_dir[MAX_PATH];
|
||||
static CHAR g_prog_name[MAX_PATH];
|
||||
|
||||
#define VTOY_PID_FILE "X:\\Windows\\System32\\pidventoy"
|
||||
#define AUTO_RUN_BAT "X:\\VentoyAutoRun.bat"
|
||||
#define AUTO_RUN_LOG "X:\\VentoyAutoRun.log"
|
||||
|
||||
#define LOG_FILE "X:\\Windows\\system32\\ventoy.log"
|
||||
#define MUTEX_LOCK(hmutex) if (hmutex != NULL) LockStatus = WaitForSingleObject(hmutex, INFINITE)
|
||||
#define MUTEX_UNLOCK(hmutex) if (hmutex != NULL && WAIT_OBJECT_0 == LockStatus) ReleaseMutex(hmutex)
|
||||
|
||||
static const char * GetFileNameInPath(const char *fullpath)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (strstr(fullpath, ":"))
|
||||
{
|
||||
for (i = (int)strlen(fullpath); i > 0; i--)
|
||||
{
|
||||
if (fullpath[i - 1] == '/' || fullpath[i - 1] == '\\')
|
||||
{
|
||||
return fullpath + i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fullpath;
|
||||
}
|
||||
|
||||
static int split_path_name(char *fullpath, char *dir, char *name)
|
||||
{
|
||||
CHAR ch;
|
||||
CHAR *Pos = NULL;
|
||||
|
||||
Pos = (CHAR *)GetFileNameInPath(fullpath);
|
||||
|
||||
strcpy_s(name, MAX_PATH, Pos);
|
||||
|
||||
ch = *(Pos - 1);
|
||||
*(Pos - 1) = 0;
|
||||
strcpy_s(dir, MAX_PATH, fullpath);
|
||||
*(Pos - 1) = ch;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void Log(const char *Fmt, ...)
|
||||
{
|
||||
va_list Arg;
|
||||
@@ -70,7 +106,7 @@ void Log(const char *Fmt, ...)
|
||||
|
||||
MUTEX_LOCK(g_vtoylog_mutex);
|
||||
|
||||
fopen_s(&File, "ventoy.log", "a+");
|
||||
fopen_s(&File, LOG_FILE, "a+");
|
||||
if (File)
|
||||
{
|
||||
fwrite(szBuf, 1, Len, File);
|
||||
@@ -233,24 +269,6 @@ static BOOL CheckPeHead(BYTE *Head)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL IsPe64(BYTE *buffer)
|
||||
{
|
||||
DWORD pe_off;
|
||||
|
||||
if (!CheckPeHead(buffer))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pe_off = *(UINT32 *)(buffer + 60);
|
||||
if (*(UINT16 *)(buffer + pe_off + 24) == 0x020b)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL CheckOsParam(ventoy_os_param *param)
|
||||
{
|
||||
@@ -528,7 +546,7 @@ int VentoyMountY(HANDLE Handle)
|
||||
|
||||
for (i = 0; physicalDriveName[i]; i++)
|
||||
{
|
||||
physicalDriveNameA[i] = toupper((CHAR)(physicalDriveName[i]));
|
||||
physicalDriveNameA[i] = (CHAR)toupper((CHAR)(physicalDriveName[i]));
|
||||
}
|
||||
|
||||
Log("physicalDriveNameA=<%s>", physicalDriveNameA);
|
||||
@@ -553,8 +571,10 @@ int VentoyMountY(HANDLE Handle)
|
||||
return bRet ? 0 : 1;
|
||||
}
|
||||
|
||||
static BOOL VentoyNeedMountY(const char *IsoPath)
|
||||
static BOOL VentoyAPINeedMountY(const char *IsoPath)
|
||||
{
|
||||
(void)IsoPath;
|
||||
|
||||
/* TBD */
|
||||
return FALSE;
|
||||
}
|
||||
@@ -576,7 +596,7 @@ static int VentoyAttachVirtualDisk(HANDLE Handle, const char *IsoPath)
|
||||
DriveYFree = 1;
|
||||
}
|
||||
|
||||
if (DriveYFree && VentoyNeedMountY(IsoPath))
|
||||
if (DriveYFree && VentoyAPINeedMountY(IsoPath))
|
||||
{
|
||||
return VentoyMountY(Handle);
|
||||
}
|
||||
@@ -744,7 +764,7 @@ static BOOL Is2K10PE(void)
|
||||
return bRet;
|
||||
}
|
||||
|
||||
static CHAR GetMountLogicalDrive(void)
|
||||
static CHAR GetIMDiskMountLogicalDrive(void)
|
||||
{
|
||||
CHAR Letter = 'Y';
|
||||
DWORD Drives;
|
||||
@@ -832,7 +852,7 @@ static int VentoyRunImdisk(const char *IsoPath, const char *imdiskexe)
|
||||
|
||||
Log("VentoyRunImdisk <%s> <%s>", IsoPath, imdiskexe);
|
||||
|
||||
Letter = GetMountLogicalDrive();
|
||||
Letter = GetIMDiskMountLogicalDrive();
|
||||
sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -o ro -f \"%s\" -m %C:", imdiskexe, IsoPath, Letter);
|
||||
Log("mount iso to %C: use imdisk cmd <%s>", Letter, Cmdline);
|
||||
|
||||
@@ -909,7 +929,7 @@ int VentoyMountISOByImdisk(const char *IsoPath, DWORD PhyDrive)
|
||||
|
||||
if (0 == fl_attach_media(VentoyFatDiskRead, NULL))
|
||||
{
|
||||
if (g_64bit_system)
|
||||
if (g_system_bit == 64)
|
||||
{
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/64/imdisk.sys", "ventoy\\imdisk.sys");
|
||||
CopyFileFromFatDisk("/ventoy/imdisk/64/imdisk.exe", "ventoy\\imdisk.exe");
|
||||
@@ -1132,7 +1152,7 @@ static int DecompressInjectionArchive(const char *archive, DWORD PhyDrive)
|
||||
|
||||
if (0 == fl_attach_media(VentoyFatDiskRead, NULL))
|
||||
{
|
||||
if (g_64bit_system)
|
||||
if (g_system_bit == 64)
|
||||
{
|
||||
CopyFileFromFatDisk("/ventoy/7z/64/7za.exe", "ventoy\\7za.exe");
|
||||
}
|
||||
@@ -1228,13 +1248,126 @@ static int ProcessUnattendedInstallation(const char *script)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int Windows11BypassCheck(const char *isofile, const char MntLetter)
|
||||
{
|
||||
int Ret = 1;
|
||||
DWORD dwHandle;
|
||||
DWORD dwSize;
|
||||
DWORD dwValue = 1;
|
||||
UINT VerLen = 0;
|
||||
CHAR *Buffer = NULL;
|
||||
VS_FIXEDFILEINFO* VerInfo = NULL;
|
||||
CHAR CheckFile[MAX_PATH];
|
||||
UINT16 Major, Minor, Build, Revision;
|
||||
|
||||
Log("Windows11BypassCheck for <%s> %C:", isofile, MntLetter);
|
||||
|
||||
if (FALSE == IsFileExist("%C:\\sources\\boot.wim", MntLetter) ||
|
||||
FALSE == IsFileExist("%C:\\sources\\compatresources.dll", MntLetter))
|
||||
{
|
||||
Log("boot.wim/compatresources.dll not exist, this is not a windows install media.");
|
||||
goto End;
|
||||
}
|
||||
|
||||
if (FALSE == IsFileExist("%C:\\sources\\install.wim", MntLetter) &&
|
||||
FALSE == IsFileExist("%C:\\sources\\install.esd", MntLetter))
|
||||
{
|
||||
Log("install.wim/install.esd not exist, this is not a windows install media.");
|
||||
goto End;
|
||||
}
|
||||
|
||||
sprintf_s(CheckFile, sizeof(CheckFile), "%C:\\sources\\compatresources.dll", MntLetter);
|
||||
dwSize = GetFileVersionInfoSizeA(CheckFile, &dwHandle);
|
||||
if (0 == dwSize)
|
||||
{
|
||||
Log("Failed to get file version info size: %u", LASTERR);
|
||||
goto End;
|
||||
}
|
||||
|
||||
Buffer = malloc(dwSize);
|
||||
if (!Buffer)
|
||||
{
|
||||
goto End;
|
||||
}
|
||||
|
||||
if (FALSE == GetFileVersionInfoA(CheckFile, dwHandle, dwSize, Buffer))
|
||||
{
|
||||
Log("Failed to get file version info : %u", LASTERR);
|
||||
goto End;
|
||||
}
|
||||
|
||||
if (VerQueryValueA(Buffer, "\\", (LPVOID)&VerInfo, &VerLen) && VerLen != 0)
|
||||
{
|
||||
if (VerInfo->dwSignature == VS_FFI_SIGNATURE)
|
||||
{
|
||||
Major = HIWORD(VerInfo->dwFileVersionMS);
|
||||
Minor = LOWORD(VerInfo->dwFileVersionMS);
|
||||
Build = HIWORD(VerInfo->dwFileVersionLS);
|
||||
Revision = LOWORD(VerInfo->dwFileVersionLS);
|
||||
|
||||
Log("FileVersionze: <%u %u %u %u>", Major, Minor, Build, Revision);
|
||||
|
||||
if (Major == 10 && Build > 20000)
|
||||
{
|
||||
Major = 11;
|
||||
}
|
||||
|
||||
if (Major != 11)
|
||||
{
|
||||
Log("This is not Windows 11, not need to bypass.", Major);
|
||||
goto End;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Now we really need to bypass windows 11 check. create registry
|
||||
HKEY hKey = NULL;
|
||||
HKEY hSubKey = NULL;
|
||||
LSTATUS Status;
|
||||
|
||||
Status = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "System\\Setup", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwSize);
|
||||
if (ERROR_SUCCESS != Status)
|
||||
{
|
||||
Log("Failed to create reg key System\\Setup %u %u", LASTERR, Status);
|
||||
goto End;
|
||||
}
|
||||
|
||||
Status = RegCreateKeyExA(hKey, "LabConfig", 0, NULL, 0, KEY_SET_VALUE | KEY_QUERY_VALUE | KEY_CREATE_SUB_KEY, NULL, &hSubKey, &dwSize);
|
||||
if (ERROR_SUCCESS != Status)
|
||||
{
|
||||
Log("Failed to create LabConfig reg %u %u", LASTERR, Status);
|
||||
goto End;
|
||||
}
|
||||
|
||||
//set reg value
|
||||
Status += RegSetValueExA(hSubKey, "BypassRAMCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Status += RegSetValueExA(hSubKey, "BypassTPMCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Status += RegSetValueExA(hSubKey, "BypassSecureBootCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Status += RegSetValueExA(hSubKey, "BypassStorageCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
Status += RegSetValueExA(hSubKey, "BypassCPUCheck", 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD));
|
||||
|
||||
Log("Create bypass registry %s %u", (Status == ERROR_SUCCESS) ? "SUCCESS" : "FAILED", Status);
|
||||
|
||||
Ret = 0;
|
||||
|
||||
End:
|
||||
if (Buffer)
|
||||
{
|
||||
free(Buffer);
|
||||
}
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
static int VentoyHook(ventoy_os_param *param)
|
||||
{
|
||||
int i;
|
||||
int rc;
|
||||
BOOL find = FALSE;
|
||||
CHAR Letter;
|
||||
CHAR MntLetter;
|
||||
DWORD Drives;
|
||||
DWORD NewDrives;
|
||||
DISK_EXTENT DiskExtent;
|
||||
UINT8 UUID[16];
|
||||
CHAR IsoPath[MAX_PATH];
|
||||
@@ -1299,9 +1432,43 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
|
||||
Log("Find ISO file <%s>", IsoPath);
|
||||
|
||||
Drives = GetLogicalDrives();
|
||||
Log("Drives before mount: 0x%x", Drives);
|
||||
|
||||
rc = MountIsoFile(IsoPath, DiskExtent.DiskNumber);
|
||||
|
||||
NewDrives = GetLogicalDrives();
|
||||
Log("Drives after mount: 0x%x (0x%x)", NewDrives, (NewDrives ^ Drives));
|
||||
|
||||
MntLetter = 'A';
|
||||
NewDrives = (NewDrives ^ Drives);
|
||||
while (NewDrives)
|
||||
{
|
||||
if (NewDrives & 0x01)
|
||||
{
|
||||
if ((NewDrives >> 1) == 0)
|
||||
{
|
||||
Log("The ISO file is mounted at %C:", MntLetter);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Maybe the ISO file is mounted at %C:", MntLetter);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
NewDrives >>= 1;
|
||||
MntLetter++;
|
||||
}
|
||||
|
||||
Log("Mount ISO FILE: %s", rc == 0 ? "SUCCESS" : "FAILED");
|
||||
|
||||
//Windows 11 bypass check
|
||||
if (g_windows_data.windows11_bypass_check == 1)
|
||||
{
|
||||
Windows11BypassCheck(IsoPath, MntLetter);
|
||||
}
|
||||
|
||||
// for protect
|
||||
rc = DeleteVentoyPart2MountPoint(DiskExtent.DiskNumber);
|
||||
Log("Delete ventoy mountpoint: %s", rc == 0 ? "SUCCESS" : "NO NEED");
|
||||
@@ -1331,6 +1498,46 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
{
|
||||
Log("decompress injection archive %s...", IsoPath);
|
||||
DecompressInjectionArchive(IsoPath, DiskExtent.DiskNumber);
|
||||
|
||||
if (IsFileExist("%s", AUTO_RUN_BAT))
|
||||
{
|
||||
HANDLE hOut;
|
||||
DWORD flags = CREATE_NO_WINDOW;
|
||||
CHAR StrBuf[1024];
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
SECURITY_ATTRIBUTES Sa = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE };
|
||||
|
||||
Log("%s exist, now run it...", AUTO_RUN_BAT);
|
||||
|
||||
GetStartupInfoA(&Si);
|
||||
|
||||
hOut = CreateFileA(AUTO_RUN_LOG,
|
||||
FILE_APPEND_DATA,
|
||||
FILE_SHARE_WRITE | FILE_SHARE_READ,
|
||||
&Sa,
|
||||
OPEN_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
|
||||
Si.dwFlags |= STARTF_USESTDHANDLES;
|
||||
if (hOut != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
Si.hStdError = hOut;
|
||||
Si.hStdOutput = hOut;
|
||||
}
|
||||
|
||||
sprintf_s(IsoPath, sizeof(IsoPath), "%C:\\%s", Letter, param->vtoy_img_path);
|
||||
sprintf_s(StrBuf, sizeof(StrBuf), "cmd.exe /c %s \"%s\" %C", AUTO_RUN_BAT, IsoPath, MntLetter);
|
||||
CreateProcessA(NULL, StrBuf, NULL, NULL, TRUE, flags, NULL, NULL, &Si, &Pi);
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
|
||||
SAFE_CLOSE_HANDLE(hOut);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("%s not exist...", AUTO_RUN_BAT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1345,24 +1552,6 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char * GetFileNameInPath(const char *fullpath)
|
||||
{
|
||||
int i;
|
||||
const char *pos = NULL;
|
||||
|
||||
if (strstr(fullpath, ":"))
|
||||
{
|
||||
for (i = (int)strlen(fullpath); i > 0; i--)
|
||||
{
|
||||
if (fullpath[i - 1] == '/' || fullpath[i - 1] == '\\')
|
||||
{
|
||||
return fullpath + i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fullpath;
|
||||
}
|
||||
|
||||
int VentoyJumpWimboot(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
{
|
||||
@@ -1371,13 +1560,7 @@ int VentoyJumpWimboot(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
DWORD size = 0;
|
||||
DWORD Pos;
|
||||
|
||||
#ifdef VTOY_32
|
||||
g_64bit_system = FALSE;
|
||||
#else
|
||||
g_64bit_system = TRUE;
|
||||
#endif
|
||||
|
||||
Log("VentoyJumpWimboot %dbit", g_64bit_system ? 64 : 32);
|
||||
Log("VentoyJumpWimboot %dbit", g_system_bit);
|
||||
|
||||
sprintf_s(LunchFile, MAX_PATH, "X:\\setup.exe");
|
||||
|
||||
@@ -1441,24 +1624,6 @@ static int ventoy_check_create_directory(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BOOL VentoyFindCmdLineStr(BYTE *buf, DWORD size)
|
||||
{
|
||||
DWORD i = 0;
|
||||
UINT32 uiDataChk;
|
||||
UINT32 uiDataHex = *(UINT32 *)(g_aucCmdLineHex);
|
||||
|
||||
for (i = 0; i < size - sizeof(g_aucCmdLineHex); i += 16)
|
||||
{
|
||||
uiDataChk = *(UINT32 *)(buf + i);
|
||||
if (uiDataChk == uiDataHex && memcmp(buf + i, g_aucCmdLineHex, sizeof(g_aucCmdLineHex)) == 0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
{
|
||||
int rc = 1;
|
||||
@@ -1484,8 +1649,7 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
goto End;
|
||||
}
|
||||
|
||||
g_64bit_system = IsPe64(Buffer);
|
||||
Log("VentoyJump %dbit", g_64bit_system ? 64 : 32);
|
||||
Log("VentoyJump %dbit", g_system_bit);
|
||||
|
||||
MUTEX_LOCK(g_vtoyins_mutex);
|
||||
stat = ventoy_check_create_directory();
|
||||
@@ -1537,13 +1701,6 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
SaveBuffer2File(LunchFile, Buffer + PeStart, FileSize - PeStart);
|
||||
MUTEX_UNLOCK(g_vtoyins_mutex);
|
||||
|
||||
#ifdef VTOY_REJUMP_SUPPORTED
|
||||
if (_stricmp(LunchFile, "ventoy\\PECMD.EXE") == 0)
|
||||
{
|
||||
g_PecmdHasCmdLine = VentoyFindCmdLineStr(Buffer + PeStart, FileSize - PeStart);
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1574,244 +1731,176 @@ End:
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int ventoy_append_process_id(const char *pidfile)
|
||||
int real_main(int argc, char **argv)
|
||||
{
|
||||
DWORD PID = 0;
|
||||
FILE *fp = NULL;
|
||||
int i = 0;
|
||||
int rc = 0;
|
||||
CHAR NewFile[MAX_PATH];
|
||||
CHAR LunchFile[MAX_PATH];
|
||||
CHAR CallParam[1024] = { 0 };
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
|
||||
PID = GetCurrentProcessId();
|
||||
|
||||
fopen_s(&fp, pidfile, "a+");
|
||||
if (!fp)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
fprintf_s(fp, "%u\n", PID);
|
||||
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ventoy_get_instance_id(const char *pidfile)
|
||||
{
|
||||
int instance = 0;
|
||||
FILE *fp = NULL;
|
||||
char line[256];
|
||||
|
||||
fopen_s(&fp, pidfile, "r");
|
||||
if (!fp)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (fgets(line, sizeof(line), fp))
|
||||
{
|
||||
instance++;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
return instance + 1;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i = 0;
|
||||
int rc = 0;
|
||||
int id = 0;
|
||||
BOOL ReJump = FALSE;
|
||||
CHAR *Pos = NULL;
|
||||
CHAR CurDir[MAX_PATH];
|
||||
CHAR LunchFile[MAX_PATH];
|
||||
CHAR CallParam[1024] = { 0 };
|
||||
DWORD LockStatus = 0;
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
|
||||
#ifdef VTOY_REJUMP_SUPPORTED
|
||||
if (argv[0] && strcmp(argv[0], "ventoy\\WinLogon.exe") == 0)
|
||||
{
|
||||
GetStartupInfoA(&Si);
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_HIDE;
|
||||
|
||||
sprintf_s(LunchFile, sizeof(LunchFile), "PECMD.EXE");
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
strcat_s(LunchFile, sizeof(LunchFile), " ");
|
||||
strcat_s(LunchFile, sizeof(LunchFile), argv[i]);
|
||||
}
|
||||
|
||||
CreateProcessA(NULL, LunchFile, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_PecmdHasCmdLine = 0;
|
||||
g_vtoylog_mutex = CreateMutexA(NULL, FALSE, "VTOYLOG_LOCK");
|
||||
g_vtoyins_mutex = CreateMutexA(NULL, FALSE, "VTOYINS_LOCK");
|
||||
|
||||
MUTEX_LOCK(g_vtoyins_mutex);
|
||||
if (IsFileExist(VTOY_PID_FILE))
|
||||
{
|
||||
id = ventoy_get_instance_id(VTOY_PID_FILE);
|
||||
}
|
||||
else
|
||||
{
|
||||
id = 1;
|
||||
}
|
||||
ventoy_append_process_id(VTOY_PID_FILE);
|
||||
MUTEX_UNLOCK(g_vtoyins_mutex);
|
||||
|
||||
if (argv[0] && argv[0][0] && argv[0][1] == ':')
|
||||
{
|
||||
GetCurrentDirectoryA(sizeof(CurDir), CurDir);
|
||||
|
||||
strcpy_s(LunchFile, sizeof(LunchFile), argv[0]);
|
||||
Pos = (char *)GetFileNameInPath(LunchFile);
|
||||
|
||||
strcat_s(CurDir, sizeof(CurDir), "\\");
|
||||
strcat_s(CurDir, sizeof(CurDir), Pos);
|
||||
|
||||
if (_stricmp(argv[0], CurDir) != 0)
|
||||
{
|
||||
*Pos = 0;
|
||||
SetCurrentDirectoryA(LunchFile);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VTOY_32
|
||||
Log("######## VentoyJump 32bit [%d] ##########", id);
|
||||
#else
|
||||
Log("######## VentoyJump 64bit [%d] ##########", id);
|
||||
#endif
|
||||
Log("#### real_main #### argc = %d", argc);
|
||||
Log("program full path: <%s>", g_prog_full_path);
|
||||
Log("program dir: <%s>", g_prog_dir);
|
||||
Log("program name:: <%s>", g_prog_name);
|
||||
|
||||
Log("argc = %d", argc);
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
Log("argv[%d]=<%s>", i, argv[i]);
|
||||
if (i > 0)
|
||||
{
|
||||
strcat_s(CallParam, sizeof(CallParam), " ");
|
||||
strcat_s(CallParam, sizeof(CallParam), argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (Pos && *Pos == 0)
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
Log("Old current directory = <%s>", CurDir);
|
||||
Log("New current directory = <%s>", LunchFile);
|
||||
Log("argv[%d]=<%s>", i, argv[i]);
|
||||
if (i > 0)
|
||||
{
|
||||
strcat_s(CallParam, sizeof(CallParam), " ");
|
||||
strcat_s(CallParam, sizeof(CallParam), argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
GetStartupInfoA(&Si);
|
||||
memset(LunchFile, 0, sizeof(LunchFile));
|
||||
|
||||
if (strstr(argv[0], "vtoyjump.exe"))
|
||||
{
|
||||
rc = VentoyJumpWimboot(argc, argv, LunchFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetCurrentDirectoryA(sizeof(CurDir), CurDir);
|
||||
Log("Current directory = <%s>", CurDir);
|
||||
rc = VentoyJump(argc, argv, LunchFile);
|
||||
}
|
||||
|
||||
GetStartupInfoA(&Si);
|
||||
Log("LunchFile=<%s> CallParam=<%s>", LunchFile, CallParam);
|
||||
|
||||
memset(LunchFile, 0, sizeof(LunchFile));
|
||||
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);
|
||||
MoveFileA(g_prog_full_path, NewFile);
|
||||
Log("Move <%s> to <%s>", g_prog_full_path, NewFile);
|
||||
|
||||
if (strstr(argv[0], "vtoyjump.exe"))
|
||||
{
|
||||
rc = VentoyJumpWimboot(argc, argv, LunchFile);
|
||||
}
|
||||
sprintf_s(NewFile, sizeof(NewFile), "ventoy\\%s", g_prog_name);
|
||||
CopyFileA(NewFile, g_prog_full_path, TRUE);
|
||||
Log("Copy <%s> to <%s>", NewFile, g_prog_full_path);
|
||||
|
||||
sprintf_s(LunchFile, sizeof(LunchFile), "%s", g_prog_full_path);
|
||||
Log("Final lunchFile is <%s>", LunchFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = VentoyJump(argc, argv, LunchFile);
|
||||
Log("We don't need to recover original <%s>", g_prog_name);
|
||||
}
|
||||
|
||||
Log("id=%d LunchFile=<%s> CallParam=<%s>", id, LunchFile, CallParam);
|
||||
if (g_os_param_reserved[0] == 3)
|
||||
{
|
||||
Log("Open log for debug ...");
|
||||
sprintf_s(LunchFile, sizeof(LunchFile), "%s", "notepad.exe ventoy.log");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CallParam[0])
|
||||
{
|
||||
strcat_s(LunchFile, sizeof(LunchFile), CallParam);
|
||||
}
|
||||
else if (NULL == strstr(LunchFile, "setup.exe"))
|
||||
{
|
||||
Log("Not setup.exe, hide windows.");
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_HIDE;
|
||||
}
|
||||
|
||||
if (id == 1 && _stricmp(argv[0], "PECMD.EXE") == 0 && _stricmp(LunchFile, "ventoy\\PECMD.EXE") == 0)
|
||||
{
|
||||
MUTEX_LOCK(g_vtoyins_mutex);
|
||||
id = ventoy_get_instance_id(VTOY_PID_FILE);
|
||||
MUTEX_UNLOCK(g_vtoyins_mutex);
|
||||
Log("Ventoy jump %s ...", rc == 0 ? "success" : "failed");
|
||||
}
|
||||
|
||||
Log("Current instance id is: %d", id);
|
||||
Log("Now launch <%s> ...", LunchFile);
|
||||
|
||||
if (id == 2)
|
||||
{
|
||||
#ifdef VTOY_REJUMP_SUPPORTED
|
||||
if (g_PecmdHasCmdLine)
|
||||
{
|
||||
ReJump = TRUE;
|
||||
CopyFileA("PECMD.EXE", "ventoy\\WinLogon.exe", TRUE);
|
||||
}
|
||||
#endif
|
||||
if (g_os_param_reserved[0] == 4)
|
||||
{
|
||||
Log("Open cmd for debug ...");
|
||||
sprintf_s(LunchFile, sizeof(LunchFile), "%s", "cmd.exe");
|
||||
}
|
||||
|
||||
MoveFileA("PECMD.EXE", "PECMD_BACK.EXE");
|
||||
CopyFileA("ventoy\\PECMD.EXE", "PECMD.EXE", TRUE);
|
||||
sprintf_s(LunchFile, sizeof(LunchFile), "%s", "PECMD.EXE");
|
||||
Log("Move original PECMD.EXE <%s>", LunchFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("%d instance started, don't move PECMD.EXE", id);
|
||||
}
|
||||
}
|
||||
Log("Backup log at this point");
|
||||
CopyFileA(LOG_FILE, "X:\\Windows\\ventoy.backup", TRUE);
|
||||
|
||||
if (g_os_param_reserved[0] == 3)
|
||||
{
|
||||
Log("Open log for debug ...");
|
||||
sprintf_s(LunchFile, sizeof(LunchFile), "%s", "notepad.exe ventoy.log");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CallParam[0])
|
||||
{
|
||||
strcat_s(LunchFile, sizeof(LunchFile), CallParam);
|
||||
}
|
||||
else if (NULL == strstr(LunchFile, "setup.exe"))
|
||||
{
|
||||
Log("Not setup.exe, hide windows.");
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_HIDE;
|
||||
}
|
||||
CreateProcessA(NULL, LunchFile, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
|
||||
Log("Ventoy jump %s ...", rc == 0 ? "success" : "failed");
|
||||
}
|
||||
|
||||
Log("Now launch <%s> ...", LunchFile);
|
||||
for (i = 0; rc && i < 1800; i++)
|
||||
{
|
||||
Log("Ventoy hook failed, now wait and retry ...");
|
||||
Sleep(1000);
|
||||
rc = VentoyHook(&g_os_param);
|
||||
}
|
||||
|
||||
if (g_os_param_reserved[0] == 4)
|
||||
{
|
||||
Log("Open cmd for debug ...");
|
||||
sprintf_s(LunchFile, sizeof(LunchFile), "%s", "cmd.exe");
|
||||
}
|
||||
Log("Wait process...");
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
|
||||
#ifdef VTOY_REJUMP_SUPPORTED
|
||||
if (ReJump)
|
||||
{
|
||||
sprintf_s(CallParam, sizeof(CallParam), "ventoy\\WinLogon.exe%s", LunchFile + strlen("PECMD.EXE"));
|
||||
Log("Now rejump to pecmd.exe <%s> ...", CallParam);
|
||||
|
||||
CreateProcessA(NULL, CallParam, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
|
||||
Log("Wait rejump process...");
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
Log("rejump finished");
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
(void)ReJump;
|
||||
#endif
|
||||
|
||||
CreateProcessA(NULL, LunchFile, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
|
||||
for (i = 0; rc && i < 1800; i++)
|
||||
{
|
||||
Log("Ventoy hook failed, now wait and retry ...");
|
||||
Sleep(1000);
|
||||
rc = VentoyHook(&g_os_param);
|
||||
}
|
||||
|
||||
Log("Wait process...");
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
|
||||
Log("vtoyjump finished");
|
||||
Log("vtoyjump finished");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
CHAR CurDir[MAX_PATH];
|
||||
CHAR NewArgv0[MAX_PATH];
|
||||
CHAR CallParam[1024] = { 0 };
|
||||
|
||||
g_vtoylog_mutex = CreateMutexA(NULL, FALSE, "VTOYLOG_LOCK");
|
||||
g_vtoyins_mutex = CreateMutexA(NULL, FALSE, "VTOYINS_LOCK");
|
||||
|
||||
Log("######## VentoyJump %dbit ##########", g_system_bit);
|
||||
|
||||
GetCurrentDirectoryA(sizeof(CurDir), CurDir);
|
||||
Log("Current directory is <%s>", CurDir);
|
||||
|
||||
GetModuleFileNameA(NULL, g_prog_full_path, MAX_PATH);
|
||||
split_path_name(g_prog_full_path, g_prog_dir, g_prog_name);
|
||||
|
||||
Log("EXE path: <%s> dir:<%s> name:<%s>", g_prog_full_path, g_prog_dir, g_prog_name);
|
||||
|
||||
if (_stricmp(g_prog_name, "WinLogon.exe") == 0)
|
||||
{
|
||||
Log("This time is rejump back ...");
|
||||
|
||||
strcpy_s(g_prog_full_path, sizeof(g_prog_full_path), argv[1]);
|
||||
split_path_name(g_prog_full_path, g_prog_dir, g_prog_name);
|
||||
|
||||
return real_main(argc - 1, argv + 1);
|
||||
}
|
||||
else if (_stricmp(g_prog_name, "PECMD.exe") == 0)
|
||||
{
|
||||
Log("We need to rejump for pecmd ...");
|
||||
|
||||
ventoy_check_create_directory();
|
||||
CopyFileA(g_prog_full_path, "ventoy\\WinLogon.exe", TRUE);
|
||||
|
||||
sprintf_s(CallParam, sizeof(CallParam), "ventoy\\WinLogon.exe %s", g_prog_full_path);
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
strcat_s(CallParam, sizeof(CallParam), " ");
|
||||
strcat_s(CallParam, sizeof(CallParam), argv[i]);
|
||||
}
|
||||
|
||||
Log("Now rejump to <%s> ...", CallParam);
|
||||
GetStartupInfoA(&Si);
|
||||
CreateProcessA(NULL, CallParam, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
|
||||
Log("Wait rejump process...");
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
Log("rejump finished");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("We don't need to rejump ...");
|
||||
|
||||
strcpy_s(NewArgv0, sizeof(NewArgv0), g_prog_full_path);
|
||||
argv[0] = NewArgv0;
|
||||
|
||||
return real_main(argc, argv);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -69,7 +69,8 @@ typedef struct ventoy_windows_data
|
||||
{
|
||||
char auto_install_script[384];
|
||||
char injection_archive[384];
|
||||
UINT8 reserved[256];
|
||||
UINT8 windows11_bypass_check;
|
||||
UINT8 reserved[255];
|
||||
}ventoy_windows_data;
|
||||
|
||||
|
||||
|
@@ -126,7 +126,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>VTOY_32;FATFS_INC_FORMAT_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>VTOY_BIT=32;FATFS_INC_FORMAT_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
@@ -135,7 +135,7 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>VirtDisk.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Version.lib;VirtDisk.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -146,7 +146,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>VTOY_64;FATFS_INC_FORMAT_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>VTOY_BIT=64;FATFS_INC_FORMAT_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
@@ -155,7 +155,8 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>VirtDisk.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>Version.lib;VirtDisk.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<DelayLoadDLLs>Version.dll;VirtDisk.dll</DelayLoadDLLs>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user