You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stage2/lw: Abstract away from always installing Essential
(Note that all changes talked about in this commit only apply to
EssentialLoader for LaunchWrapper. Not to EssentialLoader for
ModLauncher or Fabric, those continue operating as they used to.)
This commit rewrites most of Essential Loader for LaunchWrapper to no
longer always implicitly install Essential and instead provide a more
general dependency loading/negotiating mechanism (similar to
fabric-loader's Jar-in-Jar mechanism) useable by third-party mods via a
`essential.mod.json` metadata file.
To this end, this commit practically removes stage1 on LaunchWrapper
because stage1 necessarily interacts with Essential infra to
download/update stage2 and with the Essential mod to ask the user for
permission to do so.
Instead stage2 now has a self-update mechanism where if it finds a more
recent stage2 in any of the discovered jars (e.g. the downloaded
Essential jar), it will re-launch into that newer stage2.
Additionally, this also removes the concept of a pinned stage2 and
instead always includes the stage2 jar inside the stage1 jar. This also
allows using the existing stage1 update mechansim (dropping a file in a
specific location) to permanently update stage1 and therefore stage2 to
a new version on next boot (e.g. if we want to update the Downloading
gui).
To support Essential's auto-updating feature (as well as similar
third-party ones), in addition to plain inner jars, the
`essenital.mod.json` metadata file also supports loading a specific
class from the jar to generate additional dependency specifications.
This class can then e.g. download a newer version of the mod and emit a
dependency specification which points at it.
0 commit comments