feat(install): msi installer format compiled from the WiX source
VoidBuildSystem CI / 3A · Linux test (debug) (push) Canceled after 0s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Canceled after 0s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Canceled after 0s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Canceled after 0s
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Canceled after 0s
VoidBuildSystem CI / 5 · Release (push) Canceled after 0s
VoidBuildSystem CI / 1 · Requirements (push) Successful in 3s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 4m32s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 4m57s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m44s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m45s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m11s

'vbs install --archive-format msi' renders the WiX v3 source with
absolute file sources and compiles it with wixl (msitools) or the WiX
toolset (candle/light) when available, failing explicitly otherwise.
The .wxs intermediate is removed afterwards.

Verified locally: wixl produces a valid MSI (OLE compound file, File
table with the installed binaries and correct summary information),
and the install suite passes with msitools on PATH. CI adds msi to the
installer sets when the tooling exists.
This commit is contained in:
faumaray committed 2026-12-06 16:31:17 +03:00
1 parent 6b9074241f
commit ff562acc1a
4 files changed
+129 -12

No files matched your search

+21
View File
@@ -1100,6 +1100,27 @@ void build(Void::Build::Project &p) {
Void::Testing::expect(wix_text->find("ComponentGroup Id=\"ProductComponents\"") !=
std::string::npos);
// MSI compiled from the WiX source, when wixl or the WiX toolset is available.
if (Platform::resolve_executable("wixl").has_value() ||
Platform::resolve_executable("candle").has_value()) {
const auto msi_archive = tmp / "cli_hi.msi";
auto msi_req = inst_req;
for (auto &arg : msi_req.arguments) {
if (arg == installer_archive.string()) {
arg = msi_archive.string();
}
}
msi_req.arguments.push_back("--archive-format");
msi_req.arguments.push_back("msi");
auto msi_res = Platform::run_supervised(msi_req);
Void::Testing::expect(msi_res.has_value() && msi_res->succeeded());
auto msi_bytes = Void::FileSystem::read_file(msi_archive);
Void::Testing::require(msi_bytes.has_value() && msi_bytes->size() > 8);
// OLE compound file magic (the MSI container).
Void::Testing::expect(msi_bytes->substr(0, 8) ==
std::string("\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1", 8));
}
// UDIF (DMG-style) container: tar payload followed by a 512-byte koly trailer.
const auto dmg_archive = tmp / "cli_hi.dmg";
auto dmg_req = inst_req;