| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| 2 |
<html> |
| 3 |
|
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 |
|
| 8 |
<title>Routino : Installation on MS Windows</title> |
| 9 |
|
| 10 |
<!-- |
| 11 |
Routino documentation - installation on MS Windows |
| 12 |
|
| 13 |
Part of the Routino routing software. |
| 14 |
|
| 15 |
This file Copyright 2008-2015 Andrew M. Bishop |
| 16 |
|
| 17 |
This program is free software: you can redistribute it and/or modify |
| 18 |
it under the terms of the GNU Affero General Public License as published by |
| 19 |
the Free Software Foundation, either version 3 of the License, or |
| 20 |
(at your option) any later version. |
| 21 |
|
| 22 |
This program is distributed in the hope that it will be useful, |
| 23 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 24 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 25 |
GNU Affero General Public License for more details. |
| 26 |
|
| 27 |
You should have received a copy of the GNU Affero General Public License |
| 28 |
along with this program. If not, see http://www.gnu.org/licenses/. |
| 29 |
--> |
| 30 |
|
| 31 |
<link href="style.css" type="text/css" rel="stylesheet"> |
| 32 |
</head> |
| 33 |
|
| 34 |
<body> |
| 35 |
|
| 36 |
<!-- Header Start --> |
| 37 |
|
| 38 |
<div class="header"> |
| 39 |
|
| 40 |
<h1>Routino : Installation on MS Windows</h1> |
| 41 |
|
| 42 |
</div> |
| 43 |
|
| 44 |
<!-- Header End --> |
| 45 |
|
| 46 |
<!-- Content Start --> |
| 47 |
|
| 48 |
<div class="content"> |
| 49 |
|
| 50 |
|
| 51 |
<h2 id="H_1_1">Using Cygwin</h2> |
| 52 |
|
| 53 |
Cygwin is a large collection of GNU and Open Source tools which provide |
| 54 |
functionality similar to a Linux distribution on Windows. A Cygwin DLL |
| 55 |
provides substantial POSIX API functionality therefore providing direct |
| 56 |
compatibility for most UNIX source code. |
| 57 |
|
| 58 |
<p> |
| 59 |
|
| 60 |
Since Cygwin aims to replicate a Linux-like system on Windows it is the simplest |
| 61 |
method of compiling Routino. The disadvantage is that all programs compiled |
| 62 |
with Cygwin require a number of runtime Cygwin libraries which may introduce a |
| 63 |
runtime speed penalty. |
| 64 |
|
| 65 |
<p> |
| 66 |
|
| 67 |
The installer for Cygwin can be downloaded from <tt>http://cygwin.org/</tt>; |
| 68 |
there are 32-bit and 64-bit versions available. For compiling Routino the |
| 69 |
Cygwin installer should be run and the following packages selected (any |
| 70 |
dependencies will be automatically be selected at the next step): |
| 71 |
|
| 72 |
<ul> |
| 73 |
<li><i>base packages</i> |
| 74 |
<li>gcc-core (in 'Devel' menu) |
| 75 |
<li>make (in 'Devel' menu) |
| 76 |
<li>libbz2-devel (in 'Libs' menu) |
| 77 |
<li>zlib-devel (in 'Libs' menu) |
| 78 |
<li>perl (in 'Perl' menu) |
| 79 |
</ul> |
| 80 |
|
| 81 |
<p> |
| 82 |
|
| 83 |
To compile Routino open the "Cygwin Terminal" change to the Routino source |
| 84 |
directory and compile using the <tt>make</tt> command. |
| 85 |
|
| 86 |
<p> |
| 87 |
|
| 88 |
The programs that are compiled <tt>planetsplitter</tt>, <tt>router</tt> will |
| 89 |
require the Cygwin runtime to be able to run them. The |
| 90 |
library <tt>libroutino.so</tt> should be usable with other Cygwin compiled |
| 91 |
programs. |
| 92 |
|
| 93 |
|
| 94 |
<h2 id="H_1_2">Native Compilation</h2> |
| 95 |
|
| 96 |
Routino has limited support in the source code for compiling on Microsoft |
| 97 |
Windows. This includes a set of functions that can replace the <tt>mmap()</tt> |
| 98 |
and <tt>munmap()</tt> UNIX functions which are not available on Microsoft |
| 99 |
Windows. |
| 100 |
|
| 101 |
<p> |
| 102 |
|
| 103 |
The source code should be downloaded, either as a release version file or from |
| 104 |
subversion - no instructions are provided for this step. The release versions |
| 105 |
include some files (mainly the web icons) which are not included in the |
| 106 |
subversion source (and which may be difficult to create on Windows). |
| 107 |
|
| 108 |
|
| 109 |
<h3 id="H_1_2_1">Using Microsoft Visual C</h3> |
| 110 |
|
| 111 |
The Routino source code (for the router at least) has been modified so that it |
| 112 |
will compile with the Microsoft Visual C compiler. |
| 113 |
|
| 114 |
<p> |
| 115 |
|
| 116 |
Compiling Routino with MSVC is not supported directly since there is only |
| 117 |
support for using <tt>Makefile</tt>s in Routino. The files that need to be |
| 118 |
compiled for the Routino router can be found from the Makefile in |
| 119 |
the <tt>src</tt> directory listed in the <tt>ROUTER_OBJ</tt> variable. |
| 120 |
|
| 121 |
<p> |
| 122 |
|
| 123 |
To compile the router in slim mode the pre-processor definition <tt>SLIM=0</tt> |
| 124 |
must be set and for non-slim mode <tt>SLIM=1</tt> must be set. |
| 125 |
|
| 126 |
<p> |
| 127 |
|
| 128 |
The default directory for the Routino data files must be set in the |
| 129 |
<tt>ROUTINO_DATADIR</tt> pre-processor variable. If the router command line |
| 130 |
<tt>--data</tt> option is going to be used then this variable can be set to any |
| 131 |
value. |
| 132 |
|
| 133 |
<p> |
| 134 |
|
| 135 |
Since Microsoft Visual C does not fully support the C99 standard it is necessary |
| 136 |
to tell the compiler how to handle the <tt>inline</tt> functions. This can be |
| 137 |
done by passing in the command line option <tt>-Dinline=__inline</tt> to the C |
| 138 |
compiler. |
| 139 |
|
| 140 |
|
| 141 |
<h3 id="H_1_2_2">Using MinGW</h3> |
| 142 |
|
| 143 |
MinGW is the "Minimalist GNU for Windows" which includes some of the common GNU |
| 144 |
programs; principally gcc and related programs for software development. |
| 145 |
|
| 146 |
<p> |
| 147 |
|
| 148 |
The installer for MinGW can be downloaded from <tt>http://mingw.org/</tt>. For |
| 149 |
compiling Routino the MinGW installer should be run and the following packages |
| 150 |
selected: |
| 151 |
|
| 152 |
<ul> |
| 153 |
<li>mingw-base |
| 154 |
<li>msys-base |
| 155 |
<li>mingw32-pthreads-w32 |
| 156 |
<li>mingw32-libz (dev package) |
| 157 |
<li>msys-perl |
| 158 |
</ul> |
| 159 |
|
| 160 |
<p> |
| 161 |
|
| 162 |
To compile Routino open a DOS command window and set the path to the installed |
| 163 |
MinGW and MSYS software. For example if MinGW was installed in the |
| 164 |
<tt>C:/MinGW</tt> directory then the path needs to be set to |
| 165 |
<tt>C:\MinGW\bin;C:\MinGW\MSYS\1.0\bin</tt>. |
| 166 |
|
| 167 |
<p> |
| 168 |
|
| 169 |
From within this DOS command window change to the Routino source directory and |
| 170 |
compile using the MinGW version of <tt>make</tt> with this command |
| 171 |
<tt>mingw32-make</tt>. |
| 172 |
|
| 173 |
<p> |
| 174 |
|
| 175 |
After compiling Routino a set of library files are created (<tt>routino.dll</tt>, |
| 176 |
<tt>routino.def</tt> and <tt>routino.lib</tt>). These should be usable for |
| 177 |
linking with programs compiled with MSVC. |
| 178 |
|
| 179 |
|
| 180 |
<h3 id="H_1_2_3">Using MinGW-W64</h3> |
| 181 |
|
| 182 |
MinGW-w64 is an alernative implementation of the same concept as MinGW but |
| 183 |
allows for compilation to 32-bit or 64-bit executables. |
| 184 |
|
| 185 |
<p> |
| 186 |
|
| 187 |
The website for MinGW-w64 is <tt>http://mingw-w64.org/</tt> but the downloads |
| 188 |
are available from <tt>http://win-builds.org/</tt>. Installation of MinGW-w64 |
| 189 |
is slightly different from that for MinGW but a similar set of packages will be |
| 190 |
required. |
| 191 |
|
| 192 |
<p> |
| 193 |
|
| 194 |
The compilation method for MinGW-w64 is the same as for MinGW and the same files |
| 195 |
will be compiled, the only difference is that by default a 64-bit version will |
| 196 |
be created. |
| 197 |
|
| 198 |
|
| 199 |
<h3 id="H_1_2_4">Limitations</h3> |
| 200 |
|
| 201 |
A native Microsoft Windows compilation of Routino is more complicated than |
| 202 |
compiling on Linux, other UNIX system or Cygwin. This is probably not an option |
| 203 |
if you are unfamiliar with software development on Microsoft Windows. |
| 204 |
|
| 205 |
<p> |
| 206 |
|
| 207 |
The size of files that can be accessed with an MSVC or MinGW (32-bit) compiled |
| 208 |
version of Routino is limited to 32-bits (less than 4 GB). The MinGW-w64 |
| 209 |
compiler on 64-bit is able to handle larger files (bigger than 4 GB). |
| 210 |
|
| 211 |
<p> |
| 212 |
|
| 213 |
The Windows operating system does not have a function equivalent to the |
| 214 |
<tt>fork()</tt> function on UNIX. This means that it is not possible to use |
| 215 |
the <tt>planetsplitter</tt> program's built-in file decompression with an MSVC |
| 216 |
or MinGW compiled version of Routino. |
| 217 |
|
| 218 |
|
| 219 |
<h2 id="H_1_3">Example Web Pages</h2> |
| 220 |
|
| 221 |
No instructions are available for using the Routino example web pages with the |
| 222 |
Microsoft Web server (IIS). |
| 223 |
|
| 224 |
<p> |
| 225 |
|
| 226 |
For information on setting up Apache see the "Example Web Pages" section of the |
| 227 |
main <a href="installation.html" title="Installation">installation instructions</a>. |
| 228 |
|
| 229 |
</div> |
| 230 |
|
| 231 |
<!-- Content End --> |
| 232 |
|
| 233 |
<!-- Footer Start --> |
| 234 |
|
| 235 |
<div class="footer"> |
| 236 |
|
| 237 |
<address> |
| 238 |
© Andrew M. Bishop - <a href="http://www.routino.org/">http://www.routino.org/</a> |
| 239 |
</address> |
| 240 |
|
| 241 |
</div> |
| 242 |
|
| 243 |
<!-- Footer End --> |
| 244 |
|
| 245 |
</body> |
| 246 |
|
| 247 |
</html> |