Tyrrrz/Onova là dự án C# với 565 sao trong nhóm Backend. Unintrusive auto-update framework
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Development of this project is entirely funded by the community. Consider donating to support!
Onova is a lightweight auto-update framework for desktop applications.
It's primarily designed for performing in-place updates for portable applications distributed via archive files (as opposed to installers or packages).
The library requires minimal configuration, doesn't impose any changes to the CI/CD process, and doesn't affect the life cycle of your application.
✨ See also Onova.Publisher — community project that provides an integrated installation experience based on Onova.
Terms of use[?]
By using this project or its source code, for any purpose and in any shape or form, you grant your implicit agreement to all the following statements:
You condemn Russia and its military aggression against Ukraine
You recognize that Russia is an occupant that unlawfully invaded a sovereign state
You support Ukraine's territorial integrity, including its claims over temporarily occupied territories of Crimea and Donbas
You reject false narratives perpetuated by Russian state propaganda
To learn more about the war and how you can help, click here. Glory to Ukraine! 🇺🇦
Install
📦 NuGet: dotnet add package Onova
[!TIP]
You can use Binternal to internalize this library if you prefer to avoid taking an external dependency.
Allows updating to any available version, not necessarily latest
Overwrites files in-place using an external executable
Works with multiple running instances of an application
Automatically prompts for elevated privileges if necessary
Fully self-contained and doesn't require additional files
Supports desktop apps built with .NET Core 3.0+
Targets .NET Framework 4.6.1+ and .NET Standard 2.0+ (Windows only)
No external dependencies
Workflow
Package resolving
Packages and their versions are resolved using an implementation of IPackageResolver. Currently there are 5 built-in implementations:
LocalPackageResolver
This implementation looks for files in the specified directory using a predefined pattern. Package versions are extracted from file names, e.g., file named MyProject-v2.1.5.zip corresponds to package version 2.1.5.
GithubPackageResolver
This implementation looks for assets in releases of specified GitHub repository using a predefined pattern. Package versions are extracted from release names, e.g., release named v1.0 corresponds to package version 1.0.
Since .NET assemblies do not support semantic versions, pre-releases are ignored.
WebPackageResolver
This implementation requests a version manifest using the specified URL. The server is expected to respond with a plain-text list of package versions and their URLs, separated by space, one line per package. E.g.:
This implementation resolves packages from the specified NuGet feed.
Since .NET assemblies do not support semantic versions, pre-releases are ignored.
AggregatePackageResolver
This implementation provides aggregation over multiple other IPackageResolver instances. It allows resolving and downloading packages from more than one source.
Package extraction
Downloaded packages are extracted using an implementation of IPackageExtractor. Currently there are 2 built-in implementations:
ZipPackageExtractor
This implementation extracts files from zip-archived packages.
NugetPackageExtractor
This implementation extracts files from NuGet packages, from the specified root directory.
Usage
Basic usage example
The following code checks for updates and installs them if they are available, in a single operation.
// Configure to look for packages in specified directory and treat them as zips
using (var manager = new UpdateManager(
new LocalPackageResolver("c:\\test\\packages", "*.zip"),
new ZipPackageExtractor()))
{
// Check for new version and, if available, perform full update and restart
await manager.CheckPerformUpdateAsync();
}
Handling intermediate steps manually
To provide users with the most optimal experience, you will probably want to handle intermediate steps manually.
// Check for updates
var result = await manager.CheckForUpdatesAsync();
if (result.CanUpdate)
{
// Prepare an update by downloading and extracting the package
// (supports progress reporting and cancellation)
await manager.PrepareUpdateAsync(result.LastVersion);
// Launch an executable that will apply the update
// (can be instructed to restart the application afterwards)
manager.LaunchUpdater(result.LastVersion);
// Terminate the running application so that the updater can overwrite files
Environment.Exit(0);
}
Handling updates with multiple running instances of the application
To prevent conflicts when running multiple instances of the same application, only one instance of UpdateManager (across all processes) is able to prepare updates and launch the updater.
In order to correctly handle cases where multiple instances of the application may try to update at the same time, you need to catch these exceptions:
LockFileNotAcquiredException - thrown by PrepareUpdateAsync and LaunchUpdater when this instance of UpdateManager cannot acquire a lock file. This means that another instance currently owns the lock file and is probably performing an update.
UpdaterAlreadyLaunchedException - thrown by PrepareUpdateAsync and LaunchUpdater when an updater executable has already been launched, either by this instance of UpdateManager or another instance that has released the lock file.
The updater will wait until all instances of the application have exited before applying an update, regardless of which instance launched it.
Etymology
The name "Onova" is derived from the Ukrainian word for "update" (noun).
Tyrrrz/Onova thuộc nhóm Backend trên TopGit, cùng 7 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về Tyrrrz/Onova ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/Tyrrrz/Onova là nguồn chính thức.
Tyrrrz/Onova có bao nhiêu sao?
Tyrrrz/Onova có 565 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/Tyrrrz/Onova. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
Tyrrrz/Onova có những chủ đề gì?
GitHub topics của Tyrrrz/Onova: "auto", "auto-update", "clickonce", "dotnet", "dotnet-core", "dotnet-standard", "update". TopGit xếp repo vào nhóm Backend.
Tyrrrz/Onova còn đang phát triển không?
Commit gần nhất trên Tyrrrz/Onova là 4 ngày trước (theo timestamp GitHub). Repo có 40 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Tyrrrz/Onova viết bằng ngôn ngữ gì?
Tyrrrz/Onova chủ yếu viết bằng C#. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao Tyrrrz/Onova được xếp vào nhóm Backend?
TopGit xếp Tyrrrz/Onova vào nhóm Backend dựa trên GitHub topics và mô tả của repo (gắn thẻ: "auto", "auto-update", "clickonce"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về Onova?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về Onova.