diff --git a/README.en.md b/README.en.md index a41895ef080f5794a307fa2ae5810b9d24f57bfc..1c1762e6c4c165e46d1bd98f4639dd51f770972f 100644 --- a/README.en.md +++ b/README.en.md @@ -1,36 +1,54 @@ # WR -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} +WR: WAL Recorder, a basic component providing WAL log recording services. -#### Software Architecture -Software architecture description +## 1. Project Description -#### Installation +### 1. Programming Language +- C -1. xxxx -2. xxxx -3. xxxx +### 2. Build Tools +- cmake or make, cmake is recommended -#### Instructions +### 3. Directory Structure +- **WR**: Main directory, CMakeLists.txt is the main project entry; +- **src**: Source code directory, divided into subdirectories for common function modules; +- **build/build.sh**: Project build script -1. xxxx -2. xxxx -3. xxxx +## 2. Compilation Guide -#### Contribution +### 1. Supported Operating Systems and Software Dependencies +Supported operating systems: +- CentOS 7.6 (x86) +- openEuler-20.03-LTS +- openEuler-22.03-LTS +- openEuler-24.03-LTS -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request +For other systems, refer to the openGauss database compilation guide. +### 2. Download WR +WR can be downloaded from the open-source community. -#### Gitee Feature +### 3. Code Compilation +Use `WR/build/build.sh` to compile the code. The parameters are explained in the table below. -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +| Option | Parameter | Description | +|--------|--------------------|--------------------------------------------------| +| -3rd | [binarylibs path] | Specify the binarylibs path. It must be an absolute path. | +| -m | [version_mode] | Target version for compilation, Debug or Release. Default is Release. | +| -t | [build_tool] | Specify the build tool, cmake or make. Default is cmake. | + +To compile, simply use the following command: + +```bash +[user@linux]$ sh build.sh -3rd [binarylibs path] -m Release -t cmake +``` + +After compilation, the dynamic libraries are generated in the `WR/output/lib` directory, and the executables are generated in the `WR/output/bin` directory. + +### 4. UT Testing +Modify `WR/test/test_home/test_env` to set `CODE_BASE` to the absolute path of the WR directory. Execute `WR/test/gtest/build.sh` to compile the UT code. + +```bash +./test_wr_api +``` \ No newline at end of file diff --git a/README.md b/README.md index a7c30aa79bf23f243b382587350716b44055e319..543e8d0bdc7d79d2a65524c43515b560fddb867a 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,54 @@ # WR -WR:Distributed Storage Service,分布式存储服务,是一款提供分布式存储服务的基础组件。 -支持裸设备的访问及管理,提供卷组、卷、目录、文件的创建、删除、访问等API操作及运维工具;支持多节点相同文件元数据同步,支撑数据库共享存储架构。 - -#### 一、工程说明 -##### 1、编程语言:C -##### 2、编译工具:cmake或make,建议使用cmake -##### 3、目录说明: -- WR:主目录,CMakeLists.txt为主工程入口; -- src: 源代码目录,按子目录划分通用功能函数; -- build:工程构建脚本 - -#### 二、编译指导 -##### 1、操作系统和软件依赖要求 +WR:WAL Recorder,WAL日志记录器,是一款提供WAL日志记录服务的基础组件。 + +## 一、工程说明 + +### 1. 编程语言 +- C + +### 2. 编译工具 +- cmake或make,建议使用cmake + +### 3. 目录说明 +- **WR**:主目录,CMakeLists.txt为主工程入口; +- **src**: 源代码目录,按子目录划分通用功能函数; +- **build/build.sh**:工程构建脚本 + +## 二、编译指导 + +### 1. 操作系统和软件依赖要求 支持以下操作系统: -- CentOS 7.6(x86) -- openEuler-20.03-LTS -- openEuler-22.03-LTS -- openEuler-24.03-LTS +- CentOS 7.6(x86) +- openEuler-20.03-LTS +- openEuler-22.03-LTS +- openEuler-24.03-LTS + +适配其他系统,可参照openGauss数据库编译指导。 -适配其他系统,可参照openGauss数据库编译指导 -##### 2、下载WR +### 2. 下载WR 可以从开源社区下载WR。 -##### 3、代码编译 -使用WR/build/linux/opengauss/build.sh编译代码, 参数说明请见以下表格。
+ +### 3. 代码编译 +使用 `WR/build/build.sh` 编译代码, 参数说明请见以下表格。 + | 选项 | 参数 | 说明 | -| --- |:--- | :--- | -| -3rd | [binarylibs path] | 指定binarylibs路径。该路径必须是绝对路径。 | -| -m | [version_mode] | 编译目标版本,Debug或者Release。默认Release| -| -t | [build_tool] | 指定编译工具,cmake或者make。默认cmake | - -现在只需使用如下命令即可编译:
-[user@linux]$ sh build.sh -3rd [binarylibs path] -m Release -t cmake
-完成编译后,动态库生成在WR/output/lib目录中 \ No newline at end of file +|------|--------------------|------------------------------------------| +| -3rd | [binarylibs path] | 指定binarylibs路径。该路径必须是绝对路径。| +| -m | [version_mode] | 编译目标版本,Debug或者Release。默认Release| +| -t | [build_tool] | 指定编译工具,cmake或者make。默认cmake | + +现在只需使用如下命令即可编译: + +```bash +[user@linux]$ sh build.sh -3rd [binarylibs path] -m Release -t cmake +``` + +完成编译后,动态库生成在 `WR/output/lib` 目录中,可执行文件生成在 `WR/output/bin` 目录中。 + +### 4. UT测试 +修改 `WR/test/test_home/test_env` 中的 `CODE_BASE` 为WR目录的绝对路径。执行 `WR/test/gtest/build.sh` 编译UT代码。 + +```bash +./test_wr_api +``` \ No newline at end of file