packwiz / packwiz-installer

An installer for packwiz modpacks, with automatic auto-updating and optional mods! Works well with MultiMC and on servers.
https://packwiz.infra.link/
MIT License
51 stars 22 forks source link

Support file:// URIs #19

Closed ChloeDawn closed 2 years ago

ChloeDawn commented 2 years ago

It would be great to see support for local pack metadata in self-contained instances.

packwiz-installer-bootstrap.jar file://path/to/pack.toml packwiz-installer-bootstrap.jar file://pack.toml

comp500 commented 2 years ago

I think this is already supported? You might need an extra slash after file://, the syntax is a bit tricky.

ChloeDawn commented 2 years ago

packwiz-installer-bootstrap.jar file://packwiz/pack.toml

image packwiz-installer-bootstrap.jar file:///packwiz/pack.toml

image

Executed in a directory containing a subdirectory of packwiz which in turn contains pack.toml

comp500 commented 2 years ago

Ah, relative paths aren't supported; you need something like file:///C:/Users/... (or file:///home/user/... on Linux)

ChloeDawn commented 2 years ago

Ah, thanks! This fixes it:

@echo off
setlocal
set pack=%~dp0packwiz/pack.toml
set pack=%pack:\=/%
%~dp0\packwiz-installer-bootstrap.jar "file:///%pack%"