forked from GoldenCheetah/GoldenCheetah
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL-MAC
212 lines (148 loc) · 6.65 KB
/
INSTALL-MAC
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
+++++++++++++++++++++++
MACOS BUILD WALKTHROUGH
+++++++++++++++++++++++
Mark Liversedge
Ale Martinez
Mar 2024
Version 3.7
A walkthrough of building GoldenCheetah from scratch on Mac OSX. This was performed
on macOS Sonoma (14.4) but the instructions are largely the same for all current
versions of macOS.
CONTENTS
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
- Xcode
- HomeBrew
- Qt
- GSL
- Bison
2. ADDING OPTIONAL DEPENDENCIES
- FTDI D2XX
- SRMIO
- libusb
- libical
1. BASIC INSTALLATION WITH MANDATORY DEPENDENCIES
=================================================
Depending upon the speed of your internet connection and availability of the
required software the steps in section 1 will take approximately 1 hour.
1.1 Ensure macOS is up-to-date
------------------------------
Make sure you have applied all the latest updates to Mac OS X. This can be
found from the system menu, apple, about this mac, software update.
This walkthrough was performed on a MacBook Air running 14.4 (Sonoma)
1.2 Install XCode from App Store
--------------------------------
To install Xcode on macOS you need to download it via the App Store. You can
launch the App Store from launchpad, or it may be already in your dock.
Under the search box type in Xcode and it will return a few options, generally
Xcode is the first item and shows a blueprint with a hammer icon. Click on
this to install it. It should be free. The usual app store process will apply
as the application is downloaded and installed. The download is about 4GB
so do bear this in mind if you have limits on your internet bandwidth or cap.
1.3 Run the Xcode installer
---------------------------
The app store download will have added an Install Xcode icon in the launchpad.
Go ahead and run it.
Xcode includes all the development tools such as a compiler, debugger and
SDKs. It also installs the 'git' tool for working with Git repositories.
It will run through a wizard to install, just read and then accept the license
agreement and let it get on with it. If you don't like the license then quit
and use the developemnt or snapshot builds from https://www.goldencheetah.org
1.4 Get the source code
-----------------------
We store all the Golden Cheetah source code on github.com, it is a great
site holding repositories for many open source projects.
First open up a terminal session, then;
$ cd
$ mkdir Projects
$ cd Projects
$ git clone https://github.com/GoldenCheetah/GoldenCheetah.git
You will now have the GoldenCheetah sources downloaded into a 'GoldenCheetah'
directory in your home directory, under another folder called 'Projects'.
$ cd GoldenCheetah
$ ls
You should see a number of directories such as doc, qwt, src etc. If you are
wanting to build a particular release you need to checkout the release. To
build a release you need to checkout the code at the tag for the release.
A list of releases can be found at: https://github.com/GoldenCheetah/GoldenCheetah/tags
$ git checkout V3.6
$ ls
The following walkthrough is based on latest master, if you want to build v3.6 please
see the travis scripts in the repository.
1.5 Install HomeBrew
--------------------
The easiest way to install GoldenCheetah dependencies on macOS is via HomeBrew package
manager, if you don't have it installed yet, follow the instructions in their home page:
https://brew.sh/
1.6 Install Qt
--------------
Latest stable release can be installed as:
$ brew update
$ brew install Qt6
Follow the instructions to add Qt to PATH and test using:
$ qmake --version
1.6 Install GSL and Bison
-------------------------
GSL is a mandatory dependency from v3.6, you can install using HomeBrew:
$ brew install gsl
The Bison version included in Xcode is too old (2.3), you can install a
newer version using HomeBrew:
$ brew install bison
adding it to PATH as indicated, check version using:
$ bison --version
1.7 Configure and Build GoldenCheetah (with no optional dependencies)
---------------------------------------------------------------------
First thing we need to do is set the build configuration, this means editing the
private build profile settings. There is one for qwt (a charting library) and
there is another for GoldenCheetah itself.
$ cd ~/Projects/GoldenCheetah/qwt
$ cp qwtconfig.pri.in qwtconfig.pri
$ cd ../src
$ cp gcconfig.pri.in gcconfig.pri
$ vi gcconfig.pri
In that last step you can use whatever editor you feel most comfortable with.
we may need to additionally configure to use the local compression
libraries (at least I did), by adding the following line:
LIBS += -lz
and GSL location:
GSL_INCLUDES = /usr/include
GSL_LIBS = -L/opt/homebrew/lib/ -lgsl -lgslcblas -lm
Lastly, we can also uncomment and change the following line:
QMAKE_MOVE = cp
if Bison version is higher than 3.7
Once the changes have been made we are now ready to build for the first time.
$ cd .. #this should put you in the top level dir containing this file
$ qmake -recursive
$ make
When build first time you get number of error messages on .qm files missing:
"RCC: Error in 'Resources/application.qrc': Cannot find file 'translations/gc_fr.qm'"
You can ignore these messages for your build. The .qm files will be created during the
build at a later point in time via the "lrelease" command you configured in gcconfig.pri)
Once this completes you will have a GoldenCheetah.app in the src directory which
can be launched:
$ open src/GoldenCheetah.app
And you're up and running.
Now, if you would like to use XCode to debug the project, you can generate
the necessary project file.
$ qmake --recursive -spec macx-xcode
This will create a project as: build.xcodeproj Please be sure to build via
the standard method before checkin to prevent build errors. If the build
fails to launch with "couldn't be opened because you don't have permission
to view it" Then a work around would be to open the project and attach
the debugger.
$ open src/GoldenCheetah.app
2. ADDING OPTIONAL DEPENDENCIES
===============================
- D2XX
- SRMIO
- libusb
- libical
- Python embedding
- R embedding
Since these optional dependencies are more complex and require more advanced
technical skills we do not provide a walkthrough for building them all but
instead provide the configure settings and any special considerations that
should be taken into account.
See Travis scripts in the repository for the changes you need to make:
- travis/osx/before_install.sh
- travis/osx/before_script.sh
and then rebuild.