Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Travis-CI building of modpacks #268

Open
Tomoli75 opened this issue Nov 24, 2018 · 12 comments
Open

Automated Travis-CI building of modpacks #268

Tomoli75 opened this issue Nov 24, 2018 · 12 comments

Comments

@Tomoli75
Copy link

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
Copy link
Author

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
Copy link
Member

sk89q commented Nov 28, 2018 via email

@Tomoli75
Copy link
Author

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

@Tomoli75
Copy link
Author

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

@ghost
Copy link

ghost commented Nov 30, 2018

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
Copy link
Author

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

@Routhinator
Copy link

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
Copy link
Author

Tomoli75 commented Dec 1, 2018

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
Copy link

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

@sk89q
Copy link
Member

sk89q commented Dec 2, 2018

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:

protected void onFile(File file, String relPath) throws IOException {

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
Copy link

ghost commented Dec 3, 2018

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
Copy link
Contributor

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

Give some feedback here: #273

@hedgehog1029 hedgehog1029 linked a pull request Dec 24, 2020 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants