EmbeddedWB 中的 TWebUpdater 組件,是個專門用來進行網絡文件版本更新的組件,在?EmbeddedWB?組件安裝包(完整源碼版)所在目錄下面?EmbeddedWb\Demo\Various Demos\20 - WebUpdater_Demo 路徑中有比較完整的使用演示源碼:
源碼的演示,實際執行代碼只有壹句:
?WebUpdater1.Start;更多的工作在這個組件屬性的設置,比較重要的屬性設置如下:
Author?=?'bsalsa'BackupFolder?=?'Backup\'
Caption?=?'Updating?the?application...?Please?wait.'
Company?=?'bsalsa?Productions'
DeleteLogOnComplete?=?False
DeleteWebInfoFileOnComplete?=?False
ApplicationVersion.BuildVersion?=?1
EMail?=?'bsalsa@bsalsa.com'
ErrorMessage?=?'An?error?ocurred?while?'
LogAddTime?=?True
LogFileName?=?'Updater.txt'
MailErrorReport?=?False
OpenAppFolderOnComplete?=?True
ProgressBar?=?ProgressBar1
StatusBar?=?StatusBar1
SuccessMessageText?=?'Update?is?done.'
UpdatesFolder?=?'Updates\'
WebInfoFileName?=?'NewUpdate.xml'
WebURL?=?'
這其中 WebInfoFileName 和 WebUrl 屬性比較關鍵,前者定義更新的文件,後者定義指定的更新站點。
WebInfoFileName 屬性指定更新文件列表,這個文件的生成,可以同文件夾下的另壹個?Updater_XML_File_Creator 文件目錄中工具。?