Sunday, August 10, 2014

Building and Running on Windows 8.1 – Qt Creator

To obtain the project Git repository, start the Git GUI, either from the Start Menu (Programs, Git, Git GUI), from the Start Screen Git GUI icon or by typing "Git GUI" on the Start Screen (and there are probably other ways).  For Windows 8, it probably dumped the Git GUI icon right on the Start Screen.  For Windows 8.1, click the Down Arrow at the bottom-left and find the Git GUI under Git (pin to the Start screen if desired).

In the opening dialog of Git GUI, click on Clone Existing Repository.  Enter https://github.com/thunder422/ibcp in the Source Location and set to Target Directory by clicking the Browse button.  Find the Documents folder (or another folder), and click the OK button.  To the Target Directory, add /ibcp (it must be a non-existing folder or and error will occur) and click the Clone button.  After a few moments, the repository will be cloned.  The next time the Git GUI is started, the same dialog appears, however, the Git GUI remembers the repositories that have been opened previously.  Select the Repository menu and the recent repositories are listed.

The main Git GUI will be started indicating it is on the master branch.  Check out the latest branch by Branch, Create..., click the Matching Tracking Branch Name option, click the Tracking Branch option, select origin/branch0.6 (or another branch) and click the Create button.  This will create a local branch.  Now the project can be opened in Qt Creator so start Qt Creator and select File and Open File or Project...  and navigate to the Documents and then ibcp folder.  Select the CMakeLists file (the .txt is not displayed unless file extensions are enabled) and click the Open button.  

The CMake Wizard dialog appears with the build directory set to ...\Documents\ibcp-build,  click the Next button.  For a debug build (optional) add -DCMAKE_BUILD_TYPE=Debug into the Arguments field and then click the Run CMake button.  For some reason, there are a bunch of errors the first time.  Just click the Run CMake button again and it should complete successfully.  Click the Finish button and the application is ready to be built.

To start the build, click the Hammer icon (lower left, or type Ctrl+B or use the Build menu).  The run the program, click the Run/Play icon (lower left, or type Ctrl+R or use the Build menu).  For a debug build use the Debug/Play icon (lower left, or type F5 or use the Debug menu).  The application should start in GUI mode.

[commit ec787762b9] [commit 3285823de0]

No comments:

Post a Comment

All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)