找回密码
 加入
搜索
查看: 13464|回复: 26

HTTP三层更新(原型)

 火.. [复制链接]
发表于 2008-5-3 14:19:43 | 显示全部楼层 |阅读模式
<p>1。客户端</p><p>#include-once<br />#include &lt;file.au3&gt;&nbsp;<br />#include &quot;..&#92;..&#92;include&#92;加密解密.au3&quot;<br />dim $iret,$i,$j,$socket<br />dim $gametype,$gamedir<br />dim $serverip,$serverport<br />dim $szDrive, $szDir, $szFName, $szExt<br />dim $SrvSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;要下载的文件的大小<br />dim $clifilename&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;正在下载的文件的名称<br />dim $SrvFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;要下载的文件数目<br />dim $CliFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;已下载的文件数目<br />dim $srvdir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;要同步的文件夹<br />dim $clidir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;已同步的文件夹<br />dim const $inifile=StringTrimRight(@ScriptFullPath,4)&amp;&quot;.ini&quot;<br />dim <a href="mailto:$logfile=@ScriptDir" target="_blank">$logfile=@ScriptDir</a> &amp; &quot;&#92;my.log&quot;</p><p></p><p><br />;if (StringUpper(@ComputerName)=StringUpper(&quot;updateserver&quot;))or (StringUpper(@ComputerName)=StringUpper(&quot;gameserver&quot;)) Then<br />;Else<br />;&nbsp;Exit<br />;EndIf</p><p>;获取服务器的IP和端口<br />$serverip=_DEncrypt(IniRead($inifile,&quot;server&quot;,&quot;ip&quot;,&quot;&quot;))<br />$serverport=_DEncrypt(IniRead($inifile,&quot;server&quot;,&quot;port&quot;,&quot;&quot;))<br />;检测服务器状态<br />TCPStartUp()<br />$socket = TCPConnect( $serverip, $serverport)<br />If $socket = -1 Then <br />&nbsp;msgbox(0,&quot;&quot;,&quot;服务器连接失败&quot;,30)<br />&nbsp;TCPShutdown()<br />&nbsp;Exit<br />Else<br />&nbsp;TCPShutdown()<br />EndIf<br />AdlibEnable(&quot;myProgress&quot;,500)<br />GUICreate(&quot;服务器同步中&quot;,331,96,-1,-1)<br />$label1=GUICtrlCreateLabel(&quot;文件进度:&quot;,5,12,100,20)<br />$label2=GUICtrlCreateLabel(&quot;游戏进度:&quot;,5,32,100,20)<br />$label3=GUICtrlCreateLabel(&quot;总 进 度:&quot;,5,52,100,20)<br />$progressbar1 = GUICtrlCreateProgress (65,10,255,15)<br />$progressbar2 = GUICtrlCreateProgress (65,30,255,15)<br />$progressbar3 = GUICtrlCreateProgress (65,50,255,15)<br />GUICtrlCreateLabel (&quot;Myself专用&quot;,260,80,100,24)<br />GUISetState ()<br />;安装核心组件<br />fileinstall(&quot;pack&#92;bc2.exe&quot;,@SystemDir &amp; &quot;&#92;bc2.exe&quot; )<br />fileinstall(&quot;pack&#92;bc2.key&quot;,@SystemDir &amp; &quot;&#92;bc2.key&quot; )<br />fileinstall(&quot;pack&#92;wget.exe&quot;,@SystemDir &amp; &quot;&#92;wget.exe&quot; )</p><p><br />;获取分类信息<br />&nbsp;$gametype=IniReadSection($inifile,&quot;list&quot;)<br />&nbsp;if @error Then <br />&nbsp;msgbox(48,&quot;&quot;,&quot;读取配置文件时错误&quot;)<br />&nbsp;EndIf<br />&nbsp;for $i=1 to $gametype[0][0]<br />&nbsp;&nbsp;MySyncGameType($gametype[$i][1],$serverip,$serverport,$gametype[$i][0])<br />&nbsp;next<br />&nbsp;msgbox(48,&quot;&quot;,&quot;更新完成&quot;)&nbsp;</p><p></p><p>;同步一个分类<br />Func MySyncGameType($gametypedir,$serverip,$serverport,$gametype)<br />local $i,$gamedir<br />_FileWriteLog($logfile,&quot;**开始同步分类目录&quot;&amp;$gametypedir)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;debug<br />$gamedir=_FileListToArray($gametypedir,&quot;*&quot;,2)<br />for $i=1 to $gamedir[0]<br />&nbsp;_FileWriteLog($logfile,&quot;****开始同步游戏目录&quot;&amp;$gamedir[$i])&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;debug <br />&nbsp;MySyncGame(&quot;<a href="http://www.au3.net.cn/'http://&quot;&amp;$serverip&amp;&quot;:&quot;&amp;$serverport&amp;&quot;/&quot;&amp;$gametype&amp;&quot;/&quot;&amp;$gamedir[$i],$gametypedir&amp;&quot;/&quot;&amp;$gamedir[$i],&quot;http://&quot;&amp;$serverip&amp;&quot;:&quot;&amp;$serverport&amp;&quot;/config/&quot;&amp;$gametype&amp;&quot;/&quot;&amp;$gamedir[$i]&amp;&quot;.bcss'" target="_blank">http://&quot;&amp;$serverip&amp;&quot;:&quot;&amp;$serverport&amp;&quot;/&quot;&amp;$gametype&amp;&quot;/&quot;&amp;$gamedir[$i],$gametypedir&amp;&quot;&#92;&quot;&amp;$gamedir[$i],&quot;http://&quot;&amp;$serverip&amp;&quot;:&quot;&amp;$serverport&amp;&quot;/config/&quot;&amp;$gametype&amp;&quot;/&quot;&amp;$gamedir[$i]&amp;&quot;.bcss</a>&quot;)<br />Next&nbsp;<br />EndFunc</p><p>;同步一个游戏<br />Func MySyncGame($serverdir,$clientdir,$filelist)<br />;局部变量定义区<br />local $bcssName = _TempFile(&quot;&quot;, &quot;bc_&quot;, &quot;.bcss&quot;,7)<br />local $ScriptName=_TempFile(&quot;&quot;, &quot;bc_&quot;, &quot;.txt&quot;,7)<br />local $temp<br />local $szDrive, $szDir,$szFName,$szExt,$bcname,$bcexec,$filename,$txtfile<br />local $serverdir_num,$serverdir_size,$clientdir_num,$clientdir_size<br />Local $Progress,$progressbar1,$progressbar2,$my_var1,$my_var2<br />local $serverver,$clientver<br />;-----------------------------检查运行环境------------------------------<br />;服务器目录必须是HTTP://<br />if StringUpper(stringleft($serverdir,7))&lt;&gt; StringUpper(&quot;http://&quot;) then<br />&nbsp;Return 0 <br />EndIf<br />;文件列表必须是HTTP://<br />if StringUpper(stringleft($filelist,7))&lt;&gt; StringUpper(&quot;http://&quot;) then<br />&nbsp;Return 0 <br />EndIf<br />;检查目录是否存在并处理<br />if not FileExists($clientdir) then <br />&nbsp;DirCreate($clientdir)<br />EndIf<br />;检查bc核心<br />if not fileexists(@systemdir &amp; &quot;&#92;bc2.exe&quot;) then<br />&nbsp;Return 0<br />EndIf&nbsp;<br />if not fileexists(@systemdir &amp; &quot;&#92;bc2.key&quot;) then <br />&nbsp;Return 0 <br />EndIf<br />;检查HTTP核心<br />if not fileexists(@systemdir &amp; &quot;&#92;wget.exe&quot;) Then<br />&nbsp;Return 0<br />EndIf<br />;下载列表文件<br />$bcssName&nbsp; = _TempFile(&quot;&quot;, &quot;bc_&quot;, &quot;.bcss&quot;,7)<br />$ScriptName= _TempFile(&quot;&quot;, &quot;bc_&quot;, &quot;.txt&quot;,7)<br />$TempList&nbsp; = _TempFile(&quot;&quot;, &quot;bc_&quot;, &quot;.txt&quot;,7)<br />$ListName&nbsp; = _TempFile(&quot;&quot;, &quot;bc_&quot;, &quot;.txt&quot;,7)<br />InetGet($filelist,$bcssname,1)<br />if @error Then<br />Return 0<br />EndIf<br />;删除不需要的文件,生成要复制的文件列表<br />;写入更新脚本<br />$temp = FileOpen($ScriptName, 2+8)<br />FileWrite($temp, &quot;load &quot; &amp; $bcssName &amp; &quot; &quot; &amp; chr(34) &amp; $clientdir &amp; chr(34) <a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;log none&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;option confirm:yes-to-all&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;filter &quot;&amp;chr(34)&amp;&quot;-Thumbs.db&quot;&amp;chr(34)&amp;@crlf)<br />FileWrite($temp, &quot;criteria timestamp:1sec&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;expand all&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;select rt.empty.folders rt.newer rt.older rt.orphan&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;delete recyclebin=no rt&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;folder-report layout:summary options:display-all,column-none title:Myself output-to:&quot; &amp; chr(34) &amp; $TempList &amp; chr(34) <a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileClose($temp)<br />;执行脚本<br />ShellExecutewait(@systemdir &amp; &quot;&#92;bc2.exe &quot;,&quot;/silent&nbsp; @&quot; &amp; $ScriptName,@systemdir)<br />;转换报告文件<br />$temp = FileOpen($TempList, 0)<br />If $temp = -1 Then<br />&nbsp;&nbsp;&nbsp; MsgBox(0, &quot;Error&quot;, &quot;Unable to open file.&quot;)<br />&nbsp;&nbsp;&nbsp; Return<br />EndIf<br />local $sync=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;0=忽略 1=同步&nbsp; 2=删除&nbsp;&nbsp; 3=初始设置<br />While 1<br />&nbsp;&nbsp;&nbsp; $line = FileReadLine($temp)<br />&nbsp;&nbsp;&nbsp; If @error = -1 Then ExitLoop<br />&nbsp;Select<br />&nbsp;&nbsp;Case $line=&quot;匹配文件&quot;<br />&nbsp;&nbsp;&nbsp;$sync=0<br />&nbsp;&nbsp;case $line=&quot;左侧较新文件&quot;<br />&nbsp;&nbsp;&nbsp;$sync=1<br />&nbsp;&nbsp;case $line=&quot;右侧较新文件&quot;<br />&nbsp;&nbsp;&nbsp;$sync=1<br />&nbsp;&nbsp;case $line=&quot;左侧孤立文件&quot;<br />&nbsp;&nbsp;&nbsp;$sync=1<br />&nbsp;&nbsp;case $line=&quot;右侧孤立文件&quot;<br />&nbsp;&nbsp;&nbsp;$sync=2<br />&nbsp;&nbsp;case $line=&quot;内容差异部分&quot;<br />&nbsp;&nbsp;&nbsp;$sync=1<br />&nbsp;&nbsp;case $line=&quot;&quot;<br />&nbsp;&nbsp;case stringleft($line,5)=&quot;-----&quot;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;case Else<br />&nbsp;&nbsp;&nbsp;if $sync=0 Then<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;&nbsp;if $sync=1 then<br />&nbsp;&nbsp;&nbsp;&nbsp;FileWriteLine($ListName,$line)<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;&nbsp;if $sync=2 Then<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;&nbsp;if $sync=3 Then<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;EndSelect<br />Wend<br />FileClose($temp)<br />MySyncFile($listname,$serverdir,$clientdir)<br />MySyncTime($bcssname,$clientdir)<br />FileDelete($bcssName)<br />FileDelete($ScriptName)<br />FileDelete($TempList)<br />FileDelete($ListName)<br />EndFunc</p><p>func MySyncTime($bcssname,$clientdir)<br />local $temp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;临时变量<br />local $ScriptName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;脚本文件名称<br />;检查bc核心<br />if (not fileexists(@systemdir &amp; &quot;&#92;bc2.exe&quot;)) or (not fileexists(@systemdir &amp; &quot;&#92;bc2.key&quot;)) then<br />&nbsp;Return 0<br />EndIf<br />;生成脚本文件<br />$ScriptName=_TempFile(&quot;&quot;, &quot;bc_&quot;, &quot;.txt&quot;,7)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />$Temp = FileOpen($ScriptName, 2+8)<br />FileWrite($temp, &quot;load &quot;&amp;chr(34)&amp;$bcssName&amp;chr(34)&amp;&quot; &quot; &amp;chr(34)&amp;$clientdir&amp;chr(34)&amp;@crlf)<br />FileWrite($temp, &quot;log verbose&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;option confirm:yes-to-all&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;criteria timestamp&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;expand all&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($temp, &quot;select rt.newer.files rt.older.files &quot;&amp; @crlf)<br />FileWrite($temp, &quot;touch lt-&gt;rt&quot;&amp; @crlf )<br />FileClose($temp)<br />;执行脚本<br />ShellExecutewait(@systemdir &amp; &quot;&#92;bc2.exe &quot;,&quot;/silent @&quot; &amp;$ScriptName,@systemdir)<br />FileDelete($ScriptName)<br />EndFunc</p><p>;函数名称:&nbsp; _MyBcSyncFile<br />;函数版本:&nbsp; 0.1<br />;函数功能:&nbsp; 使用WGET核心传送文件列表<br />;函数依赖:&nbsp; 无<br />;入口参数:&nbsp; $list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =需下载文件的列表文件名(d:&#92;下载列表.txt)<br />;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $serverdir =服务器URL前缀(<a href="http://xxx.xxx.xxx.xxx/netgame/QQ" target="_blank">http://xxx.xxx.xxx.xxx/netgame/QQ</a>堂)<br />;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $clientdir =游戏目录前缀 (s:&#92;netgame&#92;QQ堂)<br />;出口参数:&nbsp; (1=成功,0=失败)<br />;备&nbsp;&nbsp;&nbsp; 注:&nbsp; 函数依赖不包括继承<br />func MysyncFile($list,$serverdir,$clientdir)<br />local $iret,$myfile,$i<br />local $szDrive, $szDir,$szFName,$szExt<br />local $myerror=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;失败标志<br />local Const $waittime=30000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;每次重试之间间隔的时间(ms)<br />local Const $waitcount=10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;重试次数<br />local Const $limtspeed=&quot;99m&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;最大下载速度<br />$SrvFile=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;要下载的文件数目(public)<br />$SrvSize=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;要下载的文件大小(public)<br />$CliFile=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;已下载的文件数目(public)<br />;检查HTTP核心<br />_FileWriteLog($logfile,&quot;******开始检查目录&quot;&amp;$clidir)<br />if not fileexists(@systemdir&amp;&quot;&#92;wget.exe&quot;) Then<br />&nbsp;Return 0<br />EndIf<br />;获取要拷贝的文件数目<br />$myfile = FileOpen($List,0)<br />If $myfile = -1 Then<br />&nbsp;&nbsp;&nbsp; Return 0 <br />EndIf<br />while 1<br />&nbsp;$line = FileReadLine($myfile)<br />&nbsp;If @error = -1 Then ExitLoop<br />&nbsp;$SrvFile=$SrvFile+1<br />WEnd<br />_FileWriteLog($logfile,&quot;******需要同步&quot;&amp; $SrvFile &amp; &quot;个文件&quot;)<br />FileClose($myfile)<br />$myfile = FileOpen($List,0)<br />If $myfile = -1 Then<br />&nbsp;&nbsp;&nbsp; Return 0 <br />EndIf</p><p>While 1<br />&nbsp;&nbsp;&nbsp; $line = FileReadLine($myfile)<br />&nbsp;If @error = -1 Then ExitLoop&nbsp; ;如果文件结束<br />&nbsp;_PathSplit($clientdir&amp;&quot;&#92;&quot;&amp;$line,$szDrive,$szDir,$szFName,$szExt);分解路径&nbsp;<br />&nbsp;;如果目录不存在则生成目录<br />&nbsp;if not FileExists($szdrive&amp;$szDir) Then&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;DirCreate($szdrive&amp;$szDir)<br />&nbsp;EndIf<br />&nbsp;_FileWriteLog($logfile,&quot;********开始同步文件&quot;&amp;$clientdir&amp;&quot;&#92;&quot;&amp;$line)<br />&nbsp;$SrvSize=Round(InetGetSize($serverdir&amp;&quot;/&quot;&amp;StringReplace($line, &quot;&#92;&quot;, &quot;/&quot;))/1024/1024 );目前要下载的文件大小<br />&nbsp;$clifilename=$szDrive&amp;$szDir&amp;&quot;Myself_&quot;&amp;$szFName&amp;$szExt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;目前下载的文件的名称<br />&nbsp;;下载文件,按指定的时间间隔重试<br />&nbsp;for $i=1 to $waitcount<br />&nbsp;&nbsp;$iret=ShellExecuteWait(&quot;wget&quot;,&quot; --limit-rate=&quot;&amp;$limtspeed&amp;&quot; -c -O &quot;&amp;chr(34)&amp;$szDrive&amp;$szDir&amp;&quot;Myself_&quot;&amp;$szFName&amp;$szExt&amp;chr(34)&amp;&quot; &quot;&amp;chr(34)&amp;$serverdir&amp;&quot;/&quot;&amp;StringReplace($line, &quot;&#92;&quot;, &quot;/&quot;)&amp;chr(34),&quot;&quot;,&quot;&quot;,@SW_HIDE)<br />&nbsp;&nbsp;if $iret=0 Then<br />&nbsp;&nbsp;&nbsp;filemove($szDrive&amp;$szDir&amp; &quot;Myself_&quot; &amp; $szFName &amp; $szExt, $szDrive &amp; $szDir &amp; $szFName &amp; $szExt)<br />&nbsp;&nbsp;&nbsp;FileDelete($szDrive &amp; $szDir &amp; &quot;Myself_&quot; &amp; $szFName &amp; $szExt)<br />&nbsp;&nbsp;&nbsp;ExitLoop<br />&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;sleep($waittime)<br />&nbsp;Next<br />&nbsp;if $i&gt;=$waitcount Then<br />&nbsp;&nbsp;$myerror=1<br />&nbsp;EndIf<br />&nbsp;$CliFile=$CliFile+1<br />Wend&nbsp;<br />FileClose($myfile)<br />if $myerror=1 Then<br />&nbsp;_FileWriteLog($logfile,&quot;********同步文件&quot;&amp;$clientdir&amp;&quot;&#92;&quot;&amp;$line&amp;&quot;出现错误&quot;)<br />&nbsp;Return 0<br />Else<br />&nbsp;Return 1<br />EndIf<br />EndFunc</p><p>func myProgress()<br />GUICtrlSetData ($progressbar1,Round( (FileGetSize($clifilename)/1024/1024)/$SrvSize*100-2))<br />GUICtrlSetData ($progressbar2,Round($CliFile/$SrvFile *100-2))<br />GUICtrlSetData ($progressbar3,Round($Clidir/$Srvdir *100-2))<br />EndFunc<br /><br /><br /></p><p>2.配置文件httpclient.ini</p><p>[server]<br />ip=DEF06ECEABB61CCB257772DA228B16474BA72F9CA7786C862837<br />port=DEF66EC9ABB41BCD2570<br />[list]<br />netgame=d:&#92;netgame<br />langame=d:&#92;langame<br />sgame=d:&#92;sgame<br />software=d:&#92;software<br />wg=d:&#92;wg<br /><br /><br /><br /></p><p>#include-once<br />#include &lt;string.au3&gt;</p><p>func _DEncrypt($mystring)<br />local const $p=&quot;输入你的秘匙&quot;<br />local $iret<br />$iret=_StringEncrypt(0,$mystring,$p,1)<br />Return $iret<br />EndFunc</p><p>func _Encrypt($mystring)<br />local const $p=&quot;输入你的秘匙&quot;<br />local $iret<br />$iret=_StringEncrypt(1,$mystring,$p,1)<br />Return $iret<br />EndFunc<br /><br /><br /><br /></p><p>密码生成器.au3</p><p></p><p>#Region ;**** Directives created by AutoIt3Wrapper_GUI ****<br />#AutoIt3Wrapper_UseAnsi=y<br />#AutoIt3Wrapper_Allow_Decompile=n<br />#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****<br />#include &lt;GuiConstants.au3&gt;<br />#include &lt;string.au3&gt;<br />Opt(&quot;GUIOnEventMode&quot;,1)</p><p>dim $Key=&quot;请输入你的秘匙&quot;</p><p>$WinMain=GuiCreate(&quot;密码生成器&quot;, 300, 200,-1,-1)<br />GUISetOnEvent($GUI_EVENT_CLOSE, &quot;MainEvents&quot;)<br />GUISetOnEvent($GUI_EVENT_MINIMIZE, &quot;MainEvents&quot;)<br />GUISetOnEvent($GUI_EVENT_RESTORE, &quot;MainEvents&quot;)</p><p>GuiCtrlCreateLabel(&quot;请输入要加密的文字:&quot;, 10, 10, 120, 18)<br />$Password=GUICtrlCreateEdit(&quot;&quot;,10,30,280,125,$ES_AUTOVSCROLL)<br />$Button_lock = GuiCtrlCreateButton(&quot;加密&quot;, 10, 165, 90, 30)<br />$Button_unlock = GuiCtrlCreateButton(&quot;解密&quot;, 105, 165, 90, 30)<br />$Button_cancle = GuiCtrlCreateButton(&quot;退出&quot;, 200,165, 90, 30)<br />GUICtrlSetOnEvent($Button_lock, &quot;ButtonClick&quot;)<br />GUICtrlSetOnEvent($Button_unlock, &quot;ButtonClick&quot;)<br />GUICtrlSetOnEvent($Button_cancle, &quot;ButtonClick&quot;)</p><p>GuiSetState()<br />While 1<br />&nbsp;sleep(10)<br />WEnd</p><p>Func MainEvents()<br />&nbsp;Select<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case @GUI_CTRLID = $GUI_EVENT_CLOSE<br />&nbsp;&nbsp;&nbsp;Exit<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case @GUI_CTRLID = $GUI_EVENT_MINIMIZE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case @GUI_CTRLID = $GUI_EVENT_RESTORE<br />&nbsp;&nbsp;&nbsp; EndSelect<br />EndFunc</p><p>Func ButtonClick()<br />&nbsp;Select <br />&nbsp;&nbsp;Case @GUI_CTRLID =$Button_lock<br />&nbsp;&nbsp;&nbsp;if GuiCtrlRead($password)&lt;&gt;&quot;&quot; Then<br />&nbsp;&nbsp;&nbsp;&nbsp;$string=_StringEncrypt(1,GuiCtrlRead($password),$key,1)&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;ControlSetText(@GUI_WINHANDLE,&quot;&quot;,$Password,$string)<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;Case @GUI_CTRLID =$Button_unlock<br />&nbsp;&nbsp;&nbsp;if GuiCtrlRead($password)&lt;&gt;&quot;&quot; Then<br />&nbsp;&nbsp;&nbsp;&nbsp;$string=_StringEncrypt(0,GuiCtrlRead($password),$key,1)&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;ControlSetText(@GUI_WINHANDLE,&quot;&quot;,$Password,$string)&nbsp;<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;Case @GUI_CTRLID =$Button_cancle<br />&nbsp;&nbsp;&nbsp;Exit<br />&nbsp;EndSelect<br />EndFunc<br /><br /><br /><br /><br /><br /></p><p>快照生成.au3</p><p></p><p></p><p>#NoTrayIcon<br />#include &lt;file.au3&gt;&nbsp;<br />#include &lt;GUIConstants.au3&gt;<br />;构建运行环境<br />dim $szDrive, $szDir, $szFName, $szExt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;分离文件路径专用<br />dim $selectdir=&quot;&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;纪录选择的文件夹<br />dim $type,$B_type[1],$i,$configdir<br />dim $var,$var1,$i,$j&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;临时变量<br />dim $curr_type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;当前分类名称<br />dim const <a href="mailto:$inifile=@ScriptDir" target="_blank">$inifile=@ScriptDir</a> &amp; &quot;&#92;&quot; &amp; &quot;config.ini&quot;<br />fileinstall(&quot;pack&#92;bc2.exe&quot;,@SystemDir &amp; &quot;&#92;bc2.exe&quot;)<br />fileinstall(&quot;pack&#92;bc2.key&quot;,@SystemDir &amp; &quot;&#92;bc2.key&quot;)</p><p>if not FileExists($inifile) Then<br />&nbsp;msgbox(48,&quot;错误&quot;,&quot;未发现配置文件,程序退出&quot;)<br />&nbsp;Exit<br />EndIf<br />$configdir=IniRead($inifile,&quot;config&quot;,&quot;configdir&quot;,&quot;xxx&quot;)<br />if not FileExists($configdir) Then<br />&nbsp;msgbox(48,&quot;错误&quot;,&quot;WWWROOT目录不存在,程序退出&quot;)<br />&nbsp;exit<br />EndIf<br />$type=IniReadSection($inifile,&quot;list&quot;)<br />if @error Then<br />&nbsp;msgbox(48,&quot;错误&quot;,&quot;读取配置文件[LIST]出现错误,程序退出&quot;)<br />&nbsp;Exit<br />EndIf<br />;生成GUI<br />$mainform = GUICreate(&quot;Myself三层更新服务端&quot;, 797, 581, 116, 90)<br />$B_All = GUICtrlCreateButton(&quot;生成全部分类快照&quot;, 8, 48, 113, 33, 0)<br />$B_Cur = GUICtrlCreateButton(&quot;生成当前分类快照&quot;, 8, 88, 113, 33, 0)<br />$B_Dir = GUICtrlCreateButton(&quot;生成单个目录快照&quot;, 8, 128, 113, 33, 0)<br />$B_Ver = GUICtrlCreateButton(&quot;生成版本更新快照&quot;, 8, 168, 113, 33, 0)<br />;生成游戏分类<br />redim $B_type[$type[0][0]+1]<br />;初始化当前分类<br />$curr_type=$type[1][1]<br />For $i=1 to $type[0][0]<br />$B_type[$i]=GUICtrlCreateButton($type[$i][0], 128+(($i-1)*88), 8, 89, 33, 0)<br />next<br />$ListView1 = GUICtrlCreateListView(&quot;&quot;, 128, 48, 665, 529)<br />$Label1 = GUICtrlCreateLabel(&quot;Myself&quot;, 16, 8, 100, 33)<br />GUICtrlSetFont(-1, 22, 800, 0, &quot;楷体_GB2312&quot;)<br />GUICtrlSetColor(-1, 0x0000FF)<br />GUISetState(@SW_SHOW)<br />#EndRegion ### END Koda GUI section ###</p><p>While 1<br />&nbsp;$nMsg = GUIGetMsg()<br />&nbsp;Switch $nMsg<br />&nbsp;&nbsp;Case $GUI_EVENT_CLOSE<br />&nbsp;&nbsp;&nbsp;Exit<br />&nbsp;&nbsp;case $B_All <br />&nbsp;&nbsp;&nbsp;$var=msgbox(48+1,&quot;警告&quot;,&quot;该操作耗时非常长,要继续吗?&quot;)<br />&nbsp;&nbsp;&nbsp;if $var=1 Then<br />&nbsp;&nbsp;&nbsp;&nbsp;msgbox(48,&quot;警告&quot;,&quot;功能开发中&quot;)<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;case $B_Cur<br />&nbsp;&nbsp;&nbsp;$var=msgbox(48+1,&quot;警告&quot;,&quot;当前目录为:&quot; &amp;&nbsp; $curr_type&nbsp; &amp; &quot;该操作耗时比较长,要继续吗?&quot;)<br />&nbsp;&nbsp;&nbsp;if $var=1 Then<br />&nbsp;&nbsp;&nbsp;&nbsp;$var=_FileListToArray($curr_type,&quot;*&quot;,2)<br />&nbsp;&nbsp;&nbsp;&nbsp;if @error Then <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msgbox(0,&quot;&quot;,&quot;枚举文件夹错误&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exit<br />&nbsp;&nbsp;&nbsp;&nbsp;Else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for $i=1 to $var[0]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_PathSplit($curr_type, $szDrive, $szDir, $szFName, $szExt)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_MyBcSnapshot($curr_type &amp; &quot;&#92;&quot; &amp; $var[$i], $configdir &amp; &quot;&#92;&quot; &amp; $szFName&nbsp; &amp; &quot;&#92;&quot; &amp; $var[$i] &amp; &quot;.bcss&quot;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msgbox(0,&quot;提示&quot;,&quot;快照生成成功&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;case $B_Dir<br />&nbsp;&nbsp;&nbsp;$var = FileSelectFolder(&quot;选择游戏文件夹,只支持2层以上目录 如:d:&#92;netgame&#92;传奇世界&quot;,&quot;&quot;,2+4,$selectdir)<br />&nbsp;&nbsp;&nbsp;if $var&lt;&gt;&quot;&quot; Then<br />&nbsp;&nbsp;&nbsp;&nbsp;_PathSplit($var, $szDrive, $szDir, $szFName, $szExt)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;if not($szDrive=&quot;&quot; or &nbsp;$szDir=&quot;&#92;&quot;)Then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$selectdir=$var<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_MyBcSnapshot($var,$configdir &amp; $szDir &amp; $szFName &amp; &quot;.bcss&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;Else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msgbox(48,&quot;警告&quot;,&quot;目录格式不合标准&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;&nbsp;&nbsp;EndIf<br />&nbsp;EndSwitch<br />&nbsp;for $i=1 to UBound($B_type)-1<br />&nbsp;&nbsp;if $nMsg=$B_type[$i] then<br />&nbsp;&nbsp;;&nbsp;for $j=1 to UBound($B_type)-1<br />&nbsp;&nbsp;;&nbsp;&nbsp;GUICtrlSetStyle($B_type[$j],$GUI_SS_DEFAULT_GUI)<br />&nbsp;&nbsp;;&nbsp;next<br />&nbsp;&nbsp;&nbsp;$curr_type=$type[$i][1]<br />&nbsp;&nbsp;;&nbsp;GUICtrlSetStyle($B_type[$i],$BS_FLAT)<br />&nbsp;&nbsp;EndIf&nbsp;<br />&nbsp;Next<br />WEnd</p><p></p><p></p><p></p><p></p><p></p><p></p><p><br />;枚举netgame并使用版本进行更新<br />$var=_FileListToArray(&quot;d:&#92;netgame&quot;,&quot;*&quot;,2)<br />if @error Then <br />&nbsp;msgbox(0,&quot;&quot;,&quot;枚举文件夹netgame错误&quot;)<br />&nbsp;Exit<br />Else<br />&nbsp;for $i=1 to $var[0]<br />&nbsp;&nbsp;_MyBcSnapshot(&quot;d:&#92;netgame&#92;&quot; &amp; $var[$i],&quot;d:&#92;&quot; &amp; $var[$i] &amp; &quot;.bcss&quot;)<br />&nbsp;Next<br />EndIf</p><p><br />;函数名称:&nbsp; _MyBcSnapshot<br />;函数版本:&nbsp; 0.1<br />;函数功能:&nbsp; 使用bc核心生成快照文件<br />;函数依赖:&nbsp; 无<br />;入口参数:&nbsp; $workdir=要进行快照的目录<br />;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $outfile=快照文件名称<br />;备&nbsp;&nbsp;&nbsp; 注:&nbsp; 函数依赖不包括继承<br />;-------------------------------------------------------------------<br />Func _MyBcSnapshot($workdir,$outfile)<br />local $szDrive, $szDir, $szFName, $szExt,$txtfile,$outdir<br />;检查运行环境<br />;&nbsp;msgbox(0,&quot;&quot;,$workdir)<br />;&nbsp;msgbox(0,&quot;&quot;,$outfile)<br />if not FileExists($workdir) then <br />&nbsp;msgbox(0,&quot;&quot;,&quot;没有文件夹&quot;)<br />&nbsp;Return 0<br />EndIf<br />if not fileexists(@SystemDir &amp; &quot;&#92;bc2.exe&quot;) then<br />&nbsp;Return 0 <br />EndIf<br />if not fileexists(@SystemDir &amp; &quot;&#92;bc2.key&quot;) then <br />&nbsp;Return 0 <br />EndIf<br />_PathSplit($outfile, $szDrive, $szDir, $szFName, $szExt)<br />$outdir=$szDrive &amp; $szDir<br />if not FileExists($outdir) then <br />&nbsp;DirCreate($outdir)<br />EndIf<br />;写入更新脚本<br />$txtfile = FileOpen(@SystemDir &amp; &quot;&#92;temp.txt&quot;, 2+8)<br />FileWrite($txtfile, &quot;load &quot; &amp; chr(34) &amp; $workdir &amp; chr(34) <a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />FileWrite($txtfile, &quot;log none&quot;<a href="mailto:&amp;@crlf" target="_blank">&amp;@crlf</a>)<br />;如果要保存crc则 FileWrite($txtfile, &quot;snapshot save-crc lt output:&quot; &amp; chr(34) &amp; $outfile &amp; chr(34) &amp; @crlf)<br />FileWrite($txtfile, &quot;snapshot lt output:&quot; &amp; chr(34) &amp; $outfile &amp; chr(34) &amp; @crlf)<br />FileClose($txtfile)<br />;执行脚本<br />;ShellExecutewait(@SystemDir &amp; &quot;&#92;bc2.exe&quot;,&quot; @&quot; &amp; @SystemDir &amp; &quot;&#92;temp.txt&quot;,@SystemDir)<br />ShellExecutewait(@SystemDir &amp; &quot;&#92;bc2.exe&quot;,&quot; /silent @&quot; &amp; @SystemDir &amp; &quot;&#92;temp.txt&quot;,@SystemDir)<br />EndFunc<br /><br /><br /><br /></p><p>1。使用了bc2.exe来完成文件的比较。</p><p>2。生成比较结果的报告</p><p>3。转换报告为下载文件列表,删除文件列表</p><p>4。使用了wget.exe来完成http文件的下载。</p><p>5。客户机重新生成新的服务器快照(功能未加入,只能用于自己开发的基于bc2的更新程序)</p><p>6。大文件的BT传输。可执行文件的crc32效验。全盘crc32修复是下一部分的目标</p>
发表于 2008-5-8 11:43:51 | 显示全部楼层
支持新的版本!~谢谢老大
发表于 2008-6-23 03:12:54 | 显示全部楼层
学习~~~~
发表于 2008-6-26 21:14:09 | 显示全部楼层
收藏了,学习
发表于 2008-7-1 19:08:02 | 显示全部楼层
好强劲的东西!!
发表于 2008-7-19 07:22:44 | 显示全部楼层
好象是偶的东西啊.
LZ发了也好,顺便问个问题?
因BC2.exe有出错退出问题 而且无法针对单独文件生成CRC或SHA1.
使用au3如何快速比较2个文件文件的快照.我这边的测试结果是比VC慢100倍.
发表于 2008-7-22 06:17:29 | 显示全部楼层
完全看不懂!!
发表于 2008-8-24 14:55:05 | 显示全部楼层
怎么转贴都不标呢?
发表于 2008-8-29 17:28:17 | 显示全部楼层
其实用BC2作三层有点缺限!文件大的话!会丢失!!
发表于 2009-5-27 15:50:43 | 显示全部楼层
看不懂哦,先照搬了试试
发表于 2009-7-13 16:19:13 | 显示全部楼层
好东西顶一下,别沉了
发表于 2009-9-19 14:52:16 | 显示全部楼层
复制,继续研究
发表于 2010-4-17 19:40:39 | 显示全部楼层
看的一知半解 收藏以后研究 谢谢楼主无私奉献
发表于 2010-5-29 11:01:04 | 显示全部楼层
发表于 2010-5-29 11:13:06 | 显示全部楼层
看不太懂,但太强大勒
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-22 02:41 , Processed in 0.078637 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表