Update WinSparkle to 0.8.1

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover
2024-09-09 10:38:05 +00:00
parent e8ce758a98
commit 0a1cdd9c04
19 changed files with 729 additions and 554 deletions

Binary file not shown.

View File

@@ -1,4 +1,4 @@
Copyright (c) 2009-2018 Vaclav Slavik
Copyright (c) 2009-2023 Vaclav Slavik
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View File

@@ -1,3 +1,33 @@
Version 0.8.1
-------------
- Fixed release notes not shown if <sparkle:releaseNotesLink> is malformed
and has whitespace around the URL.
Version 0.8.0
-------------
- Added support for modern Edge/WebView2 browser for release notes.
- Added win_sparkle_set_update_dismissed_callback() and
win_sparkle_set_update_postponed_callback() callbacks.
- Added partiaul support for <sparkle:criticalUpdate> tag.
- Links in release notes now open in user's default browser as they should.
- Added support for Visual Studio 2019 and 2022.
- Added official NuGet package.
- Added support for ARM64 architecture.
- This version drops official support for Windows XP. It may still be possible
to target it with vs*_xp toolsets, but would probably require at least
disabling WebView2. Prebuilt binaries and NuGet package don't support XP.
Version 0.7.0
-------------
- Added support for providing custom HTTP headers when fetch appcast feeds.
- Added support for overriding WinSparkle config functions.
- Reduced size of WinSparkle.dll.
Version 0.6.0
-------------

View File

