GitXplorerGitXplorer
c

PriTools

public
36 stars
7 forks
1 issues

Commits

List of commits on branch master.
Verified
02ac5c4dc1f1c5a1dd545742fc1685c7edfd18c9

PriInfo: Use UTF-8 as the console output encoding (#3)

mm417z committed 4 months ago
Unverified
f854f6055a1cdefad958f6f4b8ca952b484d714d

Add PRI file format specification, extend README

cchausner committed 5 months ago
Unverified
efc8ad6b18c50fdaf75f70eb401848e817056bca

Update XbfAnalyzer submodule

cchausner committed 5 months ago
Unverified
1e3b719c439decb428ada53219047f38bf3fc64a

Update XbfAnalyzer submodule

cchausner committed 5 months ago
Unverified
cf32d7afa945ee1822255da2c7704c9d601caafc

Various code modernizations

cchausner committed 5 months ago
Unverified
830f99bc3d27452f027e6547445f854f13189dda

Switch to fork of XbfAnalyzer as a submodule, upgrade projects to .NET 8

cchausner committed 5 months ago

README

The README file for this repository.

PriTools

Tools for parsing and exploring PRI (Package Resource Index) files

PRIExplorer

This sample application allows to open and browse the contents of PRI files. It is also possible to export individual resources.

The application leverages the XbfAnalyzer (originally by misenhower) to provide on-the-fly decompilation of XBF2 resources back to XAML.

PriFormat

This project implements a PRI file reader in C# for low-level access to pretty much all structures in the PRI file format. Only file reading, not writing, is supported at the moment.

Sample usage

You can use the following code to open a PRI file and print the names of all resource map items:

using (FileStream stream = File.OpenRead(path))
{
    PriFile priFile = PriFile.Parse(stream);

    ResourceMapSection resourceMapSection = priFile.GetSectionByRef(priFile.PriDescriptorSection.PrimaryResourceMapSection.Value);

    foreach (CandidateSet candidateSet in resourceMapSection.CandidateSets.Values)
    {
        ResourceMapItem resourceMapItem = priFile.GetResourceMapItemByRef(candidateSet.ResourceMapItem);

        Console.WriteLine(resourceMapItem.FullName);
    }
}

For more sample code, see the PriInfo project.

PRI File Format Specification

Package Resource Index File Format.md contains a reasonably complete (but unofficial) description of data structures in the PRI file format.

License

Apache 2.0, see LICENSE.

XBF2 decompilation code is originally based on the implementation by misenhower.