Skip to content

Commit

Permalink
Merge branch 'release/10.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
nmgwddj committed Jan 13, 2025
2 parents 7f2ec7a + 30948f6 commit fce20f4
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 13 deletions.
38 changes: 36 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
BUILD_CONFIGURATION: Release

jobs:
build:
build-x86_64:
runs-on: windows-2019

steps:
Expand All @@ -30,6 +30,40 @@ jobs:
- name: Fetch all tags
run: git fetch --tags --prune --unshallow --force

- 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 -Bbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}}

- name: Build nim-demo
# Build your program with the given configuration
run: cmake --build build --config ${{env.BUILD_CONFIGURATION}}

- name: Build nim-demo installer
run: cmake --build build --config ${{env.BUILD_CONFIGURATION}} --target installer

- uses: actions/upload-artifact@v4
with:
name: PC_Demo_Setup_x64
path: bin/NIM_Demo_Setup*.exe
build-x86:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1

- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.65.0

- name: Fetch all tags
run: git fetch --tags --prune --unshallow --force

- 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
Expand All @@ -44,5 +78,5 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: PC_Demo_Setup
name: PC_Demo_Setup_Win32
path: bin/NIM_Demo_Setup*.exe
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

网易云信 PC IM Demo 是基于[网易云信 PC SDK](https://yunxin.163.com/im-sdk-demo) 制作的即时通讯示例程序,UI 库使用 [NIM Duilib](https://github.com/netease-im/NIM_Duilib_Framework) 制作

![GitHub](https://img.shields.io/badge/license-MIT-green.svg)
[![Actions Status](https://github.com/netease-im/NIM_PC_Demo/workflows/MSBuild/badge.svg)](https://github.com/netease-im/NIM_PC_Demo/actions)
![GitHub](https://img.shields.io/badge/license-MIT-green.svg) | [![Actions Status](https://github.com/netease-im/NIM_PC_Demo/workflows/MSBuild/badge.svg)](https://github.com/netease-im/NIM_PC_Demo/actions)

## 预览

Expand All @@ -29,12 +28,24 @@ git clone https://github.com/netease-im/NIM_PC_Demo.git --depth 10

执行如下命令初始化 Debug 调试版本的项目:

> 首次初始化 Debug 或 Release 工程时会自动下载并编译依赖的三方库代码,这个过程可能相对较慢,请耐心等待。当您再次编译时,将不再重复下载和编译三方库代码而是使用上一次编译后的产物。
> [!NOTE]
> 首次初始化 Debug 或 Release 工程时会自动下载并编译依赖的三方库代码,这个过程可能相对较慢,请耐心等待。当您再次编译时,将不再重复下载和编译三方库代码而是使用上一次编译后的产物。
```bash
# 生成 64 位 Debug 工程,如果您未指定 Visual Studio 版本将默认使用本机安装的最新版本
cmake -Bbuild -Ax64 -DCMAKE_BUILD_TYPE=Debug

# 生成 32 位 Debug 工程
cmake -Bbuild -AWin32 -DCMAKE_BUILD_TYPE=Debug
```

> [!TIP]
> Visual Studio 2017 以下版本工具链不支持使用 cmake -A 参数来指定目标产物架构,您可以使用如下命令分别生成 32 位和 64 位的工程
>
> `cmake -Bbuild -G "Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=Debug`
>
> `cmake -Bbuild -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Debug`
您可以通过打开 build 目录下的 `nim_win_demo.sln` 来进行调试或通过 CMake 命令直接编译:

```bash
Expand All @@ -46,13 +57,20 @@ cmake --build build --config Debug
如您需要编译 Release 版本,则将上面的命令中 Debug 修改为 Release 即可:

```bash
# 生成 64 位 Release 工程,
cmake -Bbuild -Ax64 -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

# 生成 32 位 Release 工程,
cmake -Bbuild -AWin32 -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
```

> 所有产物均生成在项目根目录下的 bin 文件夹中,项目编译完成后您可以直接从 bin 目录下运行 nim_demo.exe 来启动 Demo
> [!TIP]
> 所有产物均生成在项目根目录下的 bin 文件夹中,项目编译完成后您可以直接从 bin 目录下运行 nim_demo.exe 来启动 Demo
> 需要注意的是,由于 Debug 和 Release 版本的依赖库文件都会拷贝到 bin 目录下,因此在切换 Debug 和 Release 版本时请使用 git clean -xdf 命令清理 bin 目录下的临时文件
> [!IMPORTANT]
> 需要注意的是,由于 Debug 和 Release 版本的依赖库文件都会拷贝到 bin 目录下,因此在切换 Debug 和 Release 版本时请使用 `git clean -xdf` 命令清理 bin 目录下的临时文件
### 制作安装包

Expand Down
8 changes: 4 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ class NebaseConan(ConanFile):
exports_sources = "*", "!build"

def requirements(self):
self.requires("libjpeg/9e")
self.requires("libjpeg/9c")
self.requires("openssl/3.3.2")
self.requires("jsoncpp/1.9.5")
self.requires("libuv/1.49.0")
self.requires("libyuv/1892")
self.requires("sqlite3/3.46.1")
self.requires("sqlite3/3.36.0")
self.requires("tinyxml/2.6.2")
self.requires("nim/10.5.0@yunxin/stable")
self.requires("nim/10.7.1@yunxin/stable")
self.requires("nertc/4.1.1@yunxin/stable")
self.requires("libcef/3.2623.1401@yunxin/stable")
self.requires("ne_live_player/1.1.1@yunxin/stable")
self.requires("ne_live_player/1.6.9@yunxin/stable")
self.requires("image_ole/4.2.0@yunxin/stable")
self.requires("ne_transfer/0.1.0@yunxin/stable")

Expand Down
3 changes: 3 additions & 0 deletions tool_kits/install/utils/7zDec.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#define EXTERN_C_END
#endif
#endif
#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))
#include <intrin.h>
#endif

EXTERN_C_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion tool_kits/install/window/setup_wnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SetupForm : public ui::WindowImplBase
virtual UINT GetClassStyle() const override;
virtual void OnFinalMessage(HWND hWnd) override;
virtual void InitWindow() override;
virtual HRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) override;
virtual LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) override;
virtual bool Notify(ui::EventArgs* msg);

private:
Expand Down
3 changes: 3 additions & 0 deletions tool_kits/uninstall/utils/7zDec.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#define EXTERN_C_END
#endif
#endif
#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))
#include <intrin.h>
#endif

EXTERN_C_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion tool_kits/uninstall/window/setup_wnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SetupForm : public ui::WindowImplBase
virtual UINT GetClassStyle() const override;
virtual void OnFinalMessage(HWND hWnd) override;
virtual void InitWindow() override;
virtual HRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) override;
virtual LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) override;
virtual bool Notify(ui::EventArgs* msg);

private:
Expand Down

0 comments on commit fce20f4

Please sign in to comment.