File: INSTALL-WIN32

package info (click to toggle)
goldencheetah 1%3A3.5~DEV1810-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 185,760 kB
  • sloc: cpp: 263,686; ansic: 5,811; xml: 1,708; yacc: 1,515; java: 1,477; python: 625; lex: 452; sh: 404; ruby: 176; makefile: 118; perl: 94
file content (214 lines) | stat: -rw-r--r-- 10,352 bytes parent folder | download
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

                                 +++++++++++++++++++++++
                                 WIN32 BUILD WALKTHROUGH
                                 +++++++++++++++++++++++

                                     Joern Rischmueller

                                       February 2017

This instruction will guide  you through a standard build of GoldenCheetah (without external
dependencies or API based services included).

Prerequisites:

To build on Windows you need the necessary toolchain to be installed. Since 2017
GoldenCheetah is enabled to be build with the Microsoft Visual C++ 2015 toolchain,
which is also the recommended toolchain to be used. Building with the "mingw" toolchain
might still be possible, but may conflict with features needed from the Qt library
which are no longer supported by the "mingw" version of Qt.

Disclaimer:

For any of the downloads and tools the document refers to, please check if you comply
with the license agreements. I cannot any responsibility for any of the downloads you
are doing.

You need:

- Microsoft Visual C++ 2015 - which is part of Visual Studio 2015
  -- Download from Microsoft - they offer a "Community Edition" which is sufficient 
     to build GoldenCheetah
	 
- Microsoft Windows SDK - which needs to be installed separately
  -- Download from here: https://developer.microsoft.com/de-de/windows/downloads/windows-10-sdk
  -- I am using the Windows 10 SDK - version 10.0.14393.795(since I build on Windows 10) - 
     Note: building on other Windows Version(s) may require other SDK Version to be installed
		   but was not tested 
  -- When installing the SDK you have several options - for GoldenCheetah you need the "SDK" itself and
     in case you want to Debug also the "Debugging Tools" to be installed. All other parts (to my experience)
	 are not required.
	 
- Flex and Bison (below the version working for me)
  -- Download from here: https://sourceforge.net/projects/winflexbison/
  -- Use the "win_flex_bison-latest.zip" version
  -- Unzip whereever you like and make sure that the location "win_bison.exe" and "win_flex.exe
     are added to your "Path" environment variable
	 
- Qt C++ Framework
  -- As of today, please use Qt 5.8.0 (which is the most recent official release) for Microsoft VC2015
  -- Download is available here: https://www.qt.io/download/ - the OpenSource version is sufficient
     to build GoldenCheetah
	 You need to decide if you go for the 32Bit or the 64Bit version, all further descriptions will refer
	 to the 64Bit version of Qt and the 64Bit Version of the Visual C++ Toolchain. 
	 32 Bit follows the same concepts, you just need to download and/or configure the tools for 32 bit.
	 The 
  -- Install Qt and make sure that the \bin directory of Qt is added to your "Path" environment variable
     (default path of Qt is C:\Qt\Qt5.8.0\5.8\msvc2015_64\bin)
  -- To build GoldenCheetah we recommend to use "jom.exe" which is an "nmake" clone - see https://wiki.qt.io/Jom
     With your Qt installation you also get QtCreator installed which is the free IDE for Qt. Jom is 
	 part of the QtCreator installation. For the later build process, make sure that the path to "jom.exe"
	 is added to your "Path" environment variable.
	 (default path of QtCreator/Jom is C:\Qt\Qt5.8.0\Tools\QtCreator\bin)
	 
Note: Building a 32bit version / Building for Windows XP
	-- 32bit follows the same concepts, you just need to download and/or configure the tools for 32 bit.
	-- The Visual Studio standard toolchain as well as the SDK do not support Windows XP any more.
	

	 
Building from command line without additional dependencies:

For this build, I am installing all source code,... into the directory: c:\coding

- Download GoldenCheetah source (either using Git or downloading the ZIP file)
  -- Download from here: https://github.com/GoldenCheetah/GoldenCheetah
  -- Install in c:\coding\GoldenCheetah
  
