MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / registerInstalledApp

Function registerInstalledApp

Tactility/Source/Tactility.cpp:211–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static void registerInstalledApp(std::string path) {
212 LOGGER.info("Registering app at {}", path);
213 std::string manifest_path = path + "/manifest.properties";
214 if (!file::isFile(manifest_path)) {
215 LOGGER.error("Manifest not found at {}", manifest_path);
216 return;
217 }
218
219 std::map<std::string, std::string> properties;
220 if (!file::loadPropertiesFile(manifest_path, properties)) {
221 LOGGER.error("Failed to load manifest at {}", manifest_path);
222 return;
223 }
224
225 app::AppManifest manifest;
226 if (!app::parseManifest(properties, manifest)) {
227 LOGGER.error("Failed to parse manifest at {}", manifest_path);
228 return;
229 }
230
231 manifest.appCategory = app::Category::User;
232 manifest.appLocation = app::Location::external(path);
233
234 app::addAppManifest(manifest);
235}
236
237static void registerInstalledApps(const std::string& path) {
238 LOGGER.info("Registering apps from {}", path);

Callers 1

registerInstalledAppsFunction · 0.85

Calls 6

isFileFunction · 0.85
loadPropertiesFileFunction · 0.85
parseManifestFunction · 0.85
addAppManifestFunction · 0.85
infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected