Skip to content

Commit

Permalink
chore: [windows] Upgrade to WinSparkle-0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lijy91 committed Mar 30, 2024
1 parent 873da29 commit d1c1cce
Show file tree
Hide file tree
Showing 29 changed files with 24 additions and 17 deletions.
1 change: 1 addition & 0 deletions packages/auto_updater/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* feat: Convert to federated plugin
* feat: Add `UpdaterListener` to listen for update events
* chore: [windows] Upgrade to `WinSparkle-0.8.1`

## 0.1.7

Expand Down
4 changes: 2 additions & 2 deletions packages/auto_updater/bin/generate_keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Future<void> main(List<String> arguments) async {
'flutter',
'ephemeral',
'.plugin_symlinks',
'auto_updater',
'auto_updater_windows',
'windows',
'WinSparkle-0.8.0',
'WinSparkle-0.8.1',
'bin',
'generate_keys.bat',
],
Expand Down
4 changes: 2 additions & 2 deletions packages/auto_updater/bin/sign_update.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ SignUpdateResult signUpdate(List<String> args) {
'flutter',
'ephemeral',
'.plugin_symlinks',
'auto_updater',
'auto_updater_windows',
'windows',
'WinSparkle-0.8.0',
'WinSparkle-0.8.1',
'bin',
'sign_update.bat',
],
Expand Down
2 changes: 1 addition & 1 deletion packages/auto_updater/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: auto_updater_example
description: Demonstrates how to use the auto_updater plugin.
version: 1.1.0+2
version: 1.0.0+1
publish_to: "none"

environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ app_id: 1D7A5470-942F-4649-8B69-122888AB0BA5
display_name: auto_updater_example
publisher: LeanFlutter
publisher_url: https://github.com/leanflutter/auto_updater
locales:
- en
1 change: 0 additions & 1 deletion packages/auto_updater/lib/src/auto_updater.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class AutoUpdater {
final List<UpdaterListener> _listeners = [];

void _handleSparkleEvents(event) {
print(event);
UpdaterError? updaterError;
Appcast? appcast;
AppcastItem? appcastItem;
Expand Down
2 changes: 1 addition & 1 deletion packages/auto_updater_windows/windows/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ x86/
# but keep track of directories ending in .cache
!*.[Cc]ache/

!WinSparkle-0.8.0/x64
!WinSparkle-0.8.1/x64
2 changes: 1 addition & 1 deletion packages/auto_updater_windows/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cmake_policy(VERSION 3.14...3.25)
set(PLUGIN_NAME "auto_updater_windows_plugin")

# WinSparkle
set(WIN_SPARKLE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/WinSparkle-0.8.0")
set(WIN_SPARKLE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/WinSparkle-0.8.1")
set(WIN_SPARKLE_BINARIES "${WIN_SPARKLE_DIR}/x64/Release/WinSparkle.dll")
set(WIN_SPARKLE_LIBRARIES "${WIN_SPARKLE_DIR}/x64/Release/WinSparkle.lib")

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 0.8.1
-------------

- Fixed release notes not shown if <sparkle:releaseNotesLink> is malformed
and has whitespace around the URL.


Version 0.8.0
-------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,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
Expand Down Expand Up @@ -91,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`.

Expand All @@ -114,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
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define WIN_SPARKLE_VERSION_MAJOR 0
#define WIN_SPARKLE_VERSION_MINOR 8
#define WIN_SPARKLE_VERSION_MICRO 0
#define WIN_SPARKLE_VERSION_MICRO 1

/**
Checks if WinSparkle version is at least @a major.@a minor.@a micro.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion packages/auto_updater_windows/windows/auto_updater.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "WinSparkle-0.8.0/include/winsparkle.h"
#include "WinSparkle-0.8.1/include/winsparkle.h"

#include <flutter/event_channel.h>
#include <flutter/method_channel.h>
Expand Down Expand Up @@ -82,6 +82,7 @@ void AutoUpdater::CheckForUpdates() {

void AutoUpdater::CheckForUpdatesWithoutUI() {
win_sparkle_check_update_without_ui();
OnWinSparkleEvent("checking-for-update");
}

void AutoUpdater::SetScheduledCheckInterval(int interval) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ void AutoUpdaterWindowsPlugin::RegisterWithRegistrar(
});
auto event_channel =
std::make_unique<flutter::EventChannel<flutter::EncodableValue>>(
registrar->messenger(),
"dev.leanflutter.plugins/auto_updater_event",
registrar->messenger(), "dev.leanflutter.plugins/auto_updater_event",
&flutter::StandardMethodCodec::GetInstance());
auto streamHandler = std::make_unique<flutter::StreamHandlerFunctions<>>(
[plugin_pointer = plugin.get()](
Expand All @@ -39,8 +38,7 @@ void AutoUpdaterWindowsPlugin::RegisterWithRegistrar(
-> std::unique_ptr<flutter::StreamHandlerError<>> {
return plugin_pointer->OnListen(arguments, std::move(events));
},
[plugin_pointer = plugin.get()](const flutter::EncodableValue*
arguments)
[plugin_pointer = plugin.get()](const flutter::EncodableValue* arguments)
-> std::unique_ptr<flutter::StreamHandlerError<>> {
return plugin_pointer->OnCancel(arguments);
});
Expand Down

0 comments on commit d1c1cce

Please sign in to comment.