-
Notifications
You must be signed in to change notification settings - Fork 835
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
Implement installers via electron-builder #138
Conversation
"linux": { | ||
"synopsis": "Mattermost Desktop" | ||
} | ||
"app-bundle-id": "org.mattermost.desktop", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuya-oc this might be something you want me to change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep indent.
@it33 Mattermost has two kind of domains. Which is better, .org
or .com
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.com please since desktop apps will eventually be hosted at releases.mattermost.com, sorry for late response for some reason I didn't see this mention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Changed.
"engines": { | ||
"node": ">=4.2.0" | ||
}, | ||
"scripts": { | ||
"install": "cd src && npm install", | ||
"postinstall": "npm run build", | ||
"postinstall": "install-app-deps", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is not necessary because dependencies are prepared by npm run build
.
The builder seems to work with my Ubuntu 14.04. But it doesn't meet with current CI process (You don't have to take care yet). I saw following behavior about installation.
I'm also beginner for
Then, if you want to continue this PR, please check Mattermost CLA. http://www.mattermost.org/mattermost-contributor-agreement/ |
4ad0889
to
62ec718
Compare
Sorry, I forgot to add the build folder. We would also need a background.png for osx I think? Not sure what to do there. Yes, I'm aware of it not taking into account your ci setup right now. 3.) Yes uninstaller also opens the app, takes a few seconds then it closes and is uninstalled. That's whats happening with windows. I'll try to look into the shortcuts again. CLA signed, thanks for pointing me towards it. Edit: Here is what we have to do for the shortcuts, but it's a typescript example unfortunatly. |
The problematic part about me doing the autoupdate stuff is, that I don't know if or how you will handle the server part. If I can assume, that we're using https://github.com/GitbookIO/nuts and heroku, I can probably come up with something. |
Thanks. For now, we don't have to think about the update server. I think that the point of handling Squirrel event is create/remove shortcuts on the event. If there is no server, the updater merely fails. So I think that's not important matter. Of course, we will have to handle updater and server to provide auto-update. |
62ec718
to
be7cdb1
Compare
return Promise.resolve({ | ||
appDirectory: path.join(outPath, 'Mattermost-win32-ia32'), | ||
iconUrl: 'https://raw.githubusercontent.com/mattermost/desktop/master/resources/icon.ico', | ||
//loadingGif: path.join(rootPath, 'assets', 'img', 'loading.gif'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if you could get somebody to provide a now installing splash screen. See https://github.com/electron/electron-api-demos/blob/master/assets/img/loading.gif as an example
Is it correct that this PR is against master? Or should it be dev? Finally got it to work on windows, haven't tested any other OS. Implementing auto update should be trivial when we get a server. This work is heavily based on: https://github.com/electron/electron-api-demos You might want to review this with whitespaces off: |
e553610
to
1829847
Compare
} | ||
|
||
// Handle Squirrel on Windows startup events | ||
switch (process.argv[1]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
electron-winstaller recommends that the event handler should be placed at the top of main.js
. https://github.com/electron/windows-installer#handling-squirrel-events
Then, please return
after app.quit()
to suppress the other events of app
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check mongodb-js/electron-squirrel-startup? It's introduced on README.md of electron-winstaller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well as everything above is a function, this will be called as the first thing. But if you prefere, I can move it to the top, just let me know.
Edit: I'll have a look at mongodb-js/electron-squirrel-startup
later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move to the top.
Sure, this part will be called at the first, but events are already registered into app module. So I'm afraid of that some issues happen by depending its timing or other reason. The top of main.js
looks proper to avoid any other processing.
Good question. master is okay. JFYI, now there are two active branches, master and dev. They almost follows git-flow. However recently I feel that it's not simple for pull-requests. So the branching model will be a coming issue. |
@yuya-oc well you might want to update contributing.md to help with the branch choice |
1829847
to
6431423
Compare
|
"electron-connect": "^0.3.7", | ||
"electron-packager": "^7.0.1", | ||
"electron-prebuilt": "0.37.8", | ||
"electron-squirrel-startup": "^1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be installed with src/package.json
to bundle.
Just curious, what does your "works fine" mean? I have never seen any shortcuts, is it correct? Environment: |
I had overlooked the folder, thank you! |
Hey,
this might be totally wrong, as I'm a fist time node user. And so far I could only test win.
The installation of the exe seems to work fine, but there is no shortcut anywhere to be found. Uninstall also seems to work fine.
Would be very cool, if other people could build it for osx/linux and let the maintainer know if it works.
Cheers