@@ -1,4 +1,3 @@
[![Build status](https://ci.appveyor.com/api/projects/status/acsuqjheafef29m1?svg=true)](https://ci.appveyor.com/project/vslavik/winsparkle)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/winsparkle/localized.png)](https://crowdin.com/project/winsparkle)
About
@@ -18,8 +17,21 @@ the [winsparkle.h header](https://github.com/vslavik/winsparkle/blob/master/incl
Using prebuilt binaries
-------------------------
The easiest way to use WinSparkle is to download the prebuilt `WinSparkle.dll`
binary.
The easiest way to use WinSparkle is to either download the prebuilt `WinSparkle.dll`
binary from releases or use the `WinSparkle` [NuGet package](https://www.nuget.org/packages/WinSparkle/).
Prebuilt binaries are available for x86, x64 and arm64 platforms.
Bindings
----------
WinSparkle has a C API that makes it easy to use from many modern languages in addition to C/C++. In addition to that, several bindings for popular languages exist:
* [How to use with C#/.NET](https://github.com/vslavik/winsparkle/wiki/Basic-Setup#managed-code--net--c-applications)
* [Python](https://pypi.org/project/pywinsparkle/)
* [Go](https://github.com/abemedia/go-winsparkle)
* [Pascal](https://github.com/vslavik/winsparkle/tree/master/pascal) binding bundled with WinSparkle
Building from sources
-----------------------
@@ -30,7 +42,7 @@ submodules.
Check the sources out and initialize the submodules:
$ git clone git://github.com/vslavik/winsparkle.git
$ git clone https://github.com/vslavik/winsparkle.git
$ cd winsparkle
$ git submodule init
$ git submodule update
@@ -38,7 +50,7 @@ Check the sources out and initialize the submodules:
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
At the moment, projects for Visual C++ (2010 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.
@@ -60,7 +72,7 @@ WinSparkle provides tools to generate keys and sign the update using OpenSSL.
You need `openssl.exe` available on Windows to use those tools (available as
[precompiled binary][OpenSSL binaries]).
Alternatively, you can generate keys and sing your updates even on macOS or Linux,
Alternatively, you can generate keys and sign your updates even on macOS or Linux,
using [tools provided by Sparkle project](https://github.com/sparkle-project/Sparkle/tree/master/bin).
#### Prepare signing with DSA signatures:
@@ -79,7 +91,7 @@ When your update is ready (e.g. `Updater.exe`), sign it and include signature
to your appcast file:
- Sign: `bin\sign_update.bat Updater.exe dsa_priv.pem`
- Add standard output of previos command as `sparkle:dsaSignature` attribute
- Add standard output of previous command as `sparkle:dsaSignature` attribute
of `enclosure` node of your appcast file.
Alternatively `sparkle:dsaSignature` can be a child node of `enclosure`.
@@ -102,7 +114,7 @@ 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
$ git clone https://github.com/vslavik/winsparkle.git
$ cd winsparkle
$ git submodule init
$ git submodule update

Binary file not shown.

View File

@@ -9,7 +9,7 @@ FOR %%i IN ("dsaparam.pem" "dsa_priv.pem" "dsa_pub.pem") DO (
openssl dsaparam 4096 > dsaparam.pem
openssl gendsa dsaparam.pem -out dsa_priv.pem
openssl gendsa -out dsa_priv.pem dsaparam.pem
del /F /Q dsaparam.pem
openssl dsa -in dsa_priv.pem -pubout -out dsa_pub.pem

View File

@@ -1,7 +1,7 @@
/*
* This file is part of WinSparkle (https://winsparkle.org)
*
* Copyright (C) 2009-2018 Vaclav Slavik
* Copyright (C) 2009-2023 Vaclav Slavik
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -31,8 +31,8 @@
*--------------------------------------------------------------------------*/
#define WIN_SPARKLE_VERSION_MAJOR 0
#define WIN_SPARKLE_VERSION_MINOR 6
#define WIN_SPARKLE_VERSION_MICRO 0
#define WIN_SPARKLE_VERSION_MINOR 8
#define WIN_SPARKLE_VERSION_MICRO 1
/**
Checks if WinSparkle version is at least @a major.@a minor.@a micro.

View File

@@ -1,7 +1,7 @@
/*
* This file is part of WinSparkle (https://winsparkle.org)
*
* Copyright (C) 2009-2018 Vaclav Slavik
* Copyright (C) 2009-2023 Vaclav Slavik
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -27,6 +27,7 @@
#define _winsparkle_h_
#include <stddef.h>
#include <time.h>
#include "winsparkle-version.h"
@@ -44,6 +45,12 @@ extern "C" {
#define WIN_SPARKLE_API __declspec(dllimport)
#endif
/// Return value for boolean functions to indicate unexpected error.
/// Only used by functions or callbacks that are explicitly documented as using it.
#define WINSPARKLE_RETURN_ERROR (-1)
/*--------------------------------------------------------------------------*
Initialization and shutdown
*--------------------------------------------------------------------------*/
@@ -222,6 +229,25 @@ WIN_SPARKLE_API void __cdecl win_sparkle_set_app_details(const wchar_t *company_
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_app_build_version(const wchar_t *build);
/**
Set custom HTTP header for appcast checks.
@since 0.7
@see win_sparkle_clear_http_headers()
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_http_header(const char *name, const char *value);
/**
Clears all custom HTTP headers previously added using
win_sparkle_set_http_header().
@since 0.7
@see win_sparkle_set_http_header()
*/
WIN_SPARKLE_API void __cdecl win_sparkle_clear_http_headers();
/**
Set the registry path where settings will be stored.
@@ -242,6 +268,42 @@ WIN_SPARKLE_API void __cdecl win_sparkle_set_app_build_version(const wchar_t *bu
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_registry_path(const char *path);
/// Type used to override WinSparkle configuration's read, write and delete functions
typedef struct win_sparkle_config_methods_tag {
/// Copy config value named @a name to the buffer pointed by @a buf, returns TRUE on success, FALSE on failure
int(__cdecl *config_read)(const char *name, wchar_t *buf, size_t len, void *user_data);
/// Write @a value as config value @a name 's new value
void(__cdecl *config_write)(const char *name, const wchar_t *value, void *user_data);
/// Delete config value named @a name
void(__cdecl *config_delete)(const char *name, void *user_data);
/// Arbitrary data which will be passed to the above functions, WinSparkle will not read or alter it.
void *user_data;
} win_sparkle_config_methods_t;
/**
Override WinSparkle's configuration read, write and delete functions.
By default, WinSparkle will read, write and delete configuration values by
interacting directly with Windows Registry.
If you want to manage configuration by yourself, or if you don't want let WinSparkle
write settings directly to the Windows Registry, you can provide your own functions
to read, write and delete configuration.
These functions needs to return TRUE on success, FALSE on failure.
If you passed NULL as a configuration action (read, write or delete)'s function pointer,
WinSparkle will use the default function for that action.
@param config_methods Your own configuration read, write and delete functions.
Pass NULL to let WinSparkle continue to use its default functions.
@note There's no guarantee about the thread from which these functions are called,
Make sure your functions are thread-safe.
@since 0.7
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_config_methods(win_sparkle_config_methods_t *config_methods);
/**
Sets whether updates are checked automatically or only through a manual call.
@@ -397,6 +459,77 @@ typedef void (__cdecl *win_sparkle_update_cancelled_callback_t)();
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_update_cancelled_callback(win_sparkle_update_cancelled_callback_t callback);
/// Callback type for win_sparkle_update_skipped_callback()
typedef void(__cdecl* win_sparkle_update_skipped_callback_t)();
/**
Set callback to be called when the user skips an update.
This is useful in combination with
win_sparkle_check_update_with_ui() or similar as it
allows you to perform some action when the update
is skipped.
@see win_sparkle_check_update_with_ui_and_install()
@since 0.8
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_update_skipped_callback(win_sparkle_update_skipped_callback_t callback);
/// Callback type for win_sparkle_update_postponed_callback()
typedef void(__cdecl* win_sparkle_update_postponed_callback_t)();
/**
Set callback to be called when the user postpones an update
( presses 'remind me later' button).
This is useful in combination with
win_sparkle_check_update_with_ui() or similar as it
allows you to perform some action when the download
is postponed.
@see win_sparkle_check_update_with_ui()
@since 0.8
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_update_postponed_callback(win_sparkle_update_postponed_callback_t callback);
/// Callback type for win_sparkle_update_dismissed_callback()
typedef void(__cdecl* win_sparkle_update_dismissed_callback_t)();
/**
Set callback to be called when the user dismisses
(closes) update dialog.
This is useful in combination with
win_sparkle_check_update_with_ui() or similar as it
allows you to perform some action when the update
dialog is closed.
@see win_sparkle_check_update_with_ui()
@since 0.8
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_update_dismissed_callback(win_sparkle_update_dismissed_callback_t callback);
/// Callback type for win_sparkle_user_run_installer_callback()
typedef int(__cdecl* win_sparkle_user_run_installer_callback_t)(const wchar_t *);
/**
Set callback to be called when the update payload is
downloaded and read to be executed.or handled in some
other manner.
The callback returns:
- 1 if the file was handled by the callback
- 0 if it was not, in which case WinSparkle default handling will take place
- WINSPARKLE_RETURN_ERROR in case of an error
@since 0.8
*/
WIN_SPARKLE_API void __cdecl win_sparkle_set_user_run_installer_callback(win_sparkle_user_run_installer_callback_t callback);
//@}

Binary file not shown.

Binary file not shown.