use of org.graalvm.component.installer.persist.DirectoryStorage in project graal by oracle.
the class ComponentInstaller method completeEnvironment.
protected Environment completeEnvironment() {
if (env.getGraalHomePath() != null) {
return env;
}
findGraalHome();
env.setGraalHome(graalHomePath);
// Use our own GraalVM's trust store contents; also bypasses embedded trust store
// when running AOT.
Path trustStorePath = SystemUtils.resolveRelative(SystemUtils.getRuntimeBaseDir(env.getGraalHomePath()), // NOI18N
"lib/security/cacerts");
// NOI18N
System.setProperty("javax.net.ssl.trustStore", trustStorePath.normalize().toString());
DirectoryStorage storage = new DirectoryStorage(env, storagePath, graalHomePath);
storage.setConfig(env);
storage.setJavaVersion("" + SystemUtils.getJavaMajorVersion(env));
env.setLocalRegistry(new ComponentRegistry(env, storage));
FileOperations fops = FileOperations.createPlatformInstance(env, env.getGraalHomePath());
env.setFileOperations(fops);
// also sets up input and feedback.
forSoftwareChannels(true, (ch) -> {
ch.init(input, feedback);
});
return env;
}
use of org.graalvm.component.installer.persist.DirectoryStorage in project graal by oracle.
the class UpgradeProcess method createRegistryFor.
private ComponentRegistry createRegistryFor(Path home) {
DirectoryStorage dst = new DirectoryStorage(feedback.withBundle(ComponentInstaller.class), home.resolve(SystemUtils.fromCommonRelative(CommonConstants.PATH_COMPONENT_STORAGE)), home);
dst.setJavaVersion(input.getLocalRegistry().getJavaVersion());
return new ComponentRegistry(feedback, dst);
}
Aggregations