Warning, /libraries/atcore/doc/build.md is written in an unsupported language. File is not indexed.

0001 <!--
0002     SPDX-FileCopyrightText: AtCore Authors
0003     SPDX-License-Identifier: CC-BY-SA-4.0
0004 -->
0005 # Building And Deploying AtCore
0006 Building AtCore is broken up into to main steps Configuration and Building. Deploying AtCore is also covered here.
0007 
0008 ## Configuration 
0009 In order to configure your build you will need [cmake] and [extra-cmake-modules].
0010 
0011 Build Options Are: 
0012  - -DBUILD_GUI = ( ON | OFF )  Build the test client (Default is OFF)
0013  - -DBUILD_DOCS = (ON | OFF ) Build the Documentation (Default is OFF)
0014  - -DBUILD_TESTS = ( ON | OFF ) Build and Run Unittests (Default is OFF)
0015  - -DDEPLOY_PLUGINS_WITH_BINARY ( ON | OFF ) Deploy the plugins to bin/plugins (Default is OFF, Turn on for win/mac)
0016  
0017 Recommended CMake Command
0018 
0019 Linux
0020 ```
0021 cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib CMakeLists.txt
0022 ```
0023 
0024 Mac OS/ Windows
0025 ```
0026 cmake -DDEPLOY_PLUGINS_WITH_BINARY=ON CMakeLists.txt
0027 ```
0028 ## Building
0029 After Configuring you Should be able to run make to build all targets.
0030 
0031 ```
0032 make
0033 ```
0034 
0035 ## Dependencies
0036 In addition to a working development enviroment for your system you will need the following to build AtCore
0037  - qt5-base
0038  - qt5-serialport
0039  - qt5-widgets
0040  - qt5-charts
0041  
0042 Building The Documentation adds the following dependency:
0043  - [doxygen]
0044 
0045 ### Installing Dependencies on Windows and Mac OS
0046 
0047 #### Mac Os
0048 Mac Os users could use [homebrew] to install both cmake and cmake-extra-modules using.
0049 ```
0050 brew update
0051 brew install cmake
0052 brew tap KDE-mac/kde;
0053 brew install kf5-extra-cmake-modules
0054 ```
0055 Then can download and install [Qt]
0056 
0057 #### Windows
0058 Windows users could install [chocolatey] and do something like 
0059 ```
0060 choco install cmake
0061 choco install ninja
0062 git clone -q git://anongit.kde.org/extra-cmake-modules.git
0063 cd extra-cmake-modules
0064 cmake -G "Ninja" . -DCMAKE_INSTALL_PREFIX= <CMAKE_INSTALL_ROOT>
0065 ninja install
0066 ```
0067 Then Download and install [Qt]
0068 
0069 ## Deploying AtCore
0070 After you build you may wish to deploy AtCore on your system for use
0071 ### Linux
0072 From the build dir the command below to install atcore with its plugins to the system (assuming cmake used above)
0073 ```
0074 sudo make install
0075 ```
0076 ### Finding Plugins
0077 AtCore will check each directory below for plugins.
0078 
0079     1. QApplication::applicationDirPath/plugins
0080     2. QApplication::applicationDirPath/AtCore
0081     3. QApplication::applicationDirPath/../PlugIns/AtCore
0082     4. INSTALL_PREFIX/KDE_PLUGIN_DIR/AtCore
0083     5. QT_Plugin_Path/AtCore
0084     6. KDE_PLUGIN_DIR/AtCore
0085     7. BUILDDIR for plugins.
0086 
0087 For Locations starting with 'QApplication::applicationDirPath'  atcore will look next to the binary using atcore.
0088 Usually this is in a directory next to the program 
0089 ```
0090 atcore_test_GUI\atcore-gui.exe
0091 atcore_test_GUI\AtCore.dll
0092 atcore_test_GUI\plugins\repetier.dll
0093 ```
0094 
0095 But on Mac OS this is in the app bundle 
0096 ```
0097 atcore-gui.app/Contents/MacOS/atcore-gui
0098 atcore-gui.app/Contents/MacOS/AtCore.dylib
0099 atcore-gui.app/Contents/MacOS/plugins/repetier.dylib
0100 ```
0101 [Qt]:https://www.qt.io
0102 [doxygen]:http://www.doxygen.nl/
0103 [cmake]:https://cmake.org/
0104 [extra-cmake-modules]:https://cgit.kde.org/extra-cmake-modules.git/tree
0105 [homebrew]:https://brew.sh/
0106 [chocolatey]:https://chocolatey.org/