mirror of
https://github.com/visualboyadvance-m/dependencies
synced 2025-10-05 15:52:38 +02:00
Remove winsparkle-static submod, use bin release.
Getting winsparkle-static to work for us is going to be complicated, because it also initializes a wxWidgets app. For the time replace it with a binary release of winsparkle, we will package the dll as a resource. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
||||
[submodule "winsparkle-static"]
|
||||
path = winsparkle-static
|
||||
url = https://github.com/visualboyadvance-m/winsparkle-static.git
|
||||
|
12
WinSparkle-0.6.0/AUTHORS
Normal file
12
WinSparkle-0.6.0/AUTHORS
Normal file
@@ -0,0 +1,12 @@
|
||||
Maintainer:
|
||||
|
||||
Vaclav Slavik <vaclav@slavik.io>
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Kohan Ikin <syneryder@namesuppressed.com>
|
||||
Christian L. Jacobsen <christian@concurrency.cc>
|
||||
Littleboy <littleboy@users.sourceforge.net>
|
||||
Vasco Veloso
|
||||
Jonas Emanuel Mueller <zanoi@zanoi.net>
|
25
WinSparkle-0.6.0/COPYING
Normal file
25
WinSparkle-0.6.0/COPYING
Normal file
@@ -0,0 +1,25 @@
|
||||
Copyright (c) 2009-2018 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
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
|
||||
|
||||
This product includes software developed by the OpenSSL Project
|
||||
for use in the OpenSSL Toolkit (http://www.openssl.org/).
|
21
WinSparkle-0.6.0/COPYING.expat
Normal file
21
WinSparkle-0.6.0/COPYING.expat
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
|
||||
Copyright (c) 2001-2017 Expat maintainers
|
||||
|
||||
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 the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
121
WinSparkle-0.6.0/NEWS
Normal file
121
WinSparkle-0.6.0/NEWS
Normal file
@@ -0,0 +1,121 @@
|
||||
|
||||
Version 0.6.0
|
||||
-------------
|
||||
|
||||
- Added support for validating DSA signatures.
|
||||
- Fixes to window placement.
|
||||
- Fixed regression in win_sparkle_check_update_without_ui() not checking
|
||||
immediately.
|
||||
|
||||
|
||||
Version 0.5.7
|
||||
-------------
|
||||
|
||||
- Fixed issue with downloads from servers without keep-alive support.
|
||||
|
||||
|
||||
Version 0.5.6
|
||||
-------------
|
||||
|
||||
- Includes security fixes for Expat XML parser (CVE-2017-11742).
|
||||
|
||||
|
||||
Version 0.5.5
|
||||
-------------
|
||||
|
||||
- Fixed regression in initial update checking introduced in 0.5.4.
|
||||
|
||||
|
||||
Version 0.5.4
|
||||
-------------
|
||||
|
||||
- Updates are now checked in background periodically even in applications that
|
||||
are running for a long time.
|
||||
- HTTP caching is now disabled more aggressively.
|
||||
- Fixed handling of downloads from URLs with query parameters.
|
||||
- Includes security fixes for Expat XML parser.
|
||||
|
||||
|
||||
Version 0.5.3
|
||||
-------------
|
||||
|
||||
- Downloads are now cancellable.
|
||||
- Fixed an issue with parsing some appcasts (#123).
|
||||
- Verify UpdateTempDir's validity before deleting it.
|
||||
|
||||
|
||||
Version 0.5.2
|
||||
-------------
|
||||
|
||||
- Includes security fixes for Expat XML parser.
|
||||
|
||||
|
||||
Version 0.5.1
|
||||
-------------
|
||||
|
||||
- Includes fix for the CVE-2016-0718 vulnerability in Expat XML parser.
|
||||
- Added Pascal bindings.
|
||||
- Fixes for RTL languages, added Arabic and Hebrew translations.
|
||||
|
||||
|
||||
Version 0.5
|
||||
-----------
|
||||
|
||||
- Added translations support (32 languages are included at the moment).
|
||||
- HiDPI support.
|
||||
- Updated Expat XML parser to 2.1.1 (security fixes, CVE-2015-1283).
|
||||
- Support for minimumSystemVersion and for specifying 32/64 versions.
|
||||
- Added win_sparkle_check_update_with_ui_and_install() for forcefully
|
||||
installing available updates.
|
||||
- Added more callbacks for various events during updating.
|
||||
- Misc cosmetic fixes.
|
||||
|
||||
|
||||
Version 0.4
|
||||
-----------
|
||||
|
||||
- Added API for gracefully shutting down the host app.
|
||||
- Added the ability to disable automatic checks.
|
||||
- Added the ability to change the update checks interval.
|
||||
- Added x64 support.
|
||||
- Added Visual Studio 201x project files.
|
||||
- Release notes included in appcast's <description> element are now recognized.
|
||||
- Added support for build numbers and shortVersionString.
|
||||
- Added support for sparkle:os="windows" attribute on appcast items.
|
||||
- Fixed appcasts over HTTPS.
|
||||
- Use application icon in the UI.
|
||||
- In-app downloads.
|
||||
|
||||
|
||||
Version 0.3
|
||||
-----------
|
||||
|
||||
- Added win_sparkle_set_app_details() for setting app metadata from code,
|
||||
as an alternative to their extraction from resources.
|
||||
- It is no longer necessary to call win_sparkle_set_appcast_url(), the
|
||||
feed can be specified in FeedURL resource with type set to APPCAST.
|
||||
- Added win_sparkle_set_registry_path().
|
||||
|
||||
|
||||
Version 0.2
|
||||
-----------
|
||||
|
||||
- Display error if update info couldn't be retrieved while manually checking
|
||||
for updates.
|
||||
- WinSparkle window is now resizable only when showing release notes.
|
||||
- Bypass cache and proxies in manual checks.
|
||||
|
||||
|
||||
Version 0.1.1
|
||||
-------------
|
||||
|
||||
- Fixed Sparkle namespace in appcast parser; it now looks for the correct
|
||||
`http://www.andymatuschak.org/xml-namespaces/sparkle` value. Appcasts
|
||||
using the incorrect `http://www.andymatuschak.org/xml-namespaces`
|
||||
URI must be updated.
|
||||
|
||||
|
||||
Version 0.1
|
||||
-----------
|
||||
|
||||
- Initial release.
|
113
WinSparkle-0.6.0/README.md
Normal file
113
WinSparkle-0.6.0/README.md
Normal file
@@ -0,0 +1,113 @@
|
||||
[](https://ci.appveyor.com/project/vslavik/winsparkle)
|
||||
[](https://crowdin.com/project/winsparkle)
|
||||
|
||||
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](https://github.com/vslavik/winsparkle/wiki) and
|
||||
the [winsparkle.h header](https://github.com/vslavik/winsparkle/blob/master/include/winsparkle.h).
|
||||
|
||||
|
||||
Using prebuilt binaries
|
||||
-------------------------
|
||||
|
||||
The easiest way to use WinSparkle is to download the prebuilt `WinSparkle.dll`
|
||||
binary.
|
||||
|
||||
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.
|
||||
|
||||
DSA signatures
|
||||
---------------
|
||||
|
||||
WinSparkle uses exactly same mechanism for signing and signature verification
|
||||
as [Sparkle Project](https://sparkle-project.org/documentation/#dsa-signatures)
|
||||
does. Its tools and verification methods are fully compatible.
|
||||
|
||||
You may use any compatible way to sign your update.
|
||||
To achieve this, you need to sign SHA1 (in binary form) of your update file
|
||||
with DSA private key, using SHA1 digest.
|
||||
|
||||
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,
|
||||
using [tools provided by Sparkle project](https://github.com/sparkle-project/Sparkle/tree/master/bin).
|
||||
|
||||
#### Prepare signing with DSA signatures:
|
||||
|
||||
- First, make yourself a pair of DSA keys. This needs to be done only once.
|
||||
WinSparkle includes a tool to help: `bin\generate_keys.bat`
|
||||
- Back up your private key (dsa_priv.pem) and keep it safe. You don’t want
|
||||
anyone else getting it, and if you lose it, you may not be able to issue any
|
||||
new updates.
|
||||
- Add your public key (dsa_pub.pem) to your project either as Windows resource,
|
||||
or any other suitable way and provide it using WinSparkle API.
|
||||
|
||||
#### Sign your update
|
||||
|
||||
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
|
||||
of `enclosure` node of your appcast file.
|
||||
Alternatively `sparkle:dsaSignature` can be a child node of `enclosure`.
|
||||
|
||||
|
||||
Where can I get some examples?
|
||||
--------------------------------
|
||||
|
||||
Download the sources archive and have a look at the
|
||||
[examples/](https://github.com/vslavik/winsparkle/tree/master/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.
|
||||
|
||||
[OpenSSL source]: https://www.openssl.org/source/
|
||||
[OpenSSL binaries]: https://wiki.openssl.org/index.php/Binaries
|
BIN
WinSparkle-0.6.0/Release/WinSparkle.dll
Normal file
BIN
WinSparkle-0.6.0/Release/WinSparkle.dll
Normal file
Binary file not shown.
BIN
WinSparkle-0.6.0/Release/WinSparkle.lib
Normal file
BIN
WinSparkle-0.6.0/Release/WinSparkle.lib
Normal file
Binary file not shown.
BIN
WinSparkle-0.6.0/Release/WinSparkle.pdb
Normal file
BIN
WinSparkle-0.6.0/Release/WinSparkle.pdb
Normal file
Binary file not shown.
30
WinSparkle-0.6.0/bin/generate_keys.bat
Normal file
30
WinSparkle-0.6.0/bin/generate_keys.bat
Normal file
@@ -0,0 +1,30 @@
|
||||
@echo off
|
||||
|
||||
FOR %%i IN ("dsaparam.pem" "dsa_priv.pem" "dsa_pub.pem") DO (
|
||||
if exist %%i (
|
||||
echo There's already a %%i here! Move it aside or be more careful!
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
openssl dsaparam 4096 > dsaparam.pem
|
||||
|
||||
openssl gendsa dsaparam.pem -out dsa_priv.pem
|
||||
del /F /Q dsaparam.pem
|
||||
openssl dsa -in dsa_priv.pem -pubout -out dsa_pub.pem
|
||||
|
||||
FOR %%i IN ("dsa_priv.pem" "dsa_pub.pem") DO (
|
||||
if not exist %%i (
|
||||
echo Failed to create %%i!
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
echo[
|
||||
echo Generated two files:
|
||||
echo dsa_priv.pem: your private key. Keep it secret and don't share it!
|
||||
echo dsa_pub.pem: public counterpart to include in youe app.
|
||||
|
||||
echo BACK UP YOUR PRIVATE KEY AND KEEP IT SAFE!
|
||||
echo If you lose it, your users will be unable to upgrade!
|
||||
echo[
|
11
WinSparkle-0.6.0/bin/sign_update.bat
Normal file
11
WinSparkle-0.6.0/bin/sign_update.bat
Normal file
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
|
||||
set argC=0
|
||||
for %%i in (%*) do set /A argC+=1
|
||||
|
||||
if not "%argC%"=="2" (
|
||||
echo Usage: %0 update_file private_key
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
openssl dgst -sha1 -binary < "%~1" | openssl dgst -sha1 -sign "%~2" | openssl enc -base64
|
64
WinSparkle-0.6.0/include/winsparkle-version.h
Normal file
64
WinSparkle-0.6.0/include/winsparkle-version.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* This file is part of WinSparkle (https://winsparkle.org)
|
||||
*
|
||||
* Copyright (C) 2009-2018 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 the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _winsparkle_version_h_
|
||||
#define _winsparkle_version_h_
|
||||
|
||||
/*--------------------------------------------------------------------------*
|
||||
Version information
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
#define WIN_SPARKLE_VERSION_MAJOR 0
|
||||
#define WIN_SPARKLE_VERSION_MINOR 6
|
||||
#define WIN_SPARKLE_VERSION_MICRO 0
|
||||
|
||||
/**
|
||||
Checks if WinSparkle version is at least @a major.@a minor.@a micro.
|
||||
*/
|
||||
#define WIN_SPARKLE_CHECK_VERSION(major, minor, micro) \
|
||||
( \
|
||||
WIN_SPARKLE_VERSION_MAJOR > (major) \
|
||||
|| \
|
||||
(WIN_SPARKLE_VERSION_MAJOR == (major) && \
|
||||
WIN_SPARKLE_VERSION_MINOR >= (minor)) \
|
||||
|| \
|
||||
(WIN_SPARKLE_VERSION_MAJOR == (major) && \
|
||||
WIN_SPARKLE_VERSION_MINOR == (minor) && \
|
||||
WIN_SPARKLE_VERSION_MICRO >= (micro)) \
|
||||
)
|
||||
|
||||
#define _WIN_SPARKLE_MAKE_STR(x) #x
|
||||
#define _WIN_SPARKLE_MAKE_VERSION_STR(a,b,c) \
|
||||
_WIN_SPARKLE_MAKE_STR(a) "." _WIN_SPARKLE_MAKE_STR(b) "." _WIN_SPARKLE_MAKE_STR(c)
|
||||
|
||||
/**
|
||||
WinSparkle version as a string in the form of e.g. "0.1.3".
|
||||
*/
|
||||
#define WIN_SPARKLE_VERSION_STRING \
|
||||
_WIN_SPARKLE_MAKE_VERSION_STR(WIN_SPARKLE_VERSION_MAJOR, \
|
||||
WIN_SPARKLE_VERSION_MINOR, \
|
||||
WIN_SPARKLE_VERSION_MICRO)
|
||||
|
||||
#endif // _winsparkle_version_h_
|
480
WinSparkle-0.6.0/include/winsparkle.h
Normal file
480
WinSparkle-0.6.0/include/winsparkle.h
Normal file
@@ -0,0 +1,480 @@
|
||||
/*
|
||||
* This file is part of WinSparkle (https://winsparkle.org)
|
||||
*
|
||||
* Copyright (C) 2009-2018 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 the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _winsparkle_h_
|
||||
#define _winsparkle_h_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "winsparkle-version.h"
|
||||
|
||||
#if !defined(BUILDING_WIN_SPARKLE) && defined(_MSC_VER)
|
||||
#pragma comment(lib, "WinSparkle.lib")
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_WIN_SPARKLE
|
||||
#define WIN_SPARKLE_API __declspec(dllexport)
|
||||
#else
|
||||
#define WIN_SPARKLE_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------*
|
||||
Initialization and shutdown
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@name Initialization functions
|
||||
*/
|
||||
//@{
|
||||
|
||||
/**
|
||||
Starts WinSparkle.
|
||||
|
||||
If WinSparkle is configured to check for updates on startup, proceeds
|
||||
to perform the check. You should only call this function when your app
|
||||
is initialized and shows its main window.
|
||||
|
||||
@note This call doesn't block and returns almost immediately. If an
|
||||
update is available, the respective UI is shown later from a separate
|
||||
thread.
|
||||
|
||||
@see win_sparkle_cleanup()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_init();
|
||||
|
||||
/**
|
||||
Cleans up after WinSparkle.
|
||||
|
||||
Should be called by the app when it's shutting down. Cancels any
|
||||
pending Sparkle operations and shuts down its helper threads.
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_cleanup();
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*
|
||||
Language settings
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@name Language settings
|
||||
|
||||
These functions set user interface language. They must be called before
|
||||
win_sparkle_init() to have any effect. If none of them is called, WinSparkle
|
||||
detects the UI language automatically.
|
||||
*/
|
||||
//@{
|
||||
|
||||
/**
|
||||
Sets UI language from its ISO code.
|
||||
|
||||
This function must be called before win_sparkle_init().
|
||||
|
||||
@param lang ISO 639 language code with an optional ISO 3116 country
|
||||
code, e.g. "fr", "pt-PT", "pt-BR" or "pt_BR", as used
|
||||
e.g. by ::GetThreadPreferredUILanguages() too.
|
||||
|
||||
@since 0.5
|
||||
|
||||
@see win_sparkle_set_langid()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_lang(const char *lang);
|
||||
|
||||
/**
|
||||
Sets UI language from its Win32 LANGID code.
|
||||
|
||||
This function must be called before win_sparkle_init().
|
||||
|
||||
@param lang Language code (LANGID) as created by the MAKELANGID macro
|
||||
or returned by e.g. ::GetThreadUILanguage()
|
||||
|
||||
@since 0.5
|
||||
|
||||
@see win_sparkle_set_lang()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_langid(unsigned short lang);
|
||||
|
||||
//@}
|
||||
|
||||
/*--------------------------------------------------------------------------*
|
||||
Configuration
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@name Configuration functions
|
||||
|
||||
Functions for setting up WinSparkle.
|
||||
|
||||
All functions in this category can only be called @em before the first
|
||||
call to win_sparkle_init()!
|
||||
|
||||
Typically, the application would configure WinSparkle on startup and then
|
||||
call win_sparkle_init(), all from its main thread.
|
||||
*/
|
||||
//@{
|
||||
|
||||
/**
|
||||
Sets URL for the app's appcast.
|
||||
|
||||
Only http and https schemes are supported.
|
||||
|
||||
If this function isn't called by the app, the URL is obtained from
|
||||
Windows resource named "FeedURL" of type "APPCAST".
|
||||
|
||||
@param url URL of the appcast.
|
||||
|
||||
@note Always use HTTPS feeds, do not use unencrypted HTTP! This is
|
||||
necessary to prevent both leaking user information and preventing
|
||||
various MITM attacks.
|
||||
|
||||
@note See https://github.com/vslavik/winsparkle/wiki/Appcast-Feeds for
|
||||
more information about appcast feeds.
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_appcast_url(const char *url);
|
||||
|
||||
/**
|
||||
Sets DSA public key.
|
||||
|
||||
Only PEM format is supported.
|
||||
|
||||
Public key will be used to verify DSA signature of the update file.
|
||||
PEM data will be set only if it contains valid DSA public key.
|
||||
|
||||
If this function isn't called by the app, public key is obtained from
|
||||
Windows resource named "DSAPub" of type "DSAPEM".
|
||||
|
||||
@param dsa_pub_pem DSA public key in PEM format.
|
||||
|
||||
@return 1 if valid DSA public key provided, 0 otherwise.
|
||||
|
||||
@since 0.6.0
|
||||
*/
|
||||
WIN_SPARKLE_API int __cdecl win_sparkle_set_dsa_pub_pem(const char *dsa_pub_pem);
|
||||
|
||||
/**
|
||||
Sets application metadata.
|
||||
|
||||
Normally, these are taken from VERSIONINFO/StringFileInfo resources,
|
||||
but if your application doesn't use them for some reason, using this
|
||||
function is an alternative.
|
||||
|
||||
@param company_name Company name of the vendor.
|
||||
@param app_name Application name. This is both shown to the user
|
||||
and used in HTTP User-Agent header.
|
||||
@param app_version Version of the app, as string (e.g. "1.2" or "1.2rc1").
|
||||
|
||||
@note @a company_name and @a app_name are used to determine the location
|
||||
of WinSparkle settings in registry.
|
||||
(HKCU\Software\<company_name>\<app_name>\WinSparkle is used.)
|
||||
|
||||
@since 0.3
|
||||
|
||||
@see win_sparkle_set_app_build_version();
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_app_details(const wchar_t *company_name,
|
||||
const wchar_t *app_name,
|
||||
const wchar_t *app_version);
|
||||
|
||||
/**
|
||||
Sets application build version number.
|
||||
|
||||
This is the internal version number that is not normally shown to the user.
|
||||
It can be used for finer granularity that official release versions, e.g. for
|
||||
interim builds.
|
||||
|
||||
If this function is called, then the provided *build* number is used for comparing
|
||||
versions; it is compared to the "version" attribute in the appcast and corresponds
|
||||
to OS X Sparkle's CFBundleVersion handling. If used, then the appcast must
|
||||
also contain the "shortVersionString" attribute with human-readable display
|
||||
version string. The version passed to win_sparkle_set_app_details()
|
||||
corresponds to this and is used for display.
|
||||
|
||||
@since 0.4
|
||||
|
||||
@see win_sparkle_set_app_details()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_app_build_version(const wchar_t *build);
|
||||
|
||||
/**
|
||||
Set the registry path where settings will be stored.
|
||||
|
||||
Normally, these are stored in
|
||||
"HKCU\Software\<company_name>\<app_name>\WinSparkle"
|
||||
but if your application needs to store the data elsewhere for
|
||||
some reason, using this function is an alternative.
|
||||
|
||||
Note that @a path is relative to HKCU/HKLM root and the root is not part
|
||||
of it. For example:
|
||||
@code
|
||||
win_sparkle_set_registry_path("Software\\My App\\Updates");
|
||||
@endcode
|
||||
|
||||
@param path Registry path where settings will be stored.
|
||||
|
||||
@since 0.3
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_registry_path(const char *path);
|
||||
|
||||
/**
|
||||
Sets whether updates are checked automatically or only through a manual call.
|
||||
|
||||
If disabled, win_sparkle_check_update_with_ui() must be used explicitly.
|
||||
|
||||
@param state 1 to have updates checked automatically, 0 otherwise
|
||||
|
||||
@since 0.4
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_automatic_check_for_updates(int state);
|
||||
|
||||
/**
|
||||
Gets the automatic update checking state
|
||||
|
||||
@return 1 if updates are set to be checked automatically, 0 otherwise
|
||||
|
||||
@note Defaults to 0 when not yet configured (as happens on first start).
|
||||
|
||||
@since 0.4
|
||||
*/
|
||||
WIN_SPARKLE_API int __cdecl win_sparkle_get_automatic_check_for_updates();
|
||||
|
||||
/**
|
||||
Sets the automatic update interval.
|
||||
|
||||
@param interval The interval in seconds between checks for updates.
|
||||
The minimum update interval is 3600 seconds (1 hour).
|
||||
|
||||
@since 0.4
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_update_check_interval(int interval);
|
||||
|
||||
/**
|
||||
Gets the automatic update interval in seconds.
|
||||
|
||||
Default value is one day.
|
||||
|
||||
@since 0.4
|
||||
*/
|
||||
WIN_SPARKLE_API int __cdecl win_sparkle_get_update_check_interval();
|
||||
|
||||
/**
|
||||
Gets the time for the last update check.
|
||||
|
||||
Default value is -1, indicating that the update check has never run.
|
||||
|
||||
@since 0.4
|
||||
*/
|
||||
WIN_SPARKLE_API time_t __cdecl win_sparkle_get_last_check_time();
|
||||
|
||||
/// Callback type for win_sparkle_error_callback()
|
||||
typedef void (__cdecl *win_sparkle_error_callback_t)();
|
||||
|
||||
/**
|
||||
Set callback to be called when the updater encounters an error.
|
||||
|
||||
@since 0.5
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_error_callback(win_sparkle_error_callback_t callback);
|
||||
|
||||
/// Callback type for win_sparkle_can_shutdown_callback()
|
||||
typedef int (__cdecl *win_sparkle_can_shutdown_callback_t)();
|
||||
|
||||
/**
|
||||
Set callback for querying the application if it can be closed.
|
||||
|
||||
This callback will be called to ask the host if it's ready to shut down,
|
||||
before attempting to launch the installer. The callback returns TRUE if
|
||||
the host application can be safely shut down or FALSE if not (e.g. because
|
||||
the user has unsaved documents).
|
||||
|
||||
@note There's no guarantee about the thread from which the callback is called,
|
||||
except that it certainly *won't* be called from the app's main thread.
|
||||
Make sure the callback is thread-safe.
|
||||
|
||||
@since 0.4
|
||||
|
||||
@see win_sparkle_set_shutdown_request_callback()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_can_shutdown_callback(win_sparkle_can_shutdown_callback_t callback);
|
||||
|
||||
|
||||
/// Callback type for win_sparkle_shutdown_request_callback()
|
||||
typedef void (__cdecl *win_sparkle_shutdown_request_callback_t)();
|
||||
|
||||
/**
|
||||
Set callback for shutting down the application.
|
||||
|
||||
This callback will be called to ask the host to shut down immediately after
|
||||
launching the installer. Its implementation should gracefully terminate the
|
||||
application.
|
||||
|
||||
It will only be called if the call to the callback set with
|
||||
win_sparkle_set_can_shutdown_callback() returns TRUE.
|
||||
|
||||
@note There's no guarantee about the thread from which the callback is called,
|
||||
except that it certainly *won't* be called from the app's main thread.
|
||||
Make sure the callback is thread-safe.
|
||||
|
||||
@since 0.4
|
||||
|
||||
@see win_sparkle_set_can_shutdown_callback()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_shutdown_request_callback(win_sparkle_shutdown_request_callback_t);
|
||||
|
||||
/// Callback type for win_sparkle_did_find_update_callback()
|
||||
typedef void(__cdecl *win_sparkle_did_find_update_callback_t)();
|
||||
|
||||
/**
|
||||
Set callback to be called when the updater did find an update.
|
||||
|
||||
This is useful in combination with
|
||||
win_sparkle_check_update_with_ui_and_install() as it allows you to perform
|
||||
some action after WinSparkle checks for updates.
|
||||
|
||||
@since 0.5
|
||||
|
||||
@see win_sparkle_did_not_find_update_callback()
|
||||
@see win_sparkle_check_update_with_ui_and_install()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_did_find_update_callback(win_sparkle_did_find_update_callback_t callback);
|
||||
|
||||
/// Callback type for win_sparkle_did_not_find_update_callback()
|
||||
typedef void (__cdecl *win_sparkle_did_not_find_update_callback_t)();
|
||||
|
||||
/**
|
||||
Set callback to be called when the updater did not find an update.
|
||||
|
||||
This is useful in combination with
|
||||
win_sparkle_check_update_with_ui_and_install() as it allows you to perform
|
||||
some action after WinSparkle checks for updates.
|
||||
|
||||
@since 0.5
|
||||
|
||||
@see win_sparkle_did_find_update_callback()
|
||||
@see win_sparkle_check_update_with_ui_and_install()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_did_not_find_update_callback(win_sparkle_did_not_find_update_callback_t callback);
|
||||
|
||||
/// Callback type for win_sparkle_update_cancelled_callback()
|
||||
typedef void (__cdecl *win_sparkle_update_cancelled_callback_t)();
|
||||
|
||||
/**
|
||||
Set callback to be called when the user cancels a download.
|
||||
|
||||
This is useful in combination with
|
||||
win_sparkle_check_update_with_ui_and_install() as it allows you to perform
|
||||
some action when the installation is interrupted.
|
||||
|
||||
@since 0.5
|
||||
|
||||
@see win_sparkle_check_update_with_ui_and_install()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_set_update_cancelled_callback(win_sparkle_update_cancelled_callback_t callback);
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*
|
||||
Manual usage
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@name Manually using WinSparkle
|
||||
*/
|
||||
//@{
|
||||
|
||||
/**
|
||||
Checks if an update is available, showing progress UI to the user.
|
||||
|
||||
Normally, WinSparkle checks for updates on startup and only shows its UI
|
||||
when it finds an update. If the application disables this behavior, it
|
||||
can hook this function to "Check for updates..." menu item.
|
||||
|
||||
When called, background thread is started to check for updates. A small
|
||||
window is shown to let the user know the progress. If no update is found,
|
||||
the user is told so. If there is an update, the usual "update available"
|
||||
window is shown.
|
||||
|
||||
This function returns immediately.
|
||||
|
||||
@note Because this function is intended for manual, user-initiated checks
|
||||
for updates, it ignores "Skip this version" even if the user checked
|
||||
it previously.
|
||||
|
||||
@see win_sparkle_check_update_without_ui()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_check_update_with_ui();
|
||||
|
||||
/**
|
||||
Checks if an update is available, showing progress UI to the user and
|
||||
immediately installing the update if one is available.
|
||||
|
||||
This is useful for the case when users should almost always use the
|
||||
newest version of your software. When called, WinSparkle will check for
|
||||
updates showing a progress UI to the user. If an update is found the update
|
||||
prompt will be skipped and the update will be installed immediately.
|
||||
|
||||
If your application expects to do something after checking for updates you
|
||||
may wish to use win_sparkle_set_did_not_find_update_callback() and
|
||||
win_sparkle_set_update_cancelled_callback().
|
||||
|
||||
@since 0.5
|
||||
|
||||
@see win_sparkle_set_did_find_update_callback()
|
||||
@see win_sparkle_set_update_cancelled_callback()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_check_update_with_ui_and_install();
|
||||
|
||||
/**
|
||||
Checks if an update is available.
|
||||
|
||||
No progress UI is shown to the user when checking. If an update is
|
||||
available, the usual "update available" window is shown; this function
|
||||
is *not* completely UI-less.
|
||||
|
||||
Use with caution, it usually makes more sense to use the automatic update
|
||||
checks on interval option or manual check with visible UI.
|
||||
|
||||
This function returns immediately.
|
||||
|
||||
@note This function respects "Skip this version" choice by the user.
|
||||
|
||||
@since 0.4
|
||||
|
||||
@see win_sparkle_check_update_with_ui()
|
||||
*/
|
||||
WIN_SPARKLE_API void __cdecl win_sparkle_check_update_without_ui();
|
||||
|
||||
//@}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _winsparkle_h_
|
BIN
WinSparkle-0.6.0/x64/Release/WinSparkle.dll
Normal file
BIN
WinSparkle-0.6.0/x64/Release/WinSparkle.dll
Normal file
Binary file not shown.
BIN
WinSparkle-0.6.0/x64/Release/WinSparkle.lib
Normal file
BIN
WinSparkle-0.6.0/x64/Release/WinSparkle.lib
Normal file
Binary file not shown.
BIN
WinSparkle-0.6.0/x64/Release/WinSparkle.pdb
Normal file
BIN
WinSparkle-0.6.0/x64/Release/WinSparkle.pdb
Normal file
Binary file not shown.
Submodule winsparkle-static deleted from 254ccc4187
Reference in New Issue
Block a user