forked from alavrik/piqi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.windows
176 lines (87 loc) · 4.28 KB
/
INSTALL.windows
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
This file contains instructions for building Piqi on Windows platform.
Windows build described in this documented relies on MinGW/Msys. Building Piqi
using Microsoft toolchain has not been tested.
(Piqi also successfully builds and runs on Windows under Cygwin. For building
Piqi under Cygwin, follow general instructions for Unix platforms provided in
INSTALL file.
Note that under Cygwin, there could be problems with broken/outdated OCaml and
Flexdll versions. These problems can be usually solved by downloading the latest
versions of Flexdll and OCaml and building them from sources.)
INSTALLATION INSTRUCTIONS
=========================
1. Download and install prerequisites
1.1. MinGW and Msys
Install MinGW and Msys using automated installer which can be downloaded
from here:
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/
Refer to MinGW website for additional information if necessary:
http://www.mingw.org
If you choose to install MinGW to non-default location (c:\mingw), make
sure the location doesn't contain spaces in directory names.
1.2. OCaml compiler suite
Download and install binary OCaml distribution for Windows from the
official website:
http://caml.inria.fr/download.en.html
The website offers two kinds of binary distributions for Windows: the
first one is based on MinGW and the second one relies on Microsoft
compiler toolchain.
It is critical that the one that is based on MinGW is installed.
The latest OCaml version, distributed through the official website, that
is known to work can be downloaded using this URL:
http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.0-win-mgw.exe
1.3. Flexdll
Download and run self-extracting Flexdll installer from here:
http://alain.frisch.fr/flexdll.html#download
1.4. Ocamlfind/Findlib -- library manager for OCaml
Download findlib sources (but don't build it yet!):
http://projects.camlcity.org/projects/findlib.html
Put the tarball to some filesystem location, for example, to
"c:\build\".
1.5. Piqi source code distribution
Download Piqi sources (but don't try to build it!):
http://piqi.org/downloads/
Put the Piqi tarball to the same filesystem location where you've put
the findlib archive (e.g. "c:\build\").
2. Build Findlib and Piqi
2.1. Start MinGW shell
Start MinGW/Msys shell. The MinGW installer usually creates a desktop
shortcut for it.
Go to your build directory:
cd c:/build
2.2. Unpack Findlib
tar -xzf findlib-*
2.3. Unpack Piqi sources
tar -xzf piqi-*
Ignore all warnings and errors printed by tar.
2.4. Configure Windows-specific build parameters
Note: this step is not necessary if MinGW, OCaml and Flexdll are
installed to the default locations suggested by their installers.
Use your favorite editor to setup environment variables in
c:\build\piqi\setenv-mingw.sh
2.5. Apply build parameters
Go back to the opened MinGW shell and type the following commands:
cd piqi
. setenv-mingw.sh
2.6. Build and install Findlib
Now, go to the unpacked findlib source code directory:
cd ..
cd findlib-<version>
And do the following:
./configure
make all
make opt
make install
Note: once you've build and installed Findlib, you will no longer need
to repeat this step for subsequent Piqi builds.
2.7. Build Piqi
Go back to the unpacked Piqi source code directory:
cd ..
cd piqi
Run the following commands:
make deps
make
Successful build will produce two stand-alone Windows executables:
piqi-tools/piqi.exe
piqic/piqic.exe
3. Further actions that are not specific to Windows
Refer to general instructions provided in INSTALL file.