How to use the @xmcl/installer.Installer.installLibrariesDirectTask function in @xmcl/installer

To help you get started, we’ve selected a few @xmcl/installer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Voxelum / minecraft-launcher-core-node / packages / forge-installer / index.ts View on Github external
return async (context: Task.Context) => {
            profile = postProcessInstallProfile(mc, profile);

            const parsedLibs = Version.resolveLibraries([...profile.libraries, ...versionJson.libraries]);
            await context.execute(Installer.installLibrariesDirectTask(parsedLibs, mc, {
                ...installLibOption,
                libraryHost: installLibOption.libraryHost ? (l) => {
                    if (l.artifactId === "forge" && l.groupId === "net.minecraftforge") {
                        return `file://${mc.getLibraryByPath(l.path)}`;
                    }
                    return installLibOption.libraryHost!(l);
                } : undefined,
            }));

            await context.execute(async function postProcessing(ctx) {
                ctx.update(0, profile.processors.length);
                let i = 0;
                const errs: Error[] = [];
                for (const proc of profile.processors) {
                    try {
                        await postProcess(mc, proc, java);

@xmcl/installer

The installers of Minecraft/Forge/Fabric/Liteloader/Quilt

MIT
Latest version published 9 months ago

Package Health Score

53 / 100
Full package analysis