Writing a python build script for your Visual C++ project

If you’ve decided to write your own python build script for existing Visual Studio projects, then two questions would probably come up at first.
  1. What utility/commands are available for actually building *.sln/*. vcxproj files?
  2. How will you specify the appropriate version for your *.rc version resource file?
Solution for #1. You can download the MSBuild tools for free from the Microsoft download website, and it provides the solution you need. First, download the MS Build tools 2013(or 2015) depending on your Visual Studio project versions.
Solution for #2. You can easily modify/set the version number string on your *.rc resource file by using python regex. Here is the example.

One thought on “Writing a python build script for your Visual C++ project

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s