Windows 7 Download and Installation

From KratosWiki
Revision as of 14:31, 29 March 2010 by JMora (Talk | contribs)
Jump to: navigation, search

Contents

Preliminaries: Components needed to install the Kratos

Last visit for the links: 28 March 2010

Note that this is a specific case of possible installation of Kratos in a 64 bits computer under Windows 7, and all the different components are not compulsory for the successful use of Kratos. You can select other equivalent C++ compilers, svn, etc. or other versions of those we are presenting.

Two examples of organization of files are provided. Of course, you should select only one of them.

C++ compiler. Microsoft Visual Studio 2008

For developers using Windows, we recommend to use Microsoft Visual Studio 2005 or 2008. If you are working with a 64 bits machine, be sure that you include the 64 bits tools in your MSVS installation.

SVN

It is recommended to use RapidSVN

The latest released version: 0.12, October 2009, RapidSVN-0.12.0-8051.exe

Download and run the file:

RapidSVN.1.jpgRapidSVN.2.jpg

Kratos Source Code

By using RapidSVN, the kratos source files can be downloaded by taking the following steps:

  • Go to Repository->Checkout and enter the following path to the kratos repository:
        http://kratos.cimne.upc.es/svn/kratos/

RapidSVN.3.jpgRapidSVN.4.jpg

  • Choose a working directory where module: kratos will be created in your pc
    • example A: "C:\Kratos2010"
    • example B: "D:"
  • "recursive" option have to be signed
  • this will create a folder "C:\Kratos2010\kratos" or "D:\kratos" with all the required Kratos files.

RapidSVN.5.jpg

Pre and Post Processor. GiD

We use GiD as our favourite pre and post-processor.

Download and install the latest version of GiD. Here we use the latest beta version for 64 bits (GiD9.2.9b-win-x64-Install.exe)

GiDInstall.1.jpgGiDInstall.2.jpg

GiDInstall.3.jpgGiDInstall.4.jpg

