[Interest] Where to does Qt expect to find ".qt-license" file when running on a Jenkins slave machine?

Jason H jhihn at gmx.com
Fri Feb 5 22:50:35 CET 2016



> Sent: Friday, February 05, 2016 at 4:36 PM
> From: "Michael Capewell" <mcapewell at gmail.com>
> To: interest at qt-project.org
> Subject: Re: [Interest] Where to does Qt expect to find ".qt-license" file when running on a Jenkins slave machine?
>
> Edward Sutton <edward.sutton <at> subsite.com> writes:
> 
> > 
> > 
> > Kai,
> > 
> > Thank you for your help.
> > 
> > On a Windows 7 VM machine it installs to:
> > 
> >  C:\Users\edward3\.qt-license
> > 
> > 
> > When logged on as edward3 all is good.
> > 
> > 
> > This same machine operates as a Jenkins slave.
> > 
> > Dumping the environment from the Jenkins job:
> > 
> >  USERDOMAIN=WORKGROUP
> >  USERNAME=WIN7X64-ESUTTON$
> >  USERPROFILE=C:\Windows\system32\config\systemprofile
> > 
> > I tried copying C:\Users\edward3\.qt-license to the following without success:
> > 
> >   C:\Windows\System32\config\systemprofile\AppData\Roaming\Qt\.qt-license
> >   C:\Windows\System32\config\systemprofile\.qt-license
> >   C:\jenkins\.qt-license
> > 
> > I had the slave building before using Qt Enterprise. What could have
> changed I do no know?
> > 
> > 
> > -Ed
> > 
> 
> 
> I had this same problem.  The solution is weird, but easy to do.  The
> problem is that C:\Windows\System32\config\systemprofile\ is different
> depending on which user is looking at it!  So if you manually copy your
> license there, Jenkins does not see it, because it runs as a different user.
>  You need to get Jenkins to copy the license there so it's in the right place.
> 
> So: 
> * add an "Execute Windows batch command" section to your Jenkins project's
> Build steps
> * copy your .qt-license into C:\temp\
> * Add the following two commands to the batch script text area (or add it at
> the top of your original script):
> * copy C:\temp\.qt-license %USERPROFILE%\.qtlicense
> * dir %USERPROFILE%
> * then build your project.  The file will be copied and qmake should run
> without issue.  
> 
> Notice that the contents listed for that directory are different than what
> you see with Windows Explorer under your normal user account!


If you copy the file as Adminstrator to the protected folder, everyone will see it. If you try to copy it as a normal user, it'll only be applied to that user's profile.



More information about the Interest mailing list