Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Initial project configuration in QtCreator
Let's assume that you have "SQLiteStudio3" project placed in
Open SQLiteStudio.pro file from the application source code (do it by right-clicking on the projects list area and selecting "Load Project", note that you need to have qmake projects plugin loaded in QtCreator). QtCreator will ask you to "configure" the project. There is only one important thing to do - define the build path (you need to expand the "Details"). Set it to the following (for both Debug and Release configurations):
It's very similar to how it was for the main project. Just open plugin's *.pro file and setup the build path.
For Plugins aggregated plugins project it will be:
For any external plugin that you want to compile (that is outside of Plugins project), it will be similar:
and so on...
To run compiled binaries you will need to copy all dependency dll files into the sime directory where SQLiteStudio.exe will be created, that is to:
Files to be copied include:
C:\projects\lib(this directory and its contents were described in Compiling application from sources)
- Another set of files will be copied from your Qt installation directory (
C:\Qt\x.x.x\mingwxx_32\bin). Files will be:
Qt5Core.dll Qt5Cored.dll Qt5Guid.dll Qt5Gui.dll Qt5Networkd.dll Qt5Network.dll Qt5PrintSupportd.dll Qt5PrintSupport.dll Qt5Scriptd.dll Qt5Script.dll Qt5Svgd.dll Qt5Svg.dll Qt5Widgetsd.dll Qt5Widgets.dll Qt5Xmld.dll Qt5Xml.dll libgcc_s_dw2-1.dll libstdc++-6.dll libwinpthread-1.dll
- Last set of files to be copied are Qt plugins. Thei are in
- Copy entire directory
- Then do the same for remaining plugin directories:
styles(the last one is for more recent Qt versions, it was absent in older).
- Copy entire directory
Output executables and plugins will be placed in:
You can compile project, then compile plugins (that's the dependency order), write some code and recompile it. n case of problems, ask on forum.
If you have multiple CPU cores, you might want to use them for faster compilation. In QtCreator, in "Projects" mode there is a "make" step for build. Expand this step for details and add command line argument for it:
The number reflects number of CPU cores that will be used.
Unit tests are disabled by default. If you want to enable that sub-project, ou need to go to "Projects" mode, find "qmake" additional arguments and add:
"DEFINES += tests"
After QtCreator refreshes new project settings (after couple of seconds) you should see unit tests as a Run targets.