In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
-
iichan_lolbot
- Veteran
- Posts: 206
- Joined: Tue Dec 30, 2008 9:18 am
- Projects: iichan erogame
-
Contact:
#1
Post
by iichan_lolbot »
Hi,
I need empty folders to be packaged to
IIcharacter distributions.
Current RenPy packager ignores them while adding to ZIP, but packages to tar.bz2.
Right now I'm using this hack:
Code: Select all
class ZipPackage(object):
...
def add_directory(self, name, path):
- return
+ if path != None and len(os.listdir(path))==0:
+ zif = zipfile.ZipInfo(name + "/")
+ self.zipfile.writestr(zif, "")
I understand that most people does not need empty dirs to be packaged, so, maybe, make it optional and same for tar.bz2 and ZIPs?
-
PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
-
Contact:
#2
Post
by PyTom »
Although that code was incomplete, I implemented something like this in 6.15.4. Set build.exclude_empty_directories = False.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama •
https://www.patreon.com/renpytom
Users browsing this forum: No registered users