Comments (20)
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.
from desktop.
Carrying over a note from @razzeee in #147
For auto updates to work, we will need a server running
- https://github.com/ArekSredzki/electron-release-server
or https://github.com/Aluxian/squirrel-updates-server - Update the application code acordingly
from desktop.
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.
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.
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).
- 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?
- 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
- 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.
@jasonblais Thank you for much feedback.
- Yeah, something like that. For example, show "Download Update" button instead of "Install Update" in our design.
- 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).
- 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.
Thanks @yuya-oc! Sorry for the incredibly long delay in replying
- Sounds good
- 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.
- 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.
- 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.
- 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.
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.
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.
Relevant: https://electronjs.org/blog/autoupdating-electron-apps
from desktop.
@yuya-oc Is the blog @kethinov referenced above something we can use to simplify our auto-updates feature?
from desktop.
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.
Depending on the reality of this being implemented any time soon, I have proposed an interim workaround in mattermost/mattermost#9077 fwiw.
from desktop.
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.
Closing via a new Jira ticket for tracking: https://mattermost.atlassian.net/browse/MM-14110.
from desktop.
Hi,
Shouldn't Mattermost Desktop be distributed via the Mac App Store (and updated there) just like the iOS version.
from desktop.
For windows users it could be distributed on the windows store
from desktop.
Is there any documentation for the feature to disable updates on the macOS version?
from desktop.
Related Issues (20)
- [Bug]: Deeplinks do not work on linux or mac HOT 16
- [Bug]: Cannot update Mattermost, Mattermost cannot be closed try again HOT 2
- [Bug]: notification not supported HOT 12
- Issue Adding Self-Hosted Mattermost Server to Mattermost Desktop Client HOT 4
- [Bug]: MimeType missing in Desktop Entry File on generic linux HOT 11
- [Bug]: ToS not a URL HOT 1
- [Bug]: Linux desktop client (5.6.0) does not work with Firefox -- AppArmor avoid executions of mattermost-desktop. HOT 3
- [Bug]: Mattermost Desktop App launches in fullscreen although [Open app in fullscreen] is diabled. HOT 6
- [Bug]: No pop-up messages are displayed in Windows 1607 HOT 1
- [Feature]: Add LanguageTool, spelling and grammar checker, support HOT 1
- [Bug]: Download location menu label in settings hard to read in dark mode
- Since I upgraded to 5.7.0 on my desktop, I only get a black screen HOT 15
- [Bug]: The title and taskbar doesn't match browser anymore HOT 2
- [Bug]: handleGetDesktopSources Blocked on wrong webContentsId HOT 4
- [Bug]: Mattermost apt repository GPG signing key is expired (today) HOT 11
- [Bug]: Missing notifications on Ubuntu 23 HOT 5
- [Bug]: Random Certificate Error HOT 3
- [Bug]: Linux desktop client keeps creating autostart file for Electron HOT 8
- Under Wayland, Mattermost should not draw extra window decorations if the compositor encourages client-side decorations
- [Bug]: linux x64 (non-arm) AppImage is missing (mattermost-desktop-5.8.0-linux-x86_64.AppImage) HOT 4
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 desktop.