Получаю абсолютные пути к проектам и компилирую их
This commit is contained in:
parent
8b32c5cb88
commit
008ecbb0b8
|
|
@ -1,5 +1,7 @@
|
|||
from subprocess import call
|
||||
import os
|
||||
import re
|
||||
|
||||
import settings
|
||||
|
||||
# print("all projects:")
|
||||
|
|
@ -16,14 +18,15 @@ import settings
|
|||
# print("projects to build:")
|
||||
# print(projects_to_build)
|
||||
|
||||
# sln_config = "Debug|iPhone Simulator 6.0"
|
||||
# build_cmd_pattern = '{0} -v build "--configuration:{1}" "--target:Build" {2}'
|
||||
sln_config = "Debug|iPhone Simulator 6.0"
|
||||
build_cmd_pattern = '{0} -v build "--configuration:{1}" "--target:Build" {2}'
|
||||
# build_cmd_text = build_cmd_pattern.format(settings.mdtool, sln_config, settings.sln_path)
|
||||
|
||||
# print(build_cmd_text)
|
||||
# ret_code = call(build_cmd_text, shell=True)
|
||||
# print('finished with return code: {0}'.format(ret_code))
|
||||
|
||||
sln_dir = os.path.dirname(settings.sln_path)
|
||||
sln_file = open(settings.sln_path)
|
||||
sln_file_content = sln_file.read()
|
||||
# print(sln_file_content)
|
||||
|
|
@ -33,4 +36,9 @@ match_iter = project_description_re.finditer(sln_file_content)
|
|||
|
||||
project_descriptions = [m.groupdict() for m in match_iter]
|
||||
for project_description in project_descriptions:
|
||||
print project_description['project_rel_path']
|
||||
rel_path = project_description['project_rel_path'].replace('\\', '/')
|
||||
abs_path = os.path.join(sln_dir, rel_path)
|
||||
build_cmd_text = build_cmd_pattern.format(settings.mdtool, sln_config, abs_path)
|
||||
print(build_cmd_text)
|
||||
ret_code = call(build_cmd_text, shell=True)
|
||||
print('finished with return code: {0}'.format(ret_code))
|
||||
|
|
|
|||
Loading…
Reference in New Issue