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
46 stars 21 forks source link

Handle "This mod is excluded from the CurseForge API and must be downloaded manually." #50

Open ChristopherHaws opened 1 year ago

ChristopherHaws commented 1 year ago

My modpack includes an optional mod that is hosted on curseforge and is set to disallow automatic downloads which results in an exception. It would be great if the packwiz installer would gracefully handle this exception, parse it for the links, and show a message and buttons to the user. The message could say something along the lines of: This mod is excluded from the CurseForge API and must be downloaded manually. with buttons for Open Download Page, Copy File Path, and Open Mods Directory.

java.lang.Exception: This mod is excluded from the CurseForge API and must be downloaded manually.
Please go to https://www.curseforge.com/minecraft/mc-mods/better-tips/files/4012378 and save this file to D:\games\Minecraft\PrismLauncher\instances\CraftersMC\.minecraft\mods\BetterTags-1.19.2-Fabric-v1.1.jar
    at link.infra.packwiz.installer.metadata.curseforge.CurseForgeSourcerKt.resolveCfMetadata(SourceFile:137)
    at link.infra.packwiz.installer.UpdateManager.validateAndResolve(SourceFile:449)
    at link.infra.packwiz.installer.UpdateManager.processIndex(SourceFile:360)
    at link.infra.packwiz.installer.UpdateManager.start(SourceFile:174)
    at link.infra.packwiz.installer.UpdateManager.<init>(SourceFile:43)
    at link.infra.packwiz.installer.Main.startup(SourceFile:109)
    at link.infra.packwiz.installer.Main.<init>(SourceFile:150)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
    at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
    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)
Ampflower commented 1 year ago

It does seem notable that the prompt for this is also unskippable, as Structory, It Takes a Pillage and alike would not let the user continue with ignoring the errors.

ChristopherHaws commented 1 year ago

@KJP12 True. If the mod is marked as optional it should let the user skip, but if the mod is marked as required, it should disallow skipping.

Ampflower commented 1 year ago

Yeah. I think the only potential work around for this would be to have the end user manually install the mods that has 3rd party launchers disabled, similar to how the main Packwiz program does it for making full modpacks.

ChristopherHaws commented 1 year ago

Yup, that is why I am recommending adding buttons which will aid the user to download the file manually and put it in the correct location. Another option would be to allow the user to click and drag the jar file into the packwiz window and let packwiz put it in the right spot.

comp500 commented 1 year ago

I actually have a WIP webview program that can be used to automate this process, allowing packwiz-installer to handle the download but still showing the CurseForge ads. I'm not sure why I didn't push this to GitHub yet, I should have time in the next few weeks to do so.

comp500 commented 1 year ago

The webview will be an optional download fwiw (particularly since I can't necessarily guarantee it'll be available for the platform you are running packwiz-installer on), I do intend to also implement a fallback with similar UI to what OP suggests.

fuzzyweapon commented 1 year ago

This issue is exactly what I'm dealing with right now. Is there a reason we just aren't rendering the urls in the error text? At the very least that would bump up the usability here while waiting on webview and this other UI. Forgive me, I'm not entirely familiar with the gui side of the tech stack.

masonbesmer commented 8 months ago

The webview will be an optional download fwiw (particularly since I can't necessarily guarantee it'll be available for the platform you are running packwiz-installer on), I do intend to also implement a fallback with similar UI to what OP suggests.

Are there any updates on this yet? I am trying to set up a server on linux using the minecraft docker but if it prompts for manual downloads/uploads I don't think it would be worth it.

masonbesmer commented 8 months ago

The webview will be an optional download fwiw (particularly since I can't necessarily guarantee it'll be available for the platform you are running packwiz-installer on), I do intend to also implement a fallback with similar UI to what OP suggests.

Are there any updates on this yet? I am trying to set up a server on linux using the minecraft docker but if it prompts for manual downloads/uploads I don't think it would be worth it.

@comp500