]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Ventoy2Disk.exe add a star to identify secure boot
authorlongpanda <admin@ventoy.net>
Thu, 25 Feb 2021 13:03:56 +0000 (21:03 +0800)
committerlongpanda <admin@ventoy.net>
Thu, 25 Feb 2021 13:03:56 +0000 (21:03 +0800)
INSTALL/Ventoy2Disk.exe
Ventoy2Disk/Ventoy2Disk/Language.h
Ventoy2Disk/Ventoy2Disk/PartDialog.c
Ventoy2Disk/Ventoy2Disk/Res/secure.ico [new file with mode: 0644]
Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.h
Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.rc
Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.vcxproj
Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.vcxproj.filters
Ventoy2Disk/Ventoy2Disk/WinDialog.c
Ventoy2Disk/Ventoy2Disk/resource.h

index 8aa71d64f8f14c165e2290b9cffedab56507e7aa..032375b32d47c37e33c11ee123ddfcc53689f725 100644 (file)
Binary files a/INSTALL/Ventoy2Disk.exe and b/INSTALL/Ventoy2Disk.exe differ
index 4ab138441f9f681f516a39cd91931bf07186347f..413299608af698e1b19ecd014ea1f2e708c565b6 100644 (file)
-/******************************************************************************
- * Language.h
- *
- * 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/>.
- *
- */
-#ifndef __LANGUAGE_H__
-#define __LANGUAGE_H__
-
-
-typedef enum STR_ID
-{
-       STR_ERROR = 0,
-       STR_WARNING, // 1
-       STR_INFO, // 2
-       STR_INCORRECT_DIR, //3
-       STR_INCORRECT_TREE_DIR, //4
-
-       STR_DEVICE, //5
-       STR_LOCAL_VER, //6
-       STR_DISK_VER, //7
-       STR_STATUS, //8
-       STR_INSTALL, //9
-       STR_UPDATE, //10
-
-       STR_UPDATE_TIP, //11
-       STR_INSTALL_TIP, //12
-       STR_INSTALL_TIP2,//13
-
-       STR_INSTALL_SUCCESS,//14
-       STR_INSTALL_FAILED,//15
-       STR_UPDATE_SUCCESS,//16
-       STR_UPDATE_FAILED,//17
-
-       STR_WAIT_PROCESS,//18
-
-       STR_MENU_OPTION,//19
-       STR_MENU_SECURE_BOOT,//20
-
-    STR_MENU_PART_CFG,//21
-    STR_BTN_OK,//22
-    STR_BTN_CANCEL,//23
-    STR_PRESERVE_SPACE,//24
-       STR_SPACE_VAL_INVALID,//25
-
-    STR_MENU_CLEAR, //26
-    STR_CLEAR_SUCCESS, //27
-    STR_CLEAR_FAILED, //28
-    STR_MENU_PART_STYLE, //29
-       STR_DISK_2TB_MBR_ERROR,//30
-
-    STR_SHOW_ALL_DEV, //31
-    STR_PART_ALIGN_4KB, //32
-    STR_WEB_COMMUNICATION_ERR, //33
-    STR_WEB_REMOTE_ABNORMAL, //34
-    STR_WEB_REQUEST_TIMEOUT, //35
-    STR_WEB_SERVICE_UNAVAILABLE, //36
-    STR_WEB_TOKEN_MISMATCH, //37
-
-       STR_ID_MAX
-}STR_ID;
-
-extern BOOL g_SecureBoot;
-
-#define VTOY_MENU_SECURE_BOOT    0xA000
-#define VTOY_MENU_PART_CFG        0xA001
-#define VTOY_MENU_CLEAN           0xA002
-#define VTOY_MENU_PART_STYLE      0xA003
-#define VTOY_MENU_PART_MBR        0xA004
-#define VTOY_MENU_PART_GPT        0xA005
-#define VTOY_MENU_ALL_DEV        0xA006
-
-
-typedef enum OPT_SUBMENU
-{
-    OPT_SUBMENU_SECURE_BOOT = 0,
-    OPT_SUBMENU_PART_STYLE,
-    OPT_SUBMENU_PART_CFG,
-    OPT_SUBMENU_CLEAR,
-    OPT_SUBMENU_ALL_DEV,
-
-    OPT_SUBMENU_MAX
-}OPT_SUBMENU;
-
-
-#define VTOY_MENU_LANGUAGE_BEGIN  0xB000
-
-
-#define VENTOY_LANGUAGE_INI  TEXT(".\\ventoy\\languages.ini")
-#define VENTOY_CFG_INI     TEXT(".\\Ventoy2Disk.ini")
-#define VENTOY_CFG_INI_A   ".\\Ventoy2Disk.ini"
-#define VENTOY_MAX_LANGUAGE     200
-
-#define GET_INI_STRING(Section, Key, Buf) GetPrivateProfileString(Section, Key, TEXT("#"), Buf, sizeof(Buf), VENTOY_LANGUAGE_INI)
-
-typedef struct VENTOY_LANGUAGE
-{
-       WCHAR Name[128];
-       WCHAR FontFamily[64];
-       int FontSize;
-
-       WCHAR StrId[STR_ID_MAX][64];
-       WCHAR MsgString[STR_ID_MAX][1024];
-
-}VENTOY_LANGUAGE;
-
-extern VENTOY_LANGUAGE *g_cur_lang_data;
-
-const TCHAR * GetString(enum STR_ID ID);
-
-#define _G(a) GetString(a)
-
-#endif
+/******************************************************************************\r
+ * Language.h\r
+ *\r
+ * Copyright (c) 2020, longpanda <admin@ventoy.net>\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License as\r
+ * published by the Free Software Foundation; either version 3 of the\r
+ * License, or (at your option) any later version.\r
+ * \r
+ * This program is distributed in the hope that it will be useful, but\r
+ * WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+ * General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ */\r
\r
+#ifndef __LANGUAGE_H__\r
+#define __LANGUAGE_H__\r
+\r
+\r
+typedef enum STR_ID\r
+{\r
+       STR_ERROR = 0,\r
+       STR_WARNING, // 1\r
+       STR_INFO, // 2\r
+       STR_INCORRECT_DIR, //3\r
+       STR_INCORRECT_TREE_DIR, //4\r
+\r
+       STR_DEVICE, //5\r
+       STR_LOCAL_VER, //6\r
+       STR_DISK_VER, //7\r
+       STR_STATUS, //8\r
+       STR_INSTALL, //9\r
+       STR_UPDATE, //10\r
+\r
+       STR_UPDATE_TIP, //11\r
+       STR_INSTALL_TIP, //12\r
+       STR_INSTALL_TIP2,//13\r
+\r
+       STR_INSTALL_SUCCESS,//14\r
+       STR_INSTALL_FAILED,//15\r
+       STR_UPDATE_SUCCESS,//16\r
+       STR_UPDATE_FAILED,//17\r
+\r
+       STR_WAIT_PROCESS,//18\r
+\r
+       STR_MENU_OPTION,//19\r
+       STR_MENU_SECURE_BOOT,//20\r
+\r
+    STR_MENU_PART_CFG,//21\r
+    STR_BTN_OK,//22\r
+    STR_BTN_CANCEL,//23\r
+    STR_PRESERVE_SPACE,//24\r
+       STR_SPACE_VAL_INVALID,//25\r
+\r
+    STR_MENU_CLEAR, //26\r
+    STR_CLEAR_SUCCESS, //27\r
+    STR_CLEAR_FAILED, //28\r
+    STR_MENU_PART_STYLE, //29\r
+       STR_DISK_2TB_MBR_ERROR,//30\r
+\r
+    STR_SHOW_ALL_DEV, //31\r
+    STR_PART_ALIGN_4KB, //32\r
+    STR_WEB_COMMUNICATION_ERR, //33\r
+    STR_WEB_REMOTE_ABNORMAL, //34\r
+    STR_WEB_REQUEST_TIMEOUT, //35\r
+    STR_WEB_SERVICE_UNAVAILABLE, //36\r
+    STR_WEB_TOKEN_MISMATCH, //37\r
+    STR_WEB_SERVICE_BUSY, //38\r
+\r
+       STR_ID_MAX\r
+}STR_ID;\r
+\r
+extern BOOL g_SecureBoot;\r
+\r
+#define VTOY_MENU_SECURE_BOOT    0xA000\r
+#define VTOY_MENU_PART_CFG        0xA001\r
+#define VTOY_MENU_CLEAN           0xA002\r
+#define VTOY_MENU_PART_STYLE      0xA003\r
+#define VTOY_MENU_PART_MBR        0xA004\r
+#define VTOY_MENU_PART_GPT        0xA005\r
+#define VTOY_MENU_ALL_DEV        0xA006\r
+\r
+\r
+typedef enum OPT_SUBMENU\r
+{\r
+    OPT_SUBMENU_SECURE_BOOT = 0,\r
+    OPT_SUBMENU_PART_STYLE,\r
+    OPT_SUBMENU_PART_CFG,\r
+    OPT_SUBMENU_CLEAR,\r
+    OPT_SUBMENU_ALL_DEV,\r
+\r
+    OPT_SUBMENU_MAX\r
+}OPT_SUBMENU;\r
+\r
+\r
+#define VTOY_MENU_LANGUAGE_BEGIN  0xB000\r
+\r
+\r
+#define VENTOY_LANGUAGE_INI  TEXT(".\\ventoy\\languages.ini")\r
+#define VENTOY_CFG_INI     TEXT(".\\Ventoy2Disk.ini")\r
+#define VENTOY_CFG_INI_A   ".\\Ventoy2Disk.ini"\r
+#define VENTOY_MAX_LANGUAGE     200\r
+\r
+#define GET_INI_STRING(Section, Key, Buf) GetPrivateProfileString(Section, Key, TEXT("#"), Buf, sizeof(Buf), VENTOY_LANGUAGE_INI)\r
+\r
+typedef struct VENTOY_LANGUAGE\r
+{\r
+       WCHAR Name[128];\r
+       WCHAR FontFamily[64];\r
+       int FontSize;\r
+\r
+       WCHAR StrId[STR_ID_MAX][64];\r
+       WCHAR MsgString[STR_ID_MAX][1024];\r
+\r
+}VENTOY_LANGUAGE;\r
+\r
+extern VENTOY_LANGUAGE *g_cur_lang_data;\r
+\r
+const TCHAR * GetString(enum STR_ID ID);\r
+\r
+#define _G(a) GetString(a)\r
+\r
+#endif\r
index 429252ac9ac45d05302b81caf7c47ef4eb5872c1..8375140cba8636eb922997b09340cbf152b72ec0 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/PartDialog.c and b/Ventoy2Disk/Ventoy2Disk/PartDialog.c differ
diff --git a/Ventoy2Disk/Ventoy2Disk/Res/secure.ico b/Ventoy2Disk/Ventoy2Disk/Res/secure.ico
new file mode 100644 (file)
index 0000000..ae05822
Binary files /dev/null and b/Ventoy2Disk/Ventoy2Disk/Res/secure.ico differ
index 153141847372f659ba2c01daa857377ac09093ae..d615e2abb0d22c04210981f0e8ef28453bb642ee 100644 (file)
@@ -231,5 +231,6 @@ UINT32 VentoyCrc32(void *Buffer, UINT32 Length);
     liCurrentPosition.QuadPart = pos; \\r
     SetFilePointerEx(hDrive, liCurrentPosition, &liCurrentPosition, FILE_BEGIN)\\r
 \r
