microsoft / microsoft/msix-packaging

Documentation of the APPX/MSIX format

Open
#572 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-MSIX Documentation
Dominant language
C
Stars
1.1k
Forks
193
Avg merge
2h 16m
Merged PRs (30d)
2

Description

Last week I unzipped an APPX/MSIX file and zipped them again. The files themselves unchanged. When trying to install the first file, it gave me some signature error, but I think I can solve that one by adding the right files. However, when I clicked the second file (my self-made zip), it gave me some parsing error. When comparing the zip files with each other, I saw some differences.

Is there any documentation about the requirements of the zip file? What files should be stored, what files should be deflated, what files shouldn't have any flags and what files should have flag 0x08? What should be the order of the files? What files need a signature header? Etcetera, etcetera. I think it is really important if you want to make software that also is able to generate APPX/MSIX files.

For now, this what worked for me (in this order):

LocalFileHeader: AppxBlockMap.xml (Deflated, no flags)
LocalFileHeader: AppxManifest.xml (Deflated, flag 0x08)
Signature: crc, compressed_size, uncompressed_size
LocalFileHeader: [Content_Types].xml (Deflated, no flags)

CentralFileHeader: AppxBlockMap.xml (Deflated, no flags)
CentralFileHeader: AppxManifest.xml (Deflated, flag 0x08)
CentralFileHeader: [Content_Types].xml (Deflated, no flags)
EndOfCentralDirectory: ...

I did some tests and for now it seems I have to stick to this order, have the flags as given above, have a correct CRC in both LocalFileHeader and CentralFileHeader and have a version that is the same in both LocalFileHeader and CentralFileHeader, no matter the value.

However, if it is possible to documentate this rules somewhat more, it would be great. Anyway, I will add my findings in this thread for if this rules aren't known by somebody else here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from issue #572 and review its APPX/MSIX examples, including AppxBlockMap.xml, AppxManifest.xml, [Content_Types].xml, LocalFileHeader, CentralFileHeader, Signature, and EndOfCentralDirectory. Compare the reported ZIP differences and document the required files, compression, flags, ordering, headers, CRCs, and versions; done means the format requirements are recorded clearly enough for generators.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.