orthanc 编译安装mysql S3

克隆代码 orthanc server

hg clone  https://orthanc.uclouvain.be/hg/orthanc/
sudo apt-get install curl zip unzip tar
cd vcpkg && ./bootstrap-vcpkg.sh

mysql

  • install libmysqlclinet-dev
set(CMAKE_BUILD_TYPE "Release")
set(ORTHANC_FRAMEWORK_VERSION "1.12.4")
set(ORTHANC_FRAMEWORK_SOURCE "path")
set(ORTHANC_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR}/../Resources/Orthanc/Sdk-1.12.4)
set(ORTHANC_FRAMEWORK_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../orthanc/OrthancFramework/Sources)
set(ALLOW_DOWNLOADS  ON)

加载配置

  • main.cpp
  const char* configurationFile = "/mnt/c/Users/Administrator/CLionProjects/orthanc/OrthancServer/Resources/Configuration.json";
  • Configuration.json
"Plugins" : [
    "/mnt/c/Users/Administrator/CLionProjects/orthanc/OrthancServer/Plugins/Plugins/libOrthancMySQLIndex.so"
  ],

  "MySQL" : {
    "EnableIndex" : true,
    "EnableStorage" : false,
    "Host" : "localhost",
    "Port" : 3306,
    "UnixSocket" : "",
    "Database" : "orthanc",
    "Username" : "root",
    "Password" : "123456",
    "Lock" : false,
    "EnableSsl" : false
  },

vcpkg

git clone https://ghp.ci/https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.sh



git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp
mkdir sdk_build
cd sdk_build
cmake ../aws-sdk-cpp -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_ONLY="s3;transfer"
make
sudo make install

sudo apt-get install libcrypto++-dev libcrypto++-doc libcrypto++-utils

安装依赖

  • cryptopp 、aws-sdk-cpp
 // 引入静态库
 find_package(CRYPTOPP_LIBRARIES NAMES cryptopp PATHS /tmp/vcpkg/packages/cryptopp_x64-linux/lib)

 // 安装
  ./vcpkg install  aws-sdk-cpp --debug

 // 代理
 https://moeyy.cn/gh-proxy
 // 下载目录
 /tmp/vcpkg/downloads/

s3

set(CMAKE_BUILD_TYPE "Release")
set(ORTHANC_FRAMEWORK_VERSION "1.12.1")
set(ORTHANC_FRAMEWORK_SOURCE "path")
set(ORTHANC_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR}/../Common/Resources/Orthanc/Sdk-1.12.1)
set(ORTHANC_FRAMEWORK_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../orthanc/OrthancFramework/Sources)
set(ALLOW_DOWNLOADS  ON)
set(USE_SYSTEM_ORTHANC_SDK OFF)
posted @ 2024-10-14 18:02  vx_guanchaoguo0  阅读(16)  评论(0编辑  收藏  举报