Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.42k stars 1.03k forks source link

Support flutter integration proposal #1672

Open liudonghua123 opened 4 years ago

liudonghua123 commented 4 years ago

Recently I want to package a flutter windows desktop app, I can make it work via manually create a nuspec file, generate the corresponding nupkg file via nuget, then generate exe/msi/release/full-nupkg file via squirrel finally.

But I find it's really difficult to implement UpdateManager in dart or flutter.

The docs I followed is http://markwal.github.io/programming/2015/07/28/squirrel-for-windows.html, and the scripts of github action file is:

https://github.com/liudonghua123/system_network_proxy/blob/d62c9ee517edc6b7bac12b85210452c42893f2ea/.github/workflows/windows.yml#L46-L52

anaisbetts commented 4 years ago

You don't need to implement UpdateManager in Flutter, follow the guide for non-C# applications. Basically what you need to do is:

  1. Call update.exe to do updates and check for updates
  2. When your app is run with various --squirrel-install, etc, call update.exe to create your shortcut
liudonghua123 commented 4 years ago

@anaisbetts Hi, If I don't need to implement UpdateManager in Flutter, How can I config update url like github in UpdateManager. I read the docs in https://github.com/Squirrel/Squirrel.Windows/blob/develop/docs/using/custom-squirrel-events-non-cs.md, https://github.com/Squirrel/Squirrel.Windows/blob/develop/docs/using/custom-squirrel-events.md. But I still could not find how can I do update logical for non-C# applications.

Sunbreak commented 3 years ago

Related:

ComtelJeremy commented 3 years ago

@liudonghua123 Try running Update.exe -? for information on the arguments you can pass in to Update.exe (which is the same as Squirrel.exe). For example:

--checkForUpdate=VALUE      Check for one available update and writes new results to stdout as JSON
--update=VALUE              Update the application to the latest remote version specified by URL

are two examples from the help.

Hope this helps.

anaisbetts commented 3 years ago

The extremely Quick Start to getting updates working is, when your app starts up, run:

## PATH_TO_MY_APP is the folder that your running executable is in - update.exe
## is always guaranteed to be one folder above it
PATH_TO_MY_APP\..\update.exe --update https://updates.mysite.com/path/to/a/folder

s.t. https://updates.mysite.com/path/to/a/folder/RELEASES successfully downloads the RELEASES file that Releasify generates. This is designed so that you can take the entire folder that Releasify generates and just upload it to S3 / Cloudfront / Your Favorite Static Hosting

liudonghua123 commented 3 years ago

@ComtelJeremy @anaisbetts Thank you very much, I will try these tips and give feedback later.

Lazizbek97 commented 2 years ago

Has someone implemented Squirrel.Windows to Flutter desktop application for auto-updating ?