Giter Site home page Giter Site logo

packwiz-installer-bootstrap's Introduction

packwiz

packwiz is a command line tool for creating Minecraft modpacks. Instead of managing JAR files directly, packwiz creates TOML metadata files which can be easily version-controlled and shared with git (see an example pack here). You can then export it to a CurseForge or Modrinth modpack, or use packwiz-installer for an auto-updating MultiMC instance.

packwiz is great for...

  • Distributing private modpacks for servers
  • Creating modpacks for CurseForge and Modrinth

packwiz is not so great for...

Join my Discord server if you need help here!

Features

  • Git-friendly TOML-based metadata format
  • MultiMC pack installer/updater, with support for optional mods and fast automatic updates - perfect for servers!
  • Pack distribution with HTTP servers, with a built in local server for testing
  • Easy installation and updating of multiple mods at once from CurseForge and Modrinth
  • Exporting to CurseForge and Modrinth packs
  • Importing from CurseForge packs
  • Server-only and Client-only mod handling
  • Creation of remote file metadata from JAR files for CurseForge mods

Installation

Prebuilt binaries are available from GitHub Actions - the UI is a bit terrible, but essentially select the top build, then download the artifact ZIP for your system at the bottom of the page.

Another option is to use nightly.link. Just go to the page, and download the artifact for your system.

To run the executable, first extract it, then add the folder where you extracted it to your PATH environment variable (see tutorial for Windows here) or move it to where you want to use it.

In future I will have a lot more installation options, but you can also compile from source:

  1. Install Go (1.19 or newer) from https://golang.org/dl/
  2. Run go install github.com/packwiz/packwiz@latest. Be patient, it has to download and compile dependencies as well!

Documentation

See https://packwiz.infra.link/ for the full packwiz documentation!

packwiz-installer-bootstrap's People

Contributors

comp500 avatar fuzzyweapon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

packwiz-installer-bootstrap's Issues

Illegal character in path cause errors.

[FATAL] Failed to process index file: 
com.google.gson.JsonParseException: Failed to parse URI
	at link.infra.packwiz.installer.metadata.SpaceSafeURIParser.deserialize(SpaceSafeURIParser.kt:20)
	at link.infra.packwiz.installer.metadata.SpaceSafeURIParser.deserialize(SpaceSafeURIParser.kt:14)
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
	at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
	at com.google.gson.Gson.fromJson(Gson.java:887)
	at com.google.gson.Gson.fromJson(Gson.java:952)
	at com.google.gson.Gson.fromJson(Gson.java:925)
	at com.moandjiezana.toml.Toml.to(Toml.java:323)
	at link.infra.packwiz.installer.UpdateManager.processIndex(UpdateManager.kt:254)
	at link.infra.packwiz.installer.UpdateManager.start(UpdateManager.kt:199)
	at link.infra.packwiz.installer.UpdateManager.<init>(UpdateManager.kt:43)
	at link.infra.packwiz.installer.Main.startup(Main.kt:81)
	at link.infra.packwiz.installer.Main.<init>(Main.kt:115)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at link.infra.packwiz.installer.bootstrap.LoadJAR.start(LoadJAR.java:51)
	at link.infra.packwiz.installer.bootstrap.Main.<init>(Main.java:91)
	at link.infra.packwiz.installer.bootstrap.Main.main(Main.java:46)
Caused by: java.net.URISyntaxException: Illegal character in path at index 36: .minecraft/mods/InventoryHUD-fabric-[1.18]%20-3.4.2.jar
	at java.base/java.net.URI$Parser.fail(URI.java:2974)
	at java.base/java.net.URI$Parser.checkChars(URI.java:3145)
	at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3227)
	at java.base/java.net.URI$Parser.parse(URI.java:3186)
	at java.base/java.net.URI.<init>(URI.java:623)
	at link.infra.packwiz.installer.metadata.SpaceSafeURI.<init>(SpaceSafeURI.kt:17)
	at link.infra.packwiz.installer.metadata.SpaceSafeURIParser.deserialize(SpaceSafeURIParser.kt:18)
	... 27 more

