使用AutoUpgraderPro来自动升级应用程序

本文档详细介绍了如何使用AutoUpgraderPro组件进行软件自动更新的步骤,包括下载安装组件、创建项目、设置属性、编写事件处理代码以及展示运行效果。通过这个过程,开发者可以为自己的应用程序添加自动检查更新和升级的功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、下载并安装AutoUpgraderPro组件。

 

 

  

2、新建项目,命名为AutoUpgraderProDemo(为了使用demo中的网上资源)作为名称。

3、在窗体上拖拽一个auAutoUpgrader1组件。

4、设置属性:

 InfoFileURL := 'http://www.appcontrols.com/download/exe/AutoUpgraderPro.inf';
    VersionControl := byNumber;    
    VersionNumber := '1';
    ShowMessages := [mAskUpgrade, mConnLost, mHostUnreachable, mLostFile, mNoInfoFile, mNoUpdateAvailable, mPasswordRequest];

 

 4、在组件的两个事件中编写如下代码:

procedure TForm1.AutoUpgraderPro1Aborted(Sender: TObject);
begin
 // upgrade aborted
  Caption := 'Upgrade aborted';
  ProgressBar1.Position := 0;

end;

 

procedure TForm1.AutoUpgraderPro1Progress(Sender: TObject;
  const FileURL: String; FileSize, BytesRead, ElapsedTime,
  EstimatedTimeLeft: Integer; PercentsDone, TotalPercentsDone: Byte;
  TransferRate: Single);
begin
 ProgressBar1.Position := PercentsDone;
end;

5、拖拽button1按钮组件和progressbar组件到窗口中,并在button的click事件编写代码:

 

procedure TForm1.Button1Click(Sender: TObject);
begin
  AutoUpgraderPro1.CheckUpdate;
end;

6、运行效果如下:

 

 

 

 

自動更新插件。 AutoUpgrader is a component for building software updates. Delphi programmers can use this component to create their own software packages without writing a single line of code, which includes ready-made wizards that can be activated for different purposes, as well as multiple languages ​​for the application interface. It uses updates and the interesting feature is that when the end user runs the update software, the application will recognize the user’s current operating system language and display the application’s interface in the same language. This component currently translates all wizards into 13 different languages, including English, Spanish, German, French, Russian, Portuguese, Italian, Chinese and more. Of course, if you are not interested in using the program’s pre-installed wizards, you can easily design an ambient wizard with your own texts and images for the entire process. If you have installed a new version of your application in the encrypted web directory, you can do so by configuring the username and password of access files, or allow this component to be displayed to the user when the login window needs it. And users can access the app by entering the appropriate username and password. With AutoUpgrader end users of your app will always use the latest version of your products. This package consists of two components, one HTTP web / HTTP based HTTP protocol (which supports upload and cache IE and …) and another acThread, a threaded caponity for use on ActiveFirms. Delphi programmers, with this component no longer need a basic design of update programs, and can focus on the logic of their program, such as updating the program to components such as AutoUpgrader.
2. Installation ---------------------------------------------------- to Borland Developer Studio 2006 ================================ 1. Create "..\Lib\AutoUpgraderPro" directory. 2. Unzip files and copy them to "BDS\Lib\AutoUpgraderPro". 3. Start Borland Developer Studio 2006 IDE (do not start C++ Builder, even if you want to install it only for BCB 2006. AutoUpgrader should be installed for entire BDS 2006 anyway). 4. Open "AutoUpgraderProBDS2006.bdsproj" file. 5. Install package to the components palette (right-click on "AutoUpgraderProBDS2006.bpl" node in the Project Manager and select "Install" menu item). * In case if you decided to use the package only in C++ Builder Personallity of BDS 2006, you can do following steps instead of previously described steps 3, 4 and 5: 3. Start C++ Builder 2006 IDE. 4. Open "AutoUpgraderProBDS2006CBuilder.bdsproj" file. 5. Install package to the components palette (right-click on "AutoUpgraderProBDS2006CBuilder.bpl" node in the Project Manager and select "Install" menu item). to Delphi 2 =========== 1. Unzip files from "Delphi2" directory to your "Delphi 2\Lib" directory. 2. Start Delphi 2 IDE. 3. Select "Component \ Install..." menu item. 4. Press "Add" button and select "_AUReg.pas" file. 5. Rebuild library. to Delphi 3 =========== 1. Unzip files from "Delphi3" directory and copy them to "Delphi 3\Lib". 2. Start Delphi 3 IDE. 3. Open "AutoUpgraderProD3.dpk" file. 4. Install package to the components palette ("Install" button). to Delphi 4 =========== 1. Unzip files from "Delphi4" directory and copy them to "Delphi 4\Lib". 2. Start Delphi 4 IDE. 3. Open "AutoUpgraderProD4.dpk" file. 4. Install package to the components palette ("Install" button). to Delphi 5 =========== 1. Unzip files from "Delphi5" directory and copy them to "Delphi 5\Lib". 2. Start Delphi 5 IDE. 3. Open "AutoUpgraderProD5.dpk" file. 4. Install package to the components palette ("Install" button). to
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值