]> git.cworth.org Git - vogl/blob - qtcreator/qtcreator.md
Update qtcreator.md
[vogl] / qtcreator / qtcreator.md
1 QtCreator 3.0
2 -------------
3
4 ### Create Project ###
5
6 * Select "File / Open File or Project..." (Ctrl+O)
7 * Open the "vogl/qtcreator/CMakeLists.txt" file
8 * Select a location for the cmake build files. I just the choose vogl/qtcreator directory.
9 * Hit "Next >" button.
10 * Change Generator to "Ninja (Desktop)" if you're going to build with Ninja.
11 * Hit "Run CMake" button.
12  * ... Wait a few seconds to parse and add files. ...
13  * ... You should see something like "2358 files added." ...
14 * Hit "Finish" button.
15
16 You should now be able to click in bottom left "Type to locate" control (or hit Ctrl+K), type in names of vogl files (ie vogl_intercept.cpp), search for symbols, etc.
17
18 ### Build ###
19
20 * Click on "Projects" icon on the left.
21 * Under Build Steps:
22  * Mouse over the "Make: make" step and click the 'x' to delete it.
23  * Click <Add Build Step>, and select "Custom Process Step".
24
25     <b>Command:</b> %{buildDir}/../bin/mkvogl.sh  
26     <b>Arguments:</b> --amd64 --debug 3>&1 1>&2 2>&3  
27
28 * Now select "Choose Build / Build Project..." or (Ctrl+B)
29 * (Alt+4) will flip QtCreator to show the compile output
30
31 ### Clean ###
32
33 * Under Clean Steps:
34  * Mouse over the "Make: make clean" step and click the 'x' to delete it.
35  * Click "Add Clean Step", select "Custom Process Step".
36
37     <b>Command:</b> %{buildDir}/../bin/mkvogl.sh  
38     <b>Arguments:</b> --amd64 --debug --cleanonly  
39
40
41 ### Other build configurations ###
42
43 * Within the <Projects> tab, next to "Edit build configurations"
44  * Click "Rename..."; change the text from "all" to "amd64_debug"
45  * Click "Add"; select "Clone selected"; follow steps below
46
47 * Repeat the steps above for the remaining build configurations:
48  * <b>"amd64_release":</b> Arguments: --amd64 --release --verbose 3>&1 1>&2 2>&3
49  * <b>"i386_debug":</b> Arguments: --i386 --debug --verbose 3>&1 1>&2 2>&3
50  * <b>"i386_release":</b> Arguments: --i386 --release --verbose 3>&1 1>&2 2>&3
51
52
53 Note that you can use the "--usemake" flag with mkvolg.sh if you don't want to use Ninja. If you do this, remove the "3>&1 1>&2 2>&3" redirections also.
54
55 ### Launching and Debugging projects ###
56
57 The default 'Run configuration' called "VoglProj" that QtCreator adds will not be associated with any binary and therefore cannot be executed. The directions below show how to launch the 64-bit vogleditor.
58
59 * Within the <Projects> tab, switch to the "Run" settings
60  * Under "Run", "Run configuration:" click "Add", select "Custom Executable"
61  * Click "Rename..." and customize this run configuration with an appropriate name (eg, "vogleditor64")
62  * For the <b>Executable:</b>, enter: %{buildDir}/../vogl_build/bin/vogleditor64
63  * For the <b>Arguments:</b>, you may optionally enter a path to a trace file
64  * <b>Run in terminal</b> does not need to be enabled for vogleditor, but is useful (required?) for other binaries
65
66 * Hit [F5] to start debugging
67
68 This approach allows you to configure mutliple run configurations that (for example) each launch the vogleditor64 with a different trace file as a parameter, or you can have another configuration that launches vogleditor32, or voglreplay64 with parameters to debug why a replay or trim is not working properly.
69