You’ll read below all the instructions to setup a developpement environnement to build and develop Art Of Sequence projects, mostly C++ ones. Other projects don’t need such setup but installing [Python](http://www.python.org/) for scripts.

0. Programming Languages

  • Most tools are implemented in modern C++, using Boost.

  • For GUI in C++ we use Qt by default (this will change in the future).

  • For scripts and raw developers tools (files and texts manipulation) we use Python.

  • Some projects requires HTML/CSS/Javascript coding, like the AOS Web Player.

1. Dependencies

There are some dependencies required to compile all the projects:

  • You’ll need to install CMake on your system if not already. We use CMake 2.8 or superior (compatible) version.

  • Boost >= 1.55.0

  • Qt 5.2+ SDK : should be automatically found by CMake. Used in AOS Designer project for GUI.

  • CodeSynthesis XSD/Tree 3.3.0+ : Have to be installed on the system. Used in AOSLCPP to generate implementation of the AOSL model in C++.

  • Python : Python have to be available in the environnement. It’s used mostly for scripts manipulating files and text, but it could be used for tools implementation too.

  • Some other C++ dependencies which we provide a version in this repository but you could get them yourself too.

2. Projects Generation

Using CMake you can generate the whole solution of the project for your preferred IDE or compiler. Note that the main development of the project is made using Visual Studio 2012 with the Qt Visual Addin extension, so other IDE and platform aren’t tested yet. Please report any problem with other setup.

To generate the project files, use CMake in the root directory of the repository. You can use CMake either through command line or it’s GUI. It should find automatically all other the dependencies, or ask for them. If you’re not used to CMake way of specifying where is what, read this tutorial.

Note

As an example, here is the command line I use in the project’s root directory to generate the projects on my Visual Studio 2012 for 64bit setup:

cmake -G "Visual Studio 11 Win64" -D BOOST_LIBRARYDIR=E:/Projects/SDK/boost/boost/lib/x64 -D Qt5Widgets_DIR=E:/Projects/SDK/Qt/5.1.1/msvc2012_64/lib/cmake/Qt5Widgets ../aos-designer

In my setup I didn’t set BOOST_LIBRARYDIR globally because I have both 64bit and 32bit library files installed, so I need to specify which one to use. I also don’t have Qt installed globally as suggested in Qt’s documentation:

In order for find_package to be successful, Qt 5 must be found below the CMAKE_PREFIX_PATH, or the Qt5<Module>_DIR must be set in the CMake cache to the location of the Qt5WidgetsConfig.cmake file. The easiest way to use CMake is to set the CMAKE_PREFIX_PATH environment variable to the install prefix of Qt 5.

So I need to specify it manually. However if you have both variable available in the path, then you don’t need to specify them each time.

All the projects binaries will be gathered in the /Build/<Configuration>/ directory of the project, but replace <Configuration> by the configuration "Debug", "Release" or other configurations.

Warning

If you’re using Visual Studio : For debugging, setup the execution directory in the binary directory! CMake will not do it for you and you will have crashes by default when trying to debugging because the default current directory in debug mode will be the project file directory instead of the binary directory! If you generate the solution in the repository root directory, then you should put "$(SolutionDir)\Build\$(Configuration)\" in the Project>Properties>Debugging>Working Directory field, for all configurations.

Once you’ve compiled all the projects, don’t forget :

  1. if you want to add or remove files :

    1. add/remove the file names in CMakeFiles.txt

    2. regenerate the project using CMake (or let Visual Studio do it on next build)

  2. projects depending on Qt needs to generate special code that CMake will generate for you, so don’t forget to make sure that your Q_OBJECT classes are processed by the Qt pre-processor (see AOS Designer CMakeFiles.txt for examples)

3. Code Generation

Note
This part is specific to AOSLCPP.

Some projects have code generated from other sources. If you modify those sources, make sure to generate the code from it, then check that everything still work, maybe make some modifications/fixes, then commit the generated files too.

At the moment, the main source of code generation is the AOSL xsd definition file. It is used to generate most of the AOSLCPP project sources. If you need to modify the language definition proceed through those steps :

  • Change the xsd file to match your language change.

  • Execute the python script available in the "script" folder to generate the C++ code equivalent of the xsd definition.

  • Compile and fix AOSLCPP and maybe add new library features accordingly to your changes.

  • Compile projects that depends on AOSLCPP like AOS Designer to make sure everything is fine.

4. Contributions