Inviwo Setup for Windows
The steps below detail how to get Inviwo running on a computer with 64-bit Windows (tested on Windows 10). The video shows all of those steps as well. In parts it is heavily sped up. Especially the last step - building Inviwo - does take some time.
(Note: The video was created for a prior version of Inviwo. We have since upgraded to Visual Studio 2019 and the process for acquiring Microsoft product at KTH has changed, and submodules have been introduced.)
Step 1: Installing Dependencies
In order to work with Inviwo, you will need to install Git, Visual Studio, Qt and CMake. If there is some dependency you already have installed, check below if the versions are recent enough.
Git
Download git (Git Download Links to an external site.) and follow the install prompt.
Visual Studio (2019)
Install Visual Studio 2019 by getting it through Microsoft Azure (Follow the instructions on the linked page and look for Visual Studio 2019 in the search interface of Azure). Make sure you add the C++ compiler components (see below).
QT (>= 5.12)
Install Qt from here: Qt Download
Links to an external site.. You only need the version for the visual studio compiler (msvc2017_64
). Also add the Qt binary directory (a subdirectory of wherever you installed Qt, e.g. C:/Qt/5.12.4/msvc2017_64/bin
) to your PATH, by editing your environment variables
Links to an external site.. If you have Anaconda installed, make sure that the Qt version used for building is before the Anaconda path in the PATH. Restart your system after completing this step.
If the installer claims the size of the install will be several Gb large, you probably selected more than just the specified component above.
CMake (>= 3.12)
Use the installer from here: CMake Download Links to an external site.
Step 2: Cloning Inviwo
The source code is available on Github. You can clone the Inviwo repository by running
git clone https://github.com/KTHVisualization/inviwo
on the command line (or by using some graphical user interface for git). This will make a local copy of the source code on your computer in the current folder of the command line. Navigate to the newly created folder with
cd inviwo
Then, clone the repositories submodules with
git submodule update --init --recursive
Step 3: Running CMake-Gui
Run the CMake-Gui Program. In the window that opens you need to specify two paths. The first is the path of the folder with the Inviwo source (this is the folder with the contents of the git repository, so something like C:/Users/username/inviwo). The other path is the one where CMake will place the build-files (e.g. C:/Users/username/inviwo-output). Specify these two paths and hit the Configure button.
Make sure for both of these paths:
- You have write-access
- They do not contain spaces or special characters
- The folders are not inside Dropbox / One-Drive / ...
- The second folder path is not inside the first one
You will be asked if you want to create the output folder (Yes) and to choose a compiler. You want to use the Visual Studio 2019 Win64 option for the compiler. This is often already the default setting. For newer CMake versions, only Visual Studio 2019 may be available. You then have to specify separately that a 64-bit version should be used, by putting x64 in the field below the generator drop-down box.
Then CMake will do some checks for what system you are using and set up the build environment accordingly.
You will see some variables with either values or checkboxes. These specify which parts of Inviwo we will be using and where certain dependencies are located. If everything worked correctly, you will not have to make any changes here. Continue to press Configure until none of the entries are marked red anymore. However, one common problem is that CMake is unable to find Qt or uses a version that is incorporated into another program. Therefore check that the variables QT_QMAKE_EXECUTABLE (should be something like C:/Qt/Qt5.12.4/5.12.4/msvc2017_64/bin/qmake.exe) and the variables Qt5*_DIR (e.g. Qt5Core_DIR should be something like C:/Qt/Qt5.12.4/5.12.4/msvc2017_64/lib/cmake/Qt5Core) are set to the correct folders.
If all settings are correct and no errors occurred, you can hit Generate.
Step 4: Building Inviwo
The button Open Project should now directly open the Visual Studio solution of Inviwo. You can also navigate to the output folder you have specified and open the file inviwo-projects.sln from there.
For faster execution you may want to choose Release as the build-type. The Debug mode is needed when you want to step through your code.
Now all that is left to do is build Inviwo (Build → Build Solution) and the run it (Debug → Start) . Once Inviwo runs on your machine, you can take a look at the different example workspaces (File → Example Workspaces).
If you get errors regarding missing Qt-DLLs upon starting Inviwo, check your environment variables and try to restart your system before starting Inviwo once more.