diff --git a/build/builder/core/env.py b/build/builder/core/env.py index 5a1dfe0..a312dbc 100644 --- a/build/builder/core/env.py +++ b/build/builder/core/env.py @@ -199,6 +199,8 @@ class Env(object): def _get_nsis(self): p = self._winreg_read(winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\NSIS\Unicode', '') + if p is None: + p = self._winreg_read(winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\NSIS', '') return os.path.join(p[0], 'makensis.exe') if p is not None else None def _winreg_read(self, base, path, key): diff --git a/client/tp_assist/tp_assist.cpp b/client/tp_assist/tp_assist.cpp index 8a2592f..f36006d 100644 --- a/client/tp_assist/tp_assist.cpp +++ b/client/tp_assist/tp_assist.cpp @@ -4,6 +4,11 @@ #include "resource.h" #include "dlg_main.h" #include "ts_http_rpc.h" + +#ifdef _DEBUG +# include +#endif + #pragma comment(lib, "shlwapi.lib") #define WMU_INSTANCE_EXIT (WM_USER + 2) diff --git a/client/tp_assist/tp_assist.vs2015.vcxproj b/client/tp_assist/tp_assist.vs2015.vcxproj index bda9abb..6d36e81 100644 --- a/client/tp_assist/tp_assist.vs2015.vcxproj +++ b/client/tp_assist/tp_assist.vs2015.vcxproj @@ -46,6 +46,8 @@ true ..\..\out\client\$(PlatformTarget)\$(Configuration)\ ..\..\out\_tmp_\$(ProjectName)\$(PlatformTarget)\$(Configuration)\ + D:\apps\vld\include;$(IncludePath) + D:\apps\vld\lib\Win32;$(LibraryPath) false diff --git a/client/tp_assist/ts_http_rpc.cpp b/client/tp_assist/ts_http_rpc.cpp index 97ceb56..94dcbc2 100644 --- a/client/tp_assist/ts_http_rpc.cpp +++ b/client/tp_assist/ts_http_rpc.cpp @@ -105,7 +105,7 @@ void http_rpc_main_loop(void) g_http_interface.run(); - EXLOGW("[prc] main loop end.\n"); + EXLOGW("[rpc] main loop end.\n"); } void http_rpc_stop(void) @@ -188,7 +188,6 @@ bool TsHttpRpc::init(const char* ip, int port) else sprintf_s(addr, 128, "%s:%d", ip, port); - mg_mgr_init(&m_mg_mgr, NULL); nc = mg_bind(&m_mg_mgr, addr, _mg_event_handler); if (nc == NULL) { @@ -250,7 +249,7 @@ void TsHttpRpc::_mg_event_handler(struct mg_connection *nc, int ev, void *ev_dat memcpy(&_uri[0], hm->uri.p, hm->uri.len); uri = &_uri[0]; -#ifdef TS_DEBUG +#ifdef EX_DEBUG char* dbg_method = NULL; if (hm->method.len == 3 && 0 == memcmp(hm->method.p, "GET", hm->method.len)) dbg_method = "GET"; @@ -319,6 +318,7 @@ void TsHttpRpc::_mg_event_handler(struct mg_connection *nc, int ev, void *ev_dat mg_printf(nc, "HTTP/1.0 200 OK\r\nAccess-Control-Allow-Origin: *\r\nContent-Length: %d\r\nContent-Type: %s\r\n\r\n", file_size, content_type.c_str()); mg_send(nc, buf, file_size); + delete []buf; nc->flags |= MG_F_SEND_AND_CLOSE; return; }