1. How to Build¶
To build the tool, follow the following instructions:
1.1. Setup the Development Environment¶
Install a modern C++ compiler that is compliant with modern C++ standards (preferably C++17).
Install the Qt framework. Qt is free for open source developers. Qt version 5.10 or later is required and version 5.12 or later is recommended.
Install CMake build tools. CMake version 3.15 or later is preferred.
Install Conan package manager, version 1.25 or later is preferred.
Add Conan SimCenter and BinCrafters repositories to the Conan remotes. You can add these remotes using the following commands in the terminal:
conan remote add simcenter https://api.bintray.com/conan/nheri-simcenter/simcenter
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
1.2. Obtain the Source Code¶
Clone the WE-UQ repository from WE-UQ Github page. You can do that by using your preferred Git client/GUI or by using the
git clone
command in the terminal.Clone the following repositories for the dependencies:
You will need to clone each dependency from its GitHub repository and place it in the same parent directory where the WE-UQ repository was cloned (note: not inside the WE-UQ directory itself, but directory above it, i.e. SimCenterCommon and WE-UQ directories both exist in the same parent directory).
1.5. Build the Backend¶
SimCenterBackendApplications contains a number of applications written in C++, C and Python that are needed by all SimCenter User Interfaces. To build the backend you will need to follow tht follwoting steps:
Clone the SimCenterBackendApplications repository.
Build SimCenterBackendApplications using the following steps:
2.1. Create a build directory for the build output, this can be done in the terminal using the command
mkdir build
.2.2. Install the backend dependencies using Conan. You can do that by going to the build output directory and running the command:
conan install .. --build missing
This will install all the dependencies and will build dependencies from their source code as needed.
2.3. Run CMake configuration this can be done using the command
cmake ..
. Depending on your build environment, especially if you have multiple compiler, you may need to select a specific CMake generator. For instance on Window using Visual Studio 2017, you can configure CMake as follows:
cmake .. -G Visual Studio 15 2017 Win64
2.4. Build the release version of the backend, this can be done using the generated build system. For instance, on Unix based systems when using make files this can be achieved using the command
make
ormake release
. When using an IDE like Visual Studio on Window or XCode on Mac, the generated project can opened in the IDE and used to build the code. In addition, this can also be done from the terminal using CMake the command:
cmake --build . --config Release
Install the backend applications to a local folder. This can be done by building the
install target
. When using make on Unix based system. This can also be from IDE (e.g.) by selecting the install target or project and building it. In addition, this can be done from the terminal using the command:
cmake --build . --target install
orcmake --install
if you have CMake 3.15 or later. If building and installation were successful you should find a folder calledapplications
in the repository with all the applications inside of it.
1.6. Build the User Interface¶
1.6.1. Build using the Qt Creator (Recommended)¶
Start Qt Creator, then open the WE-UQ.pro file located in the WE-UQ directory that was downloaded in the previous steps.
Setup the development kit in Qt Creator. This is usually done by selecting the Qt version, compiler and configuration and following the onscreen dialog.
Build the application and run it in Qt Creator IDE by using the Run button. This can be done using the keyboard shortcut
F5
to build and start the tool.
1.6.2. Build using the terminal¶
First, create a build output directory. This can be done in the terminal using the command
mkdir build
.Go into the build output directory and run QMake to Configure the project and create make files. This can be done by using the command:
qmake ../WE-UQ.proBuild the project by using the command
make
on Unix like systems. On Windows, you can either usenmake
orjom
to build in parallel. Once built, you can now run the tool executable.
1.7. Set the User Interface Preferences¶
Once built, Open the WE-UQ tool, then click on file -> preferences and set the applications directory entry to point to the applications folder that the build process created for BackendApplications.