(self)
| 42 | self.defaultLadder[(None, None)] = ('android', 'AndroidStudio') |
| 43 | |
| 44 | def process(self): |
| 45 | command = self.args.command; |
| 46 | |
| 47 | self.logger.debug('Starting command: %s', command) |
| 48 | |
| 49 | selectedConfigurations = self.buildFolder.getBuildConfigurationsForCommand(); |
| 50 | self.logger.debug("Selected platform list:") |
| 51 | for config in selectedConfigurations: |
| 52 | self.logger.debug("* %s", config) |
| 53 | |
| 54 | if len(selectedConfigurations)==0: |
| 55 | defaultLadderKey = (self.args.platform, self.args.build_system) |
| 56 | architecture = self.args.arch |
| 57 | configuration = self.args.config |
| 58 | if not architecture: |
| 59 | architecture = "std" |
| 60 | |
| 61 | if defaultLadderKey in self.defaultLadder: |
| 62 | defaults = self.defaultLadder[defaultLadderKey] |
| 63 | |
| 64 | self.logger.info("Defaulting to: %s - %s" % (defaults[0], defaults[1])) |
| 65 | selectedConfigurations = [ |
| 66 | BuildConfiguration(platform=defaults[0], arch=architecture, buildsystem=defaults[1], config=configuration) |
| 67 | ] |
| 68 | else: |
| 69 | raise error.IncorrectCallError("Could not determine default platform / buildsystem ( and configuration ). Please specifiy one via -p, -b (and -c)") |
| 70 | |
| 71 | for configuration in selectedConfigurations: |
| 72 | if configuration.platform not in self.bauerGlobals.platformMap: |
| 73 | raise error.InvalidPlatformNameError(configuration.platform); |
| 74 | |
| 75 | buildDirectory = self.buildFolder.getBuildDir(configuration) |
| 76 | |
| 77 | with GeneratorState(buildDirectory) as platformState: |
| 78 | if not "build-configuration" in platformState.state or BuildConfiguration(*platformState.state["build-configuration"]) != configuration: |
| 79 | if os.path.exists(buildDirectory): |
| 80 | self.logger.info("Build system does not match the one used when the projects for this platform were first prepared. Cleaning existing build files."); |
| 81 | if "build-configuration" in platformState.state: |
| 82 | self.logger.debug("Old config: ", BuildConfiguration(*platformState.state["build-configuration"])) |
| 83 | else: |
| 84 | self.logger.debug("(No previous state found)") |
| 85 | self.logger.debug("New config: %s", configuration) |
| 86 | shutil.rmtree(buildDirectory); |
| 87 | |
| 88 | platformState.state["build-configuration"] = configuration; |
| 89 | |
| 90 | if command=="prepare": |
| 91 | self.prepare(configuration, platformState); |
| 92 | |
| 93 | elif command=="build": |
| 94 | self.prepare(configuration, platformState); |
| 95 | self.build(configuration); |
| 96 | |
| 97 | elif command=="clean": |
| 98 | self.clean(configuration); |
| 99 | |
| 100 | elif command=="distclean": |
| 101 | self.distClean(buildDirectory); |
no test coverage detected