demonnic / muddler

A build tool for Mudlet package developers
MIT License
40 stars 12 forks source link

Preserve the original filename of the files in resources/ #5

Closed johnnymo87 closed 4 years ago

johnnymo87 commented 4 years ago

Hi @demonnic we've been playing around with muddler for our mudlet integration, and we use it to stitch back together the assets and the .xml files for scripts, triggers, etc into one, unified .mpackage. We do this by putting all these files in the resources/ directory before running muddler. The resulting .mpackage works as intended -- it loads all these assets and .xml files into a fresh mudlet as packages. However, there's one thing we don't like about the .mpackage -- the packages it installs are all named the same thing: packageName-versionNumber. I believe that this may be caused by this code.

Would you be open to a change where the original filenames are preserved?

demonnic commented 4 years ago

That line actually copies the .xml that it would normally make if you were using it to assemble the full package from json and .lua files and not just collect other .xmls to load up. This is how mudlet loads packages that contain multiple .xml files, it names each one as the overarching name of the package. If I were moving each .xml file in place with the same name I would just be overwriting them. If you open up the .mpackage file using 7zip or similiar (it's just a .zip file) you'll see your files in there with the same names I imagine.

In short, this should be a Mudlet change, it's not really on Muddler's end. That being said, it might be best if there were some indication of what package installed each entry, IE if the .mpackage included a trading.xml and foraging.xml , then having entries like OverallPackageName_InternalXMLfilename for each internal xml file