I am Using VS 2022 for cross-platform development of Linux executables, with compilation/linking occurring on a Linux server.
I have CMakeSettings.json configured to Copy build output back to the local machine, where local machine is Windows10 running VS 2022.
The back copied build output files are at:
C:\Users\<UserId>\CMakeBuild\${workspaceHash}\build\Linux-Debug
.
For local workflow reasons I want to use Command Prompt Window (or PowerShell window) shell scripts or batch files to copy files around. For example:
copy C:\Users\<UserId>\CMakeBuild\${workspaceRoot}\build\Linux-Debug\*.* c:\Temp\Example\*
So, questions:
- How does Command Prompt Window access/expand ${workspaceRoot}? I tried copying ${workspaceRoot} into a command, that doesn't work.
- Is there some way for Command Prompt Window to get the value of ? I'm trying to develop scripts usable by several people, all with different UserIds. I'd rather not have them enter their UserId as a script parameter if I can avoid it.
- What is a construct like ${variableName} called?
Part of my problem here is I don't know the proper vocabulary for some of this, so it's hard to find the answer.
The results I got were:
dir C:\Users\UserId\CMakeBuilds\${workspaceRoot}
yields File Not Found
dir C:\Users\UserId\CMakeBuilds\%workspaceHash%
yields File Not Found
dir C:\Users\UserId\CMakeBuilds\guid string
yields folder contents
I don't want users having to enter a UserId or guid into the path string. I want that data automatically inserted into the path string.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745589049a4634722.html
评论列表(0条)