Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: compiling C++ builder project with python using MSBuild



Permlink Replies: 0 Threads: [ Previous | Next ]
esmu vesels

Posts: 1
Registered: 12/11/17
compiling C++ builder project with python using MSBuild
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 1:37 PM
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)

Server Response from: ETNAJIVE02