Dev Howto Ubuntu 17.10 and QtCreator (debug mode) setup - GoldenCheetah/GoldenCheetah GitHub Wiki
Summary
This How-to describes the steps required to build Golden Cheetah for Qt Creator in debug mode in a fresh Ubuntu 17.10 install. This was tested with a VirtualBox installation of Ubuntu 17.10. This is a great way to get set up with a solid development environment with little impact on your PC's native OS.'
Details
- Ubuntu 17.10.1 64 bit on VirtualBox 5.0.40 (linux host)
- After installing all necessary packages and compiling, just under 8GB is required (to give an idea of what size to make your virtual drive).
Set up Virtual Machine
(outline only, consult google for more info)
- Download and install VirtualBox
- Download the Ubuntu 17.10 ISO file
- Create a new Virtual Drive (8 GB plus working space)
- Install Ubuntu in the Virtual Drive.
- After Ubuntu is up and running, install updates and reboot.
Set up and Build GC
Install necessary linux packages
In a terminal:
sudo apt install git build-essential qt5-default qtcreator bison flex
sudo apt install libqt5svg5-dev libssl-dev libqt5serialport5-dev qtmultimedia5-dev qtwebengine5-dev libqt5charts5-dev qtconnectivity5-dev
Set up GC code
Download GC code
In the folder where you want to have the GoldenCheetah code:
git clone git://github.com/GoldenCheetah/GoldenCheetah.git
Edit build options
In GoldenCheetah/qwt/
cp qwtconfig.pri.in qwtconfig.pri
In GoldenCheetah/src/
cp gcconfig.pri.in gcconfig.pri
Uncomment these lines in the gcconfig.pri that you just created:
CONFIG += debug
DEFINES += NOWEBKIT
LIBZ_LIBS = -lz
And uncomment and change this line as well (#QMAKE_LRELEASE):
QMAKE_LRELEASE = /usr/lib/x86_64-linux-gnu/qt5/bin/lrelease
Build GC
In GoldenCheetah folder:
make clean
qmake
make
Qt Creator
- Start QtCreator
- File -> Open File or Project (open build.pro located in the GoldenCheetah folder)
When the configure project screen appears, ensure the box is checked only next to 'Debug' and the path should point to your Golden Cheetah root directory, ex: /home/test/GC/GoldenCheetah <todo, insert image>
Now, make a breakpoint somewhere, ex. in src/Sources/gui/AboutDialog.cpp and start the debugger (play symbol with the bug, at the bottom right of the window). You'll need to create a user, do that and, from the main window, go to Help -> About Golden Cheetah. <todo, insert image>
Qt Creator will then rise to the top of the windows and show the breakpoint info. <todo, insert image>