2012-09-09 13:39:57 +02:00
|
|
|
Cppcheck GUI
|
2009-06-08 23:15:29 +02:00
|
|
|
============
|
|
|
|
This is a GUI for cppcheck. It allows selecting folder or set of files to check
|
|
|
|
with cppcheck and shows list of found errors.
|
|
|
|
|
|
|
|
Running
|
|
|
|
-------
|
2015-11-01 10:29:44 +01:00
|
|
|
You need Qt4 or Qt5 libraries installed in your system. Packages/files to install
|
2009-06-08 23:15:29 +02:00
|
|
|
depends on your operating system:
|
2015-11-01 10:29:44 +01:00
|
|
|
- Windows: download Qt from http://www.qt.io/download/
|
|
|
|
- Linux: install Qt using your package manager, look for packages having Qt
|
2012-09-09 13:39:57 +02:00
|
|
|
in their name, e.g. for Ubuntu install libqt4-core and libqt4-gui.
|
2009-06-08 23:15:29 +02:00
|
|
|
|
|
|
|
Compiling
|
|
|
|
---------
|
|
|
|
Windows:
|
2012-10-06 21:27:39 +02:00
|
|
|
- The easy ways are:
|
2015-11-01 10:29:44 +01:00
|
|
|
-- download Qt SDK from http://www.qt.io/download/ and use
|
2012-10-06 21:27:39 +02:00
|
|
|
QtCreator to build the GUI.
|
2013-11-09 16:07:28 +01:00
|
|
|
-- Download precompiled libraries for your platform and use your preferred
|
2012-10-06 21:27:39 +02:00
|
|
|
IDE/environment to build GUI. Be careful to download the correct version of
|
|
|
|
library for your compiler!
|
|
|
|
- The harder way is to download Qt sources and build Qt. Compiling Qt alone may
|
|
|
|
take over 4 hours!
|
2009-06-08 23:15:29 +02:00
|
|
|
|
|
|
|
Linux:
|
2012-09-09 13:39:57 +02:00
|
|
|
- Install Qt development packages (make sure qmake -tool gets installed!). The
|
2009-06-08 23:15:29 +02:00
|
|
|
names depend on distribution, but e.g. for Ubuntu the needed packages are:
|
|
|
|
* libqt4-core
|
|
|
|
* libqt4-gui
|
|
|
|
* libqt4-dev
|
|
|
|
* qt4-dev-tools
|
|
|
|
* qt4-qmake
|
|
|
|
|
|
|
|
After you have needed libraries and tools installed, open command
|
|
|
|
prompt/console, go to gui directory and run command:
|
2009-07-18 12:34:00 +02:00
|
|
|
- qmake (in Linux and in Windows if build with MinGW/gcc or nmake)
|
|
|
|
- qmake -tp vc (to generate Visual Studio project file)
|
2012-10-20 19:56:57 +02:00
|
|
|
- qmake -tp vc LINKCORE=yes (to generate Visual Studio project file, linking
|
2014-01-04 12:38:23 +01:00
|
|
|
dynamically to core. Recommended.)
|
2009-06-08 23:15:29 +02:00
|
|
|
|
2012-10-06 21:27:39 +02:00
|
|
|
On Windows, you have to either call qtvars.bat in Qt folder or use the Qt command
|
|
|
|
line prompt shortcut added in the start menu by Qt installation.
|
|
|
|
|
2009-06-08 23:15:29 +02:00
|
|
|
These commands generate makefiles to actually build the software. After that
|
|
|
|
the actual building is done in IDE or command line as usual. Note that you
|
|
|
|
don't need to run qmake again unless you add/remove files from the project.
|
2011-06-18 12:11:05 +02:00
|
|
|
|
2015-07-29 10:21:04 +02:00
|
|
|
The Visual Studio solution does not contain a configuration for x64 platform, but
|
|
|
|
it can be added easily.
|
|
|
|
|
2011-06-18 12:11:05 +02:00
|
|
|
Tests
|
|
|
|
-----
|
|
|
|
There are tests for the GUI in gui/test -directory. There is test.pro
|
|
|
|
-projectfile for building all the tests. Each test is in own subdirectory and
|
|
|
|
builds own binary. Test is run by simple running that binary. The binary also
|
|
|
|
has several options to select tests etc. You can get the help by running
|
|
|
|
"binaryname -help" -command.
|
|
|
|
|
2012-09-09 13:39:57 +02:00
|
|
|
Translations
|
|
|
|
------------
|
|
|
|
The GUI is translated to several languages. Qt comes with two tools to update
|
|
|
|
and compile the translations. lupdate updates translations files from the code
|
|
|
|
and lrelease compiles translation files use with the executable.
|
|
|
|
|
|
|
|
To update translations:
|
|
|
|
- run lupdate gui.pro to update the translation files to match the code. This
|
|
|
|
command updates all the .ts files. Which can be then edited to translate
|
|
|
|
the application.
|
|
|
|
|
|
|
|
To compile translations:
|
|
|
|
- run lrelease gui.pro to compile .ts files to .qm files which are used by the
|
|
|
|
executable.
|