Code Monkey home page Code Monkey logo

Comments (20)

yuya-oc avatar yuya-oc commented on July 21, 2024 1

I got proof of concept by using electron-updater on Windows. Combination of electron-updater and NSIS installer can use generic http server and static files, so it's easy to take for our release workflow.

We need to take care about some cases though, I would like to consider using this for Windows and Mac.

  • Windows zip (notify only)
  • Windows installer
  • Mac (codesign is needed to test)
  • Linux (notify only)

from desktop.

razzeee avatar razzeee commented on July 21, 2024

#162

from desktop.

jasonblais avatar jasonblais commented on July 21, 2024

Carrying over a note from @razzeee in #147

For auto updates to work, we will need a server running

from desktop.

razzeee avatar razzeee commented on July 21, 2024

Application code changes should be fairly trivial, when you take #162 as a basis. Which is using github as a backend and not one of the above servers.

from desktop.

lloeki avatar lloeki commented on July 21, 2024

Merely checking for update can be as simple as a static JSON file set up on GitHub Pages so as not to have GitHub itself being hit too often on the project's releases/tags pages. Bonus points for offering a link to the release page or a download link for the running platform in the dialog when the version is outdated.

This is simple and would go a looooong way in helping people be up to date by themselves (and stop pestering me for release links 😄 )

from desktop.

jasonblais avatar jasonblais commented on July 21, 2024

Very cool! Few questions that come to mind.

No need to have answers for each one, they're something to think about (also for myself).

  1. For Windows zip & Linux, you're proposing it would just give a prompt saying "new desktop app version available" with a link to download it?
  2. For Mac, how will the experience differ from Windows? Since the spec I had was (incorrectly) designed with Windows in mind https://docs.google.com/presentation/d/1BmH5gGtdhijHRfv46_uhgl_0kwT5qOI8_5y2HNfNpqA/edit#slide=id.p
  3. Are we planning to have a config option for an admin, or user, to turn off auto-updates?
  • An admin might want to turn it off, or control when updates are triggered
  • A package manager (e.g. Chocolatey) might want to turn it off since they handle auto-updates themselves.

On a semi-related note, one option brought up recently was that we could include the desktop app download link as part of the server download binary. That way when an admin upgrades their server, users also get notified about a new desktop app version (if one has been released), and can then follow through the auto-update process.

We could also implement it in a way that if a user has never downloaded the desktop app before, they get a prompt to download it pre-configured with the server URL.

It might be a neater solution than having a server that tracks if the desktop app has been upgraded. Moreover, if someone is using a really old Mattermost server, the new desktop app version may not be compatible, so prompting them to download it might be undesirable. An example is when we modified how mentions are considered on the app after we added the team sidebar.

from desktop.

yuya-oc avatar yuya-oc commented on July 21, 2024

@jasonblais Thank you for much feedback.

  1. Yeah, something like that. For example, show "Download Update" button instead of "Install Update" in our design.
  2. I believe the experience is almost same excepting animation. But I haven't investigate actual behavior because Mac requires codesign and I don't have any certificates for Mac apps (I'm not a member of Apple Developer Program).
  3. Sorry, I had forgotten. We should apply that. So I think we should have two kinds of pre-configuration, for admin and for package managers.

About the semi-related note, it's actually difficult problem I think. Our application supports multiple servers, so the application can't determine what version is correct when servers tell different desktop app versions.
IMHO, electron-updater can set different URL to check latest version. So if it can be set via pre-configuration, I think that admin can control application versions by preparing some json files on their http server.

from desktop.

jasonblais avatar jasonblais commented on July 21, 2024

Thanks @yuya-oc! Sorry for the incredibly long delay in replying

  1. Sounds good
  2. Yeah, we're looking at automating code-signing for Mac, to make it simpler. As for auto-updates, I'm curious what other apps typically do? I'm really not that familiar with that platform.
  3. Would this setting be in desktop config.json file (..\AppData\Roaming\Mattermost/config.json)?

About the semi-related note, it's actually difficult problem I think. Our application supports multiple servers, so the application can't determine what version is correct when servers tell different desktop app versions.

That's true. But in that case we'd just take the max of those so it'd be fine.

IMHO, electron-updater can set different URL to check latest version. So if it can be set via pre-configuration, I think that admin can control application versions by preparing some json files on their http server

So do you mean the admin could control which app version the user is running (in addition to the pre-defined URL)?

from desktop.

yuya-oc avatar yuya-oc commented on July 21, 2024
  1. Almost is similar to what we will do. i.e. showing a dialog to select one of install, skip or remind. The largest difference is that the window is implemented in html powered by Electron.
  2. The config should not be modified by users. So the config file should be separated at least.

About the semi-related note, it's actually difficult problem I think. Our application supports multiple servers, so the application can't determine what version is correct when servers tell different desktop app versions.

That's true. But in that case we'd just take the max of those so it'd be fine.

Okay, but may I take it as a separated issue? It seems too much for the first implementation.

IMHO, electron-updater can set different URL to check latest version. So if it can be set via pre-configuration, I think that admin can control application versions by preparing some json files on their http server

So do you mean the admin could control which app version the user is running (in addition to the pre-defined URL)?

Yes. However on upgrading, I feel pre-defined URL should be handled by other management tools. Basically the installer we will provide can only install the app.

from desktop.

jasonblais avatar jasonblais commented on July 21, 2024

Thanks @yuya-oc, that makes sense.

Okay, but may I take it as a separated issue? It seems too much for the first implementation.

Yeah totally fine. It's not directly related to this one.

Yes. However on upgrading, I feel pre-defined URL should be handled by other management tools. Basically the installer we will provide can only install the app.

Would this be part of #483? Agree this issue is really about auto-updates.

from desktop.

jasonblais avatar jasonblais commented on July 21, 2024

FYI @yuya-oc, we have a ticket to automate code-signing which should help testing the auto-updater for Mac https://mattermost.atlassian.net/browse/PLT-7540

from desktop.

kethinov avatar kethinov commented on July 21, 2024

Relevant: https://electronjs.org/blog/autoupdating-electron-apps

from desktop.

jasonblais avatar jasonblais commented on July 21, 2024

@yuya-oc Is the blog @kethinov referenced above something we can use to simplify our auto-updates feature?

from desktop.

yuya-oc avatar yuya-oc commented on July 21, 2024

I think unfortunately it would not help us. It would be helpful for simple use case. It assumes that all of releases are completed on GitHub only.
But we are hosting the desktop app on our own server and we need more complex use case, for example, the case which system admins want to control their desktop app version in company. update-electron-app can't match to such case as far as looking its README.

from desktop.

mcallaghan-sandvine avatar mcallaghan-sandvine commented on July 21, 2024

Depending on the reality of this being implemented any time soon, I have proposed an interim workaround in mattermost/mattermost#9077 fwiw.

from desktop.

mcallaghan-sandvine avatar mcallaghan-sandvine commented on July 21, 2024

Also, can we please improve the subject/headline for this issue?
"Check for updates" -> something like: "have Mattermost client automatically check for updates"
(not sure why I don't have permission to fix this myself)

from desktop.

amyblais avatar amyblais commented on July 21, 2024

Closing via a new Jira ticket for tracking: https://mattermost.atlassian.net/browse/MM-14110.

from desktop.

mrleblanc101 avatar mrleblanc101 commented on July 21, 2024

Hi,
Shouldn't Mattermost Desktop be distributed via the Mac App Store (and updated there) just like the iOS version.

from desktop.

ageekhere avatar ageekhere commented on July 21, 2024

For windows users it could be distributed on the windows store

from desktop.

grahampugh avatar grahampugh commented on July 21, 2024

Is there any documentation for the feature to disable updates on the macOS version?

from desktop.

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.