Support Command Line Globbing of Input Files #1049

Closed
JosephMichels opened this Issue Apr 8, 2016 · 5 comments

Comments

Projects
None yet
3 participants

On Windows (I'm not sure about Linux/Mac) the CLI doesn't support something like *.ase.

If I execute the following command:

aseprite.exe -b *.ase --sheet-pack --sheet atlas-bestfit.png --list-tags --data atlas-bestfit.json

I will get an error saying: File not found: *.ase

This is probably a low priority issue, as it can be worked around easily, but it would be a nice feature to have.

Collaborator

raetiacorvus commented Apr 8, 2016

Power Shell should support globbing, could you try if it works with that? No problems with globbing on linux for me.

Yeah, I've looked into this a bit further and on Linux and Mac this is natively supported by the shell and the application doesn't have to do anything.

On windows it appears you need to link to setargv.obj to get it handled automatically. Source

I did try it on powershell and still got the error, so I'm not sure if it does it automatically either.

@dacap dacap added bug windows labels Apr 8, 2016

Owner

dacap commented Apr 8, 2016

Actually we are using WinMain, and GetCommandLineW in the Alleg4 back-end and CommandLineToArgvW in the Skia side. It looks like setargv.obj works for main() (and I suppose -ENTRY:"mainCRTStartup" linking flag). We could try to change the entry point to wmain() and linking to wsetargv.obj to fix this issue.

Collaborator

raetiacorvus commented Apr 8, 2016

@JosephMichels if you feel comfortable using a unix shell on windows, you could use something like MSYS2 as a workaround for now. Just tested globbing with aseprite and it seems to work without problems.

dacap added this to the v1.2 milestone Jun 5, 2016

dacap self-assigned this Jun 5, 2016

Owner

dacap commented Jun 5, 2016 edited

I'll try to get a look at this issue for v1.2 (as I'm refactoring the CLI processing).

Note for development: See CommandLineToArgvW function.

@dacap dacap modified the milestone: v1.1, v1.2 Jul 6, 2016

dacap added the critical label Jul 6, 2016

dacap closed this in 92084fe Jul 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment