Cannot get TouchGFX Designer "Compile Target Command" to do headless build
I can build using
C:\ST\STM32CubeIDE_1.11.2\STM32CubeIDE\headless-build.bat -import ./.. -cleanBuild PROJECTNAME/Debug
or
C:\ST\STM32CubeIDE_1.11.2\STM32CubeIDE\headless-build.bat -import ./.. -build PROJECTNAME/Debug
In PowerShell or older command prompt running from the Source/TouchGFX folder in my project.
However if I copy the exact line into "Compile Target Command" in TouchGFX Designer I get the following error:
URI: file:/C:/source/CUSTOMER_NAME/PROJECTNAME/Source is not valid in the workspace!
I tried the following:
- putting it in a batch file Build.cmd
- Running it with cmd.exe /c "MY COMMAND"
- running the batchfile with cmd.exe /c "Build.cmd"
- Using the full path of the project instead of "./..".
Batch file:
OFF
echo incrementally building...
SET var=%cd%
ECHO %var%
C:\ST\STM32CubeIDE_1.11.2\STM32CubeIDE\headless-build.bat -import ./.. -build PROJECTNAME/Debug
It does run the batch file and I had it print the current directory, which was the Source/TouchGFX folder in my project. But I get the same error.
I don't know what magic TouchGFX Designer does with the command area, but there must be a difference. Environment variables perhaps?
Can someone help me with this?
