microsoft / msix-packaging

MSIX SDK
MIT License
963 stars 163 forks source link

Fix inconsistent zip structure in .appx files created by makemsix.exe #622

Closed st-gr closed 1 month ago

st-gr commented 3 months ago

This commit resolves issue #619 by ensuring that the central directory in .appx files created by makemsix.exe is sorted in the same order as MakeAppx.exe. The fix involves tracking the sequence of file names during the creation of the zip file and sorting the central directory entries accordingly before writing them to the stream.

Resolves: #619

This was tested building via makewin.cmd x64 --debug --pack. The following files test_makemsix.zip

were packed with: .vs\bin\makemsix pack -d C:\test_makemsix -p C:\test_makemsix_sorted.appx

The side-by-side zipdump and 7-zip properties show that the central directory is now in the same sequence as the local file header streams in the zip archive. image

msftrubengu commented 1 month ago

/azp run

azure-pipelines[bot] commented 1 month ago
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.