PngOptimizer on github

I finally put PngOptimizer source code on an online repository (github) instead of using a zip/tar.gz archive.

What motivated me is that today I have finally been able to upgrade my Windows 7 to Windows 10. My previous attempts were always leading to errors, and none of the solution I could gather would work. What I did was wiping my Windows hard drive partition, reinstall a fresh Windows 7, avoid installing any software or tweaking the hard drive (for example by installing grub). And voilą, the Windows 10 update procedure worked.

So what is the relationship between Windows 10 and PngOptimizer? Well, PngOptimizer is built with Visual Studio, and using Visual Studio build files have always been a painful experience. One of the problems being that the file format keeps changing with mostly each new version of Visual Studio.

I already ported PngOptimizer build files from Visual Studio 6.0 to Visual Studio 2005, then to Visual Studio 2010, then to Visual Studio 2012 and then I was blocked because Windows 8 was required. So now I will be able to... sigh... port them again to the latest version of Visual Studio (I guess it is 2015).

Meanwhile on Linux I use Makefiles. Makefiles are painful to work with too but at least the file format is quite stable.

I had to prepare the source code for online access so the contents are not exactly what is currently proposed on the download page:

  • I updated the distribution scripts to avoid creating the source code archive as it makes no sense anymore.
  • I removed some Windows-only or experimental projects. I just kept PngOptimizer (the graphics tool) and PngOptimizerCL (the command line tool).
  • I updated several files and directory casing. Maybe it is because I spend most of my time on Linux now, I foster lower case. I used to use PascalCase a lot when I was mostly using Windows.
  • PngOptimizerCL executable file is now all lower case on Linux. I found that it is some kind of convention on Linux.
  • I build the Linux version with std=c++0x instead of std=c++11 for older compilers.

Unfortunately I could not save the commit history because PngOptimizer was using Mercurial. It was just easier to create a new git repository from scratch.

I used a new version number (2.4.3) to identify those small changes. The download page still propose an older version. I will probably update it after I convert the build files for the latest Visual Studio and be sure everything is all right.