This is the same as #1, but idk why he closes it.

So it basically caused by illegal characters in the path (Illegal character in path at index 36: .minecraft/mods/InventoryHUD-fabric-[1.18]%20-3.4.2.jar). The only way to prevent this, is by making the mod as a normal file (w/o using packwiz)

Option to ignore update failures

--bootstrap-no-update disables updating entirely; it may be desirable to simply allow an update failure without returning exit code 0 (and continue launching the game). This is already possible in the GUI, this option would allow this behaviour to be used in the CLI (and without asking the user).

Illegal character in path cause errors.

Failed to download modpack, the following errors were encountered:
inventory-hud-forge.toml: com.google.gson.JsonParseException: Failed to parse URI
...
Caused by: java.net.URISyntaxException: Illegal character in path at index 61:
https://edge.forgecdn.net/files/3198/762/InventoryHUD-fabric-[1.16.2-1.16.5]-3.2.2.jar

inventory-hud-forge.toml

name = "Inventory HUD+"
filename = "InventoryHUD-fabric-[1.16.2-1.16.5]-3.2.2.jar"
side = "both"

[download]
url = "https://edge.forgecdn.net/files/3198/762/InventoryHUD-fabric-[1.16.2-1.16.5]-3.2.2.jar"
hash-format = "murmur2"
hash = "3155476420"

[update]
[update.curseforge]
file-id = 3198762
project-id = 357540
release-channel = "beta"

Dear developers.

I stumbled on an error that kind of prevents me from using this module of Packwiz with my modpack
When I try to make it download the mods, it always errors on this exact same mod.
I do not know what I can do about it or if there is a way around it?

Greetings

`--help` does not show options for packwiz-installer.jar even when it is present.

When I run java -jar packwiz-installer-bootstrap.jar --help after downloading packwiz-installer.jar, it does not actually update the help text. It still outputs the following text:

Options for packwiz-installer will be visible once it has been downloaded.

Edit: I have tested this on multiple Java versions on both Windows 11 and Arch Linux.

Support being called as Java-Agent

Support being called as Java-Agent would enable Packwiz-Installer to be used on:

  • Launchers that has incorrect handling of $INST_JAVA, meaning they can't start packwiz-installer from pre-launch commands reliably (HMCL / PCL2)
  • Launchers that don't support pre-launch commands (Mojang Launcher, IIRC?)

Currently there's a community workaround for the aforementioned issues ("packwiz-installer-bootstrap-wrapper") by teacon.org:

package org.teacon.codenamed;

import java.io.File;
import java.lang.instrument.Instrumentation;

public class JavaAgentEntryPoint {

  public static void premain(String args, Instrumentation inst) {
    String javaExecutable = System.getProperty("java.home") + System.getProperty("java.home") + "bin" + File.separator;
    if (System.getProperty("os.name").startsWith("Win")) {
      javaExecutable = javaExecutable + "javaw.exe";
    } else {
      javaExecutable = javaExecutable + "java";
    } 
    try {
      Process p = (new ProcessBuilder(new String[] { javaExecutable, "-jar", "packwiz-installer-bootstrap.jar", "--bootstrap-main-jar", "packwiz-installer.jar", "--bootstrap-no-update", args })).inheritIO().start();
      int exitCode;
      if ((exitCode = p.waitFor()) != 0)
        throw new RuntimeException("Process exit status is " + exitCode + ", meaning an error has occurred."); 
    } catch (Exception e) {
      throw new RuntimeException("Game failed to launch, see console output for details.", e);
    } 
  }
}

Use an alternate download mirror for the bootstrapper

Github's free Rest API hits a limit and breaks the entire installer application when the auto updater can't reach the latest release.

Perhaps an alternate service could be used instead for the updater to pull from.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.