Envision
A visual programming IDE for object-oriented languages
Compiling Envision from source

Envision is written in C++20 and uses the CMake build system.

You will need gcc 11 or newer and at least CMake 3.2.2 to compile the sources. You can check your current versions with:

g++ --version
cmake --version

Here are details about all the dependencies:

To install the dependencies on Ubuntu 21.10, run the following:

  1. Install all necessary packages:
    sudo apt-get install git g++ python cmake libqt5svg5 libqt5svg5-dev libqt5webkit5 libqt5webkit5-dev lp-solve liblpsolve55-dev libgit2-dev google-perftools libgoogle-perftools-dev libclang-dev clang llvm vera++
  2. Make the following symbolic link needed to use the shared library of lp solve:
    sudo ln -s /usr/lib/lp_solve/liblpsolve55.so /usr/lib/liblpsolve55.so 
  3. If you plan on using the C++ import feature you will also need an additional symbolic link to the clang libraries directly in main directory of Envision's source:
    Envision$ ln -s /usr/lib/llvm-7/lib/ lib 
  4. If you plan on using the JavaImportTool you will need Gradle:
    sudo apt-get install gradle 
  5. If you want to try and compile some of the disabled plug-ins (no longer maintained), you will likely need at least these additional dependencies:
    sudo apt-get install python3-dev libboost-python-dev libedit-dev 

Envision's repository contains configuration files for both Qt Creator and Eclipse. You can choose which tool you want to use but we recommend Qt Creator. The instructions below show you how to set-up both IDEs.

Qt Creator

  1. Clone Envision's GitHub repository to a directory on your computer. Have in mind that during the build process Qt Creator will create additional directories alongside the repository clone (for the out-of-source build).
  2. Start Qt Creator and configure the version of Qt that you want to use:
    • Go to: Tools > Options > Build & Run > Qt Versions. Make sure that you are using Qt 5.15 or later. This could be either Qt in PATH, or a Qt version that you compiled yourself. See below for manual Qt compilation instructions.
    • Go to: Tools > Options > Build & Run > Kits. Make sure that the default desktop kit uses the appropriate version of Qt.
  3. Open the top-level CMakeLists.txt file with Qt Creator.
  4. On Qt creator 4.x, set the CMake Build type to
    Debug 
    .
  5. In the Projects view, expand "Build Step", change the target to install change and change the tool argument to specify a parallel computation:
    -j32 install
    The install target is needed in order to copy all necessary files to the DebugBuild directory. Substitute 32 for the number of threads your hardware supports.
  6. Add run configurations
    • The executable of all run configurations must be Envision:
      %{sourceDir}/DebugBuild/Envision
    • The working directory of all run configurations must be DebugBuild:
      %{sourceDir}/DebugBuild
    • The arguments passed to Envision should at a minimum include:
      -graphicssystem raster
    • For each different test(demo) you want to run, make a new run configuration that also includes the appropriate argument. For example, to run the tests for the OOVisualization project:
      -graphicssystem raster --test oovisualization
      To see the tests (demos) associated with a project, just supply its name, converted to lowercase, as the parameter to the test argument. Do not test more than one project at a time. See here for more details about the different demos.
  7. (Recommended) If you want to debug Envision using gdb, you might notice that gdb takes quite a while to load debug symbols. It is possible to postpone this load to happen as late as possible, thereby speeding startup.
    • Go to: Tools > Options > Debugger > GDB Extended and enable the "Attempt Quick Start" option. Additionally you might want to remove unnecessary debug symbols, such as for Qt WebKit which take a long time to load. If you compiled Qt manually using the approach outlined below, simply remove any ".debug" files you do not need from the "qt/qt5-build/lib" directory.

Note that you will need to compile the JavaImportTool project separately, if you want to experiment with showing a Java project inside Envision.

Eclipse (recommended for Java; works for C++, but could require a lot of tweaking)

  1. Install the latest version of Eclipse.
  2. Download and install the Qt Integration plug-in for Eclipse. This plug-in is, unfortunately, no longer supported and the latest version is quite outdated. Look for the file: qt-eclipse-integration-linux.x86_64-1.6.1.tar.gz
  3. Start Eclipse and configure the version of Qt that you want to use. You can use the version provided by your system or you can point to a custom Qt version. See below for instructions on compiling the latest Qt version.
  4. Clone Envision's GitHub repository to a directory on your computer. The project is structured in separate directories where each one is an Eclipse project.
  5. Import all projects into your Eclipse workspace as Git projects. Eclipse/Qt might try to change some project files. Reject all requested changes.

Using the latest build of Qt

To experiment with custom Qt features, you could compile the latest Qt development branch yourself.

If you want to compile and use the latest development version of Qt, you can simply run the misc/use-qt5-dev.sh script. It is designed for and tested with Ubuntu 14.04. Running the script will:

  1. Install all dependencies required to compile Qt5 and Qt WebKit.
  2. Download the latest Qt 5 development branches of all Qt modules in qt/qt5-dev.
  3. Configure the build for a release version of Qt and WebKit with separate debug symbols.
  4. Compile all Qt modules including WebKit using 8 threads. Note that this could take a few hours even on high end machines.
  5. Install the compiled files in qt/qt5-build.
  6. Make a symbolic link: DebugBuild/qt -> qt/qt5-build/lib. This is needed for Envision to use the correct Qt version at run-time.

After you run the script you will need to configure Qt Creator to the the newly built version of Qt and rebuild Envision.

Running Envision

After you have compiled Envision give it a try! See this page for some interesting examples.

Common problems

Gcc crashes with a segmentation fault error when compiling Envision, what's wrong?
If you are running in a virtual machine, try increasing the amount of RAM of the machine. It should be at least 1 GB.