Fix calculation of spritesheet hashes to use relative paths
Summary:
When a user generates sprites, we hash all the inputs to figure out what we actually need to regenerate. Normally (i.e., on my machine), this works fine.
However, part of the hash is the absolute path of all the input images, so my machine hashes in /Users/epriestley/phabricator/path/to/sprite.png, and then @chad regens them and gets a hash of /Users/notchad/phabricator/path/to/sprite.png instead, or whatever. The hash comes out different so every manifest and sheet gets regenerated.
Instead, hash the relative path -- e.g., path/to/sprite.png. This keeps the path the same across machines and means that only sprites which have actually changed will regenerate.
See also next diff.
Test Plan:
- Before this patch: generated sprites in phabricator/, then moved phabricator/ to phabricator2/ and regenerated. Incorrectly, all sprites were regenerated. - After this patch: generated sprites in phabricator/, then moved phabricator/ to phabricator2/ and regenerated. Nothing was regenerated.
Reviewers: chad, btrahan
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5964