Package com.skcraft.launcher.model.minecraft

Examples of com.skcraft.launcher.model.minecraft.VersionManifest


        }
    }

    public void readVersionManifest(File path) throws IOException {
        if (path != null) {
            VersionManifest versionManifest = read(path, VersionManifest.class);
            manifest.setVersionManifest(versionManifest);
        }
    }
View Full Code Here


        }
    }

    public void writeManifest(@NonNull File path) throws IOException {
        manifest.setFeatures(applicator.getFeaturesInUse());
        VersionManifest versionManifest = manifest.getVersionManifest();
        if (versionManifest != null) {
            versionManifest.setId(manifest.getGameVersion());
        }
        validateManifest();
        path.getAbsoluteFile().getParentFile().mkdirs();
        writer.writeValue(path, manifest);
    }
View Full Code Here

    }

    private VersionManifest readVersionManifest(Manifest manifest) throws IOException, InterruptedException {
        // Check whether the package manifest contains an embedded version manifest,
        // otherwise we'll have to download the one for the given Minecraft version
        VersionManifest version = manifest.getVersionManifest();
        if (version != null) {
            mapper.writeValue(instance.getVersionPath(), version);
            return version;
        } else {
            URL url = url(String.format(
View Full Code Here

        manifest.update(instance);

        // Read version manifest
        log.info("Reading version manifest...");
        progress = new DefaultProgress(-1, _("instanceUpdater.readingVersion"));
        VersionManifest version = readVersionManifest(manifest);

        progress = new DefaultProgress(-1, _("instanceUpdater.buildingDownloadList"));

        // Install the .jar
        File jarPath = launcher.getJarPath(version);
        URL jarSource = launcher.propUrl("jarUrl", version.getId());
        log.info("JAR at " + jarPath.getAbsolutePath() + ", fetched from " + jarSource);
        installJar(installer, jarPath, jarSource);

        // Download libraries
        log.info("Enumerating libraries to download...");

        URL url = manifest.getLibrariesUrl();
        if (url != null) {
            log.info("Added library source: " + url);
            librarySources.add(url);
        }

        progress = new DefaultProgress(-1, _("instanceUpdater.collectingLibraries"));
        installLibraries(installer, version, launcher.getLibrariesDir(), librarySources);

        // Download assets
        log.info("Enumerating assets to download...");
        progress = new DefaultProgress(-1, _("instanceUpdater.collectingAssets"));
        installAssets(installer, version, launcher.propUrl("assetsIndexUrl", version.getAssetsIndex()), assetsSources);

        log.info("Executing download phase...");
        progress = ProgressFilter.between(installer.getDownloader(), 0, 0.98);
        installer.download();
View Full Code Here

TOP

Related Classes of com.skcraft.launcher.model.minecraft.VersionManifest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.