首次提交

This commit is contained in:
a158
2025-12-13 22:22:55 +08:00
parent 1137f1f486
commit 4d28fcf737
8 changed files with 171 additions and 73 deletions

35
.gitignore vendored Normal file
View File

@@ -0,0 +1,35 @@
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
/build
/.vs
/out/build/x64-Debug

BIN
3rdparty/cos-cpp-sdk-v5-5.5.19.zip vendored Normal file

Binary file not shown.

BIN
3rdparty/poco-poco-1.12.4-release.zip vendored Normal file

Binary file not shown.

78
CMakeLists.txt Normal file
View File

@@ -0,0 +1,78 @@
cmake_minimum_required(VERSION 3.5)
set(MODULE_NAME "tencent_cos_sdk")
# 设置项目名为当前目录名
project(${MODULE_NAME})
#set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build" FORCE)
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
#set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0")
# 搜索源文件和头文件
file(GLOB_RECURSE SOURCE_FILES "${PROJECT_SOURCE_DIR}/src/*.cpp")
file(GLOB_RECURSE HEADER_FILES
"${PROJECT_SOURCE_DIR}/src/*.h"
)
# 将源文件分配到 Source Files 文件夹
foreach(source IN LISTS SOURCE_FILES)
get_filename_component(source_path "${source}" PATH)
file(RELATIVE_PATH source_path_rel "${PROJECT_SOURCE_DIR}" "${source_path}")
string(REPLACE "/" "\\" source_path_rel_win "${source_path_rel}")
source_group("Source Files\\${source_path_rel_win}" FILES "${source}")
endforeach()
# 将头文件分配到 Header Files 文件夹
foreach(header IN LISTS HEADER_FILES)
get_filename_component(header_path "${header}" PATH)
file(RELATIVE_PATH header_path_rel "${PROJECT_SOURCE_DIR}" "${header_path}")
string(REPLACE "/" "\\" header_path_rel_win "${header_path_rel}")
source_group("Header Files\\${header_path_rel_win}" FILES "${header}")
endforeach()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
# 安装复制
set(CMAKE_INSTALL_ALWAYS_COPY TRUE)
set(YLIB ${CMAKE_INSTALL_PREFIX}/../ylib)
set(FASTWEB ${CMAKE_INSTALL_PREFIX}/../fastweb)
# 包含路径
if(MSVC)
else()
include_directories(
/usr/local/include/ylib
/usr/local/include/fastweb
/opt/lua54/include
/usr/local/include
/usr/include/apr-1.0
/usr/local/include/oss_c_sdk
)
add_definitions(-DfPIC)
endif()
# 添加共享库
add_library(${MODULE_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES})
if(MSVC)
else()
target_link_libraries(${MODULE_NAME}
hpsocket
ylib
crypto
/opt/lua54/lib/liblua.a
pthread
/usr/lib/x86_64-linux-gnu/libalibabacloud-sdk-core.so
/usr/local/lib/liboss_c_sdk.so
/usr/lib/x86_64-linux-gnu/libmxml.so
/usr/lib/x86_64-linux-gnu/libapr-1.so
/usr/lib/x86_64-linux-gnu/libaprutil-1.so
)
endif()
install(TARGETS ${MODULE_NAME} DESTINATION $<IF:$<CONFIG:Debug>,${FASTWEB}/bin/debug/module/${MODULE_NAME},${FASTWEB}/bin/release/module/${MODULE_NAME}>)

23
LICENSE Normal file
View File

@@ -0,0 +1,23 @@
Software License
Copyright (C) 2024 [liuyingjie]
License Terms
Usage Rights
1. Any individual or entity is free to use, copy, and distribute the binary form of this software without modification to the source code, without the need to disclose the source code.
2. If the source code is modified, the modifications must be open-sourced under the same license. This means that the modifications must be disclosed and accompanied by a copy of this license.
Future Versions Updates
1. From this version onwards, all future releases will be governed by the terms of the latest version of the license. This license will automatically be nullified and replaced by the new version.
2. Users must comply with the terms of the new license issued in future releases.
Liability and Disclaimer
This software is provided "as is", without any express or implied warranties, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holder be liable for any claims, damages, or other liabilities, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
Contact Information
If you have any questions, please contact us: 1585346868@qq.com Or visit our website fwlua.com.

View File

@@ -1,36 +0,0 @@
# module-tencent-cos-sdk
#### 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**}
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
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/)

View File

@@ -1,39 +1,4 @@
# module-tencent-cos-sdk
# module-module-aliyun_cloud_sdk
#### 介绍
{**以下是 Gitee 平台说明,您可以替换此简介**
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN。专为开发者提供稳定、高效、安全的云端软件开发协作平台
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
FastWeb - 腾讯云COS
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

33
build.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# 安装阿里云核心
mkdir tmp
cd tmp
git clone https://gitee.com/yobonianhua/aliyun-openapi-cpp-sdk.git
cd aliyun-openapi-cpp-sdk
sudo sh easyinstall.sh core
cd ${SCRIPT_DIR}
# 安装阿里云OSS
sudo apt-get install libcurl4-openssl-dev libapr1-dev libaprutil1-dev libmxml-dev -y
cd 3rdparty
rm -rf aliyun-oss-c-sdk-3.11.2
unzip aliyun-oss-c-sdk-3.11.2.zip
cd aliyun-oss-c-sdk-3.11.2
mkdir build
cd build
cmake ..
make
make install
cd ${SCRIPT_DIR}
# 安装ALIYUN
rm -rf build
mkdir build
cd build
cmake ..
make
cp -f libaliyunsdk.so ../target