I have a Qt (5.15) project that is building with qmake on Azure DevOps Piplelines on a self-hosted Windows Agent.
My build and install step looks as follows...
- script: |
call C:\"Program Files (x86)"\"Microsoft Visual Studio"\2019\Community\VC\Auxiliary\Build\vcvarsall.bat amd64
call qmake $(Build.SourcesDirectory)
call jom
call jom install
workingDirectory: $(Build.BinariesDirectory)
env:
INSTALL_ROOT: $(Build.ArtifactStagingDirectory)
From my understanding, I must use script
as vcvarsall.bat
cannot be ran from powershell
.
The resulting error is on jom install
:
The filename, directory name, or volume label syntax is incorrect.
I have...
INSTALL_ROOT
is set properly with the env
step property.call set INSTALL_ROOT=$(Build.ArtifactStagingDirectory)
, in the script step. This doesn't change the error.cmd.exe
and from a .bat
file. The package is installed as expected.How do I get the DevOps Windows agent to complete the install task?
When I remove INSTALL_ROOT
environment variable, the install steps succeeds. Obviously, it is not installed in the correct location in this scenario.
It appears that qmake
will append C:
to the front of the INSTALL_ROOT
variable when generating the directives in the Makefile
.
In order to use $(Build.ArtifactStagingDirectory)
, the drive prefix must be stripped.