Skip to content

Commit ef861a3

Browse files
committed
ci: WiX 6 runs, and the MSI check was the thing that was wrong
The pin worked: WIX7015 is gone, `wix build` completed with no warnings, and `Packed target/.build-mcpp/out/MsiConsumer-x64.msi` appeared. The check then refused it -- 32768 bytes against a 114688-byte program, under a `size > exesize / 2` floor whose comment admitted the ratio was invented ("a cabinet compresses, so this is a floor and not an equality"). 32768 is what a stripped hello-world looks like after a cabinet has had it. Mostly padding, highly compressible, plus the fixed overhead of an OLE compound document. The floor was refusing a correct artifact. THIS IS THE SECOND TIME IN THIS ECOSYSTEM. The AppImage floor was a 16 KB size bound and refused a correct 14999-byte bundle. Both times the check asked a proxy question. The AppImage one was replaced by running the AppImage and asserting the program's output; this one is now an administrative install (`msiexec /a`), which writes the payload out uncompressed, so the assertion is EQUALITY against the linked binary rather than a ratio -- and it also proves the package installs, which a size never did. The macOS lane stays red on `cannot package the Mach-O program`, which needs mcpp 2026.9.11.2.
1 parent 873c5dc commit ef861a3

1 file changed

Lines changed: 29 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,12 +1570,35 @@ jobs:
15701570
exe=$(find target -name 'msi-consumer.exe' | head -1)
15711571
test -n "$exe" || { echo "FAIL: no linked program to compare against"; exit 1; }
15721572
exesize=$(stat -c %s "$exe" 2>/dev/null || stat -f %z "$exe")
1573-
# An installer carrying the program is at least as large as the
1574-
# program. A cabinet compresses, so this is a floor and not an
1575-
# equality -- but an empty installer is far below it.
1576-
[ "$size" -gt $((exesize / 2)) ] \
1577-
|| { echo "FAIL: the MSI ($size) is implausibly small for a $exesize-byte program"; exit 1; }
1578-
echo "ok: one MSI, and it is not the empty one"
1573+
1574+
# ASK THE INSTALLER WHAT IT CONTAINS. A SIZE RATIO IS A GUESS.
1575+
#
1576+
# This was `size > exesize / 2`, with the reasoning "a cabinet
1577+
# compresses, so this is a floor and not an equality". The ratio was
1578+
# invented, and the first real WiX 6 run refused a correct MSI: 32768
1579+
# bytes for a 114688-byte program, which is what a stripped
1580+
# hello-world looks like once a cab has had it -- mostly padding and
1581+
# highly compressible. The same mistake was already made once in this
1582+
# ecosystem, on the AppImage floor, where a 16 KB bound refused a
1583+
# 14999-byte correct bundle.
1584+
#
1585+
# An administrative install writes the payload out uncompressed, so
1586+
# the question "is the program in there" has an exact answer and this
1587+
# asserts EQUALITY against the linked binary. It also proves the
1588+
# package installs, which a size never did.
1589+
admin="$PWD/msi-admin-image"
1590+
rm -rf "$admin"; mkdir -p "$admin"
1591+
msiexec //a "$(cygpath -w "$msi")" //qn TARGETDIR="$(cygpath -w "$admin")" \
1592+
|| { echo "FAIL: the MSI would not produce an administrative image"; exit 1; }
1593+
inside=$(find "$admin" -name 'msi-consumer.exe' | head -1)
1594+
test -n "$inside" || {
1595+
echo "FAIL: the MSI installs no msi-consumer.exe -- it is the empty installer"
1596+
find "$admin" -type f | head -20; exit 1; }
1597+
insidesize=$(stat -c %s "$inside" 2>/dev/null || stat -f %z "$inside")
1598+
[ "$insidesize" -eq "$exesize" ] || {
1599+
echo "FAIL: the installed program is $insidesize bytes, the linked one $exesize"
1600+
exit 1; }
1601+
echo "ok: the MSI installs msi-consumer.exe, $insidesize bytes, byte-for-byte the linked program"
15791602
15801603
- name: dist-apple produces a bundle that launches
15811604
if: runner.os == 'macOS'

0 commit comments

Comments
 (0)