Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,366 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nefarius™ vīcĭus updater agent

Build status Documentation GitHub Release Discord Mastodon Follow

Nefarius' nŏvīcĭus universal software updater agent for Windows.

About

vīcĭus is a self-contained C++ executable (built with MSVC's latest language standard) acting as a software update agent for Microsoft Windows. It can be deployed alongside your product and will take care of periodically checking for newer versions online and notifying the user of pending updates. Its goal is to require the least amount of configuration to get it up and running while providing enough flexibility to be customized for various environments, if desired. It doesn't require any prerequisites being present on the target system and should be able to run on any recent Windows version.

Motivation

Dealing with software update mechanics has been a steady companion for almost 10 years by now, so it's about time to learn from all the mistakes, hardships and shortcomings the various products used have put me through all this time 😅 If you want something done right, you gotta do it yourself 💪

Features

  • No backend application server required
    All you need on the server-side to get going is a web host supporting delivering static JSON files and you're done. GitHub Pages would be a sufficient free hosting solution where you can upload to and deliver the updater configuration from. Take a look at the example server implementation if you wish to write your own backend service.
  • Self-contained
    No need to worry if .NET or other runtimes are present on the target machines, everything it needs is delivered in a single Win32 executable.
  • (Almost) zero configuration
    The bare minimum configuration can be provided by simply compiling in the server URL by adjusting the CustomizeMe.h header file. This does not mean you need to maintain one build for every product you wanna support; you will get multi-tenancy out of the box by simply naming the resulting executable after the following scheme: manufacturer_product_Updater.exe, e.g. nefarius_HidHide_Updater.exe will build the server path as https://example.org/api/nefarius/HidHide/updates.json (or however it is defined in CustomizeMe.h) automatically!
  • Sane defaults
    We hate wasting time writing configuration files as much as the next person; most configuration options are either optional or have sane default fallback values you can depend on.
  • Self-updater
    Sometimes just the updater process needs an update (e.g. security patches), not the entire product it is watching over. It can update itself if the server-provided instance version is higher than the locally running one.
  • Self-healing
    If run in autostart when the user logs on, it can make sure that scheduled tasks and other supportive components are configured and working properly.
  • Low resource consumption
    The updater process is only invoked on demand (at user logon and once per day via Task Scheduler) and doesn't keep running in the background.
  • Respects your time
    Busy fragging in a game? We won't bother you with any popup windows until you're ready.
  • Powerful template engine included
    Sometimes finding the local resource of interest to check the product version can be more challenging than just having a static, boring file path. You can use inja templates to build your own path resolving logic, all while never having to leave your JSON strings!
  • Expressive modern changelog support
    Update summaries a.k.a. changelogs don't have to be boring slabs of text; Markdown is fully supported! The included fonts are also capable of rendering Fork Awesome icons and system-provided emojis! 🎉 🥳 🍕

Prerequisites

  • Windows 7 or later (x86, x86_64, ARM64)
    • Note: currently anything below Windows 10 is untested and low priority
  • An NTFS formatted volume
  • An Internet connection
  • Your software updates need to be packaged in one of the following ways:

Documentation

Head over to the extended documentation for examples and detailed explanations.

Downloads

Build artifacts for every push to master are available as workflow run artifacts. Consider these nightly snapshots.

Stable releases are published on the repository releases page. Keep in mind that those releases are built to use my own update infrastructure, so in 99% of the cases you probably don't want to use them, at least not without a configuration file!

Screenshots

All screenshots are taken from the included demo server (see Run the demo locally).

Notification & changelog

Updater start page showing available update with Display, Remind me tomorrow, and Help buttons
Start page — update notification with "Display update details now", "Remind me tomorrow", and "Open help web page" actions.
Update Summary page with Markdown changelog showing headings, bold text, and a hyperlink
Markdown changelog — rich update summary with headings, bold text, and hyperlinks rendered inline.
Update Summary with a long bullet list and a vertical scrollbar next to the changelog panel
Scrollable changelog — long bullet lists trigger a vertical scrollbar; the "Download and install" button stays accessible.

Inline media & details

Update Summary scrolled to show multiple named changelog blocks including a Demo logo section
Inline sections — changelog can contain multiple named blocks, including an image block ("Demo logo").
Changelog panel displaying an inline Nefarius logo image followed by a More details section
Inline image — server-supplied images (e.g. a product logo) are rendered directly inside the changelog.
More details section with release notes text and a Release notes on Microsoft Learn hyperlink
More details — additional release notes with clickable external hyperlinks.

Install progress & error handling

Installing Updates page with a determinate download progress bar at 43% and bytes transferred
Downloading — determinate progress bar showing bytes transferred and percentage.
Installing Updates page with an indeterminate marquee progress bar while the installer runs
Installing — indeterminate/marquee progress bar while the setup process runs.
Installing Updates error page showing exit code 1602 with a user-cancelled message and retry instructions
Error handling — failed installation with human-readable exit-code description and retry guidance.

Run the demo locally

The fastest way to see the updater in action after a fresh clone:

  1. Start the example server — open examples.sln in Visual Studio, press F5 (or dotnet run inside examples/server/). It listens on http://localhost:5200.
  2. Start the updater — open vīcĭus.sln, select Debug | x64, press F5. The committed src/vīcĭus.vcxproj.user passes --server-url, --log-level debug, and --log-to-file automatically, so no manual configuration is needed.

See the example server README for a full walkthrough of what the demo exercises.

How to build

Set up Visual Studio 2022 or newer with the C++ Desktop Development workload.

To get binary compression to work upx has to be installed. You can do so via e.g.:

winget install upx

Multi-tenant build example

You do not have to touch the checked out sources if you wish to customize your build.

Assuming a manufacturer name Valkirie and product name HandheldCompanion, create the following folder structure and file .\include\Valkirie\HandheldCompanion\ViciusPostCustomizeMe.h and override the server url in there like so:

#undef NV_API_URL_TEMPLATE
#define NV_API_URL_TEMPLATE     "https://raw.githubusercontent.com/Valkirie/HandheldCompanion/main/Valkirie_HandheldCompanion_Updates.json"

Now you can build from the command line pointing the compiler to the directory of your header(s) like so:

msbuild .\src\vīcĭus.vcxproj /p:Configuration=Release /p:CustomIncludes="${PWD}\include\Valkirie\HandheldCompanion\" /p:UpdaterName=Valkirie_HandheldCompanion_Updater

This will produce the binary Valkirie_HandheldCompanion_Updater.exe with the server URL of your custom header file baked into it!

You're of course free to put the custom header files anywhere on your system (like your own private repository), they do not need to be put under the project root directory.

TODOs

For more details check the issue tracker.

Sponsors

JetBrains

C# Abstractions Library

The abstractions/ directory contains Nefarius.Vicius.Abstractions — the managed (C#) mirror of the C++ JSON payload models.

  • External consumers (backend servers, tooling) reference it as a NuGet package.
  • The example server in this repo references it directly as a ProjectReference to the co-located abstractions/ project, so a single PR can update both the C++ models and the C# types together.

Migrating from the old standalone package? The standalone Nefarius.Vicius.Abstractions repository has been archived. The package id and namespace are unchanged; simply update your package source/version.

Sources & 3rd party credits

This tool benefits from these awesome projects ❤ (appearance in no special order):

Dependencies

Literature & references

DPI-awareness

About

Nefarius' nŏvīcĭus universal software updater agent for Windows.

Resources

Stars

77 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages