A project about blocks, operations, modules and arrows in between.
Currently Dataflow is tested on following platforms and compilers:
- Windows — Visual Studio 2013 64bit
- Linux (Ubuntu 14.04) — GCC 4.9.1
- OS X 10.10
Dataflow requires Qt 5, libxml2 2.7 or newer and CMake 2.8.11 or newer.
Windows: Get the Latest Release of the Win32 Installer from cmake.org.
Ubuntu: sudo apt-get install cmake
OS X:
- Install Homebrew.
brew install cmake
OR install the official distribution from cmake.org.
Windows: Get the official installer from Qt's website. Make sure to install a version that matches your compiler (e.g. msvc2013_64).
Linux: Consult your package manager or use the official installer.
OS X: brew install qt5
OR install the official distribution.
Windows / MinGW: Download the latest libxml2 build from the official source.
Extract it somewhere, eg. C:\Libraries
.
Windows / Visual Studio (32 bit): Download the latest iconv build and libxml2 build from the official source.
Extract them somewhere, eg. C:\Libraries
.
Windows / Visual Studio (64 bit): We have prepared special iconv and libxml2 builds for 64 bit users. They were built and tested on VS 2013. Download them and extract somewhere, eg: C:\Libraries
.
Linux: Consult your package manager or install from sources.
OS X: Provides libxml2 by default. Alternatively, you can install a different version from Homebrew if you want: brew install libxml2
. You can also install from sources if you really want to.
This has to be performed only once. CMake is smart enough to update the project on build.
- Create a directory called
build
in thedataflow
directory. - Launch CMake GUI.
- Set the following values:
- Where is the source code: path to the
dataflow
directory - Where to build the binaries: path to the
build
directory you created
- Click Add Entry.
- Add a variable called
CMAKE_PREFIX_PATH
of type PATH and point to all directories that contain your libraries separated by semicolons. (e.g.C:\Qt\5.4\msvc2013_opengl;C:\Libraries\iconv-1.9.2.win32;C:\Libraries\libxml2-2.7.8.win32
) - Click Configure.
- Choose your compiler from the list and click Finish.
- Wait until the configuration process finishes and click Generate.
- Your project has been generated in the
build
directory. - Check if the
bin
directories of your libraries are in yourPATH
. This allows you not to bother with copying over DLLs next to generated executables.
Video (in Polish): https://v.usetapes.com/H0vFD1KN8m
This assumes you are using the terminal and your current directory is dataflow
.
- Create a directory called
build
in thedataflow
directory. cd build
- If you have Qt installed in a non-standard directory, see below. If not, skip to step 4.
a.
export CMAKE_PREFIX_PATH=/path/to/your/qt/directory
. cmake ..
. This will generate a Makefile. If you want to use an IDE, usecmake -G Xcode ..
(replaceXcode
with any project generator that you want). Consultcmake --help
for more information about available generators.- Your project has been generated in the
build
directory.
- Class names (as opposed to type names) should be written in
PascalCase
. - Type names (as opposed to class names) should be written in
snake_case
. - Method names (as opposed to function names) should be written in
camelCase
. - Function names (as opposed to method names) should be written in
snake_case
. - Variable names should be written in
camelCase
. - Classes should be put in separate files named exactly like them:
ClassName.h
,ClassName.cpp
. - Files not containing any classes should be named in
snake_case
:datastore_example.cpp
.
Please use the Kernighan & Ritchie style. Break brackets from namespaces, classes and function definitions attach them to anything else.
int test(bool b)
{
if (b) {
bar();
return 1;
} else
return 0;
}
An .astylerc
file is provided if you want to automatically adjust your formatting to recommended settings using Artistic Style.
Please use 4 spaces for indenting.
For automatic editor adjustment an .editorconfig
file is provided. To use it, install an appropriate plugin from the EditorConfig website.
Windows users: Please configure Git to convert newlines for you. Otherwise you might encounter problems while editing.
git config --global core.autocrlf true
Linux or OS X users: Please ensure that the repo contains only LF newlines.
git config --global core.autocrlf input