Page 1 of 1

Script to zip your mod using info.json

Posted: Sun Apr 30, 2017 6:59 pm
by Pandemoneus
I was tired of changing the folder name and zipping it to upload it to the Factorio mod portal after I had made changes to my mod, so I made a little python script:

https://github.com/Pandemoneus/ZipMod/b ... /ZipMod.py

Put it into your mod folder and run the script from there. (python ZipMod.py)
The script looks at your info.json, creates the necessary file structure for mods and then zips it.
You will find the zip-file in the same directory as the script.

Feel free to modify/adapt the script.

Re: Script to zip your mod

Posted: Wed May 03, 2017 7:58 pm
by Narc
That's awesome! I had the same problem, but I fixed it with make.

Re: Script to zip your mod

Posted: Wed May 03, 2017 8:20 pm
by sparr
Narc wrote:That's awesome! I had the same problem, but I fixed it with make.
Thanks for reminding me of this. Did you ever update it to handle the "new" (0.13?) requirements for info.json?

Re: Script to zip your mod

Posted: Wed May 03, 2017 8:26 pm
by Narc
sparr wrote:
Narc wrote:That's awesome! I had the same problem, but I fixed it with make.
Thanks for reminding me of this. Did you ever update it to handle the "new" (0.13?) requirements for info.json?
What's there to update? I just used the current Makefile to build EvoGUI v0.4.202, but it hasn't functionally changed since forever. I can't imagine what change might be needed.

Re: Script to zip your mod

Posted: Wed May 03, 2017 8:32 pm
by sparr
I think I'm thinking of when they added factorio_version as mandatory in info.json?

Re: Script to zip your mod

Posted: Wed May 03, 2017 8:36 pm
by Narc
sparr wrote:I think I'm thinking of when they added factorio_version as mandatory in info.json?
The info.json is your own. All the makefile does is replace a few tags with things like the mod name or version.

Re: Script to zip your mod

Posted: Thu May 04, 2017 12:39 pm
by Pandemoneus
Enhanced the script a bit to also include file pattern definitions from your .gitignore file, as per suggestion (https://github.com/Pandemoneus/Biter-Spire/issues/2)