Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

Support flutter integration proposal

Open liudonghua123 opened this issue 3 years ago • 7 comments

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

liudonghua123 avatar Oct 14 '20 08:10 liudonghua123

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

anaisbetts avatar Oct 14 '20 19:10 anaisbetts

@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.

liudonghua123 avatar Oct 15 '20 00:10 liudonghua123

Related:

  • https://github.com/flutter/flutter/issues/30735#issuecomment-577790463
  • https://github.com/anaisbetts/squirrel-flutter

Sunbreak avatar Mar 08 '21 23:03 Sunbreak

@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.

ComtelJeremy avatar Mar 11 '21 21:03 ComtelJeremy

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

anaisbetts avatar Mar 15 '21 12:03 anaisbetts

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

liudonghua123 avatar Mar 15 '21 14:03 liudonghua123

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

Lazizbek97 avatar Jul 26 '22 10:07 Lazizbek97