46 lines
2.6 KiB
Markdown
46 lines
2.6 KiB
Markdown
## KLAXXL
|
|
Mung modpacks for maximum minification!
|
|
Tested against a modified version of MeatballCraft (12.2 pack), but should theoretically work for almost any modpack
|
|
on any version. I've probably overlooked some things though.
|
|
|
|
### How it works
|
|
Given a folder, it steps through every file in the folder and mungs it, using one of the methods in `mungFile` as
|
|
appropriate for the file's extension.
|
|
- ZIP and JAR files are recursively unzipped, so the files inside can be recompressed. They are also coerced to STORE
|
|
compression, to allow whatever outer compressor you use on the whole pack (`zstd --ultra -22` is recommended) the best scenario.
|
|
- Pictures get (almost) losslessly compressed with oxipng and ECT
|
|
- Audio files are crushed to `-qscale:a 1` with ffmpeg, then run through optivorbis
|
|
- Class files are scanned for fingerprint checks, which get deleted with ASM. These would otherwise block the pack from
|
|
running, as many files get altered, changing their fingerprints.
|
|
- Key files are deleted and signatures are removed from `MANIFEST.MF` files, for the same reason.
|
|
|
|
This approach should work on any modpacks... with a few caveats. Mods that do their own fingerprinting instead of relying on
|
|
Forge's would have to be manually patched or skipped. Modpacks containing *any* non-free assets likely cannot be distributed
|
|
publically post-munging, as modifying and conveying said non-free asset is probably illegal.
|
|
|
|
### Dependencies
|
|
A *nix-ish OS probably (only tested on Linux, others probably work tho) and the following commands on your PATH:
|
|
- ect
|
|
- ffmpeg, ffprobe
|
|
- jar (I have some concerns if you're missing this)
|
|
- optivorbis
|
|
- oxipng
|
|
|
|
### TODO:
|
|
- Add pack200 compression (must be supported by the installer)
|
|
- Add JAR merging (helps pack200 as a side-effect)
|
|
- Integrate [PackSquash](https://github.com/ComunidadAylas/PackSquash)
|
|
- Protect against zip bombs
|
|
- Integrate Zumegradle compression, or whatever gets spun off into Taugradle
|
|
|
|
### Licensing
|
|
KLAXXL is copyrighted by ah-OOG-ah, 2024, and distributed under the LGPLv3 only. License
|
|
headers must be applied to new files and updated to existing ones as per [the template](/license-header-template.txt).
|
|
The LGPLv3 by itself is in [LICENSE](/LICENSE), but the GPLv3 and LGPLv3 are also in [COPYING](/COPYING) and
|
|
[COPYING.LESSER](/COPYING.LESSER) as per FSF convention.
|
|
|
|
Some third-party code was used in this project. See [3RD-PARTY-LICENSES](/3RD-PARTY-LICENCES) for details.
|
|
|
|
All four of these files should be kept in sync with the ones in [src/main/resources](/src/main/resources). I would just
|
|
symlink them, but that may cause issues for people checking out the repository on different platforms.
|