-
-
Notifications
You must be signed in to change notification settings - Fork 104
Description
Prelude
The structure of our full release and delta packages is, by design, similar enough to Squirrel packages that users of Squirrel can drop in Velopack packages and have them update seamlessly.
Making this change to our package architecture needs to be done very carefully, and may need to initially be an opt-in feature. Later down the line, (eg. v2) we can make this new format on-by-default. This means users who are migrating to Velopack from Squirrel post v2 will be able to out out and generate legacy packages for the purposes of migrating to Velopack, and then use new package formats from then on. We can also limit RELEASES generation to legacy mode.
Proposal
The new proposed internal format is:
YourAppId-1.0.1-win-full.vpkg
├── splashimage
├── SomeAppId.vpkversion
└── application.tar
We would rename sq.version and/or SomeAppId.nuspec to SomeAppId.vpkversion
The tar command ships by default on all our target operating systems. By using tar to store application files, we get automatic internal symlink handling (see #52), as well as determinism out of the box. Also, it simplifies our delta process - because we can now just perform a zstd patch (already implemented) of the tar bundle instead of our (now complex) delta create/reconstruction algorithms.
The resulting package could then compressed using zip/deflate as we currently do. Alternatively, for a possibly faster algorithm, we could compress the internal .tar with Zstandard, and then zip the package using STORE instead of DEFLATE. It's important we can get at that manifest quickly and easily, so compressing the entire package with zstd is not viable.
Benefits
- Smaller deltas (larger dictionary)
- Much more resilient deltas, because both tar and zstd are established and stable
- Much faster delta reconstruction during updates since it only requires us to patch one tar file
- Remove complex zip handling logic related to symlinks and determinism
- Remove complex delta handling in C#, and avoid the need to implement it for Rust
- Deprecate the XML nuspec, so can avoid including that (large) parser in our Rust binaries