How to build Qt applications using Team Foundation Server 2017 - c++

I am currently in the process of migrating a couple of legacy Qt5 projects to a new Team Foundation Server. All projects have been developed for Windows in Visual Studio using the Qt VS AddIn (and thus don't use .pro-files). I would love to use the TFS Build Agent to build these on other platforms (mainly linux).
I have previously done this on other projects using Jenkins and qmake, having platform-dependent settings in the .pro-file.
Is there an established workflow for building VS projects using Qt5 via a TFS Build Server on other platforms?

I don't use TFS but, since TFS Build operates on Visual Studio solutions, it ought to be possible to use the "Linux development with C++" feature of VS2017. Just setup a Linux project in the VS solution and it should build like any other.

Seems you'd like to build Cross-Platform Code in Linux using TFS vNext build system. To build or deploy you'll need at least one agent. The cross platform build agent is support on Ubuntu, Red Hat, and CentOS.
Detail steps please refer this tutorial-- Deploy an agent on Linux. Then simply create the build definition add build task, select the Linux build agent the same as build on windows. More detail step and build configuration you could take a look at this video tutorial-- Building and Deploy Applications In Linux With TFS
In your case, there is not corresponding VS/Qt VS AddIn in your Linux environment. You need to set up your Linux build agent local environment to build your qt5 application successfully, then it's not hard to build through tfs.
Another way is scripting the Linux build process to run over SSH or some other remote protocol, and driving this process from the Windows build agent.

Related

How to write native C++ in VS 2022, using Linux for build and test

I need a native C++ app to make from scratch. It has to run on linux (CentOS). I want to use VS2022 to write and test. I have Hyper-V VM with CentOS.
I tried to google a solution but there are only posts for using WSL.
Can someone please describe steps to connect VS to Linux VM instead of WSL so I can build and run the app on the VM.
This article describes the process: https://devblogs.microsoft.com/cppblog/linux-development-with-c-in-visual-studio/
add workload to the VS using VS Installer (Linux and embedded..)
create project of correct type
add SSH credentials in the project Properties (also can be added/removed/edited in Tools-Options-Cross Platform)

Managed builds on Linux

We have a TFS server which runs builds of our Windows-based software.
Now we had to port part of our software to Linux and we want to run the builds in a similar manner on Linux.
The project on Linux is created using Eclipse CDT, written in C++. The question would be how to run builds of this project on a Linux machine, and will it be possible to somehow integrate it into TFS infrastructure? For quality control, etc.
There is no out-of-the-box solution: currently there are no agents for Linux.
But wait, I did this once for a customer. The solution's pieces were:
setup SSH on Linux
write a Linux build script and save it in TFS version control
modify the custom template using the Community Build Extensions to:
a. push the script
b. invoke the script remotely
c. collect the build log(s)
d. copy the logs to the OutDir
I wrote a blog post with detailed instruction: http://casavian.eu/wordpress/2014/02/13/integrating-linux-builds-in-tfs/.

TFS Builds using Eclipse CDT from Debian Box

I would like to use TFS Build system from Debian OS, I develop using C++, my IDE is Eclipse CDT. I would like to know if using TFS Build System is possible, if so how? as a side note, My development heavily relies on Boost libraries and QT.
Yes and no. You cannot run TFS builds on Linux. However you can use TFS build to run ANT or Maven, which in turn can be used to build c++.
The build will run on a TFS build agent, which will be a windows machine. Usually a different machine to the TFS server. This can be a VM, your TFS gurus should be able to set this up for you.
To use ANT or Maven you need the TFS build extensions the link is for the TFS 2012 version, however there are extensions for older versions of TFS.
Once you have a build server set up you can use ANT to build your c++ code or Maven.
If I was going to attempt this, I would get the ANT build working on a windows box first, then plumb it in to TFS with the extensions.
However, you might be better off using a more generic build engine such as Jenkins, running on Linux which connects to TFS to retrieve the code.

How Remote Development of C++ works in Netbeans?

Hi we want to use remote development features of netbeans but while trying out on our setup its very slow. I want to understand its feasibility of integrating our build environment with netbeans.
Our setup would be normally:
1. Windows 7 Professional 64bit where we install netbeans
2. RHEL 5.5 64bit linux where we have tools and sources
Normally we directly connect to that machine through PuTTY and use VIM to edit sources and gmake to compile and build projects. Now when I created the "New Remote Project with existing sources" and try to use it It took more time to load the project.
So Can anybody tell me how actually this remote compilation works??
Because we have some GBs of sources here on linux box and I want to know is it possible for smooth development with this big data??
Simple steps. Read this tutorial. You just need a SSH-server on your Linux.
The process is easy, your Netbeans connects to the SSH-server and searches for compilation tools then uses them to build your projects.
The second issue is creating a shared folder that your Windows and Linux able to access to it. I suggest you first create a shared folder on your Windows and use Samba client on your Linux.

InstallShield Runtime?

We have InstallShield 2009 Premier installed on one system on which it is used to create and compile setups (one seat license).
However, we are trying to create a one-click-build-experience by using Team Foundation Build Server to do nightly builds. We would like to integrate the generation of the setup files as well.
I know that there is an open source package available on CodePlex that contains a custom build task for automating the generation of an installshield based setup (by submitting the .ism file and other stuff).
Is there something like an installshield runtime that can be installed on our build server which does nothing else then creating the setup from an ism file without UI or anything else so that we dont have to buy another license?
InstallShield Premier includes a Standalone Builder command line tool which you can install on your build server and use as part of an automated process.
I can't remember if this come on the CD or if you need to download it through the InstallShield updates.
Note that this is not included in the Professional edition anymore.
For TFS integration, you need InstallShield 2011 as it will now work with TFS2010 and will build properly as long as the machine you are using to build on has the TFS build agent and the installshield Standalone build or InstallShield Pro/Premier edition. The generated installation will also be copied to the TFS drop folder.