Esempio n. 1
0
	def build(self, **kwargs):
		executor = kwargs.get("executor", None)
		buildfile = kwargs.get("buildfile", None)
		filemanager = kwargs.get("filemanager", None)
		target_platform = kwargs.get("target_platform", None)
		context_list = kwargs.get("context_list", None)

		# specify target with: "/t:"

		for context in context_list:
			architectures, configurations = buildfile.get_layout_params(context.product)
			for architecture in architectures:
				for configuration in configurations:
					arch = MSBuildArchitectureMap(architecture)

					cd = ChangeDirectory(path=context.abs_root)
					cd.run()

					project_name = os.path.join(context.base_to_project_relative, context.product.name)
					project_name += ".vcxproj"

					command = "msbuild \"%s\" /p:Configuration=%s;Platform=%s" % (project_name, configuration, str(arch))

					executor.execute(commandline=command)

					cd.pop()
Esempio n. 2
0
	def run_action(self, action, **kwargs):
		executor = kwargs.get("executor", None)
		buildfile = kwargs.get("buildfile", None)
		filemanager = kwargs.get("filemanager", None)
		target_platform = kwargs.get("target_platform", None)
		context_list = kwargs.get("context_list", None)

		#logging.info("context: %s" % context.product.name)

		for context in context_list:
			architectures, configurations = buildfile.get_layout_params(context.product)
			for architecture in architectures:
				for configuration in configurations:
					cd = ChangeDirectory(path=context.abs_root)
					cd.run()

					commandline = self.generate_commandline(
						context=context,
						configuration=configuration,
						architecture=architecture,
						clean=True if action == "clean" else False,
						verbose=False,
						target=context.product.name if context else None
					)

					executor.execute(commandline=commandline)
					cd.pop()