Use Jenkins CI for Qt projects - c++

I'm trying to use Jenkins for some project I have written in Qt framework.
There is qmake plug-in for Jenkins in Jenkins wiki page, although this plug-in doesn't exist in Jenkins plug-in list.
I've looked for .hpi file for qmakebuilder plug-in, couldn't find it though. So I download the source code from the given repository, tried to compile it as described in Jenkins wiki... but I get list of error indicating java.util.NoSuchElementException.
Any of you guys have used this plug-in? or any other Jenkins plug-in to compile Qt projects with?

First of all, my JAVA_HOME variable was not pointing at the right folder i.e. JDK folder and it was set to JRE which caused the maven to not work properly.
But after fixing that, I was still getting some compilation error.
Finally, I asked Jenkins people and realized for some reason qmakebuilder is not compatible with JDK 7. Therefore, I download the JDK 6 compile the code with that version and it got compiled just fine. I got the hpi file in the target folder.
Plus, the hpi file for this plug-in NOW can be find here.

Related

eclipse C++ remote compilation using cmake

Till now we are compiling our C++ project in CentOS using cmake files. Everything is working fine, now instead of putty we are looking for an IDE which will do the job from windows.
I tried with eclipse but not getting step by step documents which will do. I tried in eclipse neon and eclipse for C++ development. All works fine for local but when I say build should happen on Centos nothing works.
Using ssh remote system explorer able to view all the files.
selected the folder in system explorer and "Create remote project".
Able to see the project in the project explorer and all my files/folders are present and .project files also present.
in the .project file apart from name rest other tags are empty.
All the source folder has CMakeList.txt but how to use that in eclipse is question?
When I say build on eclipse it should build the src code on Centos.
Not sure which version of eclipse and additional tools needs to be installed.
If anyone have done already do let me know the execution steps.
Thanks
Vj

Running C Code from Github in Visual Studio

I wanted to play around with the Live Motion code I found on github at this link.
I am fairly new but I thought that all I need to do is clone and download the link. I opened it in VS code (I ran the hello world code in c++ so I assume I have configured it properly). I basically cloned the repository and all files and folders appeared as follows:
However, I am confused as to how I can run the entire project. Previously I would just click on the project name, build, and it would create the exe file. That doesn't seem to exist for cloning the repo.
I need some basic guidance to how I simply run the entire project from github.
I did install QT Creator 5.9.9 and it also shows up in my Visual Studio.
But I am still unsure about how to run the software and if anyone was able to get it to work?
Thanks

Debugging Qt in visual studio, msvcp140d_app.dll is missing

I'm new to Qt, but have been working with Visual studio for C/C++ development for a few years. Now I'm trying to build a GUI for my project. I installed Qt 5.11.0 and the Qt VS Tools on both my work computer and home PC. At work I can build and run my project with the VS debugger, however on my home system I can build but can't run either with VS debugger or simply launching the app. I tried in release and it runs fine.
The error I'm getting is :
The code execution cannot proceed because VCRUNTIME140D_APP.dll was not found.
I get 4 of these, the first two want VCRUNTIME, the second two want MSVCP140D_APP.dll.
Solutions I've tried so far :
Uninstalled Win SDK and reinstalled
Uninstalled VS2017 and SDK and reinstalled
Searched System32, SysWOW64 and VS install directories - found msvcp140d.dll and vcruntime140d.dll, but no _app.dlls
Does anyone know what these are included with and where to get them? I can't figure out why I have them on my work computer but not at home. I have the same VS updates, same Qt version, and SDK on both systems.
Using :
Visual Studio 2017 v15.7.1
Qt 5.11.0 - msvc2017_64
I suppose I can just copy the .dll's from my work pc and drop them in the appropriate locations on the other, but I'd like to know what they should have been installed with so I can have the same setup on both systems.
Edit:
I also tried changing the platform toolset to VS2015 with Qt versions msvc2015_64 and winrt_x64_msvc2015
I found this post concerning the same missing _app.dll files. There wasn't any answer there, which is why I tried reinstalling the SDK in the hope the missing files were included there.
Edit 2:
I just scanned my entire system at work and it turns out that I don't have the missing .dll there either. That tells me that there is a difference in the project properties or configuration between the two. I use git for source control, and I am currently the only contributor to this project. When I try to build and run just the example from the getting started guide I have the same problem at home with missing _app.dll files, however it works fine at work. I'm totally confused now, and any hints are greatly appreciated.
Solution:
After trying for a couple of hours making new solutions etc. I decided to delete the entire build folder and put fresh copies of all the dependencies into it. My project now runs fine in debugging mode.
I'm fairly certain that when I originally copied the Qt .dll files into it I must have grabbed them from one of the winrt folders rather than the msvc2017_64 folder. To test I replaced the working .dll files with those from the winrt_x64_msvc2017 folder and sure enough the same errors again. So, this was a dumb mistake on my part, but hopefully it'll save someone else a lot of hair-pulling in the future.

Building Django on Visual Studio Online

I'm working on a Django (1.8.6) project and using Visual Studio Online's GIT source control. I am building the application successfully in my local environment and push the changes to the VSO. However, whenever I try to build the application on VSO to be able to benefit from "Continuous Integration" as a next step (will try to deploy Azure), it fails by giving the error below:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Python
Tools\Microsoft.PythonTools.Web.targets (235, 5) The environment 'env
(Python 3.4) (unavailable)' is not available. Check your project
configuration and try again.
Unexpected exit code received from msbuild.exe: 1
My build definition on VSO:
Build Definition Screenshot
Python Version: 3.4.3
VS Version: 2015
Any suggestions regarding to my case is highly appreciated.
This is a known issue for PTVS. MS is still working on it. Refer to this thread for details: https://github.com/Microsoft/PTVS/issues/128
There is a workaround in that thread you may use, I quote it here. The second link is unavailabe now, but the first one still works.
For deployment via PowerShell, I found this, which looks correct
AFAIK.
http://www.kenneth-truyers.net/2014/02/06/deploying-cloud-services-to-azure-with-powershell/
You can also use the Python Azure SDK to deploy, but that's not as
well documented. This is what this test does:
https://github.com/Azure/azure-sdk-for-python/blob/master/tests/test_servicemanagementservice.py#L940
Both of these assume that you are able to create the .cspkg, as that's
the file you have to upload to blob storage.

Installing QT addin for Visual Studio 2013

i spent a lot of time trying to get these to install properly, so here i am.
I've already googled my problem countless times in different forms and still can't resolve it.
It's just very confusing because there are so many versions out there, and i don't even know how to build the binaries, if even have to do that, and i couldn't find the configure.exe. I don't have it after i installed QT5.
I have python, perl, Visual Studio, QT5,QT addin, and openssl installed.
When going to QT5, QT Options, then Add, add: C:\Qt\5.2.1\mingw48_32 as the path and got an error about qmake not found or something.
So I deleted libqtmain.a and libqtmaind.a as suggested by some site and that solved the problem.
I've also tried this: http://blog.kikicode.com/2011/09/qt-version-uses-unsupported-makefile.html
but i couldn't find the Trolltech folder, so i stopped.
But now my problem is this
"This QT version uses an unsupported makefile generator (used: MINGW, supported: MSVN.NET, MSBUILD).
I don't even have a configure.exe file, and can't launch it from the visual studio command line.
I really have no idea what to do. I've been attacking this problem for all of yesterday, and i've ran out of steps today. Please help me.
I don't have the express version of VS. Just so you know.
I just solved this issue. It get me mad, but is easy.
The Add-in looks to $(QTDIR)\mkspecs\default to know which one to use. The "default" folder is not created after configure and build Qt.
So the way I solved is to copy&paste the "win32-msvc2013" folder as "default".
And now the Add-in recognised Qt.
BTW, after build the sources "nmake", I make an install of them in another folder so I have just the binaries and tools but not all the source that I don't need for develop software based on Qt.
Once the compilation is complete, then type:
Set the root where the installation will be, ex:
set INSTALL_ROOT=\Sw\Qt\qt-4.8.5-install
Execute in your source's root the command:
nmake install
So after trying everything i decided to run compile the binaries.
I think not a lot of people have this problem and there is no solution on the internet because the 2013 addin is very new. So here is what i did, and what worked for me, after countless hours of trying.
I downloaded the zip located under the main downloads on their webpage: http://qt-project.org/downloads
I uninstalled the old QT. (kept the addin)
I unzipped the zip it into a folder i named QT at C:\
Then i ran the configure.bat located inside.
On the Visual Studio cmd i cd to the C:\QT\qt-everywhere-opensource-src-5.2.1
directory where the configure file is,
Tried running the 'configure' file, there was no configure.exe. Then i ran 'nmake', that took like three hours.
The i went into C:\QT\qt-everywhere-opensource-src-5.2.1\qtbase\qmake
and made a folder bin where i copied the qmake.exe found in that same folder.
Finally i went into the VS addin, qt, qt options and i added that directory.
And it works!
I'm using Qt 5.6, msvc2014, but had the same issue at first. This issue was solved for me by updating to Add-in 1.2.5 without changing anything else.