source: 2011/24/build_games.py @ 2076

Revision 2076, 770 bytes checked in by tekrjant, 10 years ago (diff)

Build script for this week's games.

Line 
1import sys
2import os
3from os.path import join, exists, abspath
4from shutil import *
5from glob import *
6from subprocess import *
7
8
9def main():
10        lib_dir_x86 = abspath('lib\\x86')
11        projects_that_did_not_build = []
12
13        for root, dirs, files in os.walk('.'):
14                if '.svn' in dirs:
15                        dirs.remove('.svn')
16                projects = glob(join(root, '*.csproj'))
17                if projects:
18                        build_cmd = 'msbuild /p:Configuration=Release /p:"ReferencePath={0}" /t:Build "{1}"'.format(lib_dir_x86, projects[0])
19                        return_code = call(build_cmd, shell=True)
20                        if return_code != 0:
21                                projects_that_did_not_build.append(projects[0])
22
23        print ''
24        print 'Projects that did not build:'
25        for p in projects_that_did_not_build:
26                print p
27
28
29if __name__ == '__main__':
30        sys.exit(main())
Note: See TracBrowser for help on using the repository browser.