Comments (6)
Installing new versions of runtimes during updates was never a feature of the old Squirrel, but it's something I am considering adding in the next release which is why this issue is open as an enhancement.
from clowd.squirrel.
Workaround suggested by @theresia-tobii for how to ensure that the necessary runtime is installed prior to updating to net5 or higher:
- The old app fetches updates from "url1".
- Add an update that uses net framework like before but clowd.squirrel with the workaround from Install/bootstrap new runtimes during updates #9.
- Make this update fetch releases and updates from a new URL so that it will essentially be the last update from the old URL causing it to never be skipped in the update chain.
- So now any new updates requiring the new framework will be fetched from the new URL and thus only be enabled from that last version that ensures the runtimes are installed.
from clowd.squirrel.
Hi caesey,
I also expirenced, that on new installation the download of the .net6 runtime started automatically.
However on updates the following link is opened: https://dotnet.microsoft.com/en-us/download/dotnet/6.0/runtime
Is it possible to have the same logik on install and update?
from clowd.squirrel.
Commit 791f34b and 160373e make it possible to install new runtimes while updating your app. It is not fully automatic.
If you were planning an update from .net5 to .net6, for example, you'd need to first push the below code on .net5. It would allow you to install net6 before your users get get the update.
I may revisit this later to see if it can be further automated, but I suspect not - because it requires the user to accept a UAC prompt while installing .net, and this should not be unexpected (eg. the user needs to be interacted with first)
private static async void UpdateMyApp()
{
var net6 = Runtimes.DOTNET6_X64;
var net6installed = await net6.CheckIsInstalled();
// ask user if they would like to install net6 if it is not already installed
if (!net6installed)
{
if (MessageBoxResult.Yes == MessageBox.Show("Would you like to install net6?", "Update", MessageBoxButton.YesNo))
{
// install net6 before we install our update
var instPath = Path.GetTempFileName() + ".exe";
await net6.DownloadToFile(instPath);
await net6.InvokeInstaller(instPath, isQuiet: true);
}
else
{
// do not install your app update until net6 is installed
return;
}
}
// net6 is now installed, you can update normally
using var mgr = new UpdateManager("https://the.place/you-host/updates");
var newVersion = await mgr.UpdateApp();
// optionally restart the app automatically, or ask the user if/when they want to restart
if (newVersion != null)
{
UpdateManager.RestartApp();
}
}
from clowd.squirrel.
The problem with needing to add code to do this in the app itself is that users might miss that particular version if the app is not run very often. I would really like to see this being part of the update.exe and automated.
EDIT: This could potentially be solved by moving to a new update URL having the last version implement this workaround and start fetching updates from a new URL going forward.
from clowd.squirrel.
After 02b5b60 users will be automatically prompted to install missing app dependencies when the app is started.
from clowd.squirrel.
Related Issues (20)
- Did the installer detect that the version being installed is an old version? HOT 3
- Win32splash renders in wrong location HOT 4
- Can it support custom download paths at runtime (needed for offline environments)? HOT 6
- File or Directory not found HOT 4
- Progress dialog title has a random process name HOT 3
- Install dependencies silently and w/o admin rights HOT 3
- .NET Framework support? HOT 5
- Error -532462766 occurred while running setup HOT 3
- Mark a directory incomplete when staging updates HOT 2
- Tool Squirrel.exe/Update.exe is reported as trojan HOT 1
- Code contracts are deprecated and should be replaced HOT 1
- Refactor GitlabSource to support public GraphQL api
- Run after install HOT 5
- Possible to sync AssemblyInfo? HOT 2
- Runtime support for aspnetcore-runtime-8.0.0-win-x86? HOT 2
- App only starts after install HOT 4
- Github Releases New Update HOT 1
- Rollback and previous version HOT 3
- Install date is always today HOT 4
- .NET dependency retrieval fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clowd.squirrel.