开发者

How to update a program and a database structure from multiple servers

开发者 https://www.devze.com 2023-03-08 23:07 出处:网络
I am developing an application in .NET (C# and VB.NET) (Framework 4.0) that will use MySQL database (in local or in remote).

I am developing an application in .NET (C# and VB.NET) (Framework 4.0) that will use MySQL database (in local or in remote).

I am doing the installation with InnoSetup, of such form that:

  • I download the archive installer created by InnoSetup (archive .EXE).
  • I execute the archive and I check if it exists the Framework 4.0. In case that it does not exist, the script downloads the archive for its installation.
  • After installing the Framework 4.0 I download from an own server the installer of MySQL.
  • I install my program.

With the first execution of the program I install the database and I enter the necessary data through a SQL script.

I have problems with the updates, because I need:

  • Have multiple routes to download the updates (multiple URL with Linux/Apache servers), for balance and availability.
  • Update the archives of the program (.exe, .dll, images,...) and new fields of the database (ALTER TABLE sentences and 开发者_如何学运维some INSERT).

I am thinking in develop a own updater, but I don't want write it if I can use some available solution. Could someone recommend me some available solution? I have been consulting the following products, but I have not seen that any of them support or multiple URL or update of the database:

  • Clickonce.
  • Netsparkle.
  • WinSparkle.
  • WindowsClient Application Updater Component.
  • WyBuild.

For the update of the database I have found only one solution: Autodbupdater.

Thank you


NAppUpdate an open-source solution I wrote to address specific needs we had for WinForms and WPF apps. The general idea is to have the greatest flexibility, at the lowest overhead possible. I think it provides exactly the flexibility you need:

It lets you determine what tasks to execute and on what conditions - you make the rules. A support for any updates source (web, BitTorrent, etc) exist, as well as any feed format - whatever is not implemented you can just write for yourself.

Generally all you'll need to do is add NAppUpdate to your project (one small DLL), implement your own IUpdateSource (to be able to download from multiple sources), use the existing FileUpdateTask and roll your own DbUpdateTask to do DB updates.

Cold updates (requiring an application restart) are supported, and done automatically for file operations unless "hot-swap" is specified for the task.

Some more details at http://www.code972.com/blog/2010/08/nappupdate-application-auto-update-framework-for-dotnet/ or via the mailing list at http://groups.google.com/group/nappupdate.

Code is at http://github.com/synhershko/NAppUpdate (Licensed under the Apache 2.0 license)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号