nefarius / vicius

Nefarius' nŏvīcĭus universal software updater agent for Windows.
https://docs.nefarius.at/projects/Vicius
BSD 3-Clause "New" or "Revised" License
38 stars 3 forks source link

Nefarius™ vīcĭus updater agent

Build status Documentation Discord Mastodon Follow

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

About

vīcĭus is a self-contained C++20 executable 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

Prerequisites

Documentation

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

Downloads

You can get unsigned build snapshots here. Consider these Beta-releases.

Signed stable releases will be provided on the repository releases page.

Screenshots

nefarius_HidHide_Updater_z4YFTJStbr.png

nefarius_HidHide_Updater_GDFudys8mB.png

nefarius_HidHide_Updater_T7lQFBKqRw.png

Updater_mc9y7o4qcL.png

Updater_EMJNlbXitT.png

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.

Non-exhaustive list of things open or in-progress...

Must-haves

Nice-to-haves

Done

Expand me! - [x] Make UI DPI-aware - [x] Finalize UI design - [x] `WizardPage::Start` - [x] `WizardPage::SingleVersionSummary` - [x] `WizardPage::DownloadAndInstall` - [x] Finalize local updater config JSON format - [x] Add retry-logic (e.g. retry failed downloads etc.) - [x] Add some fallback code if the temp directory isn't available - [x] Handle all known error-cases - [x] Server response errors - [x] Release download errors - [x] Setup launch errors - [x] [Documentation](https://docs.nefarius.at/projects/Vicius/) - [x] About page - [x] JSON Schemas - [x] Specify supported Command Line Arguments - [x] Exit Codes - [x] Emergency Feature - [x] Server Discovery - [x] Logging - [x] Common Errors - [x] Local Configuration - [x] Remote Configuration - [x] Allow setting the download directory - [x] Implement "postpone" choice behaviour - [x] Implement Task Scheduler - [x] Registration - [x] Removal - [x] Finalize REST API design - [x] Add info dialog before self-updating UAC dialog comes up - [x] Add self-updater logic - [x] Tests - [x] Fix issues launching from write-protected directory like `Program Files` - [x] Implement Product Version detection - [x] `RegistryValue` - [x] `FileVersion` - [x] `FileSize` - [x] `FileChecksum` - [x] `CustomExpression` - [x] Add some logging - [x] Tidy up and improve includes - [x] Optimize build times - [x] Use pre-compiled headers? - [x] Support environment variables or custom placeholders in path strings and alike

Sources & 3rd party credits

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

Dependencies

Literature & references

DPI-awareness