diff --git a/.gitmodules b/.gitmodules index d1bbd2f..e7b4341 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,7 +13,7 @@ [submodule "pip"] path = pip url = https://git.shs.tools/SHS/pip.git - branch = shstk + branch = master [submodule "cd"] path = cd url = https://git.shs.tools/SHS/cd.git diff --git a/CMakeLists.txt b/CMakeLists.txt index fee1f3e..e6e590c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.13) cmake_policy(SET CMP0011 NEW) # don`t affect includer policies cmake_policy(SET CMP0017 NEW) # need include() with .cmake cmake_policy(SET CMP0020 NEW) # Automatically link Qt executables to qtmain target on Windows diff --git a/Jenkinsfile b/Jenkinsfile index de62052..bf17402 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,7 +28,7 @@ node { _envmap["${_n}"] = "${_v}"; } def _msg = "Built images:" - def platforms = ['debian', 'osx', 'windows', 'android', 'pi'] + def platforms = ['debian', 'osx', 'windows', 'android', 'pi', 'ubuntu'] for (int i = 0; i < platforms.size(); ++i) { if (_envmap["BUILD_${platforms[i]}"] == "1") { stage("${platforms[i]}-shstk") { diff --git a/README.md b/README.md index 1e67437..13983e8 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,25 @@ ## Introduction -This repo contains: +SHS Toolkit is metaproject, that contains references to CMake, PIP, QAD, CD and QGLEngine. +* CMake - many CMake helpers and wrappers +* PIP - Platform-Independent Primitives, C++ libraries to solve many common tasks +* QAD - Qt for Advanced Developers, many Qt-based widgets and helpers. Also provide Qt-Designer + plugins. +* CD - Control/Debug toolkit, PIP-based client-server library to simplify using coefficients + and track some variables tasks. Also provide QAD-based pult. +* QGLEngine - modern Qt/OpenGL-based 3D engine with PBR materials. Also provide GUI widgets + to edit scene and "libassimp"-based files importer. -* PIP +Each project provide Find*.cmake file with correct dependecies. So, if you call `find_package(CD)` +then PIP and QAD will be found. + +Each of there projects can be built separately, but this project help you to build all at once. + + +After successfully install, you can use next CMake imported targets: + +* PIP: * PIP - main library * PIP::USB - PIUSB (libusb) * PIP::Console - PIScreen @@ -13,34 +29,36 @@ This repo contains: * PIP::FFTW - FFT with libfftw3 * PIP::OpenCL - PIP OpenCL bindings * PIP::IOUtils - * PIP::Cloud + * PIP::Cloud - PIP cloud IODevices * PIP::Lua - PIP Lua bindings -* QAD - Qt for Advanced Developers: +* QAD: * QAD::Utils - * QAD::Widgets + * QAD::Widgets - collection of extendent widgets * QAD::Application * QAD::Blockview - * QAD::Graphic - * QAD::SQLTable - * QAD::TouchWidgets - * QAD::Doc + * QAD::Graphic - widget for realtime visualization and publication quality 1D/2D plots + * QAD::SQLTable - widget for display and edit data based on SQL tables with relations + * QAD::TouchWidgets - collection of widgets for touch screen interface + * QAD::Doc - markdown helper for qt * QAD::PIQt - helpers to convert PIP <-> Qt types * QAD::PIQtUtils - Gui libraries and executables to edit PIConnection configs and watch PIIntrospection - * qglview - old Qt-base OpenGL engine -* qglengine - new Qt-base OpenGL engine + * +* QGLEngine: * QGLEngine::Core - 3d engine * QGLEngine::Widgets - qt widgets for manage 3d obects and materials -* CD +* CD: * CD::Core - PIP-based client/server library for read, transmit and use custom structures of coefficients * CD::Qt - Qt bindings to CDUtils and "CD Pult" executable - full-featured CD client - -## Compile -This repo can be compile with GCC/MinGW/Clang, for Qt 4/5. -If there is no Qt found, builds only PIP and cd_utils. +qglview - old Qt-base OpenGL engine, has no imported target, so you should link with "qglview4" or "qglview5" + +## Compile +This repo can be compiled with GCC/MinGW/Clang, for Qt 4/5. + +If there is no Qt found, builds only PIP and CD. CMake options: -* **LIB** - if 1 then install to system directories: MinGW on Windows, /usr/local on Linux/MacOS, ${ANDROID_SYSTEM_LIBRARY_PATH} on Android. If 0 then install to ${CMAKE_INSTALL_PREFIX}. Enabled by default +* **LOCAL** - if 0 then install to system directories: MinGW on Windows, /usr/local on Linux/MacOS, ${ANDROID_SYSTEM_LIBRARY_PATH} on Android. If 1 then install to ${CMAKE_INSTALL_PREFIX}. Disabled by default * **UTILS** - build or not executable utilites, enabled by default * **DESIGNER_PLUGINS** - build or not Qt Designer plugins, enabled by default * **QGLVIEW** - build or not QGLView, disabled by default @@ -48,29 +66,29 @@ CMake options: ## Windows scripts Build steps: -1. unzip mingw.7z to C:\mingw -2. unzip qt.7z to C:\qt -3. download and install cmake from https://cmake.org/download/ +1. Unzip mingw.7z to C:\mingw +2. Unzip qt.7z to C:\qt +3. Download and install cmake from https://cmake.org/download/ 4. Prepare environment for x86 or amd64 architecture: - set prefix for mingw e.g.: for C:\mingw\8_1_x32\ or C:\mingw\8_1_x64\ - set SDK_MINGW_DIR=C:\mingw\7_1_x + set SDK_MINGW_DIR=C:\mingw\8_1_x - set prefix for Qt5 e.g.: for C:\qt\qt5150_win32\ or C:\qt\qt5150_win64\ - set SDK_QT5_DIR=C:\qt\qt5150_win + set SDK_QT5_DIR=C:\qt\qt5150_win - set SDK_CMAKE_DIR=C:\cmake or C:\Program Files\CMake -5. run make_shstk32.bat or make_shstk64.bat +5. Run `make_shstk32.bat` or `make_shstk64.bat` - -Build steps for both architectures: - -- follow previos steps, but on '4' state run make_libs_all.bat +Build steps for both architectures: follow previous steps, but on '5' state run `make_shstk_all.bat` ## Non-Windows scripts -Script "make_shstk.sh" compile and install SDK for current environment, e.g. -`./make_shstk.sh -j4` +Script "make_shstk.sh" compile and install toolkit for current environment, e.g. `./make_shstk.sh -j4` ## Docker -This repo provide Dockerfile, so you can exec `docker build -t libs .` in this directory -and make docker image "libs" with installed SHS SDK for: -* Debian 10 -* Windows x64 -* MacOS -* Android ndk 21 armeabi-v71, arm64-v8a, x86, x86_64 +This repo provide several Dockerfiles, so you can exec `docker build -t windows-shstk docker\windows-shstk` +and make docker image "windows-shstk" with installed SHS Toolkit for Windows. Similar for other platforms. +Dockerfile provides for next platforms: +* Debian 10 (debian-shstk) +* Ubuntu 20.04 (ubuntu-shstk) +* Windows x64 (windows-shstk) +* MacOS (osx-shstk) +* Raspberry Pi Raspbian (pi-shstk) +* Android ndk 21 armeabi-v71, arm64-v8a, x86, x86_64 (android-shstk) diff --git a/cd b/cd index b43350c..d6734e1 160000 --- a/cd +++ b/cd @@ -1 +1 @@ -Subproject commit b43350cb71167ad2730e286bf99320322b2cea84 +Subproject commit d6734e195417bd696d6680681d85f287e533ce46 diff --git a/cmake b/cmake index 2f84d98..8966f58 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 2f84d98a32a2b0a0b182b509b006cc29928e7221 +Subproject commit 8966f58f602aebd9171afe89b9f78958c07f5845 diff --git a/docker/ubuntu-shstk/Dockerfile b/docker/ubuntu-shstk/Dockerfile new file mode 100644 index 0000000..d894a66 --- /dev/null +++ b/docker/ubuntu-shstk/Dockerfile @@ -0,0 +1,17 @@ +ARG DOCKER_PREFIX=wapmobil/ +FROM ${DOCKER_PREFIX}ubuntu + +ARG LIBS_BUILD_NUMBER=9999 +ARG JOBS_COUNT=4 +ENV PATH=/opt/cmake/bin:$PATH + +WORKDIR /soft +RUN git clone -b master --single-branch --depth 1 --recursive https://git.shs.tools/SHS/shstk.git + +WORKDIR /soft/shstk_build_ubuntu +RUN cmake -DICU=0 -DLOCAL=0 -DQGLENGINE=1 -DQGLVIEW=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \ + && make install -j${JOBS_COUNT} \ + && rm -rf * \ + && ldconfig + +WORKDIR /soft/src diff --git a/make_shstk.sh b/make_shstk.sh old mode 100644 new mode 100755 diff --git a/qad b/qad index 3d5a86e..6b4a903 160000 --- a/qad +++ b/qad @@ -1 +1 @@ -Subproject commit 3d5a86e21520eba00037a478dc68645ac4c2cab1 +Subproject commit 6b4a903764ebc1a017f6e0df095dfd605fafa14e diff --git a/qglengine b/qglengine index 17e38bc..973ee2a 160000 --- a/qglengine +++ b/qglengine @@ -1 +1 @@ -Subproject commit 17e38bc8216a50cd720b4253a0ff698ebbace4f1 +Subproject commit 973ee2aa04648035730dfff710939a0a371d4bee diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ff77498 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,18 @@ +libicu-dev +libfftw3-dev +libsodium-dev +libassimp-dev +libmarkdown2-dev +ocl-icd-opencl-dev +zlib1g-dev +qtbase5-dev-tools +qttools5-dev +qtscript5-dev +qtdeclarative5-dev +qtpositioning5-dev +libqt5datavisualization5-dev +qt5-default +libglew-dev +liblua5.3-dev + +apt install libicu-dev libfftw3-dev libsodium-dev libassimp-dev libmarkdown2-dev ocl-icd-opencl-dev zlib1g-dev qtbase5-dev-tools qttools5-dev qtscript5-dev qtdeclarative5-dev qtpositioning5-dev libqt5datavisualization5-dev qt5-default libglew-dev liblua5.3-dev \ No newline at end of file