App update framework for Windows, inspired by Sparkle for OS X
C++ CMake C Pascal
Latest commit da4bd8c Sep 15, 2016 @nickdademo nickdademo committed with Handle connection closed events during download (#114)
There are cases where INTERNET_STATUS_CONNECTION_CLOSED events could
be triggered during a download transfer (due to network connectivity
issues).

Previously, WinSparkle would erroneously report the download as
successfully completed due to the fact that InternetReadFileEx would
return TRUE with 'dwBufferLength' set to zero after the connection
closed event.

This commit aims to gracefully handle these events (by throwing an
exception) via doing the following:
- When an INTERNET_STATUS_CONNECTION_CLOSED event is triggered,
immediately close the connection handle so that future API calls will
return failure (e.g. ERROR_INVALID_HANDLE).
- If the download has completed (indicated by 'dwBufferLength' being
zero), check that the connection handle is still valid. This detects
the case when the INTERNET_STATUS_CONNECTION_CLOSED event is received
and the connection handle is closed during a call to
InternetReadFileEx.
Permalink
Failed to load latest commit information.
3rdparty Silence C4535 warning in wxWidgets Jul 14, 2016
artwork Update stock icon with higher-resolution sizes Nov 18, 2014
cmake Add disclaimed about lack of support for CMake Dec 4, 2015
examples Retroactively add VS2015 support to bakefiles May 24, 2016
include Increase version to 0.5.2, update NEWS Jun 22, 2016
pascal Added bindings for Pascal (FPC, Delphi). May 12, 2016
src Handle connection closed events during download (#114) Sep 15, 2016
translations Update translations from Crowdin (added he, ar) Apr 11, 2016
.gitattributes Include gettext tools nuget package May 15, 2015
.gitignore Added bindings for Pascal (FPC, Delphi). May 12, 2016
.gitmodules Change expat dependency into submodule May 24, 2016
AUTHORS Fix maintainer email address Feb 5, 2016
COPYING Update copyright years Jan 22, 2016
NEWS Increase version to 0.5.2, update NEWS Jun 22, 2016
README.md Update compiler support info in README.md May 6, 2016
WinSparkle-2010.sln Fix .gitattributes syntax & normalize line endings. Oct 23, 2013
WinSparkle-2010.vcxproj Change expat dependency into submodule May 24, 2016
WinSparkle-2010.vcxproj.filters Compile MO translations into the DLL May 15, 2015
WinSparkle-2012.sln Fix .gitattributes syntax & normalize line endings. Oct 23, 2013
WinSparkle-2012.vcxproj Change expat dependency into submodule May 24, 2016
WinSparkle-2012.vcxproj.filters Compile MO translations into the DLL May 15, 2015
WinSparkle-2013.sln Move packages.config to make it work with VS2015 Apr 21, 2016
WinSparkle-2013.vcxproj Change expat dependency into submodule May 24, 2016
WinSparkle-2013.vcxproj.filters Compile MO translations into the DLL May 15, 2015
WinSparkle-2015.sln Move packages.config to make it work with VS2015 Apr 21, 2016
WinSparkle-2015.vcxproj Don't share $(IntDir) between projects Jul 14, 2016
WinSparkle-2015.vcxproj.filters Add projects for MSVS 2015. Oct 11, 2015
WinSparkle.Targets Update Gettext.Tools to 0.19.8.1 Jul 9, 2016
WinSparkle.bkl Change expat dependency into submodule May 24, 2016
WinSparkle.sln Fix .gitattributes syntax & normalize line endings. Oct 23, 2013
WinSparkle.vcproj Change expat dependency into submodule May 24, 2016
distrib.makefile Use git-archive-all to package source tarball Mar 13, 2016
packages.config Update Gettext.Tools to 0.19.8.1 Jul 9, 2016

README.md

Build status Crowdin

About

WinSparkle is a plug-and-forget software update library for Windows applications. It is heavily inspired by the Sparkle framework for OS X written by Andy Matuschak and others, to the point of sharing the same updates format (appcasts) and having very similar user interface.

See https://winsparkle.org for more information about WinSparkle.

Documentation: wiki and the winsparkle.h header.

Using prebuilt binaries

The easiest way to use WinSparkle is to download the prebuilt WinSparkle.dll binary. It doesn't have any extra dependencies (not even msvcr*.dll) and is compatible with all Windows compilers.

Building from sources

If you prefer to build WinSparkle yourself, you can do so. You'll have to compile from a git checkout; some of the dependencies are included as git submodules.

Check the sources out and initialize the submodules:

$ git clone git://github.com/vslavik/winsparkle.git
$ cd winsparkle
$ git submodule init
$ git submodule update

To compile the library, just open WinSparkle.sln (or the one corresponding to your compiler version) solution and build it.

At the moment, projects for Visual C++ (2008 and up) are provided, so you'll need that (Express/Community edition suffices). In principle, there's nothing in the code preventing it from being compiled by other compilers.

There are also unsupported CMake build files in the cmake directory.

Where can I get some examples?

Download the sources archive and have a look at the examples/ folder.

Using latest development versions

If you want to stay at the bleeding edge and use the latest, not yet released, version of WinSparkle, you can get its sources from public repository. WinSparkle uses git and and the sources are hosted on GitHub at https://github.com/vslavik/winsparkle

WinSparkle uses submodules for some dependencies, so you have to initialize them after checking the tree out:

$ git clone git://github.com/vslavik/winsparkle.git
$ cd winsparkle
$ git submodule init
$ git submodule update

Then compile WinSparkle as described above; no extra steps are required.