GUP客户端软件版本升级方案

gup是notepad++编辑器的在线升级方案:

 

----------------------------------------------------------------------------------

使用php或者是java其他web动态语言编写个cgi处理单元,根据传过来的属性 Version,判断是否需要升级?

<?xml version=\"1.0\"?>
<GUP>
	<NeedToBeUpdated>no</NeedToBeUpdated>
</GUP>

 或

<?xml version=\"1.0\"?>
<GUP>
	<NeedToBeUpdated>yes</NeedToBeUpdated>
	<Version>$lastestVersionStr</Version>
	<Location>$InstallPackage</Location>
</GUP>
 

同时配置客户端配置 gup.xml:

<?xml version="1.0" ?>
<!--
    Copyright 2007 Don HO <[email protected]>
	
    This file is part of GUP.

    GUP is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    GUP is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with GUP.  If not, see <http://www.gnu.org/licenses/>.
-->
<GUPInput>
	<!-- optional.
	It's the current version of your program. GUP will add "?version=versionNumber" at the end of InfoUrl.
	This parameter will be ignored if you pass directly your version number to GUP 
	-->
	<Version>1.0</Version>

	<!-- Mandatory.
	This is the url (your web application) from where your GUP gets the update information.
	The tag "Version" value will be the parameter that your web application can use $_GET["version"] to get the current version of the program to be updated.
	With the current version value, your web application should return a set of information in xml form to tell GUP update version and the location of update package to download.
	-->
	<InfoUrl>http://10.8.103.254/cgi-bin/getDownLoadUrl.php</InfoUrl>

	<!-- optional. 
	The window class name of program that you want to update.
	GUP uses FindWindow routine to get the Handle of window, then send WM_CLOSE to the handle in order to quit the program.
	If there are several running instances, GUP will kill one by one until the last instance.
	
	In win32 system, if a program is running, the binary file is locked. 
	Use this parameter to close the program to make sure the old binary files can be erased by new ones.
	-->
	<ClassName2Close>HollyBar</ClassName2Close>
	
	<!-- Optional.
	This is the title to display on the messagebox title bar.
	If extraCmd is set (parameter is presentand the value is not empty), the 3rd button will be appear.
	extraCmd (with its wParam and lParam) will be sent to the handle of application indicated in ClassName2Close
	-->
	<MessageBoxTitle extraCmd="" ecWparam="" ecLparam="">HollyBar update</MessageBoxTitle>

	<!-- optional. YES by default.
	This parameter can hide all the network error message. 
	If "SilentMode" is set as "yes", then users won't be warned when there's no connection of internet or the url is not available. 
	-->
	<SilentMode>no</SilentMode>
	
</GUPInput>
 

你可能感兴趣的:(客户端)