IsmAvatar / LateralGM

A free Game Maker source file editor
http://lateralgm.org/
Other
95 stars 25 forks source link

Modularize Project Backups #517

Closed RobertBColton closed 4 years ago

RobertBColton commented 4 years ago

This follows from c257080404a69df0135754dae13508e6a0e14e08 which fixed the backups mechanism for GMX. The current backup mechanism is not modular and it manually inspects the file extensions to determine what to do. For example, with GMX it looks for the GMX extension so that the backup mechanism operates on the directory rather than the project manifest.

Ideally this format-specific logic should be handled by the file writer or some other abstraction so that plugins, like ENIGMA, which add their own formats could integrate more nicely with the backups mechanism. While the backups mechanism does work correctly for EGM, it uses a .egm.gb1 file extension. That's not too big of a deal though since it distinguishes it from regular GameMaker backup files, which I've made directly readable in 880ba286deba3a110dc69d2b6b674f25a9293e6a through a custom file filter.

Regardless I don't even think it's possible for a plugin to add a directory-based format, like GMX, to LGM right now and also have it work correctly with the backup and autosave mechanisms. EGM only works because it happens to be a zipped up directory and a single file.