+#define SECURE_ICON_STRING "*"\r
 \r
 #endif\r
index 838217107d1a655b059deb983e7d5c813dcc561c..bb68eb2207377d0ee1c623303b081a4a58cc4282 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.rc and b/Ventoy2Disk/Ventoy2Disk/Ventoy2Disk.rc differ
index 821d13e508647f66747738cb54372384c9d570fb..7824269f2662103d457618bae559eed11dfc6adf 100644 (file)
   <ItemGroup>
     <Image Include="res\icon2.ico" />
     <Image Include="Res\refresh.ico" />
+    <Image Include="Res\secure.ico" />
     <Image Include="Res\ventoy.ico" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
index 1eac7fbb9d6833e6abad5506c7e1ff97baae79c2..a4dede7c1b31104f456f99f8fac5d51e5b72d836 100644 (file)
     <Image Include="Res\refresh.ico">
       <Filter>资源文件</Filter>
     </Image>
+    <Image Include="Res\secure.ico">
+      <Filter>资源文件</Filter>
+    </Image>
   </ItemGroup>
 </Project>
\ No newline at end of file
index d82253e560705c884fa5fa452d473704af38863f..98613fbab6771d86be7fe24e6929a7c8a2326fdc 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/WinDialog.c and b/Ventoy2Disk/Ventoy2Disk/WinDialog.c differ
index f65e0643c7dd359ebbf359a9d12a6fdef7bc0a64..34c5ecd08d7b47dfc537bf7bce0ff5219716a57e 100644 (file)
Binary files a/Ventoy2Disk/Ventoy2Disk/resource.h and b/Ventoy2Disk/Ventoy2Disk/resource.h differ