vslavik / winsparkle Goto Github PK
View Code? Open in Web Editor NEWApp update framework for Windows, inspired by Sparkle for macOS
Home Page: http://winsparkle.org
License: Other
App update framework for Windows, inspired by Sparkle for macOS
Home Page: http://winsparkle.org
License: Other
So, after looking at the issues opened for WinSparkle, does it provide complete silent mode? no ui what so ever? I can see that people talked about merging silent mode option, but I did not find any API which is completly UI-less.
So I like the library but ran into a few issues I want to list here:
When looking at https://github.com/vslavik/winsparkle/releases, Version 0.4 is the current release. However, it dates back to September 14. Since then there have been many bugfixes. Do you plan to pack a new release sometime soon?
Add capability to display UI in other languages.
I've followed wxwidgets Internationalization guide and got a internationalized version of winsparkle working but I had to mess around with wxwidgets setup.h and visual studio project files.
It compiles ok and displays the translated ui to the system language but I'm having trouble with text encoding.
I'm willing to implement this and submit it as a patch but because I don't have a deep understating of wxwidgets I need a few pointers as to what I need to enable in wxwidgets etc.
In using winsparkle with a qt application, I call win_sparkle_init() in the showEvent() of the main widget. But, winsparkle pops up behind my application. I am using Windows 8.1 x64 and Qt 5.3.2.
Hi.
I'm willing to prepare at least 2 releaseNotes for English and Japanese within single appcast xml.
From a certain sparkle documentation, at Localization section, it says xml:lang is useful for localization.
https://github.com/sparkle-project/Sparkle/wiki/Publishing-An-Update
If I tried that, the some releaseNotes URLs were concatenated into one URL.
Is there any chance to support xml:lang attribute that is seen in that documentation so that we can supply multilingual releaseNotes from single appcast xml?
Thanks for Winsparkle.
We integrated your framework with our app and it works well on all Windows 8 & 8.1 systems except a few users on Windows 7. All reports of this issue have been on Windows 7 systems. Every time they skip a minor update, on next launch it pops up dialog saying new update is available for same version.
Could this be an issue with appcast xml ?
I 'd download and build your example project show:
":error: LNK1104: cannot open file 'yacc.obj'"
my system: windows8.1+Qt 5.4
You mention in your docs that signing updates is not yet supported, but I didn't see this in the planned features list. So hereby I am requesting this feature.
Background: We are considering using Sparkle for ScummVM ( http://www.scummvm.org) on Mac OS X. It then would make a lot of sense to also use WinSparkle for our Windows port. But I would feel very uncomfortable about installing unsigned updates automatically this way. (Granted, we don't yet provide signatures for our regular downloads either, but this, too, is something that should change).
Hopefully this won't be too difficult to implement. Microsoft seems to provide an API for verifying crypto signatures (including DSA support), according to MSDN ( http://msdn.microsoft.com/en-us/library/aa387761%28v=VS.85%29.aspx)
I’d like my application to access my appcast and installers via HTTPS. I have several questions about the security of this approach. (For example, is the domain name on the SSL certificate checked to make sure it matches the domain being accessed? Are there any situations in which an HTTPS error would silently cause the connection to fall back to HTTP? How are invalid or questionable certificates handled?)
I get the impression that WinSparkle delegates all of its downloading activity to standard Windows functions. Is that right? Does WinSparkle deviate from the default settings for anything related to HTTPS?
I integrated WinSparkle into our application and it works great! Thank you for this great project.
Our application is marked as DPI aware and the WinSparkle dialogs work well on a high DPI screen. Just the release notes are displayed way too small.
The following code seems the fix this issue:
VARIANT zoomVariant;
VariantInit(&zoomVariant);
V_VT(&zoomVariant) = VT_I4;
V_I4(&zoomVariant) = PX(100);
m_webBrowser->ExecWB((OLECMDID)63 /*OLECMDID_OPTICAL_ZOOM*/,
OLECMDEXECOPT_DODEFAULT,
&zoomVariant,
NULL);
Just add it after the WebBrowser control is created in ui.cpp.
The only problem with this solution is that the release notes' HTML needs to be adjusted to work correctly. It doesn't seem to zoom text which specifies the font size in px.
I guess the correct solution would be to implement IDocHostUIHandler::GetHostInfo()
and return DOCHOSTUIFLAG_DPI_AWARE
flag. I tried to implement this but didn't get far since it has been a while since I did any COM programming... ;)
The code below in appcast.cpp, introduced in #14, crashes winsparkle (and thus my innocent application) when the appcast has no items yet.
// Search for first <item> which has "sparkle:os=windows" attribute.
// If none, use the first item.
std::vector<Appcast>::iterator it = std::find_if(ctxt.items.begin(), ctxt.items.end(), is_windows_item);
if (it == ctxt.items.end())
it = ctxt.items.begin();
*this = *it;
Hi @vslavik,
We need to strongly urge users into always using the latest version of our application. I'd like a function that will check for updates and install them if available. The UI should be present, and the main thread should be notified if the user cancels the download. I've implemented the functionality in sparkle (see sparkle-project/Sparkle#620) and I'd like to implement its counterpart in winsparkle.
How would you suggest I begin? Some possibilities include:
win_sparkle_check_and_install_with_ui()
UpdateChecker
subclass which calls a new static method on UI, such as UI::InstallUpdate()
.Thoughts?
If you have an item such as;
<item>
<enclosure sparkle:os="windows-x86" />
<enclosure sparkle:os="windows-x64" />
</item>
It will always overwrite the values with the last enclosure. It could store a list of these enclosures or maybe only store the first enclosure that is for the correct platform.
For example, if account is "你好". The path of the temp folder is "C:\Users"你好"\Local\Temp". Since the code use std::string instead of std::wstring to represent this value and pass it to non-unicode-aware API. It failed.
I am not sure why winsparke use those *A API instead of *W API.
Currently win_sparkle_check_update_without_ui
behaves the same as win_sparkle_check_update_with_ui
, because both functions use the ManualUpdateChecker class.
The following change in win_sparkle_check_update_without_ui
fixes the issue (tried to check this in, but did not have permission):
UpdateChecker *check = new UpdateChecker();
If I call win_sparkle_cleanup() before closing my application, an orphaned process stays in memory. If I don't call it, nothing seems to go wrong, and there is no orphaned process.
Do I really need to call cleanup()?
I have followed the instructions to download the source from Github along with the dependencies, but when I compile it I get this error:
1>\winsparkle\WinSparkle.targets(19,5): error MSB3073: The command "packages\Gettext.Tools.0.19.4\tools\msgfmt.exe -c -c -o "translations\bg.mo" translations\bg.po" exited with code 3.
Steps to reproduce:
In "Updates avaliable" window click "Install".
After download finishes, use "Enter" to click "Install" button instead of using mouse,
After you press "Enter" Winsparkle starts download again.
Here is the video of this bug http://www.youtube.com/watch?v=5ydRRwO221c&feature=youtu.be
When using WinSparkle on a dual monitor setup and the application is used on the second monitor, all WinSparkle dialogs appear centered in the main monitor rather than the parent application.
Another reason to make the hosting app's main window parent of WinSparkle's dialogs is focus handling: WinSparkle window should stay on top of the app and not be hidden behind it.
The only complication: determining app's main window correctly.
It would be nice to have silent update feature that don't ask user select update/not update. Just update anyway.
If I call win_sparkle_check_update_with_ui() manually I see a very wrong changelog:
Call it a second time and its correct:
appcast.xml is available at https://i10z.com/appcast.xml , also win_sparkle_check_update_without_ui() does not exhibit this behaviour.
The current GIT's WIN_SPARKLE_CHECK_VERSION is broken (missing bracket)
It's my code:
/* initialize WinSparkle as soon as the app itself is initialized, right
before entering the event loop: */
win_sparkle_set_appcast_url("http://googledrive.com/host/0B7uLD-nJke_ANlQ1Q1ZGODY3dmM/mytest.xml");
win_sparkle_init();
First start winsparkle Im use version="1.5.4 " to install Poedit, and second start Poedit I agree check automatically done.
I just add one line code in your example.
As far as I've seen, the latest release is v0.3 from 2011. Are there newer binaries around, or should I better compile it myself? If not, it might be useful to put some newer ones online.
Thanks, Max
Our updates are hosted on a password-protected web site, and rather than make users enter their username and password into the WinSparkle UI, I'd like to simply launch a web browser to the download page if a new version is detected.
It looks like neither WinSparkle nor Sparkle currently supports this?
Any thoughts on adding such a feature? E.g., if no <enclosure>
is present and a <link>
is present, then launch a browser to that link if the user clicks update. I can work on implementing it if you're open to the idea.
Would it be possible to add a NuGet package for WinSparkle?
The sources already use _()
to tag translatable strings and they are formed properly to be gettext-friendly; wxWidgets supports gettext catalogs. What's missing is mainly build system support.
The issue here is that WinSparkle shouldn't use individual PO files, but should package everything in self-contained WinSparkle.dll. wxWidgets now has support for this, so it's just a matter of enabling the support and automating PO->MO compilation and PO updates.
I can't seem to get miniumSystemVersion working with winsparkle. I'm trying to only allow updates for users on win7 or above.
<sparkle:minimumSystemVersion>6.1</sparkle:minimumSystemVersion>
Works for Mac's Sparkle, but not for WinSparkle.
I'm running into a weird error when trying to use the CanShutdownCallback and ShutdownRequestCallback in a VSTO Word Add-in. Let me try to explain the situation.
I've built my own WinSparkle Wrapper class for .NET and tested that using a Windows Forms application. That worked nicely, even with the callbacks mentioned above.
I then used the same wrapper and general approach in a VSTO Word Add-in. "General approach" means that certain things are done in different places in such an Add-in. The strange thing that happens with the VSTO Add-in, though, is that the following exception is thrown:
An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.
Additional information: Object reference not set to an instance of an object.
This only happens when clicking the "Install update" button of the "Software Update" dialog once it says "Ready to install." in conjunction with the CanShutdownCallback
having been registered using the SetCanShutdownCallback
method. Here's the signature:
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int CanShutdownCallback();
[DllImport("WinSparkle.dll", EntryPoint = "win_sparkle_set_can_shutdown_callback", CallingConvention = CallingConvention.Cdecl)]
public static extern void SetCanShutdownCallback([MarshalAs(UnmanagedType.FunctionPtr)] CanShutdownCallback callback);
If the callback is not set, everything works fine. As soon as it is set, the exception will get thrown.
I'm using the WinSparkle release version 0.4.
Should use assembly metadata in preference to win32 resources. We'll be able to store appcast URL in metadata too, and it should be preferred way of doing it, because it could be inspected from outside (a la AppFresh on Mac).
It may be possible to merge .NET assembly with native DLL in single WinSparkle.dll -- see how the System.Data.SQLite wrapper (http://sqlite.phxsoftware.com/) for SQLite does it.
Is it possible to do the silent update with WinSparkle?
I used win sparkle for update mechanism in my windows application it works fine for me . I am facing a problem with updated exe which pops up and asking for installation, here I want to know how to install exe silently without any user interaction. Is this possible with current version of win sparkle ? if it is possible, please let me know in detail how it works . I struck at this point for a while. please do help me .
Since WinSparkle uses similar mechanism as Sparkle, it appears that some WinSparkle client configurations using non-SSL connections for appcast may have related ability for Man In the Middle leading to tricking client into loading update(s) (malware) from unsafe sources.
For details, see
https://vulnsec.com/2016/osx-apps-vulnerabilities/
and especially
I see no reason to believe that a skilled attacker would not be ale to leverage this same MITM and then use something like Metasploit to attack systems using WinSparkle with unsecure connections.
Our IDS/SIEM using Emerging Threats Pro feed is pinging us on insecure WinSparkle requests for an updater for a common IoT device.
Hi.
I am trying to use this library with my .NET application.
So I have added it as described in wiki, then created simple appcast feed and tried to get it work.
Unfortunately, changelog codepage is wrong. I saved changelog in UTF-8 codepage, but Winsparkle shows it incorrectly. Because it could be hard to debug codepage issuses in foreign language, i am attaching some links to files and screenshots.
So, thats is simple appcast: http://vprojector.ru/download/updates.xml
It is saved in UTF-8 with BOM and looks like this in akelpad:
But when i start my application, it looks like this:
When I open Winsparkle's webbrowser's sourcecode in akelpad I see this:
The file is still in UTF-8, but the content became damaged. I've tried to find, what codepage is it, but no success. I've tried all major russian codepages, but is still not readable.
It should be possible to launch update's installer silently. If the app and the installer support it, download and installation would ideally be done completely within WinSparkle UI.
Will need some custom WinSparkle tag in the appcast to tell it that silent install is supported and what parameters to use when launching it.
This will also need to handle access rights correctly: if the app is installed system-wide, ask for elevation, but don't do it if it's in a location writable by the user.
UpdateDialog goes out of screen, if no app window available.
P.S. My app has no main window. It stays at tray icon!
Here is the previous behavior I have ever seen.
UpdateDialog is located around (34, 22) which will be default behavior of wxTOPLEVEL_EX_DIALOG flag.
Applying commits by #22 issue.
UpdateDialog is moved beyond top left corner.
I have modified CenterWindowOnHostApplication function so that AskPermissionDialog won't get out of screen.
But subsequent UpdateDialog gets out.
Because CenterWindowOnHostApplication function will simply do centering.
UpdateDialog will keep center position against my process's window AskPermissionDialog:
So I have tweaked around CenterWindowOnHostApplication function. UpdateDialog won't get out now.
I have my experimental code for this issue.
However I want to discuss: centering is ideal for usual cases?
In my case, I'll disable CenterWindowOnHostApplication and, use it for my customer.
I have worked hard today for this issue, but I began to think whether centering is ideal or not?
I'm trying out WinSparkle for a project, and it seems to have been working nicely until now, where I've had the following problem:
On update check, WinSparkle correctly reads the cast and sees that a new version is available. It doesn't, however, download the new version but instead installs the same old version that was downloaded for an earlier update.
Do you have any idea as to why this is happening and how to prevent it?
when i added winsparkle into my application,an error occurred.
when i called the method win_sparkle_check_update_with_ui();
Update Error!
An error occurred in retrieving update information:are you connected to the internet?Please try again later.
but my computer connect to the internet well !
can you help me? thanks very well !
LNK1104 cannot open file 'C:\Users\ciaran\Workspace\winsparkle\Debug\WinSparkle.lib'
I got such error:
[ 76%] Building CXX object 3rdparty/CMakeFiles/wxWidgets.dir/wxWidgets/src/msw/menuitem.cpp.obj
cd /home/taurus/develop/winsparkle/build/3rdparty && /usr/bin/i686-w64-mingw32-g++ -DNDEBUG -DUNICODE -DWIN32 -DWXBUILDING -D_CRT_SECURE_NO_WARNINGS -D_LIB -D_UNICODE -O3 -DNDEBUG @CMakeFiles/wxWidgets.dir/includes_CXX.rsp -o CMakeFiles/wxWidgets.dir/wxWidgets/src/msw/menuitem.cpp.obj -c /home/taurus/develop/winsparkle/3rdparty/wxWidgets/src/msw/menuitem.cpp
In file included from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/menuitem.h:198:0,
from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/src/msw/menuitem.cpp:28:
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/msw/menuitem.h:125:27: error: 'wxBitmap' does not name a type
void SetBitmaps(const wxBitmap& WXUNUSED(bmpChecked),
^
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/msw/menuitem.h:125:35: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
void SetBitmaps(const wxBitmap& WXUNUSED(bmpChecked),
^
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/msw/menuitem.h:126:27: error: 'wxBitmap' does not name a type
const wxBitmap& WXUNUSED(bmpUnchecked) = wxNullBitmap) { }
^
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/msw/menuitem.h:126:62: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
const wxBitmap& WXUNUSED(bmpUnchecked) = wxNullBitmap) { }
^
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/msw/menuitem.h:127:26: error: 'wxBitmap' does not name a type
void SetBitmap(const wxBitmap& WXUNUSED(bmp),
^
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/msw/menuitem.h:127:34: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
void SetBitmap(const wxBitmap& WXUNUSED(bmp),
^
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/msw/menuitem.h:129:11: error: 'wxBitmap' does not name a type
const wxBitmap& GetBitmap() const { return wxNullBitmap; }
^
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/msw/menuitem.h:126:62: error: 'wxNullBitmap' was not declared in this scope
const wxBitmap& WXUNUSED(bmpUnchecked) = wxNullBitmap) { }
^
[ 77%] Building CXX object 3rdparty/CMakeFiles/wxWidgets.dir/wxWidgets/src/msw/mslu.cpp.obj
cd /home/taurus/develop/winsparkle/build/3rdparty && /usr/bin/i686-w64-mingw32-g++ -DNDEBUG -DUNICODE -DWIN32 -DWXBUILDING -D_CRT_SECURE_NO_WARNINGS -D_LIB -D_UNICODE -O3 -DNDEBUG @CMakeFiles/wxWidgets.dir/includes_CXX.rsp -o CMakeFiles/wxWidgets.dir/wxWidgets/src/msw/mslu.cpp.obj -c /home/taurus/develop/winsparkle/3rdparty/wxWidgets/src/msw/mslu.cpp
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/src/msw/menu.cpp: In function 'bool {anonymous}::IsGreaterThanStdSize(const wxBitmap&)':
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/src/msw/menu.cpp:292:15: error: invalid use of incomplete type 'const class wxBitmap'
return bmp.GetWidth() > ::GetSystemMetrics(SM_CXMENUCHECK) ||
^
In file included from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/event.h:20:0,
from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/window.h:18,
from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/menu.h:23,
from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/src/msw/menu.cpp:28:
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/gdicmn.h:29:28: error: forward declaration of 'const class wxBitmap'
class WXDLLIMPEXP_FWD_CORE wxBitmap;
^
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/src/msw/menu.cpp:293:16: error: invalid use of incomplete type 'const class wxBitmap'
bmp.GetHeight() > ::GetSystemMetrics(SM_CYMENUCHECK);
^
In file included from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/event.h:20:0,
from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/window.h:18,
from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/menu.h:23,
from /home/taurus/develop/winsparkle/3rdparty/wxWidgets/src/msw/menu.cpp:28:
/home/taurus/develop/winsparkle/3rdparty/wxWidgets/include/wx/gdicmn.h:29:28: error: forward declaration of 'const class wxBitmap'
class WXDLLIMPEXP_FWD_CORE wxBitmap;
^
I found that if use #define wxUSE_OWNER_DRAWN 1
in setup.h then WinSparkle can be compiled with these errors.
I don't know the best way fix this. So I opened a new issue instead of pull request.
When the sparkle dialog is shown, only the current release notes are shown. We should be showing all release notes from the next build after the currently running up to the currently most recent build.
WinSparkle can't be built if the solution path has blanks in it. This is the case, for example, if your WinSparkle project folder sits in the Visual Studio default location for projects which happens to have "Visual Studio 2013" in it, for example, if you are using Visual Studio 2013.
I compiled static version of WinSparkle. When I started my application with static WinSparkle it hangs on win_sparkle_check_update_with_ui
. Shared version works fine. I tried to compile WinSparkle with Fedora MinGW and with Windows MinGW. The same problem. I haven't any ideas where problem or how debug this.
Could you have a registry setting enabled to control how often to check for updates? For instance check every day, week, month, or based on a time of seconds?
Hi,
I had a look winsparkle.h, doesn't look like there is an API allows me to change app Icon, please help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.