-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Startup option in preferences (WIP) #837
Conversation
function install () { | ||
var appPath = process.execPath | ||
|
||
startup.add('webtorrent-desktop', appPath) |
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.
Does this work on Windows and OS X?
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.
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.
waiting for typicode/user-startup#7 to land,
apparently all params are required.
@feross where do you think is a good place to have the initial startup installation? |
switched to use auto-launch due to better electron support |
@grunjol thanks! |
@dcposch do you have thoughts on this?
|
@@ -107,7 +107,8 @@ function setupSavedState (cb) { | |||
downloadPath: config.DEFAULT_DOWNLOAD_PATH, | |||
isFileHandler: false, | |||
openExternalPlayer: false, | |||
externalPlayerPath: null | |||
externalPlayerPath: null, | |||
startup: true |
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.
Default should not be true
IMHO
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.
Why not? There's a pref to disable
Looks like uTorrent not only starts automatically, but it re-enables that option after every auto-update (!) https://forum.utorrent.com/topic/92281-disable-utorrent-program-auto-start-as-default-setting/
Obv we don't want to do that---if someone turns off the pref, we'll respect it permanently---but I think auto start after they first install WebTorrent is fine.
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.
Let me be clear, I'm not against create a startup feature, but do not force the user beforehand.
- The application is not a daemon, so the user should indicate when start.
- The user will be surprised with the first autostart (even more if its a updating user).
- A lot of users care about their privacy, hence use VPNs, (manually started in most of the cases) so first autostart will be offensive.
- Even in the forum post you mention, the users ask for the same expected behavior
he is not complaining about not respecting user's preference but the default behavior.
LGTM! @noamokman thanks for doing this! For future PRs that add new UI (in this case, new controls on the Prefs page), consider posting a screenshot. Github lets you just paste images directly into a PR, so on Windows you can open the prefs page -> Alt + PrintScr -> paste into Github |
@dcposch cool! it looks something like that: |
Hi everyone,
I'm having problems packaging the app on my machine. |
You don't need to implement the last 2 if the default behavior is not run at startup (simply install or uninstall on preference change) |
Yeah, that's true. |
We can have it off by default, for now, as @grunjol suggested. Sounds like it'll be easier to ship that way. If we make it the default in the future, it will only affect new installs (not existing users). CC @feross
I'd just hide it.
I can test on Mac and Windows |
var AutoLaunch = require('auto-launch') | ||
|
||
var appLauncher = new AutoLaunch({ | ||
name: 'WebTorrent 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.
you should get the app name from config
Working fine on Ubuntu and Debian GNOME. It starts the app with torrent list. I am guessing... can we make it start 'minimized' from autostart? (maybe with a command line) |
Great 👍 thanks
on it! |
Reading a little more, it seems it already has an |
On Mac (El Capitan) and Windows (Win 10), I'm getting the following error:
...but only when running the packaged app. After testing on the master branch, turns out it's happening there as well. @feross looks like the React / Material UI change doesn't work with the packaging script yet. I'll try to fix it later today. |
already reported #842 its a case sensitive issue |
@noamokman |
@grunjol oops, didnt see the messages while working on it, check the latest commit. |
After rebasing on top of #843, auto start works on Mac, but it pops up two windows. One is the WebTorrent window (should start minimized), the other is a terminal: |
Works great on Windows! Looks like there are three things left to do:
|
these two are already pushed |
The implementation for linux and windows is an hidden argument. |
i think you get this wrong, you need to add |
@@ -21,6 +21,7 @@ var windows = require('./windows') | |||
|
|||
var shouldQuit = false | |||
var argv = sliceArgv(process.argv) | |||
var hidden = argv.includes('--hidden') |
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.
instead of set hidden value here, do it in function processArgv (argv)
, this also prevents --hidden
be treated as torrentId
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.
need to leave it here so that the main windows starts hidden,
placing the hide function in the processArgv function makes the window flash for a sec.
Made the processArgv function ignore the value as a torrent id
just tried it again--on mac, it still shows the window and the terminal after booting #843 is merged btw |
@dcposch terminal showing issue: Check the latest message it has a possible solution |
waiting for Teamwork/node-auto-launch#38 to land 👍 |
Rebased, added some fixes, merged. See #923 . Thanks @noamokman ! |
Hi there,
This is about #835,
Still WIP,
Need to test and create startup on first boot or install.
Would love to help more along the way 😄
Thanks,
Noam