Update to WinSparkle 0.5.3.

Update our WinSparkle package to 0.5.3. This fixes a file deletion bug.
Note that WinSparkle now supports application shutdown callbacks, which
should let us fix bugs 9687 and 12989.

Bug: 13217
Change-Id: I4b5f325c6dc251ce167f7bd344bbf3ca5ad3fe14
Reviewed-on: https://code.wireshark.org/review/19230
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2016-12-08 09:41:47 -08:00
parent ce54bfe055
commit dd816a1218
3 changed files with 23 additions and 7 deletions

View File

@ -17,9 +17,15 @@ ENDIF (WINSPARKLE_INCLUDE_DIRS)
INCLUDE(FindWSWinLibs)
FindWSWinLibs("WinSparkle.*" "WINSPARKLE_HINTS")
FIND_PATH(WINSPARKLE_INCLUDE_DIR winsparkle.h HINTS "${WINSPARKLE_HINTS}" )
# The 64-bit wpcap.lib is under /x64/Release
set ( _RELEASE_SUBDIR "Release" )
if( WIN32 AND "${WIRESHARK_TARGET_PLATFORM}" STREQUAL "win64" )
set ( _RELEASE_SUBDIR "x64/Release" )
endif()
FIND_LIBRARY(WINSPARKLE_LIBRARY NAMES WinSparkle HINTS "${WINSPARKLE_HINTS}" )
FIND_PATH(WINSPARKLE_INCLUDE_DIR winsparkle.h HINTS "${WINSPARKLE_HINTS}/include" )
FIND_LIBRARY(WINSPARKLE_LIBRARY NAMES WinSparkle HINTS "${WINSPARKLE_HINTS}/${_RELEASE_SUBDIR}" )
# handle the QUIETLY and REQUIRED arguments and set WINSPARKLE_FOUND to TRUE if
# all listed variables are TRUE
@ -30,7 +36,7 @@ IF(WINSPARKLE_FOUND)
SET(WINSPARKLE_LIBRARIES ${WINSPARKLE_LIBRARY} )
SET(WINSPARKLE_INCLUDE_DIRS ${WINSPARKLE_INCLUDE_DIR} )
if (WIN32)
set ( WINSPARKLE_DLL_DIR "${WINSPARKLE_HINTS}"
set ( WINSPARKLE_DLL_DIR "${WINSPARKLE_HINTS}/${_RELEASE_SUBDIR}"
CACHE PATH "Path to the WinSparkle DLL"
)
file( GLOB _winsparkle_dll RELATIVE "${WINSPARKLE_DLL_DIR}"

View File

@ -99,8 +99,8 @@ Param(
# trouble instead of trying to catch exceptions everywhere.
$ErrorActionPreference = "Stop"
$Win64CurrentTag = "2016-11-29"
$Win32CurrentTag = "2016-11-29"
$Win64CurrentTag = "2016-12-12"
$Win32CurrentTag = "2016-12-12"
# Archive file / subdir.
$Win64Archives = @{
@ -121,7 +121,7 @@ $Win64Archives = @{
"snappy-1.1.3-win64ws.zip" = "";
"spandsp-0.0.6-win64ws.zip" = "";
"upx303w.zip" = "";
"WinSparkle-0.3-44-g2c8d9d3-win64ws.zip" = "";
"WinSparkle-0.5.3.zip" = "";
"WpdPack_4_1_2.zip" = "";
"zlib-1.2.8-ws.zip" = "";
}
@ -144,7 +144,7 @@ $Win32Archives = @{
"snappy-1.1.3-win32ws.zip" = "";
"spandsp-0.0.6-win32ws.zip" = "";
"upx303w.zip" = "";
"WinSparkle-0.3-44-g2c8d9d3-win32ws.zip" = "";
"WinSparkle-0.5.3.zip" = "";
"WpdPack_4_1_2.zip" = "";
"zlib-1.2.8-ws.zip" = "";
}
@ -202,6 +202,7 @@ $CleanupItems = @(
"AirPcap_Devpack_4_1_0_1622"
"GeoIP-1.*-win??ws"
"WinSparkle-0.3-44-g2c8d9d3-win??ws"
"WinSparkle-0.5.?"
"WpdPack"
"current-tag.txt"
)

View File

@ -94,10 +94,19 @@ void
software_update_init(void) {
const char *update_url = get_appcast_update_url(prefs.gui_update_channel);
/*
* According to the WinSparkle 0.5 documentation these must be called
* once, before win_sparkle_init. We can't update them dynamically when
* our preferences change.
*/
win_sparkle_set_registry_path("Software\\Wireshark\\WinSparkle Settings");
win_sparkle_set_appcast_url(update_url);
win_sparkle_set_automatic_check_for_updates(prefs.gui_update_enabled ? 1 : 0);
win_sparkle_set_update_check_interval(prefs.gui_update_interval);
/* Todo: Fix bugs 9687 and 12989.
* win_sparkle_set_can_shutdown_callback(...);
* win_sparkle_set_shutdown_request_callback(...);
*/
win_sparkle_init();
}