From 35fb25089781bc5a6619d2cd428fc10a27538bfb Mon Sep 17 00:00:00 2001 From: Zvicii Date: Fri, 12 Aug 2022 17:13:27 +0800 Subject: [PATCH 1/9] Update README.md --- README.md | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a1f2115d..1f36e4bd 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,15 @@ ## 最低要求 - - CMake 3.10 或以上版本 - - Visual Studio 2017 或以上版本 - - Git +- CMake 3.10 或以上版本 +- Visual Studio 2017 或以上版本 +- Git ## 开发步骤 NIM Demo 从 8.4.0 版本开始使用 CMake 管理工程结构,您需要下载安装 CMake 并安装到系统中:[https://cmake.org/download/](https://cmake.org/download/) - > 源代码脚本中使用 Git 和 CMake 指令根据当前仓库的提交信息、提交次数来动态生成的目录结构及 `.rc` 文件版本,您系统中必须安装 Git 客户端并推荐使用 git clone 下载代码而不是直接下载压缩包! +> 源代码脚本中使用 Git 和 CMake 指令根据当前仓库的提交信息、提交次数来动态生成的目录结构及 `.rc` 文件版本,您系统中必须安装 Git 客户端并推荐使用 git clone 下载代码而不是直接下载压缩包! 安装完成后,首先克隆项目到你的磁盘中: @@ -96,11 +96,28 @@ cmake . -Bbuild -G"Visual Studio 15 2017" -T"v141_xp" -DBUILD_WITH_NERTC_G2=ON - cmake --build build --config Debug --target install ``` +## 常见问题 + +- 检测到“\_ITERATOR_DEBUG_LEVEL”的不匹配项 + 该问题常见于 Build Type 发生变化时,可在 build 之前加入 clean 命令 + + ```bash + cmake -Bbuild -G"Visual Studio 15 2017" -T"v141_xp" -DCMAKE_BUILD_TYPE=Release + cmake --build build --config Release --target clean + cmake --build build --config Release --target INSTALL + ``` + +- “rc.exe”已退出, 代码为 x + 检查项目路径是否包含中文,导致 rc 文件中带中文编译出错 + +- Demo 运行提示“资源不存在” + 检查项目 bin 目录中 cef_themes、res 等资源是否被删除,若被删除可用 git 恢复 + ## 交流 - - 遇到问题:关注[云信开发人员手册](https://dev.yunxin.163.com/)帮助您理解和使用云信 SDK 接口 - - 提交缺陷:在确保使用最新版本依然存在问题时请尽量以简洁的语言描述清楚复现该问题的步骤并提交 Issue - - 功能建议:如果你有什么好的想法或者提案,欢迎提交 Issue 与我们交流 +- 遇到问题:关注[云信开发人员手册](https://dev.yunxin.163.com/)帮助您理解和使用云信 SDK 接口 +- 提交缺陷:在确保使用最新版本依然存在问题时请尽量以简洁的语言描述清楚复现该问题的步骤并提交 Issue +- 功能建议:如果你有什么好的想法或者提案,欢迎提交 Issue 与我们交流 -#推荐好友使用云信,即享1500元京东卡奖励# 点击参与https://yunxin.163.com/promotion/recommend?channel=github -[![main]( https://yx-web-nosdn.netease.im/quickhtml%2Fassets%2Fyunxin%2Fdefault%2F2022%2Fgithub%2F233.png)](https://yunxin.163.com/promotion/recommend?channel=github) +#推荐好友使用云信,即享 1500 元京东卡奖励# 点击参与https://yunxin.163.com/promotion/recommend?channel=github +[![main](https://yx-web-nosdn.netease.im/quickhtml%2Fassets%2Fyunxin%2Fdefault%2F2022%2Fgithub%2F233.png)](https://yunxin.163.com/promotion/recommend?channel=github) From deefe53999b9f72637e3d098d4f41b56dd50d62e Mon Sep 17 00:00:00 2001 From: Windows-CI Date: Tue, 6 Dec 2022 11:59:44 +0800 Subject: [PATCH 2/9] chore: show native profile UI Signed-off-by: Windows-CI --- tool_kits/ui_component/ui_kit/guiex/main/main_form_ex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool_kits/ui_component/ui_kit/guiex/main/main_form_ex.cpp b/tool_kits/ui_component/ui_kit/guiex/main/main_form_ex.cpp index 0877fe05..028ac57e 100644 --- a/tool_kits/ui_component/ui_kit/guiex/main/main_form_ex.cpp +++ b/tool_kits/ui_component/ui_kit/guiex/main/main_form_ex.cpp @@ -99,8 +99,8 @@ namespace nim_comp btn_online_state_ = dynamic_cast(FindControl(L"btn_online_state")); btn_online_state_->SetVisible(nim_comp::SubscribeEventManager::GetInstance()->IsEnabled()); btn_header_->AttachClick([this](ui::EventArgs* param) { - nim_comp::WindowsManager::GetInstance()->SingletonShow(nim_comp::ProfileMine::kClassName); - //nim_comp::ProfileForm::ShowProfileForm(nim_comp::LoginManager::GetInstance()->GetAccount()); + //nim_comp::WindowsManager::GetInstance()->SingletonShow(nim_comp::ProfileMine::kClassName); + nim_comp::ProfileForm::ShowProfileForm(nim_comp::LoginManager::GetInstance()->GetAccount()); return true; }); btn_online_state_->AttachClick(nbase::Bind(&MainFormEx::OnlineStateMenuButtonClick, this, std::placeholders::_1)); From 87a7eb270e58cc1d2244ccc657e51d3a16c2d031 Mon Sep 17 00:00:00 2001 From: Dylan <2894220@qq.com> Date: Tue, 6 Dec 2022 12:55:39 +0800 Subject: [PATCH 3/9] fix: build error on GitHub actions Signed-off-by: Dylan <2894220@qq.com> --- tool_kits/install/window/setup_wnd.cpp | 2 +- tool_kits/uninstall/window/setup_wnd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tool_kits/install/window/setup_wnd.cpp b/tool_kits/install/window/setup_wnd.cpp index 66aedd86..5fec40e2 100644 --- a/tool_kits/install/window/setup_wnd.cpp +++ b/tool_kits/install/window/setup_wnd.cpp @@ -97,7 +97,7 @@ void SetupForm::InitWindow() Setup(); } } -HRESULT SetupForm::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +LRESULT SetupForm::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { bHandled = FALSE; if (start_setup_ && wParam == 1) diff --git a/tool_kits/uninstall/window/setup_wnd.cpp b/tool_kits/uninstall/window/setup_wnd.cpp index f4e49f83..48e824a6 100644 --- a/tool_kits/uninstall/window/setup_wnd.cpp +++ b/tool_kits/uninstall/window/setup_wnd.cpp @@ -85,7 +85,7 @@ void SetupForm::InitWindow() progress_pos_ = (ui::Label*)FindControl(L"progress_pos"); check_userdata_ = (ui::CheckBox*)FindControl(L"chkbox_userdata"); } -HRESULT SetupForm::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +LRESULT SetupForm::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { bHandled = FALSE; if (pre_progress_pos_ > 0 && pre_progress_pos_ < 100 && wParam == 0) From 8416dbb1b477db5f34b2200b9daf34a37f2fc8a9 Mon Sep 17 00:00:00 2001 From: Dylan <2894220@qq.com> Date: Tue, 6 Dec 2022 14:14:01 +0800 Subject: [PATCH 4/9] chore: using MSVC 15 in GitHub actions Signed-off-by: Dylan <2894220@qq.com> --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 0de79b5a..b80c84ee 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -27,14 +27,14 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{env.GITHUB_WORKSPACE}}/build -T"v141_xp" -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} + run: cmake -B ${{env.GITHUB_WORKSPACE}}/build -AWin32 -T"v141_xp" -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} - name: Build nim demo # Build your program with the given configuration run: cmake --build ${{env.GITHUB_WORKSPACE}}/build --config ${{env.BUILD_CONFIGURATION}} --target install - name: Configure nim demo installer - run: cmake tool_kits -B ${{env.GITHUB_WORKSPACE}}/build_setup -T"v141_xp" -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} + run: cmake tool_kits -B ${{env.GITHUB_WORKSPACE}}/build_setup -AWin32 -T"v141_xp" -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}} - name: Build nim demo installer run: cmake --build ${{env.GITHUB_WORKSPACE}}/build_setup --config ${{env.BUILD_CONFIGURATION}} --target installer From 2338c01b3e2b4f416cd2afe6cda3601ba20363e2 Mon Sep 17 00:00:00 2001 From: Dylan <2894220@qq.com> Date: Tue, 6 Dec 2022 14:56:25 +0800 Subject: [PATCH 5/9] chore: link nertc 32-bit only Signed-off-by: Dylan <2894220@qq.com> --- CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9516ffe..ad4f2f51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,13 +84,8 @@ IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nertc-SDK.zip" AND NOT BUILD_WITH_CONAN) ENDIF () EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf "${CMAKE_BINARY_DIR}/nertc-SDK.zip" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) FILE(GLOB_RECURSE NERTC_HEADER_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/*.h) -IF (CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE MATCHES "x64") - FILE(GLOB_RECURSE NERTC_LIB_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/lib/x64/*.lib) - FILE(GLOB_RECURSE NERTC_BINARY_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/dll/x64/*.dll) -ELSE () - FILE(GLOB_RECURSE NERTC_LIB_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/lib/x86/*.lib) - FILE(GLOB_RECURSE NERTC_BINARY_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/dll/x86/*.dll) -ENDIF () +FILE(GLOB_RECURSE NERTC_LIB_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/lib/x86/*.lib) +FILE(GLOB_RECURSE NERTC_BINARY_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/dll/x86/*.dll) FILE(COPY ${NERTC_HEADER_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/include) FILE(COPY ${NERTC_LIB_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/lib) From aba939de24688dd6b109071da9900fe93f879922 Mon Sep 17 00:00:00 2001 From: Dylan <2894220@qq.com> Date: Tue, 6 Dec 2022 15:30:11 +0800 Subject: [PATCH 6/9] chore: update NIM SDK to 9.7.0 Signed-off-by: Dylan <2894220@qq.com> --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad4f2f51..36c72dbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ SET(GROUP_UI_COMPONENTS "ui_components") SET(RELEASE_OUTPUT_7Z_FILE "${CMAKE_BINARY_DIR}/release.7z") STRING(REPLACE "/" "\\\\" RELEASE_OUTPUT_7Z_FILE_WIN ${RELEASE_OUTPUT_7Z_FILE}) -SET(NIM_CROSS_PLATFORM_SDK_FILE_NAME "nim-win32-ia32-refs-tags-9.4.0.1554-build.166.tar.gz") +SET(NIM_CROSS_PLATFORM_SDK_FILE_NAME "nim-win32-ia32-9-7-0-156-build-1671629.tar.gz") SET(DEBUG_THIRD_PARTY_LIBS "http://yx-web.nos.netease.com/package/1619605746/NIM_Windows_Demo_Build_Binaries_Debug.zip") SET(RELEASE_THIRD_PARTY_LIBS "http://yx-web.nos.netease.com/package/1619605768/NIM_Windows_Demo_Build_Binaries_Release.zip") SET(NIM_CROSS_PLATFORM_SDK_URL "https://yx-web-nosdn.netease.im/package/${NIM_CROSS_PLATFORM_SDK_FILE_NAME}") From 6b81b0b91f27421c2b621bad3d4841b2d91e898d Mon Sep 17 00:00:00 2001 From: Zvicii Date: Mon, 6 Mar 2023 09:53:48 +0800 Subject: [PATCH 7/9] chore: update nim sdk version to 9.9.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9516ffe..330ca7a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ SET(GROUP_UI_COMPONENTS "ui_components") SET(RELEASE_OUTPUT_7Z_FILE "${CMAKE_BINARY_DIR}/release.7z") STRING(REPLACE "/" "\\\\" RELEASE_OUTPUT_7Z_FILE_WIN ${RELEASE_OUTPUT_7Z_FILE}) -SET(NIM_CROSS_PLATFORM_SDK_FILE_NAME "nim-win32-ia32-refs-tags-9.4.0.1554-build.166.tar.gz") +SET(NIM_CROSS_PLATFORM_SDK_FILE_NAME "nim-win32-ia32-9-9-0-383-build-1750145.tar.gz") SET(DEBUG_THIRD_PARTY_LIBS "http://yx-web.nos.netease.com/package/1619605746/NIM_Windows_Demo_Build_Binaries_Debug.zip") SET(RELEASE_THIRD_PARTY_LIBS "http://yx-web.nos.netease.com/package/1619605768/NIM_Windows_Demo_Build_Binaries_Release.zip") SET(NIM_CROSS_PLATFORM_SDK_URL "https://yx-web-nosdn.netease.im/package/${NIM_CROSS_PLATFORM_SDK_FILE_NAME}") From 9292dfae3bd54a29f54cb100f79c84fa5e19f26c Mon Sep 17 00:00:00 2001 From: Zvicii Date: Tue, 7 Mar 2023 17:31:47 +0800 Subject: [PATCH 8/9] fix: cannot convert argument 1 from 'NIMProxyType' to 'nim::NIMProxyType' --- nim_win_demo/gui/login/login_form.cpp | 2 +- nim_win_demo/gui/proxy/proxy_form.cpp | 4 ++-- tool_kits/net/export/nim_tools_http_def.h | 10 ---------- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/nim_win_demo/gui/login/login_form.cpp b/nim_win_demo/gui/login/login_form.cpp index 32955989..5b561ed2 100644 --- a/nim_win_demo/gui/login/login_form.cpp +++ b/nim_win_demo/gui/login/login_form.cpp @@ -34,7 +34,7 @@ void LoginForm::OnLogin() chkbox_private_use_proxy_enable_->SetEnabled(true); return; } - nim_http::SetGlobalProxy(NIMProxyType::kNIMProxyNone, "", 0, "", ""); + nim_http::SetGlobalProxy(nim::kNIMProxyNone, "", 0, "", ""); nim_http::HttpRequest req(url, nullptr,0, [this, url](bool ret, int code, const std::string& configs) { Post2UI(this->ToWeakCallback([this,ret,code, configs, url]() { diff --git a/nim_win_demo/gui/proxy/proxy_form.cpp b/nim_win_demo/gui/proxy/proxy_form.cpp index 0f8f8b5d..b7a0f244 100644 --- a/nim_win_demo/gui/proxy/proxy_form.cpp +++ b/nim_win_demo/gui/proxy/proxy_form.cpp @@ -113,10 +113,10 @@ void ProxyForm::ConfirmSetting() //httptool auto httptool_proxy_setting = proxy_httptool_->GetProxySetting(); if (httptool_proxy_setting->IsUseGlobalSetting()) - nim_http::SetGlobalProxy((NIMProxyType)(ProxyTip::ConvertBaseProxytypeToNimProxyType(global_proxy_setting->GetType())), \ + nim_http::SetGlobalProxy((nim::NIMProxyType)(ProxyTip::ConvertBaseProxytypeToNimProxyType(global_proxy_setting->GetType())), \ global_proxy_setting->GetHost(), global_proxy_setting->GetPort(), global_proxy_setting->GetUserName(), global_proxy_setting->GetPassowrd()); else - nim_http::SetGlobalProxy((NIMProxyType)(ProxyTip::ConvertBaseProxytypeToNimProxyType(httptool_proxy_setting->GetType())), \ + nim_http::SetGlobalProxy((nim::NIMProxyType)(ProxyTip::ConvertBaseProxytypeToNimProxyType(httptool_proxy_setting->GetType())), \ httptool_proxy_setting->GetHost(), httptool_proxy_setting->GetPort(), httptool_proxy_setting->GetUserName(), httptool_proxy_setting->GetPassowrd()); //VChat diff --git a/tool_kits/net/export/nim_tools_http_def.h b/tool_kits/net/export/nim_tools_http_def.h index e38083ee..09077100 100644 --- a/tool_kits/net/export/nim_tools_http_def.h +++ b/tool_kits/net/export/nim_tools_http_def.h @@ -11,16 +11,6 @@ extern"C" { #endif -/** @enum NIMProxyType 代理类型 */ - enum NIMProxyType - { - kNIMProxyNone = 0, /**< 不使用代理*/ - kNIMProxyHttp11 = 1, /**< HTTP 1.1 Proxy*/ - kNIMProxySocks4 = 4, /**< Socks4 Proxy*/ - kNIMProxySocks4a = 5, /**< Socks4a Proxy*/ - kNIMProxySocks5 = 6, /**< Socks5 Proxy*/ -}; - /** @typedef void* HttpRequestHandle * http任务句柄 */ From d0e39e744831008889aa792a3fc5f8d496fb882f Mon Sep 17 00:00:00 2001 From: Dylan <2894220@qq.com> Date: Tue, 6 Dec 2022 14:56:25 +0800 Subject: [PATCH 9/9] chore: link nertc 32-bit only Signed-off-by: Dylan <2894220@qq.com> --- CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 330ca7a3..7abdf291 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,13 +84,8 @@ IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nertc-SDK.zip" AND NOT BUILD_WITH_CONAN) ENDIF () EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar -xf "${CMAKE_BINARY_DIR}/nertc-SDK.zip" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) FILE(GLOB_RECURSE NERTC_HEADER_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/*.h) -IF (CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE MATCHES "x64") - FILE(GLOB_RECURSE NERTC_LIB_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/lib/x64/*.lib) - FILE(GLOB_RECURSE NERTC_BINARY_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/dll/x64/*.dll) -ELSE () - FILE(GLOB_RECURSE NERTC_LIB_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/lib/x86/*.lib) - FILE(GLOB_RECURSE NERTC_BINARY_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/dll/x86/*.dll) -ENDIF () +FILE(GLOB_RECURSE NERTC_LIB_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/lib/x86/*.lib) +FILE(GLOB_RECURSE NERTC_BINARY_FIELS ${CMAKE_BINARY_DIR}/nertc_sdk_windows*/dll/x86/*.dll) FILE(COPY ${NERTC_HEADER_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/include) FILE(COPY ${NERTC_LIB_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/lib)