Debian Codegraph @

INSTALL-WIN32

raw
1 Update Note: to build GoldenCheetah v3.6 we are using Microsoft Visual C++ 2019,
2 included in Microsoft Visual Studio 2019 AppVeyor image, with Qt5.15.2 and GSL 2.7
3 installed with vcpkg, on AppVeyor continuous integration platform.
4 You can check the appveyor.yml for the complete and updated build script,
5 the minimum Qt version known to work is 5.13 with Qt WebEngine and Qt Charts.
6 GSL - GNU Scientific Library is a mandatory dependency starting with v3.6
7
8 Ale Martinez - Jul, 2022
9 +++++++++++++++++++++++
10 WIN32 BUILD WALKTHROUGH
11 +++++++++++++++++++++++
12
13 Joern Rischmueller
14
15 February 2017
16
17
18 This instruction will guide you through a standard build of GoldenCheetah (without external
19 dependencies or API based services included).
20
21 Prerequisites:
22
23 To build on Windows you need the necessary toolchain to be installed. Since 2017
24 GoldenCheetah is enabled to be build with the Microsoft Visual C++ 2015 toolchain,
25 which is also the recommended toolchain to be used. Building with the "mingw" toolchain
26 might still be possible, but may conflict with features needed from the Qt library
27 which are no longer supported by the "mingw" version of Qt.
28
29 Disclaimer:
30
31 For any of the downloads and tools the document refers to, please check if you comply
32 with the license agreements. I cannot any responsibility for any of the downloads you
33 are doing.
34
35 You need:
36
37 - Microsoft Visual C++ 2015 - which is part of Visual Studio 2015
38 -- Download from Microsoft - they offer a "Community Edition" which is sufficient
39 to build GoldenCheetah
40
41 - Microsoft Windows SDK - which needs to be installed separately
42 -- Download from here: https://developer.microsoft.com/de-de/windows/downloads/windows-10-sdk
43 -- I am using the Windows 10 SDK - version 10.0.14393.795(since I build on Windows 10) -
44 Note: building on other Windows Version(s) may require other SDK Version to be installed
45 but was not tested
46 -- When installing the SDK you have several options - for GoldenCheetah you need the "SDK" itself and
47 in case you want to Debug also the "Debugging Tools" to be installed. All other parts (to my experience)
48 are not required.
49
50 - Flex and Bison (below the version working for me)
51 -- Download from here: https://sourceforge.net/projects/winflexbison/
52 -- Use the "win_flex_bison-latest.zip" version
53 -- Unzip wherever you like and make sure that the location "win_bison.exe" and "win_flex.exe
54 are added to your "Path" environment variable
55
56 - Qt C++ Framework
57 -- As of today, please use Qt 5.8.0 (which is the most recent official release) for Microsoft VC2015
58 -- Download is available here: https://www.qt.io/download/ - the OpenSource version is sufficient
59 to build GoldenCheetah
60 You need to decide if you go for the 32Bit or the 64Bit version, all further descriptions will refer
61 to the 64Bit version of Qt and the 64Bit Version of the Visual C++ Toolchain.
62 32 Bit follows the same concepts, you just need to download and/or configure the tools for 32 bit.
63 The
64 -- Install Qt and make sure that the \bin directory of Qt is added to your "Path" environment variable
65 (default path of Qt is C:\Qt\Qt5.8.0\5.8\msvc2015_64\bin)
66 -- To build GoldenCheetah we recommend to use "jom.exe" which is an "nmake" clone - see https://wiki.qt.io/Jom
67 With your Qt installation you also get QtCreator installed which is the free IDE for Qt. Jom is
68 part of the QtCreator installation. For the later build process, make sure that the path to "jom.exe"
69 is added to your "Path" environment variable.
70 (default path of QtCreator/Jom is C:\Qt\Qt5.8.0\Tools\QtCreator\bin)
71
72 Note: Building a 32bit version / Building for Windows XP
73 -- 32bit follows the same concepts, you just need to download and/or configure the tools for 32 bit.
74 -- The Visual Studio standard toolchain as well as the SDK do not support Windows XP any more.
75
76
77
78 Building from command line without additional dependencies:
79
80 For this build, I am installing all source code,... into the directory: c:\coding
81
82 - Download GoldenCheetah source (either using Git or downloading the ZIP file)
83 -- Download from here: https://github.com/GoldenCheetah/GoldenCheetah
84 -- Install in c:\coding\GoldenCheetah
85
86 - Setup the configuration of GoldenCheetah for the Qt windows build
87 -- Copy C:\coding\GoldenCheetah\qwt\qwtconfig.pri.in to C:\coding\GoldenCheetah\qwt\qwtconfig.pri
88 -- Copy C:\coding\GoldenCheetah\src\gccconfig.pri.in to C:\coding\GoldenCheetah\src\gccconfig.pri
89 -- Edit the "gcconfig.pri" file (see also instructions in the file itself)
90 Lines to be changed (from Default to New - or Add(ed):
91 Default New
92 #CONFIG += release CONFIG += release
93 #DEFINES += NOWEBKIT DEFINES += NOWEBKIT
94 #QMAKE_LRELEASE = /usr/bin/lrelease QMAKE_LRELEASE = lrelease
95
96 Default
97 #WINKIT_INSTALL= "C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x64"
98 New
99 WINKIT_INSTALL= "C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64"
100 Note: This is the default path for the SDK - depending on how you installed the
101 SDK the path my deviate from the example.
102
103 Add Lines
104 CONFIG += lex
105 CONFIG += yacc
106
107 Default New
108 #QMAKE_LEX = win_flex QMAKE_LEX = win_flex --wincompat
109 #QMAKE_YACC = win_bison QMAKE_YACC = win_bison --file-prefix=y -t
110
111 Add Lines
112 # Make sure that LEX/YACC is executed first (to allow multi-core compilation via Jom)
113 lex.CONFIG += target_predeps
114 yacc_impl.CONFIG += target_predeps
115 yacc_decl.CONFIG += target_predeps
116
117
118 - Open the console tool of your choice in folder c:\coding\GoldenCheetah to run the build process
119 (I assume cmd.com with prompt ">")
120 -- Initialize the Visual C++ compile for 64 Bit Builds
121 >CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
122 -- Run "qmake" to prepare the build for Qt
123 >qmake build.pro -spec win32-msvc2015
124 -- Run "jom" to prepare and run the GoldenCheetah build
125 >jom qmake_all && jom
126 Note: When build first time you get number of error messages on .qm files missing.
127 "RCC: Error in 'Resources\application.qrc': Cannot find file 'translations/gc_fr.qm'"
128 You can ignore these messages for your build. The .qm files will be created during
129 the build at a later point in time via the "lrelease.exe" command you configured in
130 gcconfig.pri)
131 Hint: In some (still inpredictable cases) the build stops during compilation of the "qwt"
132 library. Just re-start it by running "jom" again, without any other action. Your
133 build will continue without problems.
134
135 - Wait - the compile with "jom" just uses 1 core. If you want to use more of your machine,
136 you may use "jom" with option "-j <no_of_cores>" e.g. "jom -j 4".
137
138
139 - Since your are doing an "in-source" build you will find a release version of "GoldenCheetah.exe"
140 in folder: "C:\coding\GoldenCheetah\src\release". You can run the .exe from that location as long
141 as the Qt libraries are on your "Path".
142
143 - To run GoldenCheetah.exe on a different machine (withoug Qt being installed), you need to collect
144 the Qt libraries. Easiest way is the "windeployqt" tool provided with Qt.
145 Details can be found here: http://doc.qt.io/qt-5/windows-deployment.html
146
147
148 Building with additional dependencies:
149
150 We use a number of libraries for specific functions of GoldenCheetah. You find the list of dependencies
151 and their sources documented in "gccconfig.pri.in". Here just a short summary which of those libraries
152 are available in the official GoldenCheetah builds and some hints how to build them to be usable.
153
154 Info: I plan to provide a pre-compiled set of the dependencies for the Windows version of GoldenCheetah,
155 so that not everybody has to invest the efforts to build the .dll's for the different tools.
156
157
158 - SRM download support via SRMIO
159 -- Is NOT part of the official Windows builds since I was not able to create a .DLL which works
160 with an MSVC2015 based build of GoldenCheetah. If anybody finds a solution to add this dependency
161 again - highly welcome.
162
163 - D2XX device download support
164 -- Is part of the official Windows builds - we use the libs and do static linking.
165 The version currently used is: "CDM v2.10.00 WHQL Certified" - while there are more recent
166 version available for download.
167
168 - iCal Calendar support (prerequisite for the "Diary" view)
169 -- Is part of the official build as a static lib - the build uses Release 1.0.1
170
171 - USB1 support via USBExpress
172 -- Is part of the official build as .dll - the build uses Release 3.5.1
173
174 - USB2 support via libusb
175 -- Is part of the official build - the build uses the pre-compiled release 1.2.6.0
176
177 - Video Playback via VLC
178 -- Is part of the official build as .dll - the build uses the pre-compiled release 2.2.1
179
180 - Resampling via libsamplerate
181 -- Is part of the official build as .dll - the build uses
182
183
184 Building with integration to external services (via APIs)
185
186 As of today a number of integrations with external services like Strava, Cyclinganalytics,
187 Google Calendar, Dropbox, Today's Plan, Google Drive, CloudDB) exist in the official GoldenCheetah
188 builds. The permission to use API's of such services requires a dedicated registration (in this case
189 for "GoldenCheetah" as the consumer of the services) where in return the GoldenCheetah team gets
190 specific credentials to access the services.
191
192 All of the services request that the access credentials are kept private and are under responsibility
193 of the team/company/individual who has registered for the API use with the company providing the services.
194
195 You can always start your personal registration process with the services to get your own credentials
196 to build GoldenCheetah version which can use the service APIs. But you are doing that on your own full
197 responsibility.
198
199 *****************************************************************************************************
200
201 Have fun to build your own version. Feedback/Contributions to this guide are welcome. The easiest way
202 to contribute is to provide a pull-request.
203
204 Cheers.
205 Joern