Files
@ e1209459d052
Branch filter:
Location: EI/VirtualLeaf/doc/recipe.rst
e1209459d052
8.9 KiB
text/prs.fallenstein.rst
initial commit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | .. $Id$
.. |date| date::
.. |time| date:: %H:%M
.. header::
###Title### - |date|
.. footer::
###Page###
Virtual Leaf
============
Linux Installation
------------------
Material
++++++++
#. The Virtual Leaf source code
#. `QT SDK <http://qt.nokia.com>`_
#. Development Systems will have many of these items already installed:
#. Python programming language
#. `Mercurial revision control system <http://mercurial.selenic.com/wiki>`_
#. KDiff2 diff/merge tool.
#. GCC, The GNU Compiler Collection
#. GNU Make
#. Iconv conversion utilities
#. Perl programming language
#. Zlib compression library
#. Libxml2 XML parser
Methods
+++++++
#. Install the aforementioned development software. The following
commands should show meaningful output::
python --version
hg --version
gcc --version
make --version
iconv --version
perl --version
locate libz.so
locate libxml2.so
#. The VirtualLeaf is written with the QT Cross platform application
and UI framework. To compile the VirtualLeaf from source you will
need to install the QT software development kit(SDK), which you
can download from the `QT download site <http://qt.nokia.com/downloads/downloads>`_.
#. Whether installed globally by a system administrator our locally in
your own user space, make sure the QT bin directory containing qmake
is in your execution path, e.g.::
> PATH=/opt/QT/qt/bin:$PATH
#. Create a Mercurial configuration file named .hgrc in your home
directory containing the following lines::
[ui]
username = Your Name <your e-mail address>
merge = kdiff3
[extdiff]
cmd.vdiff = kdiff3
[merge-tools]
diffFiles.args = $local $other $base
kdiff3.args = $base $local $other -o $output
#. Make or change to the directory where you wish to install the Virtual Leaf::
> cd /home/michael/simulations
#. Retrieve the Virtual Leaf source code from its Google Code repository::
> hg clone https://virtualleaf.googlecode.com/hg/ virtualleaf
#. Compilation is effected with make. To facilitate cross platform
compatibility, the makefiles use two environment variables:
``MAKE`` and ``QMAKE`` to name the make and QT-make utilities
respectively. The fallback defaults are ``make`` and ``qmake``.
If you wish to use some other ``make`` or ``qmake`` utilities other
than the defaults, instantiate environment variables named ``MAKE``
and ``QMAKE``, e.g.::
> export MAKE=gmake
> export QMAKE=/home/michael/MyQT/qt/bin/qmake
#. In the VirtualLeaf ``src`` directory you will find a
``Makefile``, the root of a hierarchy of makefiles, that will
guide the compilation and installation of the VirtualLeaf
executable, its default plugins and the tutorial examples. To
compile the VirtualLeaf**, go to the VirtualLeaf ``src`` directory
and invoke ``make``, for example::
> cd /home/michael/simulations/virtualleaf/src
> make -f Makefile
Once the compilation is complete, you will find the ``VirtualLeaf``
binary in ``virtualleaf/bin`` and the plugins in ``virtualleaf/bin/models``.
Windows
-------
Material
++++++++
#. The Virtual Leaf source code
#. QT SDK: http://get.qt.nokia.com/qtsdk/qt-sdk-win-opensource-2010.02.1.exe
#. Development Systems most likely will have most of the items in the following list already installed:
#. Python programming language
#. `Mercurial <http://mercurial.selenic.com/wiki/Download#Windows>`_ revision control system .
#. `KDiff3 diff/merge tool <http://sourceforge.net/projects/kdiff3/files/>`_.
#. `Iconv conversion utilities <http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13/>`_
(rename libiconv.dll.a to libiconv.a).
#. `Perl programming language <http://strawberry-perl.googlecode.com/files/strawberry-perl-5.10.1.1.msi>`_.
#. `Zlib compression library <http://sourceforge.net/projects/mingw/files/MinGW/zlib/zlib-1.2.3-1-mingw32/>`_.
#. `libz-1.dll <http://sourceforge.net/projects/mingw/files/MinGW/zlib/zlib-1.2.3-1-mingw32/>`_ (rename to zlib1.dll).
#. Libxml2 XML parser: from ftp://ftp.zlatkovic.com/libxml/ or ftp://xmlsoft.org/libxml2/win32.
Or compile from source::
git clone git://git.gnome.org/libxml2
To obviate compilation problems with mingw see:
#. https://bugzilla.gnome.org/show_bug.cgi?id=561340
#. http://osdir.com/ml/gnome.lib.xml.general/2004-02/msg00007.html
#. http://www.c-plusplus.de/forum/viewtopic-var-t-is-260421.html
#. http://markmail.org/message/rlpeuruibg2ruqqv
Methods
+++++++
#. Install the aforementioned development software.
#. The VirtualLeaf is written with the QT Cross platform application
and UI framework. To compile the VirtualLeaf from source you will
need to install the QT software development kit(SDK), which you
can download from the `QT download site <http://qt.nokia.com/downloads/downloads>`_.
#. Create a Mercurial configuration file named .hgrc in your `home
directory <http://mercurial.selenic.com/wiki/WindowsInstall#Setup_environment>`_::
Notepad "C:\Documents and Settings\your_name\.hgrc"
Add these lines to the configuration file::
[ui]
editor = Notepad
username = your_name <your_email_address>
[merge-tools]
kdiff3.priority=-1
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output
kdiff3.regkey=Software\KDiff3
kdiff3.regappend=\kdiff3.exe
kdiff3.fixeol=True
kdiff3.gui=True
#. Make or change to the directory where you wish to install the Virtual Leaf::
> c:\Documents and Settings\michael\simulations
#. Retrieve the Virtual Leaf source code from its Google Code repository::
> hg clone https://virtualleaf.googlecode.com/hg/ virtualleaf
#. Compilation is effected with make. To facilitate cross platform
compatibility, the makefiles use two environment variables:
``MAKE`` and ``QMAKE`` to name the make and QT-make utility
respectively. The fallback defaults are ``make`` and
``qmake``. Since QT executable names are consistent across
platforms, the ``QMAKE`` default value, ``QMAKE=qmake``, will
work fine. You will have to create an environment variable named ``MAKE``
though.
To add an environment variable call up the *system tool*, either
with a left click on the *start menu* then a right click on *My
Computer* and choosing *properties* from the drop down list, or
by choosing *control panel* from the *start menu* and then double
clicking on the *system tool* itself. Once in the *system tool*,
choose the *advanced* tab and then click the *environment
variables* button. The environment variables screen is split in
two with *User* variables above and *System* variables below. Add
a new users variable named ``MAKE`` with the value,
e.g. ``mingw32-make``. the QT(SDK) contains the *minimum gnu for
windows* (mingw) compiler; commonly installed in:
``c:\QT\qt-version\mingw\bin``. Look there for the ``MAKE``
utility name.
#. For convenience sake, three required development libraries:
``libiconv``, ``libxml2`` and ``libz`` are distributed with the
VirtualLeaf code, and the VirtualLeaf will compile correctly with
them. If, however, you wish to use other versions of these
libraries, you will need to reassign the ``LIBICONVDIR``,
``LIBZML2DIR`` and ``LIBZDIR`` variables in all the project
files.
#. After installing QT and setting the ``MAKE`` environment
variable, you should be able to invoke a QT command window from
the *start menu*. This shell automatically includes the necessary
QT folder in your execution PATH. Within this command window, go
to the VirtualLeaf ``src`` folder and invoke make, for example::
> c:\Documents and Settings\michael\simulations\virtualleaf\src
> mingw32-make -f Makefile
When complete, you will find the ``VirtualLeaf.exe`` binary in
``v1.0/bin`` and the plugins in ``v1.0/bin/models``.
MacOS
-----
Material
++++++++
Identical to the Linux installation except that instead of GNU GCC
and Make, install the XCode development environment from the MacOSX
installation DVDs.
Methods
+++++++
Identical to the Linux installation except:
#. Open the Terminal program (in ``/Applications/Utilities/``) and
retrieve the Virtual Leaf source code from its Google Code
repository::
> hg clone https://virtualleaf.googlecode.com/hg/ virtualleaf
#. Compile the VirtualLeaf code with the correct options::
> cd virtualleaf/src
> export QMAKESPEC=macx-g++; make -f Makefile
When complete, you will find the ``VirtualLeaf`` binary in
``v1.0/bin`` and the plugins in ``v1.0/bin/models``.
|