Skip to content

Commit

Permalink
Add APPXBUNDLE format support
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecot committed Jan 23, 2024
1 parent 122e3f9 commit 6b34f57
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ identification.
- Nintendo Switch Package (NSP)
- Red Hat Package Manager (RPM)
- Web Application Archive (WAR)
- Windows App Bundle (APPXBUNDLE)
- Windows App Package (APPX)
- XAP
- XPInstall (XPI)
Expand Down
Binary file added fixtures/package/sample.appxbundle
Binary file not shown.
7 changes: 7 additions & 0 deletions src/formats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2781,6 +2781,13 @@ formats! {
extension = "ani"
kind = Image

format = WindowsAppBundle
name = "Windows App Bundle"
short_name = "APPXBUNDLE"
media_type = "application/vnd.ms-appx.bundle"
extension = "appxbundle"
kind = Package

format = WindowsAppPackage
name = "Windows App Package"
short_name = "APPX"
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ identification.
* [Sun XML Writer Template (STW)](`FileFormat::SunXmlWriterTemplate`)
* [Universal Scene Description Zipped (USDZ)](`FileFormat::UniversalSceneDescriptionZipped`)
* [Web Application Archive (WAR)](`FileFormat::WebApplicationArchive`)
* [Windows App Bundle (APPXBUNDLE)](`FileFormat::WindowsAppBundle`)
* [Windows App Package (APPX)](`FileFormat::WindowsAppPackage`)
* [XAP](`FileFormat::Xap`)
* [XPInstall (XPI)](`FileFormat::Xpinstall`)
Expand Down
1 change: 1 addition & 0 deletions src/readers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ impl crate::FileFormat {
"AndroidManifest.xml" => return Ok(Self::AndroidPackage),
"AppManifest.xaml" => return Ok(Self::Xap),
"AppxManifest.xml" => return Ok(Self::WindowsAppPackage),
"AppxMetadata/AppxBundleManifest.xml" => return Ok(Self::WindowsAppBundle),
"META-INF/AIR/application.xml" => return Ok(Self::AdobeIntegratedRuntime),
"META-INF/MANIFEST.MF" => fmt = Self::JavaArchive,
"META-INF/application.xml" => return Ok(Self::EnterpriseApplicationArchive),
Expand Down
7 changes: 7 additions & 0 deletions tests/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ fn test_web_application_archive() {
assert_eq!(fmt, FileFormat::WebApplicationArchive);
}

#[cfg(feature = "reader-zip")]
#[test]
fn test_windows_app_bundle() {
let fmt = FileFormat::from_file("fixtures/package/sample.appxbundle").unwrap();
assert_eq!(fmt, FileFormat::WindowsAppBundle);
}

#[cfg(feature = "reader-zip")]
#[test]
fn test_windows_app_package() {
Expand Down

0 comments on commit 6b34f57

Please sign in to comment.