0
|
1 import argparse
|
|
2 import logging
|
|
3 from logutil import setup_logging
|
|
4 from vsutil import SolutionCache
|
|
5
|
|
6
|
|
7 logger = logging.getLogger(__name__)
|
|
8
|
|
9
|
|
10 def main(args=None):
|
|
11 parser = argparse.ArgumentParser()
|
|
12 parser.add_argument('solution',
|
|
13 help="The path to the Visual Studio solution file.")
|
|
14 parser.add_argument('-c', '--cache',
|
|
15 help="The path to the solution cache.")
|
|
16 parser.add_argument('-v', '--verbose',
|
|
17 action='store_true',
|
|
18 help="Show verbose information.")
|
|
19 args = parser.parse_args(args)
|
|
20 setup_logging(args.verbose)
|
|
21
|
|
22 cache, _ = SolutionCache.load_or_rebuild(args.solution, args.cache)
|
|
23 sec = cache.slnobj.globalsection('SolutionConfigurationPlatforms')
|
|
24 for e in sec.entries:
|
|
25 config, platform = e.name.split('|')
|
|
26 if config != "Invalid" and platform != "Invalid":
|
|
27 print(e.name)
|
|
28
|
|
29
|
|
30 if __name__ == '__main__':
|
|
31 main()
|