Граф коммитов

40 Коммитов

Автор SHA1 Сообщение Дата
Ruben Guerrero 8a3fe80913
Rename GetLogTextUTF8 to MsixGetLogTextUTF8 (#359) 2020-07-24 15:21:44 -07:00
Ruben Guerrero add4a30436
Fix Issue 224 (#239) 2019-10-14 18:11:19 -07:00
Ruben Guerrero d65e1e76e3
Use MSIX_BINARY_ROOT instead of CMAKE_BINARY_DIR (#183) 2019-07-31 13:28:21 -07:00
Ruben Guerrero 8843c96c32
Use MSIX_* specific CMake variables for build and src directories to don't interfere with projects that add it as a subtree" (#181) 2019-07-30 11:01:17 -07:00
Ruben Guerrero a3f4e6b511
Deprecate MSIX_VALIDATION_OPTION_SKIPAPPXMANIFEST and improve CMake MSIX SDK option processing (#177) 2019-07-16 15:49:49 -07:00
Ruben Guerrero Samaniego e804fafc71 Merge branch 'master' into packaging 2019-06-04 23:58:06 -07:00
Ruben Guerrero 418393f8dd
msixtest - use catch2 as our test infrastructure for all supported platforms (#149) 2019-05-30 11:58:06 -07:00
Ruben Guerrero ed3bc904a8
Packaging sample (#128) 2019-05-10 09:51:33 -07:00
Ruben Guerrero Samaniego 7c84b3fa66 Merged PR 2844732: IAppx*Utf8 interfaces variants
Add UTF8 variant to public APIs that use LPWSTR or LPCWSTR.

New Interfaces:
•	IAppxBlockMapFileUtf8
•	IAppxBlockMapReaderUtf8
•	IAppxBundleManifestPackageInfoUtf8
•	IAppxBundleReaderUtf8
•	IAppxFactoryUtf8
•	IAppxFileUtf8
•	IAppxManifestApplicationUtf8
•	IAppxManifestPackageDependencyUtf8
•	IAppxManifestPackageIdUtf8
•	IAppxManifestPropertiesUtf8
•	IAppxManifestQualifiedResourceUtf8
•	IAppxManifestResourcesEnumeratorUtf8
•	IAppxManifestTargetDeviceFamilyUtf8
•	IAppxPackageReaderUtf8

This change also fixes a bug were all non-AppPackaging public interfaces (eg. IMsixElement) had their IID_I* set to 0 for Windows only. GUID definition is now defined on AppxPackaging.hpp removing the need of AppPackaging_i.cpp
2019-02-08 20:31:28 -08:00
Ruben Guerrero Samaniego 131f8a1c51 Merged PR 2807884: Improve API tests and port them to the AOSP and iOS
Re-wrote the entire API tests to not hardcode one package and one bundle and make them compatible with AOSP and iOS.

There are 5 main tests with subtests.

- TestPackage
-Package.PayloadFiles
-Package.PayloadFile
-Package.PayloadFile.DontExists
-Package.FootprintFile
- TestPackageManifest
-Package.Manifest.Stream
-Package.Manifest.Applications
-Package.Manifest.Properties
-Package.Manifest.Dependencies
-Package.Manifest.Capabilities
-Package.Manifest.Resources
-Package.Manifest.Tdf
-Package.Manifest.MsixDocument
-Package.Manifest.PackageId
- TestPackageBlockMap
-Package.BlockMap.Stream
-Package.BlockMap.ValidateFiles
- TestBundle
-Bundle.FootprintFile
-Bundle.PayloadPackages

- TestBundleManifest
-Bundle.Manifest.Stream
-Bundle.Manifest.PackageId
-Bundle.Manifest.PackageInfo

apitest.exe supports getting input from the command windows or taking a file with all the input. See test/api/input/apitest_test_1.cmakein for an example input file. This file is used in all automated tests. NOTE: don't use this file directly, use <bin folder>/test/api/input/apitest_test_1.txt
It is expected that the person who does the test knows what the input should be (eg. There is not: "Enter the package: " text output)

apitest.exe also supports redirecting the output to a file. That option is used for the AOSP and iOS BVTs.

Bugs found and fixed:
1. IAppxFile::GetName for CodeIntengrity footprint file returned AppxMetadata/CodeIntegrity.cat instead of AppxMetadata\CodeIntegrity.cat
1. IMsixElement::GetElements returned an empty IMsixElementEnumerator for AOSP.
1. S_OK and S_FALSE was taken as an int instead of signed long
2019-02-08 20:31:00 -08:00
Letao Wang 49e5f4c1c9 Merged PR 2461986: Add interface for applicability override
Added interface to override language applicability in bundle reader.
Added sample to illustrate usage.

Related work items: #19015501
2018-10-22 13:55:28 -07:00
Ruben Guerrero Samaniego a1c8c698f7 Merged PR 2416703: Clean up on CMakeLists.txt and DirectoryObject.cpp
Clean up to follow CMake conventions and best practices.
2018-10-09 13:44:15 -07:00
Ruben Guerrero Samaniego 4cb6dc4cf7 Move to preview 2018-09-26 10:07:11 -07:00
Chaitanya Donthini 35420f62f7
Update README.md 2018-09-26 07:08:32 -07:00
William Cheng 64d54bda73 Merged PR 2367350: copy win7msix project to samples
This needs to be available on GitHub next week Monday 9/24 so that Andrew Clinick can point to it and say "look here we've made this open sourced".
Code was largely lifted from the MSIX.Win7 intern project with minor modifications
2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego dea2e72be9 Merged PR 2308191: [MSIX SDK] add a c-make switch to exclude bundles from unpack
Enable the user to disable bundle support for the SDK by specifying -DSKIP_BUNDLES=on on CMake. If the user tries to unpack a bundle or create a bundle factory they will get 0x80070032 (E_NOTSUPPORTED). The binary size decreases ~60k.

Win x64
- bundle: 464 k
- no bundle: 413 k

Win x86
- bundle: 330 k
- no bundle: 293 k

Linux
- bundle: 5,424 k
- no bundle: 5,330 k

AOSP arm
- bundle: 4,381 k
- no bundle: 4,313 k

AOSP arm v7a
- bundle: 4,288 k
- no bundle: 4,220 k

MacOS
- bundle: 4,487 k
- no bundle: 4,413 k

iOS arm64
- bundle: 4,516 k
- no bundle: 4,458 k

Related work items: #18753331
2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego 508de650e7 Merged PR 2275263: Support for Flat Bundles
Adding support for flat bundles. There are two ways a flat bundle can be unpacked:
1. Payload packages are in the same directory as the flat bundle.
1. Payload packages are in a different directory as the flat bundle.

For case 1, we create the stream of the package given the path of the bundle plus the information on the bundle manifest. A flat bundle and payload packages for testing can be found under test/appx/flat.

For case 2, two new public interfaces are defined: IMsixFactoryOverrides and IMsixStreamFactory. IMsixFactoryOverrides is implemented by the AppxFactory. The user can QI for this interface and specify an override via SpecifyExtension and the extension it wants to override defined in the MSIX_FACTORY_EXTENSION enum before creating the bundle/package reader. For now, we only have MSIX_FACTORY_EXTENSION_STREAM_FACTORY but it is design to be extended if we need to (eg. override applicability logic)

For MSIX_FACTORY_EXTENSION_STREAM_FACTORY, the user needs to set an object that implements IMsixStreamFactory. When the bundle being unpacked is a flat bundle, we get the override via GetCurrentSpecifiedExtension and QI for IMsixStreamFactory. IMsixStreamFactory has only one method, CreateStreamOnRelativePath that takes a path of the package and returns an IStream for that package. We then validate this stream as normal.

sample/OverrideStreamSample contains a sample implementation of IMsixStreamFactory and IStream. An easy way to play with the sample is to copy FlatBundleWithAsset.appxbundle in a different folder and try to unpack it.

Extras: refactor to improve readability of the code.

Related work items: #18607747, #18607753
2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego 9124b9771c Merged PR 1844385: Filtering packages in bundle and implementation of public interfaces
In this change:
- Implementations of several public interfaces to expand the SDK
    - IAppxManifestReader
    - IAppxManifestReader2
    - IAppxManifestReader3
    - IAppxManifestPackageId
    - IAppxManifestProperties
    - IAppxManifestTargetDeviceFamiliesEnumerator
    - IAppxManifestTargetDeviceFamily
    - IAppxManifestResourcesEnumerator
    - IAppxManifestApplicationsEnumerator
    - IAppxManifestApplication
    - IAppxManifestQualifiedResourcesEnumerator
    - IAppxManifestQualifiedResource
    - IAppxBundleManifestReader
    - IAppxBundleManifestPackageInfoEnumerator
    - IAppxBundleManifestPackageInfo
- New option for makemsix unbundle -d <directory> -p <package> [-sl] [-sp]
- New entrypoints UnpackBundle and UnpackBundleFromStream
- Parse attributes from AppxManifest.xml
- EnumeratorCom class specialized for enumerators interfaces.
- ChainInterfaces struct for ComClass (eg. IAppxManifestReader3->IAppxManifestReader2->IAppxManifestReader)
- Fix QI'ing for IUnknown and other bugs.
- ApiTest to validate the correctness of the implementation
- New bundle sample to show information about packages in a bundle (doesn't extract)

Related work items: #15765569
2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego 695ff39212 PR Comments 2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego ca1a5ca3fb Implement Windows8+ Applicability PAL 2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego cf39a03965 Improve sample 2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego f1eadb32df Add logging to ExtractContentsSample.cpp 2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego 3dc4890e03 Add new entry point UnpackPackageFromStream to allow unpacking a package given a stream. Update ExtractContentsSample to unpack bundles 2018-09-21 15:57:06 -07:00
Ruben Guerrero Samaniego 2604b9a0bc Delete AppxCerts.hpp to use the new resource zip file. Rename resource file to MSIXResource. Create a helper methods to obtain the resources and move CreateBufferFromStream to its own header. 2018-03-29 17:06:17 -07:00
Ruben Guerrero Samaniego 7e05b7959b Merged PR 1424038: Rename CrossPlat files from appx to MSIX
This change contains the renaming from xPlatAppx to MSIX Packaging SDK

Binaries
- xPlatAppx.dll -> msix.dll
- MakexPlatAppx.exe -> makemsix.exe

Export rename
- UnpackAppx ->UnpackPackage

Related work items: #15704951
2018-02-13 21:25:38 +00:00
Ruben Guerrero Samaniego 0593014cd3 Merged PR 1317796: ExtractContentsSample don't create subdirectories approperly for non-Win platforms.
In the extract sample, for non-Win platforms, a file in a subdirectory will be saved as `Assets\contrast-black\SplashScreen.scale-100_contrast-black.png` instead of creating the proper directories

Related work items: #15487436
2018-01-17 02:06:16 +00:00
Phil Smith b75a75c182 Merged PR 1304570: Remove dead/unused submodules from project.
Turns out that we did not need Xalan for xPath support, and we never ended up using fb_util_for_appx either.
2018-01-12 00:49:27 +00:00
Ruben Guerrero Samaniego a4c27c4162 Merged PR 1168654: Unpack save files with their encoding name, instead of the name on the BlockMap
Fix saving the files using the percentage encoding name that OPC uses. We now save files as the name defined in the AppxBlockMap.xml file.

Unpacking test\appx\BlockMap\HelloWorld.appx used to produce a file with name Shortcut%20File\HelloWorld.appxref-ms and now is Shortcut File\HelloWorld.appxref-ms

Unpacking test\appx\HelloWorld.appx used to produce a files with name icon-32%255B2%255D.png and icon-32%25255B2%25255D.png and now is icon-32%5B2%5D.png and icon-32%255B2%255D.png respectively.

Related work items: #14874780
2017-12-05 01:18:11 +00:00
Phil Smith e329e5d404 Review feedback taken into account. 2017-11-08 15:08:41 -08:00
Phil Smith 70d54bd9e5 Fix small issue in Win32 sample. 2017-11-07 12:25:15 -08:00
Phillip Smith 1c21c2e38a Fixed a bug in the API surface where the IAppxFilesEnumerator was handing back IStream objects that were handed out via the GetFootPrint method, which causes overlapping writes to the same file (bad!). Also fixed a few build breaks that were non-win32 specific. Confirmed that both the API surface and the MakeXPlat unpack functionality BOTH work on Mac now! 2017-11-06 23:13:52 -08:00
Phil Smith 962e563b4f Fixed two small issues: 1) Temporarily made ExtractContentsSample handle file names whose path separator is '/' on Win32 (hint: it should be '\\' on Win32. 2) Handed out a COM object that had been run-down because I used Get instead of Detach. :/ 2017-11-06 17:53:34 -08:00
Phil Smith 545d12bf54 Everything except for translating file name(s) through the IAppxFile interface into a platform correct/compatible name. 2017-11-06 17:32:40 -08:00
Phillip Smith 65e86d9bd5 Code compiles, but there's something weird happening down in ComHelper w.r.t. the QI chain and not correctly adjusting the pointer we hand-out to clients. 2017-11-03 00:22:17 -07:00
Phillip Smith c04961b588 Reverts the revert that went into the wrong branch. This should head-off any merge conflicts that arise when this branche's payload hits the payload that was in origin/helpphil. 2017-11-03 00:20:08 -07:00
Phillip Smith 8922a45334 Revert Packing up for the day. This was inadvertently pushed to the wrong branch. 2017-11-02 20:09:32 -07:00
Phil Smith dda88911c9 Packing up for the day. 2017-11-02 18:13:34 -07:00
Ruben Guerrero Samaniego c1ed26e8e2 Merged PR 1001261: Merge appxpackaging to feature
Coclasses with AppxPackaging interfaces

Verified that builds on Windows, Linux and Android

Related work items: #13953288
2017-10-19 21:20:45 +00:00
Ruben Guerrero Samaniego 99874ffde1 Merged PR 952974: API Surface IDL
IDL and MIDL generated header
2017-10-12 22:51:58 +00:00
Phil Smith 1793b01895 move submodule dependencies to under the lib folder and some small changes to stream stuff. 2017-09-19 16:17:28 -07:00