diff --git a/build/.idea/build.iml b/build/.idea/build.iml
index 14585d1..8bca406 100644
--- a/build/.idea/build.iml
+++ b/build/.idea/build.iml
@@ -4,7 +4,7 @@
-
+
diff --git a/build/builder/build-assist.py b/build/builder/build-assist.py
index 50bea5c..d7f3c16 100644
--- a/build/builder/build-assist.py
+++ b/build/builder/build-assist.py
@@ -32,7 +32,7 @@ class BuilderWin(BuilderBase):
def build_assist(self):
cc.i('build tp_assist...')
- sln_file = os.path.join(env.root_path, 'client', 'tp_assist_win', 'tp_assist.vs2017.sln')
+ sln_file = os.path.join(env.root_path, 'client', 'tp_assist_win', 'tp_assist.vs2022.sln')
out_file = os.path.join(env.root_path, 'out', 'client', ctx.bits_path, ctx.target_path, 'tp_assist.exe')
if os.path.exists(out_file):
utils.remove(out_file)
@@ -85,16 +85,8 @@ class BuilderWin(BuilderBase):
utils.makedirs(tmp_cfg_path)
utils.copy_file(os.path.join(env.root_path, 'out', 'client', ctx.bits_path, ctx.target_path), tmp_app_path, 'tp_assist.exe')
- utils.copy_file(os.path.join(env.root_path, 'client', 'tp_assist_win', 'runtime'), tmp_app_path, 'msvcp140.dll')
- utils.copy_file(os.path.join(env.root_path, 'client', 'tp_assist_win', 'runtime'), tmp_app_path, 'vcruntime140.dll')
utils.copy_file(os.path.join(env.root_path, 'client', 'cfg'), tmp_cfg_path, ('tp-assist.windows.json', 'tp-assist.json'))
- utils.copy_file(os.path.join(env.root_path, 'client', 'cfg'), tmp_cfg_path, 'cacert.cer')
- utils.copy_file(os.path.join(env.root_path, 'client', 'cfg'), tmp_cfg_path, 'localhost.key')
- utils.copy_file(os.path.join(env.root_path, 'client', 'cfg'), tmp_cfg_path, 'localhost.pem')
-
- # assist configuration web page
- utils.copy_ex(os.path.join(env.root_path, 'client', 'tp_assist_win'), tmp_app_path, 'site')
utils.makedirs(os.path.join(tmp_app_path, 'tools', 'putty'))
utils.copy_file(os.path.join(env.root_path, 'client', 'tools', 'putty'), os.path.join(tmp_app_path, 'tools', 'putty'), 'putty.exe')
@@ -104,11 +96,6 @@ class BuilderWin(BuilderBase):
utils.copy_file(os.path.join(env.root_path, 'client', 'tools', 'winscp'), os.path.join(tmp_app_path, 'tools', 'winscp'), 'license.txt')
utils.makedirs(os.path.join(tmp_app_path, 'tools', 'tprdp'))
- # utils.copy_file(os.path.join(env.root_path, 'client', 'tools', 'tprdp'), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'tprdp-client.exe')
- # utils.copy_file(os.path.join(env.root_path, 'client', 'tools', 'tprdp'), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'tprdp-replay.exe')
- # utils.copy_file(os.path.join(env.root_path, 'client', 'tools', 'tprdp'), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'libeay32.dll')
- # utils.copy_file(os.path.join(env.root_path, 'client', 'tools', 'tprdp'), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'ssleay32.dll')
- # utils.copy_file(os.path.join(env.root_path, 'client', 'tools', 'tprdp'), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'msvcr120.dll')
utils.copy_file(os.path.join(env.root_path, 'client', 'tools', 'tprdp'), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'wfreerdp.exe')
utils.copy_file(os.path.join(env.root_path, 'client', 'tools'), os.path.join(tmp_app_path, 'tools'), 'securecrt-telnet.vbs')
@@ -137,11 +124,11 @@ class BuilderWin(BuilderBase):
utils.copy_file(qt_redist_path, tmp_app_path, 'api-ms-win-crt-string-l1-1-0.dll')
utils.copy_file(qt_redist_path, tmp_app_path, 'api-ms-win-crt-time-l1-1-0.dll')
utils.copy_file(qt_redist_path, tmp_app_path, 'api-ms-win-crt-utility-l1-1-0.dll')
-
utils.copy_file(qt_redist_path, tmp_app_path, 'Qt5Core.dll')
utils.copy_file(qt_redist_path, tmp_app_path, 'Qt5Gui.dll')
utils.copy_file(qt_redist_path, tmp_app_path, 'Qt5Network.dll')
utils.copy_file(qt_redist_path, tmp_app_path, 'Qt5Widgets.dll')
+ utils.copy_file(qt_redist_path, tmp_app_path, 'msvcp140_1.dll')
utils.copy_ex(os.path.join(qt_redist_path, 'platforms'), os.path.join(tmp_app_path, 'platforms'))
utils.copy_ex(os.path.join(qt_redist_path, 'styles'), os.path.join(tmp_app_path, 'styles'))
utils.copy_ex(os.path.join(qt_redist_path, 'translations'), os.path.join(tmp_app_path, 'translations'))
diff --git a/build/builder/core/env.py b/build/builder/core/env.py
index 4439875..92bdbe1 100644
--- a/build/builder/core/env.py
+++ b/build/builder/core/env.py
@@ -129,12 +129,18 @@ class Env(object):
# if warn_miss_tool:
# cc.w(' - can not locate Visual Studio installation, so I can build nothing.')
- if 'msbuild' in _tmp:
- self.msbuild = _tmp['msbuild']
+ if 'vs_path' in _tmp:
+ self.visual_studio_path = _tmp['vs_path']
- if self.msbuild is None or not os.path.exists(self.msbuild):
+ self.msbuild = os.path.join(self.visual_studio_path, 'MSBuild', 'Current', 'Bin', 'MSBuild.exe')
+ if not os.path.exists(self.msbuild):
+ self.msbuild = None
+ if warn_miss_tool:
+ cc.w(' - can not locate `MSBuild`, so I can build nothing.')
+ else:
+ self.visual_studio_path = None
if warn_miss_tool:
- cc.w(' - can not locate `MSBuild`, so I can build nothing.')
+ cc.w(' - can not locate Visual Studio installation, so I can build nothing.')
if 'nsis' in _tmp:
self.nsis = _tmp['nsis']
diff --git a/build/builder/core/utils.py b/build/builder/core/utils.py
index 5b9143e..a7d6a5d 100644
--- a/build/builder/core/utils.py
+++ b/build/builder/core/utils.py
@@ -322,7 +322,7 @@ def qt_build(prj_path, prj_name, bit_path, target_path):
tmp_path = os.path.join(env.root_path, 'out', '_tmp_', prj_name, bit_path)
makedirs(tmp_path)
# C:\Windows\System32\cmd.exe /A /Q /K C:\Qt\Qt5.12.0\5.12.0\msvc2017\bin\qtenv2.bat
- cmd = 'C:\\Windows\\System32\\cmd.exe /A /Q /C ""{}\\qt-helper.bat" "{}\\bin\\qtenv2.bat" "{}VC\\Auxiliary\\Build\\vcvarsall.bat" {} "{}" "{}" {}"'.format(env.build_path, env.qt, env.visual_studio_path, bit_path, tmp_path, prj_path, target_path)
+ cmd = 'C:\\Windows\\System32\\cmd.exe /A /Q /C ""{}\\qt-helper.bat" "{}\\bin\\qtenv2.bat" "{}\\VC\\Auxiliary\\Build\\vcvarsall.bat" {} "{}" "{}" {}"'.format(env.build_path, env.qt, env.visual_studio_path, bit_path, tmp_path, prj_path, target_path)
ret, _ = sys_exec(cmd)
if ret != 0:
raise RuntimeError('build Qt project `{}` failed.'.format(prj_name))
diff --git a/client/tp_assist_win/dlg_main.cpp b/client/tp_assist_win/dlg_main.cpp
index d98d8b4..33ad8c5 100644
--- a/client/tp_assist_win/dlg_main.cpp
+++ b/client/tp_assist_win/dlg_main.cpp
@@ -33,7 +33,7 @@ static BOOL onInitDialog(HWND hwndDlg);
static wchar_t g_wsz_url[1024] = {0};
-INT_PTR CALLBACK eomDlgMainProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK tpDlgMainProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
if (0 != message && g_dwTaskbarRecreateMessage == message)
{
diff --git a/client/tp_assist_win/dlg_main.h b/client/tp_assist_win/dlg_main.h
index b9d2d70..66ce054 100644
--- a/client/tp_assist_win/dlg_main.h
+++ b/client/tp_assist_win/dlg_main.h
@@ -1,5 +1,5 @@
-#ifndef __EOMASSIST_DLG_MAIN_H__
-#define __EOMASSIST_DLG_MAIN_H__
+#ifndef __TP_ASSIST_DLG_MAIN_H__
+#define __TP_ASSIST_DLG_MAIN_H__
#include
@@ -7,6 +7,6 @@
#define WMU_DLG_MAIN_EXIT (WM_USER + 2)
extern HWND g_hDlgMain;
-INT_PTR CALLBACK eomDlgMainProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK tpDlgMainProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam);
-#endif // __EOMASSIST_DLG_MAIN_H__
+#endif // __TP_ASSIST_DLG_MAIN_H__
diff --git a/client/tp_assist_win/tp_assist.cpp b/client/tp_assist_win/tp_assist.cpp
index 2e79c41..92381ab 100644
--- a/client/tp_assist_win/tp_assist.cpp
+++ b/client/tp_assist_win/tp_assist.cpp
@@ -75,7 +75,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmd
#ifdef EX_DEBUG
EXLOG_LEVEL(EX_LOG_LEVEL_DEBUG);
#else
- EXLOG_LEVEL(EX_LOG_LEVEL_INFO);
+ EXLOG_LEVEL(EX_LOG_LEVEL_VERBOSE);
#endif
EXLOG_FILE(L"tp_assist.log", g_env.m_log_path.c_str(), EX_LOG_FILE_MAX_SIZE, EX_LOG_FILE_MAX_COUNT);
@@ -250,7 +250,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
case WM_COMMAND:
if (IDM_MAIN == LOWORD(wParam)) {
- CreateDialog(g_hInstance, MAKEINTRESOURCE(IDD_DLG_MAIN), hWnd, eomDlgMainProc);
+ CreateDialog(g_hInstance, MAKEINTRESOURCE(IDD_DLG_MAIN), hWnd, tpDlgMainProc);
ShowWindow(g_hDlgMain, SW_HIDE);
}
break;
diff --git a/client/tp_assist_win/tp_assist.vs2020.sln b/client/tp_assist_win/tp_assist.vs2022.sln
similarity index 91%
rename from client/tp_assist_win/tp_assist.vs2020.sln
rename to client/tp_assist_win/tp_assist.vs2022.sln
index 89fcf0b..0105c8d 100644
--- a/client/tp_assist_win/tp_assist.vs2020.sln
+++ b/client/tp_assist_win/tp_assist.vs2022.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32505.173
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tp_assist", "tp_assist.vs2020.vcxproj", "{63B7A8F2-9722-487C-A92A-3DB5D8CA1473}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tp_assist", "tp_assist.vs2022.vcxproj", "{63B7A8F2-9722-487C-A92A-3DB5D8CA1473}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/client/tp_assist_win/tp_assist.vs2020.vcxproj b/client/tp_assist_win/tp_assist.vs2022.vcxproj
similarity index 96%
rename from client/tp_assist_win/tp_assist.vs2020.vcxproj
rename to client/tp_assist_win/tp_assist.vs2022.vcxproj
index 0350bbf..9636f1c 100644
--- a/client/tp_assist_win/tp_assist.vs2020.vcxproj
+++ b/client/tp_assist_win/tp_assist.vs2022.vcxproj
@@ -78,7 +78,7 @@
MaxSpeed
true
true
- WIN32;MG_ENABLE_SSL;NDEBUG;_WINDOWS;_WINSOCK_DEPRECATED_NO_WARNINGS;MG_ENABLE_THREADS;MG_DISABLE_HTTP_DIGEST_AUTH;MG_DISABLE_MQTT;MG_DISABLE_SSI;MG_DISABLE_FILESYSTEM;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_WINSOCK_DEPRECATED_NO_WARNINGS;MG_ENABLE_SSL;MG_ENABLE_THREADS;MG_DISABLE_HTTP_DIGEST_AUTH;MG_DISABLE_MQTT;MG_DISABLE_SSI;MG_DISABLE_FILESYSTEM;MG_ENABLE_SYNC_RESOLVER;MG_ENABLE_GETADDRINFO;%(PreprocessorDefinitions)
true
..\..\common\teleport;..\..\common\libex\include;..\..\external\jsoncpp\include;..\..\external\openssl\include
MultiThreaded
diff --git a/client/tp_assist_win/tp_assist.vs2020.vcxproj.filters b/client/tp_assist_win/tp_assist.vs2022.vcxproj.filters
similarity index 100%
rename from client/tp_assist_win/tp_assist.vs2020.vcxproj.filters
rename to client/tp_assist_win/tp_assist.vs2022.vcxproj.filters
diff --git a/config.json.in b/config.json.in
index fb1b5ac..9ed148f 100644
--- a/config.json.in
+++ b/config.json.in
@@ -15,9 +15,9 @@
"cmake": "/opt/cmake/bin/cmake"
},
"#.toolchain.example.windows": {
- "qt_path": "C:\\Qt\\Qt5.15.2\\5.15.2\\msvc2017",
+ "qt_path": "C:\\Qt\\5.15.2\\msvc2019",
"cmake": "C:\\Program Files(x86)\\CMake\\bin\\cmake.exe",
- "msbuild": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe",
+ "vs_path": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community",
"wget": "",
"7z": "",
"nsis": ""
diff --git a/dist/client/windows/assist/setup.nsh b/dist/client/windows/assist/setup.nsh
index 74ed15a..45c0e48 100644
Binary files a/dist/client/windows/assist/setup.nsh and b/dist/client/windows/assist/setup.nsh differ
diff --git a/make.sh.in b/make.sh.in
index 521834e..b922404 100644
--- a/make.sh.in
+++ b/make.sh.in
@@ -54,10 +54,10 @@ function build_win
on_error "Sorry, need x86 version of Python 3.7 or above."
fi
# and must be x86 version.
- $("${pyexec}" -c "import platform;import sys;ret=0 if platform.architecture()[0]=='32bit' else 1;sys.exit(ret)")
- if [ $? -ne 0 ]; then
- on_error "Sorry, need x86 version of Python 3.7 or above."
- fi
+ # ret=$("${pyexec}" -c "import platform;import sys;ret=0 if platform.architecture()[0]=='32bit' else 1;print(ret)")
+ # if [ $ret -ne 0 ]; then
+ # on_error "Sorry, need x86 version of Python 3.7 or above."
+ # fi
${pyexec} -B "${PATH_ROOT}/build/build.py" $@
}