Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification for Windows compatibility #1

Open
athomic1 opened this issue Oct 24, 2016 · 1 comment
Open

Modification for Windows compatibility #1

athomic1 opened this issue Oct 24, 2016 · 1 comment

Comments

@athomic1
Copy link

Run according to documentation, was failing with the following error:

gifsicle.exe:/tmp/a.gif: No such file or directory

Located two references to /tmp/a.gif in gif-to-sprite.js (lines 31/32):

child_process.execSync(gifsicle + ' --colors=255 --output /tmp/a.gif ' + fileName);
var gifsicleCmd = util.format('%s --unoptimize --resize %s --output - /tmp/a.gif',

After replacing '/tmp' with '%temp%', program ran and successfully converted files.

While this "fix" allows the program to run in a Windows command shell, it most likely breaks it for other systems. Would suggest detecting OS and setting a tmp path variable accordingly, to be referenced in place of the hard-coded path in the lines above. If I get time, I may try this myself, but as I've never used node.js before, it's likely to take awhile. Someone else might have better luck hitting on a solution sooner.

@kristofferjalen
Copy link

+1 I also ran into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants