Plugin Autoupdater
3 Attachment(s)
Allows plugin writers to add a few lines of code to their plugin to let it update itself.
Requires the Socket Extension. Thanks to exvel for a seemingly endless stream of bug reports and p3tsin and Matthias Vance for help with downloading files. Cvars: sm_autoupdate_binary (1) - Download binaries? sm_autoupdate_source (1) - Download sources? sm_autoupdate_gamedata (1) - Download gamedata files? sm_autoupdate_other (1) - Download other files? sm_autoupdate_backup (1) - Save backups of old versions? When set to 1, saves backups of old versions to addons/sourcemod/plugins/disabled/backups Commands: sm_autoupdate_check [filename/idx] - Checks for updates but doesn't download anything. Leave idx blank to check all plugins. (logs results to sourcemod/logs/autoupdate.log) sm_autoupdate_download [filename/idx] - Checks for updates and downloads them. Leave idx blank to update all plugins. (logs results to sourcemod/logs/autoupdate.log) sm_autoupdate_list - Returns the list of plugins that will be updated. sm_autoupdate_rem <filename/idx> - Stops a plugin being autoupdated. Get idx from sm_autoupdate_list. sm_autoupdate_block_add <filename> - Adds a plugin to the block list. Plugins in the block list won't be added to the autoupdate list. (eg sm_autoupdate_block_add autoupdate.smx) sm_autoupdate_block_rem <filename/idx> - Removes a plugin from the block list. sm_autoupdate_block_list - Lists blocked plugins. Todo: Translation support Making your plugin autoupdate: Include autoupdate in your plugin and use the AutoUpdate_AddPlugin()/AutoUpdate_RemovePlugin() natives. Example plugin: PHP Code:
Code:
<plugin> When sm_autoupdate_download is ran, the plugin will try to download 127.0.0.1/auexample.smx, 127.0.0.1/auexample.sp, 127.0.0.1/folder/auexample.games.txt and so on. You do not need to add gamedata/source/other. (you only need the version, but what use would that be?) The plugin doesn't update itself because if I didn't keep making stupid mistakes it wouldn't need to :D |
Re: Plugin Autoupdater
Wow, this is AWESOME. Good work!
|
Re: Plugin Autoupdater
So I need a hosting for making a such plugin that is able to autoupdate, right?
Also if answer: yes, you can write a manual of how to post your plugin in free svn service or something like google code. |
Re: Plugin Autoupdater
Quote:
|
Re: Plugin Autoupdater
Quote:
p.s. anyway, good job +karma |
Re: Plugin Autoupdater
What should I write here? New version number or update description?
Quote:
|
Re: Plugin Autoupdater
Also about a suggestion that is already in your ToDo list. Custom files tag:
Quote:
p.s. google code example: http://code.google.com/p/showhealth/downloads/list |
Re: Plugin Autoupdater
Quote:
Quote:
Code:
<other dir="sounds">annoying1.mp3,annoying2.mp3,annoying3.mp3</other> |
Re: Plugin Autoupdater
Yeap this is very close to what I expected but this would be looks better I think:
Code:
<other dir="sounds">annoying1.mp3</other> Code:
sm_autoupdate_check |
Re: Plugin Autoupdater
Try AutoUpdate_AddPlugin("showhealth.googlecode.c om", "/files/version.xml", PLUGIN_VERSION);
edit: I don't know why it's adding a space :| |
All times are GMT -4. The time now is 18:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.