Thread: compiling C++ builder project with python using MSBuild
Posts:
1
Registered:
12/11/17
|
|
def BuildEmbarcaderoProject(path, build_type):
RSVars_path = "C:\\Program Files (x86)\\Embarcadero\\Studio\\19.0\\bin\\rsvars.bat"
ExitCode = subprocess.Popen(RSVars_path).wait()
if ExitCode == 0:
MSBuild_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe"
StartCommand = MSBuild_path + " \"" + path + "\" /target:Build /p:config=" + build_type
ExitCode = subprocess.Popen(StartCommand).wait()
if ExitCode == 0:
return True
return False
It does not work. error MSB4057: The target "Build" does not exist in the project.
When I run rsvars.bat in cmd.exe and then StartCommand.. it works perfectly.
What can I do here?
Edited by: esmu vesels on Jan 9, 2018 1:37 PM
|
|
|
Legend
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|
Connect with Us