Squirrel.windows: Support flutter integration proposal

Created on 14 Oct 2020  路  6Comments  路  Source: Squirrel/Squirrel.Windows

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

Most helpful comment

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

All 6 comments

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

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

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

Was this page helpful?
0 / 5 - 0 ratings