Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I'm a developer for a cross platform (Win, MacOS, Linux) open source C++ application. I would like to have the program occasionally check for the latest version from our web site.

Between the security, privacy, and cross platform network issues, I'd rather not roll our own solution. It seems like this is a common enough thing that there 'ought' to be a library/app which will do this. Unfortunately, the searches I've tried come up empty.

Ideally, the web app would track requests and process the logs into some nice reports (number of users, what version, what platform, frequency of use, maybe even geographical info from IP address, etc.). While appropriately respecting privacy, etc.

What pre-existing tools can help solve this problem?


I am looking for a reporting tool, not a dependency checker.

Our project has the challenge of keeping up with our users. Most do not join the mailing list. Our project has not been picked up by major distributions -- most of our users are Windows/MacOS anyway. When a new version comes out, we have no way of informing our users of its existence. Development is moving pretty fast, major features added every few months.

We would like to provide the user with a way to check for an updated version. While we're at it, we would like to use these requests for some simple & anonymous usage tracking (X users running version Y with Z frequency, etc.).

We do not need/want something that auto-updates or tracks dependencies on the system. We are not currently worried about update size -- when the user chooses to update, we expect them to download the complete latest version. We would like to keep this as simple as possible.

share|improve this question

closed as off-topic by gnat, durron597, Snowman, MichaelT, GlenH7 Aug 15 at 21:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, durron597, Snowman, MichaelT, GlenH7
If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to programmers. Please read the FAQ to help understand what kinds of questions work well on this site. This question will eventually get closed as not constructive, unless you edit it. Any question that asks "Any suggestions?" is really too broad to fit the site as every answer will be valid. Please edit this questionand try to focus on a SPECIFIC question. –  Walter Apr 22 '12 at 13:43
What are you looking for exactly? A reporting tool or a dependency management tool? –  Woot4Moo May 23 '12 at 17:40

1 Answer 1

General Thoughts

A basic solution could be very simple:

  • Use libcurl to download a JSON file describing the latest version.
  • Use JsonCpp to parse it and compare the latest version to what's currently installed.
  • Prompt the user, and if the user so chooses, point the user's web browser at the update URL. Grab your statistics as parameters to the update URL (e.g., http://www.example.com/update?fromversion=1.0.0) and from the browser's user-agent.

One caveat: I'm not sure that it's possible to say both "I want to be fully secure and respect people's privacy" and "I want a third-party solution to collect demographic information and to take care of all of this for me without my thinking about it."

Pre-Existing Solutions

Sparkle is the de facto standard, open source, check-for-updates library for OS X. The current version supports demographics that seem to be similar to what you're requesting.

WinSparkle is an "almost-port" of Sparkle to Windows.

The standard approach on Linux is for the distribution (Debian, Fedora, Ubuntu, etc.) to take care of packaging and updating applications. They also collect their own demographic info (such as Debian's Popularity Contest and Fedora's Statistics page). Since the preferred way of updating Linux software is distro-dependent (e.g., .rpm versus .deb), and since distros prefer to distribute updates themselves, it may be harder to find an open source check-for-updates library that you can incorporate into your app, and most package maintainers would want to disable any check-for-updates feature that does exist.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.