diff --git a/tools/apps/hgjson/CDlgMain.cpp b/tools/apps/hgjson/CDlgMain.cpp
index a147d48..ec32d2b 100644
--- a/tools/apps/hgjson/CDlgMain.cpp
+++ b/tools/apps/hgjson/CDlgMain.cpp
@@ -9,6 +9,7 @@
#include "hgjsonDlg.h"
#include "CDlgLang.h"
+#include "DlgTwain.h"
// CDlgMain 对话框
@@ -51,6 +52,10 @@ BOOL CDlgMain::OnInitDialog()
page->Create(CDlgLang::IDD, this);
insert_page(page, L"\u8BED\u8A00\u5305\u5236\u4F5C");
+ page = new CDlgTwain(this);
+ page->Create(CDlgTwain::IDD, this);
+ insert_page(page, L"TWAIN");
+
tab_.SetCurSel(0);
OnTcnSelchangeTab1(NULL, &lret);
diff --git a/tools/apps/hgjson/hgjson.rc b/tools/apps/hgjson/hgjson.rc
index bdc917d..7bb49bd 100644
Binary files a/tools/apps/hgjson/hgjson.rc and b/tools/apps/hgjson/hgjson.rc differ
diff --git a/tools/apps/hgjson/hgjson.vcxproj b/tools/apps/hgjson/hgjson.vcxproj
index bc1aa69..f9e2876 100644
--- a/tools/apps/hgjson/hgjson.vcxproj
+++ b/tools/apps/hgjson/hgjson.vcxproj
@@ -116,6 +116,7 @@
+
@@ -130,6 +131,7 @@
+
diff --git a/tools/apps/hgjson/hgjson.vcxproj.filters b/tools/apps/hgjson/hgjson.vcxproj.filters
index 68c66f1..0df155f 100644
--- a/tools/apps/hgjson/hgjson.vcxproj.filters
+++ b/tools/apps/hgjson/hgjson.vcxproj.filters
@@ -45,6 +45,9 @@
Header Files
+
+ Header Files
+
@@ -68,6 +71,9 @@
Source Files
+
+ Source Files
+
diff --git a/tools/apps/hgjson/hgjsonDlg.cpp b/tools/apps/hgjson/hgjsonDlg.cpp
index 44d3c88..b1eb4eb 100644
--- a/tools/apps/hgjson/hgjsonDlg.cpp
+++ b/tools/apps/hgjson/hgjsonDlg.cpp
@@ -5892,6 +5892,32 @@ static const char* title_to_name(std::wstring& title)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ChgjsonDlg dialog
+static bool is_match(const char* str, const char* pattern)
+{
+ std::vector parts;
+ std::string all(pattern);
+ size_t pos = all.find("*");
+
+ while (pos != std::string::npos)
+ {
+ if (pos++)
+ parts.push_back(all.substr(0, pos));
+ all.erase(0, pos);
+ pos = all.find("*");
+ }
+ if (!all.empty())
+ parts.push_back(all);
+
+ for (pos = 0; pos < parts.size(); ++pos)
+ {
+ str = strstr(str, parts[pos].c_str());
+ if (!str)
+ break;
+ str += parts[pos].length();
+ }
+
+ return pos == parts.size();
+}
ChgjsonDlg::ChgjsonDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(ChgjsonDlg::IDD, pParent)
@@ -5899,6 +5925,7 @@ ChgjsonDlg::ChgjsonDlg(CWnd* pParent /*=NULL*/)
, show_list_tooltips_(true)
{
std::string py(hz_2_py::getLetter("ɫģʽ", true));
+ is_match("/usr/bin/python3.9", "bin*.9");
}
void ChgjsonDlg::DoDataExchange(CDataExchange* pDX)
diff --git a/tools/apps/hgjson/resource.h b/tools/apps/hgjson/resource.h
index 015ad52..b441d3b 100644
Binary files a/tools/apps/hgjson/resource.h and b/tools/apps/hgjson/resource.h differ
diff --git a/tools/solution/Release/hgjson.exe b/tools/solution/Release/hgjson.exe
index 3922d88..9e8a348 100644
Binary files a/tools/solution/Release/hgjson.exe and b/tools/solution/Release/hgjson.exe differ