Menu

BuildWindowsVS2008

vISTe

Build vIST/e from source: Visual Studio 2008

Install Visual Studio 2008

Install Qt

  • Go to http://qt.nokia.com/downloads.
  • Click on Qt Libraries 4.8.2. for Windows (VS 2008, 234MB) (or a similar version for the same platform and development IDE).
  • Install Qt to C:\Qt or some other directory. This directory will later be referred to by the \<QTDIR> variable.
  • When the installation is finished, go to Start -> Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables. In Windows XP, you can right-click the My Computer icon and then select Properties.
  • Under System Variables find the PATH (or Path) variable and select Edit.
  • Add \<QTDIR>\qt\bin directory. Use a semi-colon (;) to separate this directory from other directories already listed.

Install CMake

Install VTK

  • Go to http://www.vtk.org/VTK/resources/software.html to download the latest version of VTK source code (not the Windows installer!).
  • Extract the ZIP archive to a location of your choice, e.g. C:\VTK. This location will later be referred to as <VTKSRC>.
  • Create empty directory at same level, e.g. C:\VTK_build, which will be referred to as <VTKBIN>.
  • Start CMake. On Windows 7 it may be necessary to start CMake in administrator mode by right-clicking the CMake icon and selecting Run as Administrator. This can happen if CMake was installed in C:\Program Files or C:\Program Files (X86).
  • In CMake, set the source directory to point to <VTKSRC>.
  • Set the target directory to point to <VTKBIN>. We recommend using a separate build directory because it will keep the source directory clean. If something goes wrong, you just delete the target (build) directory and try again.
  • Press Configure and select a generator. In this case, choose Visual Studio 9 2008. Do not choose any of the options ending with "Win64", even if your Windows version is 64-bit.
  • CMake will configure VTK for building, which may take a few seconds.
  • Then a list of red colored options will appear.
  • Make sure to check the BUILD_SHARED_LIBS and VTK_USE_QT options.
  • Press Configure again until the Generate button becomes enabled.
  • Then press Generate to generate the Visual Studio 2008 solution files.
  • In <VTKBIN>, open VTK.sln.
  • Select the Debug configuration and press F7 to build the project. If you wish to make a release version of VTK, you can select the Release configuration in the menu and build again.
  • When the build is finished successfully, go to Start -> Control Panel -> System and Security -> System -> Advanced System Setting -> Environment Variables.
  • Under System Variables find the PATH (or Path) variable and select Edit.
  • Add <VTKDIR>\bin\Debug to the path (and <VTKDIR>\bin\Release if you also built a release version).

Optional: install GLEW

  • If you want to use the IllustrativeClusters plugin, you need GLEW (the OpenGL Extension Wrangler Library). The reason for this is that this plugin does not (yet) rely on VTK's extension manager. If you do not want to use the IllustrativeClusters plugin, you can skip installation of GLEW but make sure to leave the PLUGINS_BUILD_ILLUSTRATIVECLUSTERS option unchecked when you first configure CMake on the vIST/e project.
  • Go to http://glew.sourceforge.net and download the latest binaries for Windows (32-bit).
  • Unzip the archive to a directory of your choice, referred to as <GLEWDIR>.
  • In Visual Studio 2008, go to Tools -> Options -> VC++ Directories. Under Show Directories For select Executable Files. Add the <GLEWDIR>\bin directory.
  • Under Show Directories For select Library Files and add <GLEWDIR>\lib.
  • Add <GLEWDIR>\bin to your PATH variable (as previously explained).

Checkout vIST/e source code

The main source code tree of vIST/e is publicly accessible. For specific branches you need a valid username and password combination. Contact the developers at Eindhoven University of Technology if you need this (viste.tue at gmail.com).

  • (Optional) Install the Tortoise SVN client from http://tortoisesvn.net/downloads.html. You need this tool to access the SVN repository where the vIST/e source code is hosted. Installing Tortoise SVN will add SVN-specific menu items to every right-click operation you perform in Windows Explorer.

  • Go to a folder where you wish to check out the vIST/e project, e.g., C:\vISTe\subversion.

  • Right-click in this folder, and select SVN Checkout....
  • In the URL of Repository text field, type https://svn.berlios.de/svnroot/repos/viste-tool/trunk.
  • In the Checkout Directory text field a C:\vISTe\subversion\viste is suggested. You can use this one or remove the 'viste' part to put everything directly in the 'subversion' directory.
  • Press Ok to check out.

Configure and build vIST/e

  • Start CMake.
  • Set the source directory to C:\vISTe\subversion.
  • Set the binary directory to C:\vISTe\builds\1.0.0-x86 (or some other folder you prefer). Do not use the same binary folder as your source folder because this will become confusing when you commit your changes to SVN (if you have permission to do that of course). Even so, it is always a good idea to keep source code and binaries separated.
  • Press Configure and select the desired generator (the same one you used for VTK, so that should be Visual Studio 9 2008.
  • After the first configure step is finished, you see a list of red colored options. vIST/e by default enabeld all plugins except those that require special libaries. For example, the IllustrativeClusters plugin requires GLEW and is disabled. Also, the FiberTrackingCUDA plugin requires CUDA and is also disabled.
  • For the rest you can keep everything as is, and press Configure again until everything is no longer red colored.
  • Then press Generate to generate the Visual Studio solution.
  • Open the solution file Project.sln and press F7 to build all project modules. Again, you can do this for both the Debug and Release configurations.
  • To launch vIST/e from Visual Studio, right-click the vIST/e project and select Set as Startup Project. Then press F10 to start vIST/e (usually in Debug mode).

Extending registration period Visual Studio 2008

Microsoft requires you to register any Express Edition product within 30 days. For this, you need to have or create a Windows Live account with Microsoft. If you don't want this, you can follow these instructions to circumvent this issue.

  • Open the registry editor using Start -> Search Programs and Files.
  • Type regedit in the text field and press enter. This will show the registry editor.
  • Navigate to HKEY_CURRENT_USER\Software\Microsoft\VCExpress\9.0\Registration.
  • Double-click the Params property and replace the first 8 characters of the data value with the following letter sequence: AAAAAAAA.
  • Press Ok and close the registry editor.
  • Start Visual C++ 2008 and go to Help > Register Product. If everything is ok, then the registration period should be some very large number (e.g. 17761 days).

Related

Wiki: BuildFromSource

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.