|
Answer» Hi, I want to BUILD a VC8 soultion from command-line by devenv. I have a path to the solution like set SOL_PATH="C:\myStuffs\myproject\win\build"
and then I am doing a PUSHD to "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE"
now when i say devenv %SOL_PATH%\a.sln /build "Debug" devenv cannot find path to a.sln.
This is because %SOL_PATH%\a.sln evaluates to "C:\myStuffs\myproject\win\build"\a.sln which devenv doesnt understand.
However if I write devenv "C:\myStuffs\myproject\win\build\a.sln" /build "Debug" it works fine.
I am looking for a solution to concatenate the path with the filename, and such that "C:\myStuffs\myproject\win\build"\ + a.sln becomes "C:\myStuffs\myproject\win\build\a.sln". In other words, the filename comes inside the QUOTES too.
Please help. thanks, -manirupIt might be easier to use the old 8.3 notation:
set SOL_PATH=C:\myStuffs\myproj~1\win\build
8-)Thanks for the suggestion. But I dont know what the directory name would be. I dont want the path to be hard coded. xxxxx~1 does not suffice because it can be ~2 or ~3 and so on... and you cannot assure that ~1 will work fine.. Quote It might be easier to use the old 8.3 notation:
set SOL_PATH=C:\myStuffs\myproj~1\win\build
8-) You can discover for yourself the correct name by running a directory list on the parent directory:
dir /x C:\myStuffs
OR
Use your original method but APPEND the quotes on the program call:
set SOL_PATH=C:\myStuffs\myproject\win\build devenv "%SOL_PATH%\a.sln" /build "Debug"
8-)
Thanks... That was a nice solution indeed... I never thought in that direction... apending the quotes on the program call solves my problem... So simple... thanks again to sidewinder -manirup
QuoteYou can discover for yourself the correct name by running a directory list on the parent directory:
dir /x C:\myStuffs
OR
Use your original method but append the quotes on the program call:
set SOL_PATH=C:\myStuffs\myproject\win\build devenv "%SOL_PATH%\a.sln" /build "Debug"
8-)
manirup, You will never have this problem when you work without quotes until you need them. I.e.:
CODE: [Select]set SOL_PATH=C:\myStuffs\myproject\win\build PUSHD "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" devenv "%SOL_PATH%\a.sln" /build "Debug" Hope this helps
|