You should have to install the GiDpost External Library too (latest version, March 2010, ftp://gid.cimne.upc.es/pub/gid/Tools/gidpost1.70.zip).

Unzip the file in your kratos external libraries.

  • example A: "C:\Kratos2010\kratos\external_libraries\gidpost" (already existing folder, the one by default)
  • example B: "D:\external_libraries\gidpost" (independent folder outside kratos' directory tree)

To build the GiD postprocess libray:

  • Open a DOS console (from Start - Programs - Microsoft Visual Studio 2008 - Visual Studio Tools - System Console
  • Run vcvarsall.bat

GiDInstall.5.jpg GiDInstall.6.jpg

  • Change to the VC Common7\Tools directory (cd ..; cd Common7; cd Tools)
  • Run vcvars32.bat

GiDInstall.7.jpg

  • change to the "gidpost\win" directory (remember, "C:\Kratos2010\kratos\external_libraries\gidpost" or "D:\external_libraries\gidpost")
  • And depending on the version you want to compile (probably both of them) invoke:
 nmake -f Makefile.vc CFG="Release"
 nmake -f Makefile.vc CFG="Debug"

GiDInstall.9.jpg GiDInstall.8.jpg

  • This will create two new folders "gidpost\win\Debug" and "gidpost\win\Release" with the file gidpost.lib for the Debug or Release compilation

GiDInstall.10.jpg

  • Very important! Finally and only if you have selected a different directory to the default one (example B), copy the existing Jamfile file from the default folder (D:\kratos\external_libraries\gidpost) to the one you are using for the libraries (D:\external_libraries\gidpost)

Scripting Language Python. Python(x,y)

Python can be downloaded from here. At this moment the python 2.6 is supported.

Before installing Python, consider if you want to use it to plot graphics. In that case, you should check packages (python(x,y), for example) which include matplotlib or other equivalent graphic tools.

For this example, we will describe the full package Python(x,y) installation.

Download and run the installation file from http://www.pythonxy.com/ (latest version 2.6.2.0, March 2010, 426 MB, http://ftp.ntua.gr/pub/devel/pythonxy/Python(x,y)-2.6.2.0.exe)

Python xy Install.1.jpg

Everything by default, but it is recommended to:

  • select installation for all the users
  • select the destination folders (to check the full installation process)
  • select all the components to be installed
  • folders:
    • example A:
general destination: C:\Program Files (x86)\pythonxy
python(x,y) documentation: C:\Program Files (x86)\pythonxy\doc
python kernel: C:\Python26
eclipse: C:\Program Files (x86)\pythonxy\eclipse
eclipse workspace: C:\Documents\Python
mingw: C:\Program Files (x86)\pythonxy\mingw
    • example B:
general destination: D:\pythonxy
python(x,y) documentation: D:\pythonxy\doc
python kernel: D:\Python26
eclipse: D:\pythonxy\eclipse
eclipse workspace: D:\Simulations\Python
mingw: D:\pythonxy\mingw

Python xy Install.2.jpgPython xy Install.3.jpgPython xy Install.4.jpg Python xy Install.5.jpgPython xy Install.6.jpgPython xy Install.7.jpg Python xy Install.8.jpgPython xy Install.9.jpgPython xy Install.10.jpg Python xy Install.11.jpg

After the installation, you should check that Python has created a folder called "C:\Python26\libs" or "D:\Python26\libs".

Boost Library

Kratos uses the Boost library.

Boost provides free peer-reviewed portable C++ source libraries.

Step1 - Install the building system

The compilation of both the Kratos and the Boost-library is performed using bjam which is a portable "make" like system and manages the compilation. Bjam has configuration files for many different compilers. This configuration files are contained in the "boost-build".

The following steps are needed to install the build system:

  • Downlodad precompiled bjam for windows ((http://www.boost.org/doc/tools/build/index.html, latest version 2007) and unzip it in the external libraries folder: "C:\Kratos2010\kratos\external_libraries\boost\boost-build" or "D:\external_libraries\boost\boost-build").
  • Open a DOS console and change to the boost-build\jam_src folder
  • Run build.bat

Boost-Build Install.1.jpg

Boost-Build Install.2.jpg

  • A new folder bin.ntx86 will have been created with a bjam.exe file in it.
  • Copy the bjam.exe in the kratos root ("C:\Kratos2010\kratos\external_libraries\boost\boost-build\jam_src\bin.ntx86" to "C:\Kratos2010\kratos", in the example A; "D:\external_libraries\boost\boost-build\jam_src\bin.ntx86" to "D:\kratos", in the example A;)

Step2 - Install the boost library

You can install and build manually the boost library or you can directly use an installer. As said in the boost webpage: "The easiest way to get a copy of Boost is to use an installer. The Boost website version of this Getting Started guide will have undated information on installers as they become available, or see Boost downloads or the installer provided by BoostPro Computing. We especially recommend using an installer if you use Microsoft Visual Studio, because the installer can download and install precompiled library binaries, saving you the trouble of building them yourself."

Download and run BoostPro Installer (latest version 1.42.0, 190K, boost_1_42_setup.exe, March 2010). You should register to freely download the file.

  • select Visual C++ 9.0 (Microsoft Visual Studio 2008) and all the variants

BoostInstall.1.jpgBoostInstall.2.jpg

  • select all the components for VC9.0

BoostInstall.3.jpgBoostInstall.4.jpg

  • select "C:\Kratos2010\kratos\external_libraries\boost\boost_1_42" (example A) or "D:\external_libraries\boost\boost_1_42" (example B) as Destination Folder

BoostInstall.6.jpgBoostInstall.9.jpg

BoostInstall.7.jpgBoostInstall.8.jpg

  • check that the following specific folders have been created: \external_libraries\boost\boost_1_42\lib and \external_libraries\boost\boost_1_42\bin

BoostInstall.10.jpgBoostInstall.11.jpg

Step3 - Environment variables

  • Check your environment variables (Control Panel->System and Security->System->Advanced System Settings)

Boost-Build Install.3.jpg

  • Define the following variable:
    • example A: BOOST_BUILD_PATH = C:\Kratos2010\kratos\external_libraries\boost\boost-build
    • example B: BOOST_BUILD_PATH = D:\external_libraries\boost\boost-build

Boost-Build Install.4.jpgBoost-Build Install.5.jpg

  • check your path. In this moment, you probably have got something like (example A):
%CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Python26;C:\Python26\DLLs;C:\Python26\Scripts;C:\Python26\Lib\site-packages\PyQt4;C:\Python26\gnuplot\bin;C:\Python26\Lib\site-packages\vtk;C:\Python26\OpenCV\bin;C:\Program Files (x86)\pythonxy\console;C:\Program Files (x86)\pythonxy\SciTE-2.01;C:\Program Files (x86)\pythonxy\mingw\bin
  • you should add the following boost directories (\external_libraries\boost\boost_1_42; \external_libraries\boost\boost_1_42\lib; \kratos\external_libraries\boost\boost_1_42\bin; \external_libraries\boost\boost-build)
%CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Python26;C:\Python26\DLLs;C:\Python26\Scripts;C:\Python26\Lib\site-packages\PyQt4;C:\Python26\gnuplot\bin;C:\Python26\Lib\site-packages\vtk;C:\Python26\OpenCV\bin;C:\Program Files (x86)\pythonxy\console;C:\Program Files (x86)\pythonxy\SciTE-2.01;C:\Program Files (x86)\pythonxy\mingw\bin;C:\Kratos2010\kratos\external_libraries\boost\boost_1_42; C:\Kratos2010\kratos\external_libraries\boost\boost_1_42\lib; C:\Kratos2010\kratos\external_libraries\boost\boost_1_42\bin; C:\Kratos2010\kratos\external_libraries\boost\boost-build


Compiling Kratos

  1. Copy the Common_Jamroot to Jamroot
  2. In the folder KratosR1 copy Common_Jamroot to Jamroot and then open it with a text editor: select and customize the parts marked as WINDOWS INSTALLATION

Finally compiling the Kratos using bjam

   bjam toolset=msvc threading=multi -j2

the "-j2" flag is to compile using 2 processors. Omitting it implies compiling with a single processor. "-jN" to compile with N processors

Visual Studio Project

A simple interface for the compilation using Microsoft Visual Studio 2005 is provided at the link:

ProjectFile

To use it simply download the file and unpack it in the directory "kratosR1". The file treats the bjam as a makefile and allows compiling inside the visual studio environment

Personal tools
Categories