#56 Wildcards don't work


Even using the latest pngcrush_1_7_61_w64.exe and pngcrush_1_7_61_w32.exe wildcards (*.png) don't work.

This is really disappointing as it seems this was fixed way back but is now broken again:

Version 1.5.7 (built with libpng-1.2.0)

  Added setargv.obj to Makefile.msc to expand wildcards, e.g., *.png


  • Glenn Randers-Pehrson

    • status: open --> accepted
    • Group: -->
  • Glenn Randers-Pehrson

    • assigned_to: Glenn Randers-Pehrson
  • Glenn Randers-Pehrson

    Makefile.msc disappeared between 1.5.10 and 1.6.0. I am currently using this to generate the Windows-32 and -64 exe files on a Ubuntu platform:

    glenn.rp> /opt/mingw32/bin/i686-w64-mingw32-gcc --version
    i686-w64-mingw32-gcc (GCC) 4.8.0 20121015 (experimental)

    glenn.rp> /opt/mingw32/bin/i686-w64-mingw32-gcc -DZ_SOLO *.c -o

    glenn.rp> /opt/mingw64/bin/x86_64-w64-mingw32-gcc --version
    x86_64-w64-mingw32-gcc (GCC) 4.8.0 20121031 (experimental)

    glenn.rp> /opt/mingw64/bin/x86_64-w64-mingw32-gcc -DZ_SOLO *.c -o

  • Robert

    Robert - 2013-06-14

    I don't know what any of that means, and it still doesn't work with 1.7.62! Are you saying that Makefile.msc is gone for good, and so is wildcard support?

    Last edit: Robert 2013-06-14
  • Glenn Randers-Pehrson

    Please try 1.7.63. I added a "_dowildcard=-1;" flag.

  • Robert

    Robert - 2013-06-16

    No go unfortunately even with 1.7.63:

    Could not find file: *.png
  • Glenn Randers-Pehrson

    One possibly useful suggestion (I have no way of testing it; it doesn't seem to be on my old XP machine) is to use "Powershell".

  • Robert

    Robert - 2013-06-17

    So you have an XP machine? Do your recent changes work for you on XP?

    PowerShell can be installed on XP too, and if push comes to shove I can write a batch file that will feed PNGs to pngcrush one by one. Ideally of course scripting shouldn't be required, and not everyone will be capable of the same.

    Perhaps to prevent confusion the program's help text should be modified to remove all references to the "files" parameter, replacing it with "file1 file2 ... FileN"?

    Thanks for all your efforts to solve this. I've just discovered that optipng is a fork of pngcrush, and it seems to have no problems with wildcards. I'll move to that for now and check back here after a few months to see if there have been any positive developments.

    Last edit: Robert 2013-06-17
  • Glenn Randers-Pehrson

    I installed Powershell version 1 on the XP (about a 5 to 10-minute job). Unfortunately it behaves the same as the regular commandline processor; *.png does not get expanded. BTW optipng contains the same "_dowildcard=1" hack that I tried, so I guess the distributed executable was not built with the MinGW cross compiler.

    • Robert

      Robert - 2013-06-17

      BTW optipng contains the same "_dowildcard=1" hack that I tried, so I guess the distributed executable was not built with the MinGW cross compiler.

      That's promising. So it's just a problem with the compiler you're using? Perhaps it's possible to figure out (or ask) what they're using, and switch to that if feasible?

  • Glenn Randers-Pehrson

    It's not that promising, if you look at the recent optipng bug report that claims their Windows executable contains malware (I have no idea if the report is true or not!) I used to accept pngcrush Windows executables from random people but am not willing to do that any more (I haven't actually refused any since 1.7.15 but the volunteers disappeared). So for now, people who need to have wildcard support on Windows will need to build their own, until a working cross-compiler comes on the scene.

  • Glenn Randers-Pehrson

    I verified that the optipng executable does expand *.png, whether by the Powershell or by the regular commandline interpreter.


Log in to post a comment.