diff --git a/README.md b/README.md index 633c19e4aac1d84928bdc63f951b290923925da6..7a8326a9059e11e1c3eb99729123634a3a3758ed 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ for CaosDB and a part of the CaosDB project. ## Setup -Please read the [README_SETUP.md](README_SETUP.md) for instructions on how to -develop, build and use this code. +Please read the installation notes [online](https://docs.indiscale.com/caosdb-cpplib/Install_develop.html) or [in the source repository](doc/Install_develop.md) for instructions +on how to build, use and develop this code. ## Further Reading @@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md). ## License -* Copyright (C) 2021 Indiscale GmbH <info@indiscale.com> +* Copyright (C) 2022 Indiscale GmbH <info@indiscale.com> All files in this repository are licensed under a [GNU Affero General Public License](LICENCE.md) (version 3 or later). diff --git a/README_SETUP.md b/README_SETUP.md deleted file mode 120000 index c5c7270fb583274df037848bfb735cdb48829d28..0000000000000000000000000000000000000000 --- a/README_SETUP.md +++ /dev/null @@ -1 +0,0 @@ -doc/README_SETUP.md \ No newline at end of file diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index e047833099812cadf7c3575aa45e235f0e20d9c6..a1e46806012540a800917d8e80753b1c28e5d5fb 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -84,7 +84,7 @@ if (DOXYGEN_FOUND) sphinx_out DEPENDS doc-doxygen Examples.rst - README_SETUP.md + Install_develop.md FEATURES.md CHANGELOG.md WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} @@ -94,7 +94,7 @@ if (DOXYGEN_FOUND) # Copying files is necessary: https://stackoverflow.com/a/45808534/232888 file(COPY Examples.rst - README_SETUP.md + Install_develop.md DEPENDENCIES.md CHANGELOG.md FEATURES.md diff --git a/doc/Examples.rst b/doc/Examples.rst index eef2976aa3122edae7a5edf268075c0b93f5b5ec..1bf62f31a05bccd9e168be22a1c2d12d6873f325 100644 --- a/doc/Examples.rst +++ b/doc/Examples.rst @@ -5,8 +5,8 @@ Examples Connect to a CaosDB server -------------------------- -See also the hints on how to :doc:`get started<README_SETUP>`, and set-up of libcaosdb. In order to -connect to a CaosDB server with libcaosdb you first have to configure the connection via a +See also the hints on how to :doc:`get started<Install_develop>`, and set-up of libcaosdb. In order +to connect to a CaosDB server with libcaosdb you first have to configure the connection via a configuration file as explained in the :ref:`"Client Configuration" section <Client Configuration>`. Once the configuration is set up, connecting to the server is as easy as @@ -19,6 +19,7 @@ You can print the full version of the server that you are connected to (and therby test the connection) via: .. code:: cpp + // get version info of the server connection.RetrieveVersionInfo() const auto &v_info = connection->GetVersionInfo(); @@ -57,8 +58,9 @@ you want to retrieve an Entity with id=123. This is done via You can then use the getter methods like :cpp:any:`GetId<caosdb::entity::Entity::GetId>`, -:cpp:any:`GetParents<caosdb::entity::Entity::GetParents>`, or :cpp:any:`GetProperties`<caosdb::entity::Entity::GetProperties>` to get the -name, the parents, or the properties of the retrieved entity. +:cpp:any:`GetParents<caosdb::entity::Entity::GetParents>`, or +:cpp:any:`GetProperties`<caosdb::entity::Entity::GetProperties>` to get the name, the parents, or +the properties of the retrieved entity. Retrieving multiple entities works in the same way. Type @@ -83,9 +85,9 @@ transaction manually. This is done by transaction->RetrieveById("1233"); auto status = transaction->Execute(); -A result set can be obtained -via :cpp:any:`GetResultSet`<caosdb::transaction::Transaction::GetResultSet>` which contains the resulting entities -and can, e.g., be checked for length. +A result set can be obtained via +:cpp:any:`GetResultSet`<caosdb::transaction::Transaction::GetResultSet>` which contains the +resulting entities and can, e.g., be checked for length. Execute queries --------------- @@ -147,6 +149,7 @@ Insert, update and delete operations function the same way. The respective task is added to a transaction and the transaction is executed. .. code:: cpp + const auto &connection = caosdb::connection::ConnectionManager::GetDefaultConnection(); @@ -202,7 +205,7 @@ task is added to a transaction and the transaction is executed. Up- and Download a file ---------------- +----------------------- .. code:: cpp diff --git a/doc/README_SETUP.md b/doc/Install_develop.md similarity index 95% rename from doc/README_SETUP.md rename to doc/Install_develop.md index ac8f675e3e67ac9e53b230e10d6784d25c2861a2..ebc9aec411d511b11be37b4c0e7e918d9e44ffeb 100644 --- a/doc/README_SETUP.md +++ b/doc/Install_develop.md @@ -1,4 +1,4 @@ -# How to Develop and Use Libcaosdb +# How to use and develop libcaosdb ## Dependencies @@ -6,6 +6,17 @@ ## Build +### Building with `make` ## + +Make sure that the dependencies (see above) are fulfilled. On systems which have `make` installed, +type this in your command line terminal: + +```console +make conan +``` + +### Manual build ## + We use [cmake](https://cmake.org) as build tool, with Conan as package manager. The compiler must support the C++17 standard. @@ -66,12 +77,6 @@ as compiler. We use [cmake](https://cmake.org/download/) as build tool. fix this in the next release. See [#34](https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib/-/issues/34) -### Creating a local Conan package ## - -Building and installing libcaosdb with Conan is just a single command: `make conan` - -For MacOS, you probably should adjust the option as mentioned above. - ### Troubleshooting #### `conan install` fails due to missing prebuilts diff --git a/doc/conf.py.in b/doc/conf.py.in index c359c11e4d785a840761e50e93c2787d86312a43..0490a20abe04a6ad027eff36fcc9d1fe4939cb4e 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -18,7 +18,7 @@ # -- Project information ----------------------------------------------------- project = '@CMAKE_PROJECT_NAME@' -copyright = '2021 IndiScale GmbH' +copyright = '2022 IndiScale GmbH' author = 'Timm Fitschen' version = '@CMAKE_PROJECT_VERSION@' release = '@CMAKE_PROJECT_VERSION@' @@ -46,7 +46,7 @@ extensions = [ 'sphinx_sitemap', 'sphinx.ext.inheritance_diagram', 'breathe', - "recommonmark" # For markdown files. + "recommonmark", # For markdown files. ] # Add any paths that contain templates here, relative to this directory. diff --git a/doc/index.rst.in b/doc/index.rst.in index 5828a70ffe23433156e4a04cbf112d8e27574004..b6fdaaf592f8fe4e36008a509204a10d23d3e320 100644 --- a/doc/index.rst.in +++ b/doc/index.rst.in @@ -30,7 +30,7 @@ Welcome to |PROJECT_NAME|'s documentation! :caption: Contents: Welcome <self> - Getting Started <README_SETUP> + Getting Started <Install_develop> Examples.rst cppapi/index capi/index