forked from GoldenCheetah/GoldenCheetah
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL-LINUX
373 lines (266 loc) · 11.4 KB
/
INSTALL-LINUX
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
+++++++++++++++++++++++
LINUX BUILD WALKTHROUGH
+++++++++++++++++++++++
Mark Liversedge
John Ehrlinger
Jan 2015
Version 1.2
A walkthrough of building GoldenCheetah from scratch on Ubuntu linux. This walkthrough
should be largely the same for any Linux distro.
CONTENTS
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
- QT
- git
2. ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 2
- FTDI D2XX
- SRMIO
- liboauth
- QwtPlot3d
- libkml
3. ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 3
- checking out the release 3 branch & building with MANDATORY dependencies
- flex
- bison
- libical - Diary window and CalDAV support (google/mobileme calendar integration)
- libvlc - Video playback in training mode
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
=================================================
Installed Ubuntu 11.04 from CD image amd-64.iso. You will not need to do this if you
already have a Linux distribution installed. Left this step in to highlight the
Linux distribution the commands below were executed on.
login and open a terminal to get a shell prompt
Download MANDATORY DEPENDENCIES (browser)
-----------------------------------------
Download and install the Qt 4.8 SDK from http://qt-project.org/
Once that is completed test qmake is ok with: qmake --version (should report 4.7.0 or higher)
Install git with:
$ sudo apt-get install git
Said Y to prompt about all git files installed (git-gui et al)
Install FLEX and BISON
----------------------
You will need flex v2.5.9 or later
$ sudo apt-get install bison
$ sudo apt-get install flex
$ vi gcconfig.pri
Ensure you have the following lines (which are now also in gcconfig.pri.in which has
been updated to reflect the new dependencies in version 3)
QMAKE_LEX = flex
QMAKE_YACC = bison
win32 {
QMAKE_YACC = bison --file-prefix=y -t
QMAKE_MOVE = cmd /c move
QMAKE_DEL_FILE = rm -f
}
Build!
------
$ make clean
$ qmake
$ make
You will now have a release3 binary but with none of the release3 dependencies compiled in.
Get latest GOLDEN CHEETAH source files
--------------------------------------
$ mkdir -p ~/Projects/Live
$ cd ~/Projects/Live
$ git clone git://github.com/GoldenCheetah/GoldenCheetah.git
$ cd GoldenCheetah
Configure MANDATORY DEPENDENCIES
--------------------------------
$ cd qwt
$ cp qwtconfig.pri.in qwtconfig.pri
$ cd ../src
$ cp gcconfig.pri.in gcconfig.pri
$ vi gcconfig.pri
Comment out the D2XX_INCLUDE and SRMIO_INSTALL lines for now (put # in first character of the line
to comment out), we will install that in a moment, if we need to.
If you are building for your local host you may find that you get better performance if
compiling with gcc -O3 (tree vectorization can have a significat impact) [or -Ofast]
If so you might like to uncomment:
QMAKE_CXXFLAGS += -O3
Save and exit
$ cd ..
BUILD WITH BASIC CONFIGURATION
$ qmake -recursive
$ make
Congratulations you have now build a basic GoldenCheetah and can run this safely. See below for
optional dependencies you can install to support other features.
ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 2
====================================================
D2XX - For Powertap downloads via USB
-------------------------------------
Download the FTDI drivers from http://www.ftdichip.com/Drivers/D2XX.htm (e.g. I used Linux
64-bit drivers from http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx1.0.4.tar.gz)
Extract into your home directory (I put mine into ~/Projects/ with archive manager which
created a sub-directory ~/Projects/libftd2xx1.0.4
$ cd src
$ vi gcconfig.pri
Uncomment the D2XX_INCLUDE entry and make it match (my home is /home/markl)
D2XX_INCLUDE = /home/markl/libftd2xx1.0.4
Make clean is needed if you have previouslt built, since source files examine #defines before
including this feature. You can skip it if you know why ;)
$ make clean
$ qmake
$ make
You now have D2XX support, for downloading from a PT via a USB cradle.
SRMIO - For SRM powercontrol V downloads via Serial
---------------------------------------------------
$ cd ~/Projects
$ git clone git://github.com/rclasen/srmio srmio
$ cd srmio
Get automake and tools, if you don't already have them (I didn't after a fresh install)
$ sudo apt-get install automake
$ sudo apt-get install libtool
Generate the configure script, run it, build and install srmio
$ sh genautomake.sh
$ ./configure
$ make
$ sudo make install
Lets go config GC and build with SRMIO
$ cd ~/Projects/Live/GoldenCheetah/src
$ vi gcconfig.pri
Uncomment the SRMIO_INSTALL and replace with the target used from srmio install:
SRMIO_INSTALL = /usr/local/
At the bottom of gcconfig.pri you will see the include directory should reference from
the base install location (/usr/local) make sure it says:
SRMIO_INCLUDE = $${SRMIO_INSTALL}/include
SRMIO_LIB = $${SRMIO_INSTALL}/lib/libsrmio.a
Make clean is needed if you have previouslt built, since source files examine #defines before
including this feature. You can skip it if you know why ;)
$ make clean
$ qmake
$ make
You now have SRM support built in.
OAUTH/CRYPT - For Tweet my ride (twitter) support
-------------------------------------------------
You should be able to install liboauth and dependencies
directly with:
$ sudo apt-get install liboauth-dev
If this does not work then:
Download the source from: http://sourceforge.net/projects/liboauth/files/liboauth-0.9.4.tar.gz/download and
unpack it into ~/Projects/liboauth-0.9.4 using archive manager
$ cd ~/Projects/liboauth-0.9.4
You may find that libcurl is not installed (which liboauth depends upon) so download it
from http://curl.haxx.se/download/curl-7.21.6.tar.gz and unpack it into ~/Projects/curl-7.21.6
using archive manager to drag and drop into your Projects folder
$ cd ~/Projects/curl-7.21.6
$ ./configure
$ make
$ sudo make install
You should now have libcurl and friends installed in /usr/local
You may find that liboauth also requires the openssl libs installed, these are available
pre-packaged thankfully so:
$ sudo apt-get install libssl-dev
This will also install zlibg which liboauth also desires.
$ cd ~/Projects/liboauth-0.9.4
$ ./configure
$ make
$ sudo make install
Now we have liboauth and libcurl in /usr/local and libssl in /usr/lib, so we can go back to
GoldenCheetah and update the gcconfig.pri to point at the right places:
$ cd ~/Projects/Live/GoldenCheetah/src
$ vi gcconfig.pri
Make sure the following are set:
LIBOAUTH_INSTALL = /usr/local
LIBCRYPTO_INSTALL = -lcrypto
LIBCURL_INSTALL=-lcurl
Make clean is needed if you have previously built, since source files examine #defines before
including this feature. You can skip it if you know why ;)
$ make clean
$ qmake
$ make
You can now tweet your rides and amaze your friends, or alternatively tweet your rides but
omit to mention average power to hide your weaknesses.
LIBQWTPLOT3D - For 3D plot
--------------------------
Download the tarball from http://qwtplot3d.svn.sourceforge.net/viewvc/qwtplot3d/branches/maintain_0_2_x/qwtplot3d/?view=tar
and unarchive it into your Projects directory using archive manager. There is no version number it just creates a
subdirectory called qwtplot3d
You will need to install libgl and extensions, this can be done with;
$ sudo apt-get install libgl1-mesa-dev
$ sudo apt-get install libglu-dev
On Ubuntu 12.10 I also ran
$ sudo apt-get install freeglut3 freeglut3-dev
$ cd ~/Projects/qwtplot3d
Edit the qwtplot3d.pri and add
CONFIG += staticlib
You will find that on modern Linuxes you also need to fix include/qwt3d_global.h by adding the line:
#include <GL/glu.h>
then build
$ qmake
$ make
Then to let gc know where the qwtplot3d libs are you need to edit gcconfig.pri;
$ cd ~/Projects/Live/GoldenCheetah/src
$ vi gcconfig.pri
And uncomment the following line and set the install directory to where you build
QWT3D_INSTALL = ~/Projects/qwtplot3d
LIBKML - For export to Google Earth
-----------------------------------
You will need Google Earth 5.2 or later and therefore libkml that supports this. Unfortunately at the time of writing
the officially packaged libkml is too old, so you will need to install from source, which means you will need to have
subversion installed and expat. You may be able to use the currently packaged libkml with
$ sudo apt-get install libkml-dev
if this does not work you will need to build from source:
$ sudo apt-get install subversion
$ sudo apt-get install expat libexpat1 libexpat1-dev
Once svn is installed you can grab the libkml source and configure build etc:
$ cd ~/Projects
$ svn checkout http://libkml.googlecode.com/svn/trunk/ libkml
$ cd libkml
You will need automake and friends (see SRMIO above)
$ sh autogen.sh
$ ./configure
$ make
$ make install
$ sudo make install
If you get errors about use of 'long long' then edit:
- src/kml/{convenience,dom,engine,regionator,xsd}/Makefile
- examples/{engine,gpx,gx,hellonet,helloworld,regionator,xsd}/Makefile
- and look for the flag -pedantic and remove it. I got this on Linux 64bit builds ymmv.
Once libkml is installed and built:
$ cd ~/Projects/Live/GoldenCheetah/src
$ vi gcconfig.pri
Ensure KML_INSTALL=/usr/local
Make clean is needed if you have previously built, since source files examine #defines before
including this feature. You can skip it if you know why ;)
$ make clean
$ qmake
$ make
You can now export rides to Google Earth kml format.
ADDING OPTIONAL DEPENDENCIES WHEN BUILDING VERSION 3
====================================================
NOTE: When you run version 3 it will refresh ride metrics and CP files -- this only occurs the
first time it runs (and will refresh only rides that change after that). I find it is best
to import ride files once your build where you want it. i.e. don't import until you have
got all your dependencies sorted.
NOTE: To reduce the dependencies on 'dormant' code there are a number of new pieces of source
that are included in the release3 tree. Notably; qtsoap from qt-solutions, since they
work but are likely to be archived and deprecated. If and when that happens we may well
adopt whatever classes Trolltech introduce.
LIBICAL - Diary integration with Google or MobileMe calendars
-------------------------------------------------------------
$ cd ~/Projects/Live/GoldenCheetah/src
$ sudo apt-get install libical-dev
$ vi gcconfig.pri
ICAL_INSTALL=/usr/include
ICAL_LIBS=-lical
Since the src.pro wants ICAL installed in a different place we need to hack it, *** this will
be fixed shortly ***
$ vi src.pro
Comment out the ICAL_LIBS entry:
#ICAL_LIBS = $${ICAL_INSTALL}/lib/libical.a
$ make clean
$ qmake
$ make
You should now have diary functions.
NOTE: That upload to MobileMe and Google requires a functioning https lib in QT. Depending
upon the version installed this might not be the case and will need to be built and
configured -- this is beyond the scope of this walkthough. Sorry.
LIBVLC - Video playback in Realtime (Experimental)
--------------------------------------------------
You will need libvlc 1.1.9 or higher (1.1.8 is ok but will segv on exit)
$ sudo apt-get install libvlc-dev
$ vi gcconfig.pri
Comment out VLC_INSTALL and it should read:
VLC_INSTALL = /usr/include/vlc/
$ make clean
$ qmake
$ make