MCPcopy Create free account
hub / github.com/AshampooSystems/boden / open

Method open

bauer/commandprocessor.py:164–195  ·  view source on GitHub ↗
(self, configuration, buildDirectory)

Source from the content-addressed store, hash-verified

162 codeSigner.sign(self.args)
163
164 def open(self, configuration, buildDirectory):
165 cmake = self.buildExecutor.cmake if not configuration.platform == "android" else self.androidExecutor.cmake
166
167 if configuration.buildsystem == 'Xcode':
168 for cmakeConfig in cmake.codeModel['configurations']:
169 project_file_name = os.path.join(buildDirectory, cmakeConfig['main-project']['name'] + ".xcodeproj")
170 self.logger.debug("Starting: %s", project_file_name)
171 self.bauerGlobals.open_file(project_file_name)
172 return
173
174 elif configuration.buildsystem == 'AndroidStudio':
175 self.logger.debug("Looking for 'studio'")
176
177 if sys.platform == "win32":
178 defaultWindowsPath = "C:\\Program Files\\Android\\Android Studio\\bin\\studio64.exe"
179 if os.path.exists(defaultWindowsPath):
180 subprocess.Popen([defaultWindowsPath, buildDirectory])
181 return
182 else:
183 self.logger.warning("Couldn't find Android Studio, opening project folder")
184 else:
185 studio_path = find_executable('studio')
186 self.logger.debug("Path: %s", studio_path)
187
188 if studio_path == None:
189 self.logger.warning("Couldn't find 'studio', please install via Android Studio => Tools => Create Command-line launcher")
190 else:
191 subprocess.Popen([studio_path, buildDirectory])
192 return
193
194 self.logger.debug("Trying to open %s", buildDirectory)
195 self.bauerGlobals.open_file(buildDirectory)
196
197 def buildDeps(self):
198 pass

Callers 1

processMethod · 0.95

Calls 1

open_fileMethod · 0.80

Tested by

no test coverage detected