Raised This Month: $51 Target: $400
 12% 

Plugin Autoupdater


Post New Thread Reply   
 
Thread Tools Display Modes
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 05-08-2009 , 15:09   Re: Plugin Autoupdater
Reply With Quote #11

Quote:
Originally Posted by MikeJS View Post
Try AutoUpdate_AddPlugin("showhealth.googlecode.c om", "/files/version.xml", PLUGIN_VERSION);

edit: I don't know why it's adding a space
Ok, I changed to this:
PHP Code:
AutoUpdate_AddPlugin("showhealth.googlecode.com""/files/version.xml"PLUGIN_VERSION); 
Now it connects but can't find a file or something like that:
Code:
sm_autoupdate_check
L 05/08/2009 - 23:07:19: [SM] Native "WritePackString" reported: Invalid data pack handle 0 (error 4)
L 05/08/2009 - 23:07:19: [SM] Displaying call stack trace for plugin "autoupdate.smx":
L 05/08/2009 - 23:07:19: [SM]   [0]  Line 110, C:\SPComp\autoupdate.sp::OnSocketReceive()
L 05/08/2009 - 23:07:20: <FAILED> showhealth.smx: showhealth.googlecode.com/files/version.xml (couldn't find anything)
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-08-2009 , 16:05   Re: Plugin Autoupdater
Reply With Quote #12

Updated to 1.1 which fixes the datapack error (along with a few others) but I can't get it work for anything other than 127.0.0.1.
__________________
MikeJS is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 05-08-2009 , 16:31   Re: Plugin Autoupdater
Reply With Quote #13

Step by step it works better and better.
Now I can download files but...
Code:
sm_autoupdate_download
L 05/09/2009 - 00:27:10: <UPDATING> showhealth.smx to version 1.0.1 - Changes:
* 1.0.1
Minor code changes for better performance
Added config file
* 1.0.0
Initial Release

L 05/09/2009 - 00:27:10: Couldn't find gamedata.
L 05/09/2009 - 00:27:10: Downloaded addons\sourcemod\plugins\showhealth.smx
L 05/09/2009 - 00:27:10: Downloaded addons\sourcemod\scripting\showhealth.sp
After this I can't load/reload my plugin and I think know why. Here is a downloaded showhealth.sp file:
PHP Code:
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<
TITLE>302 Moved</TITLE></HEAD><BODY>
<
H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.ru/">here</A>.
</
BODY></HTML
And it seems that .smx has the same code inside.
__________________
For admins: My plugins

For developers: Colors library

Last edited by exvel; 05-08-2009 at 16:44.
exvel is offline
Send a message via ICQ to exvel
Downtown1
Veteran Member
Join Date: Mar 2004
Old 05-08-2009 , 18:21   Re: Plugin Autoupdater
Reply With Quote #14

Would be 10x more useful if we could host our plugins to be auto-updated from the AlliedModders site.

Fast suggestions:

* Add support for updating extensions. Delay overwriting the extension until the server is restarted? Notify the user to restart server when a new extension is downloaded.
* Add some kind of checksum support, something simple like MD5. Don't want to download a file that's corrupt and have it overwrite our stuff, now do we?

Very sweet btw, I wanted to do this feature myself for my plugin to make distribution simpler, but though that such a feature should be applicable across all plugins. Unfortunately I did not realize that plugins can call code from other plugins via CreateNative.

What a nice breakthrough!

Last edited by Downtown1; 05-08-2009 at 18:26.
Downtown1 is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-08-2009 , 18:42   Re: Plugin Autoupdater
Reply With Quote #15

Quote:
Originally Posted by Downtown1 View Post
* Add support for updating extensions. Delay overwriting the extension until the server is restarted? Notify the user to restart server when a new extension is downloaded.
Maybe.
Quote:
Originally Posted by Downtown1 View Post
* Add some kind of checksum support, something simple like MD5. Don't want to download a file that's corrupt and have it overwrite our stuff, now do we?
Why didn't I think of this
__________________
MikeJS is offline
Downtown1
Veteran Member
Join Date: Mar 2004
Old 05-08-2009 , 22:40   Re: Plugin Autoupdater
Reply With Quote #16

I release updates that often add significant functionality updates (especially when its major bug fixes) to my plugins, so having a way to deploy it faster will be invaluable. Unfortunately I've also recently started to require an extension (that I also develop), so having a way to automatically update that would be prime.

BTW, MikeJS do you hang out on #sourcemod ?
Downtown1 is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 05-08-2009 , 23:05   Re: Plugin Autoupdater
Reply With Quote #17

Quote:
Originally Posted by Downtown1 View Post
* Add support for updating extensions. Delay overwriting the extension until the server is restarted? Notify the user to restart server when a new extension is downloaded.
That's not possible since this plugin provides a set functions to other plugins and afaik an extension can't use natives that are provided by a plugin... The only solution i see if you want extensions support is if this was written as an extension and then writing an interface for these functions so other extensions could you use it and at the same time plugins by just creating interface wrappers.
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-09-2009 , 06:35   Re: Plugin Autoupdater
Reply With Quote #18

Quote:
Originally Posted by Downtown1 View Post
BTW, MikeJS do you hang out on #sourcemod ?
Sometimes
Quote:
Originally Posted by Fredd View Post
That's not possible since this plugin provides a set functions to other plugins and afaik an extension can't use natives that are provided by a plugin... The only solution i see if you want extensions support is if this was written as an extension and then writing an interface for these functions so other extensions could you use it and at the same time plugins by just creating interface wrappers.
You could release the extension with a plugin that updates the extension
__________________
MikeJS is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 05-09-2009 , 06:43   Re: Plugin Autoupdater
Reply With Quote #19

MikeJS, did you find a problem that I wrote above? Or it is google code issue? I didn't find any other good file/code hostings so I hope you will change plugin to work with google code.
Also it is strnage that version.xml downloads without any problems but other files has this strange html code.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-09-2009 , 06:49   Re: Plugin Autoupdater
Reply With Quote #20

Try using:
Code:
<binary>\files\showhealth.smx</binary>
<source>\files\showhealth.sp</source>
<gamedata>\files\empty.txt</gamedata>
__________________
MikeJS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode