<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Qmake: License could not be found using Jenkins as windows service with Qt5.9 where 5.6 does]]></title><description><![CDATA[<p dir="auto">We switched building from Qt5.6 to Qt5.9. This works fine using QtCreator or console on Developer Machines.</p>
<p dir="auto">Now switching our Build-System based on Jenkins as System Service with 5.9 always fails to find the qt license.</p>
<p dir="auto">We installed Qt using my credentials and we can install and update fine using the user account. Just the service user cannot find the license, which is a mandatory for running jenkins in this configuration. We already tried placing the .qt-license file to the system home directory but this did not help at all.</p>
<p dir="auto">How can we achive the system user's qmake calls can find a valid license?</p>
<p dir="auto">BuildConfig:</p>
<pre><code>echo CD
echo %CD%
echo USERPROFILE
echo %USERPROFILE%
echo USERNAME
echo %USERNAME%
echo.
echo.
echo Content of userprofile directory
echo.
echo.
dir %USERPROFILE%
echo.
echo.
echo --------------- Running QMake ---------------
echo.
mkdir build
cd build
set BUILDDIR=%CD%
call C:\Qt\5.9\msvc2015\bin\qtenv2.bat
cd %BUILDDIR%
qmake.exe ..\source\TestBuild.pro "CONFIG+=release" &amp;&amp; nmake qmake_all
</code></pre>
<p dir="auto">BuildLog:</p>
<pre><code>C:\Jenkins\Testbuild&gt;echo CD 
CD

C:\Jenkins\Testbuild&gt;echo C:\Jenkins\Testbuild 
C:\Jenkins\Testbuild

C:\Jenkins\Testbuild&gt;echo USERPROFILE 
USERPROFILE

C:\Jenkins\Testbuild&gt;echo C:\Windows\system32\config\systemprofile 
C:\Windows\system32\config\systemprofile

C:\Jenkins\Testbuild&gt;echo USERNAME 
USERNAME

C:\Jenkins\Testbuild&gt;echo TESTBUILD$ 
TESTBUILD$

C:\Jenkins\Testbuild&gt;echo.


C:\Jenkins\Testbuild&gt;echo.


C:\Jenkins\Testbuild&gt;echo Content of userprofile directory 
Content of userprofile directory

C:\Jenkins\Testbuild&gt;echo.


C:\Jenkins\Testbuild&gt;echo.


C:\Jenkins\Testbuild&gt;dir C:\Windows\system32\config\systemprofile 
 Volume in Laufwerk C: hat keine Bezeichnung.
 Volumeseriennummer: ---------

 Verzeichnis von C:\Windows\system32\config\systemprofile

10.02.2016  16:34    &lt;DIR&gt;          .
10.02.2016  16:34    &lt;DIR&gt;          ..
10.02.2016  15:35    &lt;DIR&gt;          .oracle_jre_usage
10.02.2016  14:35               251 .qt-license
               1 Datei(en),            251 Bytes
               3 Verzeichnis(se), 10.672.287.744 Bytes frei

C:\Jenkins\Testbuild&gt;echo.


C:\Jenkins\Testbuild&gt;exit 0 
[Testbuild] $ cmd /c call C:\Windows\TEMP\hudson3453996140933717738.bat

C:\Jenkins\Testbuild&gt;echo.


C:\Jenkins\Testbuild&gt;echo --------------- Running QMake --------------- 
--------------- Running QMake ---------------

C:\Jenkins\Testbuild&gt;echo.


C:\Jenkins\Testbuild&gt;mkdir build 
Ein Unterverzeichnis oder eine Datei mit dem Namen "build" existiert bereits.

C:\Jenkins\Testbuild&gt;cd build 

C:\Jenkins\Testbuild\build&gt;set BUILDDIR=C:\Jenkins\Testbuild\build 

C:\Jenkins\Testbuild\build&gt;call C:\Qt\5.9\msvc2015\bin\qtenv2.bat 
Setting up environment for Qt usage...
Remember to call vcvarsall.bat to complete environment setup!
Calling vcvarsall.bat now
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.12
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'


NOTICE  NOTICE  NOTICE  NOTICE

  You are not licensed to use this version of Qt.

  Please log into your Qt Account at https://account.qt.io/
  to renew your license.

  Refer to Qt Support FAQ for known resolutions in license issues:
  https://wiki.qt.io/index.php?title=KnowledgeBase:SupportFAQ

NOTICE  NOTICE  NOTICE  NOTICE

Project ERROR: License check failed! Giving up ...
Build step 'Windows Batch-Datei ausführen' marked build as failure
Finished: FAILURE
</code></pre>
]]></description><link>https://forum.qt.io/topic/80839/qmake-license-could-not-be-found-using-jenkins-as-windows-service-with-qt5-9-where-5-6-does</link><generator>RSS for Node</generator><lastBuildDate>Fri, 15 May 2026 23:44:41 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/80839.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Jun 2017 09:36:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qmake: License could not be found using Jenkins as windows service with Qt5.9 where 5.6 does on Mon, 03 Jul 2017 11:48:42 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the feedback !</p>
]]></description><link>https://forum.qt.io/post/402700</link><guid isPermaLink="true">https://forum.qt.io/post/402700</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 03 Jul 2017 11:48:42 GMT</pubDate></item><item><title><![CDATA[Reply to Qmake: License could not be found using Jenkins as windows service with Qt5.9 where 5.6 does on Mon, 03 Jul 2017 08:36:16 GMT]]></title><description><![CDATA[<p dir="auto">We've got an answer from the Qt support requesting to setup the QT_LICENSE_FILE environment variable.</p>
<p dir="auto">We now copied the .qt-licese file from the original installation user directly into the Qt installation directory</p>
<pre><code>C:\Qt\.qt-license
</code></pre>
<p dir="auto">On the begining of every batch block in Jenkins we now manually set this path as the license environment variable</p>
<pre><code>set QT_LICENSE_FILE=C:\Qt\.qt-license
echo.
echo --------------- Running QMake ---------------
echo.
mkdir build
cd build
set BUILDDIR=%CD%
call C:\Qt\5.9\msvc2015\bin\qtenv2.bat
cd %BUILDDIR%
qmake.exe ..\source\TestBuild.pro "CONFIG+=release" &amp;&amp; nmake qmake_all
</code></pre>
<p dir="auto">This helped us getting jenkins back to building.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.qt.io/post/402650</link><guid isPermaLink="true">https://forum.qt.io/post/402650</guid><dc:creator><![CDATA[NetZwerg]]></dc:creator><pubDate>Mon, 03 Jul 2017 08:36:16 GMT</pubDate></item></channel></rss>