I have some good upgrading code in my Qserve scripts...
The script automates producing upgrades and automates upgrading on the user end. The upgrade is installed without shutting down mirc. Upgrades are downloaded via http and uploaded via FTP. It also supports upgrading it's self.
and download, look at the following files...
- system\Remotes\other.ini (Upgrade the Upgrade Module)
* on *:SIGNAL:UPGRADE_START
* alias webget.f
* alias install.upgrade.upgrade
* on 1:sockopen:webfile2
* on 1:sockread:webfile2
* on 1:sockclose:webfile2
* on *:SIGNAL:UPGRADE_COMPLETE (Remove run.once from here)
- system\Remotes\Upgrades.ini (Primary upgrade code)
* Look at the whole file
* %FTP.Site 22.214.171.124
* %FTP.Port 21
* %FTP.Login loginname
* %FTP.Pass password
* %FTP.PostUpload $true
* %FTP.RemoteFolder /Qserve-Update/
* Used for compression
%FTP.Login and %FTP.Pass are not in the scripts, they are variables only needed on the producers end and should be set manulally...
- You will need to create a "version.txt" file as a template of what files to include in the upgrade. Put it in $mircdir.
MASTER_LIST (Dummy line, not used...)
Also I use a global variable called "%Version". It is increment by 0.001 every time /make.upgrade is done.