Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this package works with electron-updater package? #363

Open
alisherafat01 opened this issue Apr 13, 2024 · 1 comment
Open

Does this package works with electron-updater package? #363

alisherafat01 opened this issue Apr 13, 2024 · 1 comment

Comments

@alisherafat01
Copy link

I want to know which package to use:

import { autoUpdater } from 'electron-updater';
or 
import {  autoUpdater } from 'electron';
@lilhuy0405
Copy link

lilhuy0405 commented Jun 14, 2024

Yes it does you can import it like this import {autoUpdater} from 'electron';
And follow this docs: https://www.electronjs.org/docs/latest/tutorial/updates#using-other-update-services
But if you follow this docs there is a note: the platform's name saved in electron-release-server and the process.platform is difference.
So this code from docs will build a wrong update url

const server = 'https://your-deployment-url.com'
const url = `${server}/update/${process.platform}/${app.getVersion()}`

autoUpdater.setFeedURL({ url })

In my case proccess.platfrom is win64 but the platform that release server expected is something looks like windows_64 so we need to format the platform to match the release server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants