-
Notifications
You must be signed in to change notification settings - Fork 327
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
Auto-update scripts #1053
Comments
I agree. As Greasemonkey user, now I use wescript.net for update scripts. It works, but it's another add-on. Not so many people know about it. Look at Stylish add-on. It has "Find Updates" button Greasemonkey should learn from this. |
This is also being discussed on Userscripts.org: http://userscripts.org/topics/48267 |
Well here's a start to solving this issue. This commit involves mostly changes to the GM core to support update checking and doesn't do anything to notify users of an available update. Specifics are in the commit message. Update: I'm currently working on this feature in this branch. Any help would be greatly appreciated. |
I finally got around to integrating recent upstream changes into my branch for this issue. So far the actual update checking works fairly well given the few tests that I've run. I've only been able to get some basic integration with the addons dialog working. On Firefox start up, if there are any updates that have been accumulated the addons dialog will open and display them for the user. You can install available updates via the context menu. I've made the "Find Updates" button filter the scripts list to show only scripts with available updates. Scripts that have an update have a little green exclamation mark next to them in the addons dialog. |
Great work sizzle. I might flick though a few patches if I get some time off my other projects :) |
For those interested I just implemented this feature for Scriptish, it's only for FF4 though, but it should help whomever works on this for GM. |
I'm sorry if it is redundant to mention this, but I just wanted to say that Stylish does a good job of using the same update system as Firefox uses to update extensions to also update their Userstyles. The same thing for Userscripts would be fantastic! |
I just spent the last two hours resolving conflicts when I attempted to merge my updater branch with Greasemonkey 0.9.10. I haven't had a chance to test it yet and I also need to port this important commit from Scriptish. Also merging brought back the utils.js file by accident. |
Sorry I missed this for so long. I'm working on merging it. But as you pointed out, because of the time passed and the recent really large refactor, it's taking some work. |
Is your branch supposed to pop up an installation dialog, when installing an update? It does currently, and I'm thinking that's where the breakage I'm seeing is coming from. |
No it's supposed to bypass the installation dialog since its an update and not a new install. It is also supposed to open the script manager on FF startup if there are available updates. That never worked perfectly so perhaps that is the cause of the breakage. |
Ok. My previously linked branch is updated, and much more functional. |
Okay, I just tried your branch in FF 6.0.2 and it managed to find an update for one of my scripts and I installed it. Very nice work. A few suggestions from my test experience:
Edit: Yeah the Add-ons Manager doesn't open on startup when updates are available in FF3.6 either. Also in FF3.6 I noticed:
|
I agree it would be very nice. But it's hard. Code plumbing aside, we don't actually know how much will be downloaded: you've got the main script, then any number of requires and resources it defines. The latter you don't know until the script is downloaded.
Hm. Will have to test!
Why would there "be available updates"? I rather think that if it's been discovered automatically, it should be installed automatically. Firefox even does this with extensions now, with the caveat that you have to restart Firefox for them to really be installed (but if you do restart, they are installed, silently). |
All that aside: I think it might well be time to merge this into master, and start tracking all these little issues in their own tickets so they don't get lost track of. |
As with extensions, you should have the option to disable update checking on a per-script basis (if it hasn't already been implemented). |
On Mon Sep 19 19:36:42 2011, Ryan Chatham wrote:
Has not been implemented, but agreed. There's a simple workaround: |
I've decided that for 0.9.12 this feature will be included, but disabled by default. Therefore it won't do anything unless you manually check for, and apply, updates. We'll work out the remaining warts in the future (and in following tickets), and when it's ready, turn it on for everyone. |
Created a pile of separate smaller issues, all in 0.9.13, to improve this feature: |
It'd be great if there was something explaining how a script can be configured for updating. There's zero documentation, and reading over this bug doesn't really shed any light. Is there a new "source" parameter in the header, or something? |
Things are still under development and docs will be coming. But for now it's as simple as the @Version header. If a script at the same URL which the installed script was installed from has a higher @Version, then it will update. We use nsIVersionComparator and thus its definition of what version is "higher" than another. |
As arantius explains, you don't need to do anything special to your script to enable updating besides setting and incrementing the |
I searched, but didn't find this issue, other than the one here:
http://userscripts.uservoice.com/pages/795-general/suggestions/5436-auto-update-scripts
Which doesn't really make sense, because Jesse can't do anything for this.
Auto-update scripts; it's been a hotter topic than ever in userscripting, especially as greasemonkey is reaching more people. Jesse provides enough resources on userscripts.org to properly update any script from userscripts.org. It would be ultra-badass if script updating were given a similar look and feel to the Firefox add-on manager.
As for scripts not installed from userscripts.org, maybe you can flag it with a "manual update" flag, whereas scripts from US.o would be flagged for automatic updating.
What do you guys think?
The text was updated successfully, but these errors were encountered: