]> sjero.net Git - linphone/blob - README.mingw
Update README to add tunnel build instructions.
[linphone] / README.mingw
1 Software to install
2 *******************
3
4 Download lastest mingw-get-inst.exe from http://www.mingw.org
5 Run mingw-get-inst.exe. Choose "download lastest catalogues".
6 In the feature list, select:
7 * C compiler
8 * C++ compiler
9 * Mingw developer toolkit
10 Let the installer fetch and install everything.
11
12 In mingw shell, run
13
14 mingw-get install msys-zip
15 mingw-get install msys-unzip
16 mingw-get install msys-wget
17 mingw-get install msys-libopenssl
18
19 mkdir -p /opt/perl/bin
20 cp /bin/perl /opt/perl/bin/.
21
22 cd ~
23 #Download intltool
24 wget http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
25
26 Download lastest linphone-deps-win32 zip from  
27 http://download.savannah.gnu.org/releases-noredirect/linphone/misc
28 using your browser. 
29
30 Download lastest gtk+ win32 bundle from http://www.gtk.org 
31
32 Install all these three package in /:
33
34 cd /
35 unzip ~/intltool_0.40.4-1_win32.zip
36 unzip <path to gtk bundle zip>
37 unzip <path to linphone-deps>
38
39 #Install GTK+ Outcrop theme, the one used by linphone for distribution.
40 cd /share/themes
41 wget http://art.gnome.org/download/themes/gtk2/1122/GTK2-Outcrop.tar.gz
42 tar -xvzf GTK2-Outcrop.tar.gz
43
44 #Remove the special stdint.h and inttypes.h included in linphone-deps: it is for MSVC only.
45 #Mingw will use the one in /mingw/include
46 rm /include/stdint.h /include/inttypes.h
47
48 #Remove libgcc specific libraries, only needed for MSVC:
49 rm /lib/libgcc.a /lib/libmingw32.a /lib/libmingwex.a
50
51 #To get the translations working, remove from C:/MinGW/lib :
52 libintl.a libintl.la libintl.dll.a
53
54 * Download and install Inno Setup Compiler (required only if you run 'make setup.exe'). Add it to your windows Path environment variable.
55
56 Get Linphone source code
57 ************************
58
59 Install msys-git from (http://code.google.com/p/msysgit/). During installation you are asked to make a choice about how line endings are treated by git.
60 Choose "Checkout line endings as they are, commit as they are". THIS CHOICE IS VERY IMPORTANT. OTHERS BREAK AUTOMAKE.
61
62 It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example
63 c:\sources\
64 Within msys-git bash, do
65 cd /c/sources
66 git clone git://git.savannah.nongnu.org/linphone.git --recursive
67
68
69 Building
70 ********
71
72 WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor,
73  you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu.
74 Kill it. Don't know what it is, but once killed, windows runs normally.
75
76 #Compile and install tunnel
77 cd tunnel && ./autogen.sh && ./configure --prefix=/opt/linphone && make && make install
78 #run autogen.sh after a git checkout or update
79 ./autogen.sh
80 ./configure --prefix=/opt/linphone --enable-shared --disable-static
81 make
82 #will install to /opt/linphone, required for compilation of plugins.
83 make install
84 #make a binary zip of linphone
85 make zip
86 #additionally you can make binary installer if you have Inno Setup 5 installed in its default path
87 make setup.exe
88 #now you're done, you have a fresh linphone windows installer in the current directory.
89
90 #build plugins
91 cd mediastreamer2/plugins/msx264
92 ./autogen.sh
93 PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static
94 #make a binary zip of this plugin
95 make zip
96 #or make an installer
97 make setup.exe
98
99 #the buddylookup plugin enables lookup of buddies in a remote database using xml-rpc over http/https.
100 cd coreapi/plugins/buddylookup
101 ./autogen.sh
102 PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static 
103 make
104 #make a binary zip of this plugin
105 make zip
106
107
108 ******************************************************
109 *      Notes about linphone-deps generation          *
110 ******************************************************
111
112 Linphone-deps is a collection of linphone dependencies, that are for some of them difficult
113 to find as windows binaries.
114 These notes are useful if you want to upgrade part of the software that is included in the
115 linphone-deps packages.
116
117 List of software included in linphone-deps:
118 libosip2  (compiled)
119 libeXosip2 (compiled)
120 libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all these from ffmpeg)
121 libtheora (from the web)
122 libx264 (compiled from the version distributed from linphone's web site)
123 libogg (from the web)
124 libspeex, libspeexdsp (compiled, statically to workaround a dll-related crash)
125 libgnutls (from the web)
126 libgsm (from the web)
127 libxml2 (compiled)
128 libsoup (compiled)
129
130 Remarks:
131 For every package compiled that goes into linphone-deps, .la files (libtool files) must be removed to avoid libtool errors.
132 When running "make install DESTDIR=<somepath>", somepath must be absolute and should not contain any ~ or space.
133
134 - building ffmpeg 
135   ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
136   make install DESTDIR=/home/<myuser>/ffmpeg-install
137   Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
138   Copy also all *.dll.a files from the build tree to lib/ directort of linphone-deps. These are the implibs necessary to link a program against the dlls.
139
140 - building libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup 
141   (that requires libxml2).
142   ./configure --enable-shared --disable-static && make && make install DESTDIR=/home/<myuser>/libxml2-install
143   copy ~/libxml2-install/usr/local/* into linphone-deps/.
144
145 - building x264:
146  
147   * download yasm normal version windows executable from yasm project page:
148   http://www.tortall.net/projects/yasm/wiki/Download
149   copy it as /usr/local/bin/yasm.exe
150
151   cd into x264/ dir then run:
152   ./configure --enable-pic
153   make
154   make install DESTDIR=/home/<myuser>/x264-install
155   then copy the content of ~/x264-install/usr/local/ into linphone-deps/.
156
157 - libgnutls (required for libsoup https support)
158         - download binary zip from http://josefsson.org/gnutls4win.org
159         - add to linphone-deps
160
161 - building libsoup (only required for buddylookup plugin)
162         - download source from gnome ftp (warning: at the time of the writing only version 2.26.x can compile with the 
163                 glib version supplied in the gtk-bundle, 2.27 requires a new version of glib)
164         - uncompress libgnutls zip in /
165         - make sure you have libxml2 installed in /
166         - apply a bugfix patch (fix gnutls support on windows, completely broken otherwise). The patch
167                 is in linphone-deps/src, apply it this way:
168                 cd libsoup-2.26.*
169                 cd libsoup
170                 patch -p0 < libsoup-gnutls-bugfix.patch
171         - run:
172                 ./configure --prefix=/usr --enable-shared --disable-static
173                 make
174                 make install
175                 make install DESTDIR=/home/<myuser>/libsoup-install
176         - copy ~/libsoup-install/usr/* into linphone-deps/
177
178 Once you have everything in linphone-deps, remove .la files from lib:
179         cd lib && rm -f *.la