- Setup the configuration of GoldenCheetah for the Qt windows build
  -- Copy C:\coding\GoldenCheetah\qwt\qwtconfig.pri.in to C:\coding\GoldenCheetah\qwt\qwtconfig.pri     
  -- Copy C:\coding\GoldenCheetah\src\gccconfig.pri.in to C:\coding\GoldenCheetah\src\gccconfig.pri 
  -- Edit the "gcconfig.pri" file (see also instructions in the file itself)
     Lines to be changed (from Default to New - or Add(ed):
 	 Default										New
     #CONFIG += release					 		    CONFIG += release	
     #DEFINES += NOWEBKIT                		    DEFINES += NOWEBKIT
	 #QMAKE_LRELEASE = /usr/bin/lrelease			QMAKE_LRELEASE = lrelease
	 
	 Default
	 #WINKIT_INSTALL= "C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x64"
	 New
	 WINKIT_INSTALL= "C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64"
	 Note: This is the default path for the SDK - depending on how you installed the 
	       SDK the path my deviate from the example.
		   
	 Add Lines
	 CONFIG += lex
	 CONFIG += yacc
	 
	 Default										New
	 #QMAKE_LEX = win_flex							QMAKE_LEX  = win_flex --wincompat
	 #QMAKE_YACC = win_bison						QMAKE_YACC = win_bison --file-prefix=y -t
	 
	 Add Lines
	 # Make sure that LEX/YACC is executed first (to allow multi-core compilation via Jom)
	 lex.CONFIG += target_predeps
	 yacc_impl.CONFIG += target_predeps
	 yacc_decl.CONFIG += target_predeps
	 

- Open the console tool of your choice in folder c:\coding\GoldenCheetah to run the build process
  (I assume cmd.com with prompt ">")
  -- Initialize the Visual C++ compile for 64 Bit Builds
	 >CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
  -- Run "qmake" to prepare the build for Qt
     >qmake build.pro -spec win32-msvc2015
  -- Run "jom" to prepare and run the GoldenCheetah build
     >jom qmake_all && jom
     Note: 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.exe" command you configured in 
		   gcconfig.pri)
	 Hint: In some (still inpredictable cases) the build stops during compilation of the "qwt"
	       library. Just re-start it by running "jom" again, without any other action. Your
		   build will continue without problems.
		   
- Wait - the compile with "jom" just uses 1 core. If you want to use more of your machine,
  you may use "jom" with option "-j <no_of_cores>" e.g. "jom -j 4".
  
  
- Since your are doing an "in-source" build you will find a release version of "GoldenCheetah.exe" 
  in folder: "C:\coding\GoldenCheetah\src\release". You can run the .exe from that location as long
  as the Qt libraries are on your "Path".
  
- To run GoldenCheetah.exe on a different machine (withoug Qt being installed), you need to collect
  the Qt libraries. Easiest way is the "windeployqt" tool provided with Qt. 
  Details can be found here: http://doc.qt.io/qt-5/windows-deployment.html


Building with additional dependencies:
 
We use a number of libraries for specific functions of GoldenCheetah. You find the list of dependencies
and their sources documented in "gccconfig.pri.in". Here just a short summary which of those libraries
are available in the official GoldenCheetah builds and some hints how to build them to be usable.

Info: I plan to provide a pre-compiled set of the dependencies for the Windows version of GoldenCheetah,
      so that not everybody has to invest the efforts to build the .dll's for the different tools.
	  
	  
- SRM download support via SRMIO
  -- Is NOT part of the official Windows builds since I was not able to create a .DLL which works
     with an MSVC2015 based build of GoldenCheetah. If anybody finds a solution to add this dependency
	 again - highly welcome.
	 
- D2XX device download support
  -- Is part of the official Windows builds - we use the libs and do static linking.
     The version currently used is: "CDM v2.10.00 WHQL Certified" - while there are more recent
	 version available for download.
	 
- Qt Oauth library - kQoAuth
  -- Is part of the official build as a .dll - build is done with Qt - the build uses Release 0.98
  
- Qt 3D plotting - qwtplot3d
  -- Is part of the official build as a static lib - build is done with Qt - the build uses Release 0.3.0
  
- Google Earth .kml files (export)
  -- Is part of the official build as a static lib - build is done with MSVC2015 - the build uses Release 1.2
     (path of source code has changed to https://github.com/google/libkml)

- iCal Calendar support (prerequisite for the "Diary" view)
  -- Is part of the official build as a static lib - the build uses Release 1.0.1
  
- USB1 support via USBExpress
  -- Is part of the official build as .dll - the build uses Release 3.5.1
  
- USB2 support via libusb
  -- Is part of the official build - the build uses the pre-compiled release 1.2.6.0
  
- Video Playback via VLC
  -- Is part of the official build as .dll - the build uses the pre-compiled release 2.2.1
  
- Resampling via libsamplerate
  -- Is part of the official build as .dll - the build uses 
  

Building with integration to external services (via APIs)

As of today a number of integrations with external services like Twitter, Strava, Cyclinganalytics, 
Google Calendar, Dropbox, Today's Plan, Google Drive, CloudDB) exist in the official GoldenCheetah
builds. The permission to use API's of such services requires a dedicated registration (in this case
for "GoldenCheetah" as the consumer of the services) where in return the GoldenCheetah team get's 
specific credentials to access the services.

All of the services request that the access credentials are kept private and are under responsibility
of the team/company/individual who has registered for the API use with the company providing the services.

You can always start your personal registration process with the services to get your own credentials
to build GoldenCheetah version which can use the service APIs. But you are doing that on your own full
responsibility.

*****************************************************************************************************

Have fun to build your own version. Feedback/Contributions to this guide are welcome. The easiest way
to contribute is to provide a pull-request.

Cheers.
Joern