SKCraft / Launcher

🚀 Distribute your Minecraft modpacks with a custom launcher
Other
619 stars 433 forks source link

Automated Travis-CI building of modpacks #268

Open Tomoli75 opened 5 years ago

Tomoli75 commented 5 years ago

Can I have travis-ci use the command line tools to build from a github repo, into github releases to a webserver can download it and host it?

I can't figure out how to actually result with the upload folder containing all modpack, having been built automatically?

Tomoli75 commented 5 years ago

I've gotten far enough, but am struggling with the github file size limit. Can there be a setting to make .url.txt files work without the .jar equivalent?

sk89q commented 5 years ago

Well you could possibly put a dummy jar although it results in an incorrect checksum which means the launcher may redownload the files in I think only some rare cases

On Wed, Nov 28, 2018, 10:05 AM Tomoli75 <notifications@github.com wrote:

I've gotten far enough, but am struggling with the github file size limit. Can there be a setting to make .url.txt files work without the .jar equivalent?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SKCraft/Launcher/issues/268#issuecomment-442546556, or mute the thread https://github.com/notifications/unsubscribe-auth/AACYJY94zlrRuLSqjCtyFPLdh6ulz0iSks5uztBwgaJpZM4Yxn_p .

Tomoli75 commented 5 years ago

Is it possible to stop the checksum test or re-download the files after they're downloaded from the url.txt file?

Tomoli75 commented 5 years ago

This is the last step I need to make a fully automated modpack distribution system, from a github repository!

ghost commented 5 years ago

Maybe you need to delete the check-sum code from the launcher src. I'm facing the same problem. I just want to have a list of urls to download jars from. Otherwise there's no sense in having such a file (.url.txt) if you already have the jar in there IMO.

Tomoli75 commented 5 years ago

I can most likely do that myself, i'd just need some help with java

Routhinator commented 5 years ago

The easiest change to the existing code is likely to have a .json format supported in addition to the exisiting .txt format (so older launchers are not broken) and have the json support a URL and checksum hash inside. The issue is the launcher currently uses the existing jar to generate a checksum, however all it really needs is a checksum to be defined.

Tomoli75 commented 5 years ago

I just need to disable the checksums in the launcher, maybe make .url.txt files work but then .dl.txt files just download it and hope for the best?

Routhinator commented 5 years ago

If you don't mind worrying about users having you troubleshoot possibly odd issues because of a bad downloaded jar, then sure.

sk89q commented 5 years ago

The launcher consists of the modpack builder and the client-side launcher and thankfully the client-side part is really, really dumb. It downloads whatever URLs are in the manifest file, and that's it. It doesn't even know about mods or Forge. You could use it to launch other (Java-based) games if you fed it the right manifest file, lol

...which is awesome because you can implement 80% of the features that you want without touching the launcher. All that .url.txt happens in the modpack builder, and it all happens in one function: https://github.com/SKCraft/Launcher/blob/403f2848b82d127691db529c2a3109373faaf5b7/launcher-builder/src/main/java/com/skcraft/launcher/builder/ClientFileCollector.java#L56

That function is called for every file in a directory. That is the only function you need to change to add support for a new type of file (like blahblah.alt.txt), or searching a mod repo for a file, or anything, as long as you emit a URL (entry.setLocation(URL HERE)).

edit: if you need me to add a new type of way to just specify a URL, I can probably add that pretty quickly. I do need to figure out how to generate a checksum that doesn't involve redownloading the file every time you build the pack

ghost commented 5 years ago

So as I'm interested in the features listed above, too, I want to do some sort of feature request to @sk89q . I'd like to have json support (maybe with google gson for parsing?) with support for the url and like two mirrors if the given url is down and a user defined checksum (doing it automatically would be better, but I don't know how without redownloading the jar as you said before). Of course this json file should work independently e.g. it shouldn't need a jar file like the .url.txt thing.

jkroepke commented 5 years ago

I made a proof of concept since I want this feature too.

Give some feedback here: https://github.com/SKCraft/Launcher/pull/273