Raised This Month: $32 Target: $400
 8% 

Plugin Autoupdater


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

I've already tried adding empty gamedata file and the only differece is that now it downloads an another html code but not a real plugin's code.
I looked into the code and found that download processes for all files happen in one moment so maybe google refuses more than 1 connection at the moment?
Attached Files
File Type: txt empty.txt (6.7 KB, 165 views)
__________________
For admins: My plugins

For developers: Colors library

Last edited by exvel; 05-09-2009 at 06:59.
exvel is offline
Send a message via ICQ to exvel
Downtown1
Veteran Member
Join Date: Mar 2004
Old 05-09-2009 , 13:44   Re: Plugin Autoupdater
Reply With Quote #22

Ok upon thinking about this.. why do you need a plugin to add autoupdate support to itself via code? Why not do it via some kind of configuration file.

i.e. to add support to autoupdate a plugin called abc.smx we go to data/autoupdate/abc.txt and it is a key-value file with the URL to the XML file?
Code:
//Filename: abc.txt
{
  "Plugins Repository"
  { 
    "http://localhost/plugins.xml"
   }
}
That way to add autoupdate support could be done to any plugin without having to edit the source code .
------------------

You could try iterating the plugins with GetPluginIterator/MorePlugins/ReadPlugin then with GetPluginFilename see if there's any matches entries in data/autoupdate and if there is then you just associate them with it. GetPluginInfo or "sm plugins list" to get the version of the loaded plugin .

Last edited by Downtown1; 05-09-2009 at 13:54.
Downtown1 is offline
blade81
Senior Member
Join Date: Apr 2005
Old 05-10-2009 , 05:41   Re: Plugin Autoupdater
Reply With Quote #23

Is it possible to add ftp support?
__________________
blade81 is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-10-2009 , 06:36   Re: Plugin Autoupdater
Reply With Quote #24

Quote:
Originally Posted by Downtown1 View Post
Ok upon thinking about this...
Nice idea.

Quote:
Originally Posted by blade81 View Post
Is it possible to add ftp support?
Probably not anytime soon
__________________
MikeJS is offline
mattressfish
Member
Join Date: Feb 2009
Old 05-11-2009 , 09:59   Re: Plugin Autoupdater
Reply With Quote #25

Quote:
Originally Posted by Downtown1 View Post
Ok upon thinking about this.. why do you need a plugin to add autoupdate support to itself via code? Why not do it via some kind of configuration file.

i.e. to add support to autoupdate a plugin called abc.smx we go to data/autoupdate/abc.txt and it is a key-value file with the URL to the XML file?
Code:
//Filename: abc.txt
{
  "Plugins Repository"
  { 
    "http://localhost/plugins.xml"
   }
}
That way to add autoupdate support could be done to any plugin without having to edit the source code .
------------------

You could try iterating the plugins with GetPluginIterator/MorePlugins/ReadPlugin then with GetPluginFilename see if there's any matches entries in data/autoupdate and if there is then you just associate them with it. GetPluginInfo or "sm plugins list" to get the version of the loaded plugin .
That's an even better idea!

I've been waiting for something like this guys. Keep up the good work!
mattressfish is offline
Poheart
Member
Join Date: Mar 2009
Old 05-11-2009 , 11:11   Re: Plugin Autoupdater
Reply With Quote #26

it working on Left 4 Dead SourceMod Plugin?
And i don't know how to use it- -
Thanks a lot
Poheart is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 05-11-2009 , 11:44   Re: Plugin Autoupdater
Reply With Quote #27

Tryed svn 2 http url:
http://code.google.com/p/showhealth/...wse/#svn/trunk
showhealth.smx: http://showhealth.googlecode.com/svn...showhealth.smx
showhealth.sp: http://showhealth.googlecode.com/svn.../showhealth.sp

Same result. Text in .sp and .smx files:
Quote:
<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>
__________________
For admins: My plugins

For developers: Colors library

Last edited by exvel; 05-11-2009 at 11:54.
exvel is offline
Send a message via ICQ to exvel
MikeJS
Senior Member
Join Date: Nov 2008
Old 05-11-2009 , 12:05   Re: Plugin Autoupdater
Reply With Quote #28

Have you tried using code.google.com in the .sp and
Code:
<source>\p\showhealth\source\browse\trunk\scripting\showhealth.sp</source>
// etc
in the xml?
__________________
MikeJS is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 05-11-2009 , 12:14   Re: Plugin Autoupdater
Reply With Quote #29

http://code.google.com/p/showhealth/.../showhealth.sp is incorrect page, it shows info about file.
This one is a direct link: http://showhealth.googlecode.com/svn.../showhealth.sp and I tested plugin with it.
Also version.xml downloads well so I think links are correct. Mike, please figure it out. I am sure that something wrong inside plugin's downloading code. Maybe it is better to make a line for downloading-files so they won't download at the same time.
__________________
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-11-2009 , 13:43   Re: Plugin Autoupdater
Reply With Quote #30

Updated the plugin so it actually works with something other than XAMPP (use "/" rather than "\" in the xml file now). Also added a public cvar because I forgot to add it before.
__________________
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 22:10.


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