Giter VIP home page Giter VIP logo

Comments (6)

caesay avatar caesay commented on June 12, 2024 1

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.

caesay avatar caesay commented on June 12, 2024 1

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.

simader avatar simader commented on June 12, 2024

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.

caesay avatar caesay commented on June 12, 2024

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.

theresia-tobii avatar theresia-tobii commented on June 12, 2024

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.

caesay avatar caesay commented on June 12, 2024

After 02b5b60 users will be automatically prompted to install missing app dependencies when the app is started.

from clowd.squirrel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.