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

21 篇文章 0 订阅
1 篇文章 0 订阅

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 <don.h@free.fr>
	
    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>
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值