How can I configure KDevelop to build before executing? - c++

In most IDEs (e.g. Visual Studio, all the java IDEs, etc) by default the sources are build when the user selects to execute or debug the application. How can I configure KDevelop to do the same?

Go to the Run->Launch Configurations menu item.
There you can configure a launch configuration, with arguments, working directory, etc.
At the bottom, there is a dependencies block, where you can specify a build target that should be run before the execution of the launch configuration.

Related

How to configure my Jenkins to auto build and test my Qt project?

I'm a newer to Qt project,strange to its project structure.
I have used jenkins+git+github+MSBuild+xUnit to build CI for VS project in windows.
Now my job is to configure jenkins so that it can auto build and test my qt project(in Ubuntu).
However,it seems there is few information about "jenkins build Qt project".
I don't know which plugins should I use on jenkins and how to configure them.
Can you show me how to do that?(I use Ubuntu 16.04)
I have read this blog,and try to run that way:
https://www.peter.hartmann.tk/single-post/2015/06/17/Minimal-Continuous-Integration-for-Git-projects-with-Jenkins-and-a-Qt-example
In this blog,it use "qmake && make && make check" to do all the thing(build and test) without installing any plugin.what does this command do?Does it work for all Qt project?
What's more,in Ubuntu,can I pack my Qt project using jenkins?If yes,how to do that?(Windows can pack qt project as .exe file, Ubuntu pack as what kind of file?)
I'll just link to already existing materials, which there's plenty of.
In general there's three main steps in what you want to do:
Trigger Jenkins build after git push: How can I make Jenkins CI with git trigger on pushes to master?. That gives you Jenkins job execution (that at this point does nothing) after each git push automatically.
Pulling changes from SCM - that is a ready step within regular Jenkins project that you just click through.
Building your project - in case of QT project which can be built from command line (Compile a Qt project from command Line) you can add this as a simple shell command build step in Jenkins.
Optionally you can then run tests on the result, store your artifacts after a successful build and/or trigger email notifications on failed builds.
As for storing artifacts - there's a ready plugin for that (https://wiki.jenkins.io/display/JENKINS/Compress+Artifacts+Plugin).

How can I configure what .NET version should be installed by windows installer in VS 2017

Currently I am working on a project that needs .NET 4.0 to work properly but when I configure the windows installer and try to install it is trying to install the latest version of .NET. So how can I configure the windows installer to install the .NET version on which the project was created. Also I would like to know how to include the Visual C++ Redistributable in my installer.
When you create a setup project and add primary output of a project to the setup project, the setup project automatically detect dependencies including Microsoft .Net Framework. To see if the detected dependency is correctly what you need, you cam see the following locations:
First of all, right click on Dependencies and click on Refresh Dependencies.
Check prerequisites for your project:
Right click on setup project and choose Properties.
In Properties dialog, from the Configurations combo box choose the configuration, and repeat the following steps for both Debug and Release.
Click on Prerequisites... button to open Prerequisites.
In the Prerequisites dialog, check the desired .Net Framework version.
Press OK and Make sure you repeat above steps for both Debug and Release.
Check Launch Conditions for your setup project:
Right click on setup project and from View select Launch Conditions:
Then under Launch COnditions node, select .Net Framework node and right click and select Properties Window.
In Properties Window check the Version property for .Net Framework launch condition.

Eclipse CDT: Run/debug settings doesn't see system environment variables

I have a setup where I use my own makefiles to build a c++ project from within eclipse. I kick of eclipse from shell in unix.
I was able to setup the build without a problem because environment variables (inherited from the shell) were listed in build configuration's variable list.
But the run/debug setting seems to be seeing only the native eclipse environment variables - the system environment variables are not included in the variable list I get within the run/debug setting configurations.
What am I missing? I want to run a script before running eclipse to set the an environment variable which eclipse can inherit and use to know the path to the executable. I could pass this to the building configuration, but not to the run/debug config.
I don't want to put an absolute path because I am part of a development team and I want others who are in different branches/streams to reuse my setup seamlessly.

Configure Eclipse CDT not to launch external tool on unsuccessfull build

I am using Eclipse CDT on Linux to create console application. I configured External tool to launch more advanced terminal than internal Console window. Internal Eclipse console does not suit the style of application I am developing. However I can't find a way to configure Eclipse not to launch external tool if the build operation fails. Or other approach would be to remove binary from output folder, but only on unsuccessfull build. I can remove binary before every build to do that, but it would take more time on every launch to re-link. There is a Prompt option in normal Run mode, but i cannot itegrate my Shell script to launch my exterminal there. Advices on achieving such functionality?

Starting running all build configuration in TeamCity

In TC there is a project with a couple build configurations. Build configs targets projects that not interfere with each other - so I can start the build process simultaneously. On each build configuration home page there is Run button that starts the build.
My question - there is possible to create a such button that triggers the build of all configs?
I know that there is Build triggers and so on - but sometime there is need to start all build configuration - "on demand" build run - and it is a little inconvenient to go to each home page and press Run button.
You can accomplish this by creating a 'kick-off' build configuration -- it doesn't need to do anything -- and linking each of your parallel configurations to it by a Finish Build trigger. When you Run... the 'kick-off' configuration, it'll finish quickly and all of the parallel configurations should then get triggered.