Repository navigation
Shrink the Windows MSI to runtime files - #92
Merged
Merged
Conversation
The v0.2.0 MSI was 537 MiB because WiX harvested the optional LibreOffice documents.tar.gz and the codec source trees. Stage only the executables, DLLs and notices, use high CAB compression, and smoke-test an extracted image and video conversion. Co-authored-by: Leo <leoisadev1@users.noreply.github.com>
Comment on lines
+85
to
+88
| names = {path.name for path in files} | ||
| for required in REQUIRED: | ||
| if required not in names: | ||
| errors.append(f"missing required runtime file: {required}") |
There was a problem hiding this comment.
🟡 Missing runtime files pass staging
When convt.exe is missing from the payload root, validate accepts a namesake under licenses. stage leaves that namesake under licenses, so the MSI lacks its CLI.
Suggested change
| names = {path.name for path in files} | |
| for required in REQUIRED: | |
| if required not in names: | |
| errors.append(f"missing required runtime file: {required}") | |
| names = {path.name for path in files if path.parent == root} | |
| for required in REQUIRED: | |
| if required not in names: | |
| errors.append(f"missing required runtime file: {required}") |
Was this helpful? React with 👍 or 👎 to provide feedback.
| $env:CONVT_LICENSE_STORE = 'file' | ||
| $env:CONVT_CONFIG_DIR = Join-Path $Work 'cfg' | ||
| $env:CONVT_DATA_DIR = Join-Path $Work 'data' | ||
| $env:CONVT_PDFIUM_DIR = $Bin |
Mac and Linux already download document support after Install; they just have no hosted archive yet. Windows now compiles that same URL against convt-<version>-windows-x86_64-documents.tar.gz on the GitHub release and verifies the pinned checksum. The MSI stays runtime-only. Co-authored-by: Leo <leoisadev1@users.noreply.github.com>
Staging treated a namesake under licenses as convt.exe. Required files must sit at the payload root. Smoke now checks the compiled GitHub release URL against the published checksum, and assemble refuses a pack without its .sha256. Co-authored-by: Leo <leoisadev1@users.noreply.github.com>
|
FFmpeg's color source is 25 fps, so d=0.1 produced several frames and the image2 muxer refused sample.png. That failed the required smoke step before the MSI and document pack uploaded. Also keep COPYING.LESSER and LICENSE-1 notices, and restage msi-payload so a WiX retry works. Co-authored-by: Leo <leoisadev1@users.noreply.github.com>
Install the sibling document pack, convert a Word fixture to PDF, and fail if convt-app.exe exits. Retry cleanup now removes only the owned msi-payload harvest directory.
pwsh parsed $ExpectedStage: as a variable and failed the MSI package step before smoke could run.
Staging refused licenses/pdfium/libjpeg_turbo.ijg, which blocked the unsigned MSI. Keep every non-source file under licenses/.
The runner workspace is on D:\, and pack discovery rejects that volume root. Use the per-user profile, then convert the Word fixture to PDF.
Keep the MSI smoke (document pack install, DOCX to PDF, GUI stay-running) and the PE subsystem checks from main.
Give each smoke run unique LOCALAPPDATA and extract folders, and compile the versioned GitHub pack URL even when a previous build left CONVT_DOCUMENT_PACK_URL set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Public feedback on X: the Windows MSI is about 500 MB while the Mac and Linux downloads are about 50 MB. That is almost all packaging, not the app.
What was in the v0.2.0 MSI (537 MiB)
Extracted with 7-Zip from convt-0.2.0-windows-x86_64.msi. The cabinets already use LZX:18 (high compression). The File table uses hashed names; sizes and magic identify the members.
documents.tar.gz— the optional LibreOffice pack, already gzipped so CAB barely helpsffmpeg.exe(97.2 MiB) andffprobe.exe(97.0 MiB), Gyan essentials staticconvt-app.exe(35.7 MiB),convt.exe(15.0 MiB),aom.dll, CRT,LICENSE.txtlicenses/native-source/plus the remaining runtime DLLs (heif.dll,libde265,x265,pdfium, more CRT)WiX harvested
packaging/out/windows/payload/**. That directory held the document pack (product docs already call this a separate opt-in on Mac and Linux) and the full x265 / libde265 / aom / libheif source trees.No PDBs and no uncompressed CAB. The leftover bulk after this fix is the two static FFmpeg binaries (~61 MiB compressed), which the app needs at runtime. Expected MSI after the change: about 80–90 MiB (cab1 + cab3 + the runtime DLLs from cab4). CI fails the job if the MSI is 120 MiB or larger.
How document support works
Mac and Linux already download the LibreOffice pack on demand. Selecting a Word/Excel/PowerPoint file shows Quick convert's Download card; nothing hits the network until the user clicks Install (or runs
convt pack install documents). The engines then fetchCONVT_DOCUMENT_PACK_URL, verify the compiled SHA-256, and install under the per-user data directory. A silent convert never downloads.Those platforms do not ship the pack inside the AppImage/DMG, and they do not yet publish a hosted archive, so a released Mac/Linux build only converts documents if LibreOffice is already on the machine.
Windows used to embed the 446 MiB pack in the MSI (
bundle:documents.tar.gz) so Install worked offline. That is what made the installer 537 MiB. Windows now matches the Mac/Linux installer code:convt-<version>-windows-x86_64-documents.tar.gzand.sha256on the samewindows-release-reviewartifact (and then on the GitHub release).CONVT_DOCUMENT_PACK_URLpointing at that release asset, plus the digest and sizes. Quick convert shows the existing Download card (size, progress, checksum failure, retry).convt pack install documentsfetches and verifies it.The website update manifest does not list the pack as a Windows app download. Only the compiled URL fetches it.
What changed
build.ps1writes the pack beside the payload, names itconvt-<version>-windows-x86_64-documents.tar.gz, writes the checksum, and compiles the GitHub release URL.build-native.ps1copies codec LICENSE/COPYING/NOTICE files only, not the source trees.stage_payload.pyis the harvest allowlist: executables, DLLs, and notices. It refuses the document pack,native-source, PDBs,.libfiles, and headers.assemble.pyrequires the pack and checksum whenever the Windows MSI is included.MediaTemplatesetsCompressionLevel="high". MSI artifact name stayswindows-release-review/convt-<version>-windows-x86_64.msi.release-windows.ymlstill runs onwindows-latest. After packaging,smoke.ps1extracts the MSI, converts a PNG and an MP4, installs the sibling document pack, converts a Word file to PDF, and fails ifconvt-app.exeexits or does not start.installer.ps1retries by removing only the ownedmsi-payloadharvest directory.@convt/desktop(and the fixed CLI/web group) so this ships in the next release.PR #73 is also editing release CI. This only adds the smoke step, the extra Windows review files, a short release-notes line, and unit tests on the existing
ubuntu-24.04release-scripts job. Runners are unchanged.Proof so far
python3 -m unittest discover -s packaging/windows(payload allowlist, document-pack URL/checksum, smoke script contract).python3 -m unittest discover -s scripts/release(assemble now requires the Windows pack and checksum).crates/convt-app/src/ui/tests.rs(a_build_without_a_pinned_pack_offers_no_downloadvs the configured Download card).How to dry-run the real MSI
A reviewer can:
cursor/windows-msi-size-8c4c.version=0.2.0(must match this commit),source_date_epoch= any UTC unix time (for example1791331200),dry_run=true.windows-release-review: the MSI,convt-0.2.0-windows-x86_64-documents.tar.gz, and.sha256.convt-app.exedoes not stay running. The job fails if the MSI is 120 MiB or larger.Do not merge; a reviewer will merge it.