reducing the msix sdk binary size for android by ~3.5MB by switching to use the inbox android java xml no validation parser instead of xerces. This reduces the libmsix.so from ~5.8MB to ~2.3 MB.
- Need to use JNI interop for accessing the java xml parser elements. Made sure that local refs to java objects are released when done.
-by default on android, it will use javaxml. For flexibility, if one still wants to use the native xerces parse, they can use the -parser-xerces build flag.
- verified that androidBVT tests pass.
Related work items: #18565184
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
updating android to use the ndk version of libz.so instead of the static lib built in the xplatappx repo. If you want to use the xplatappx one instead, you can specify the -xzlib build option to makeaosp.sh
Refactored the inflatestream code to keep the common portions of stream state management and pulled out the compression implementation specifics into a compressionObject PAL implementation.
This reduces the binary size by ~30K on android.
Related work items: #18607665
Android added, on API level 24 support for having more than one language on the device . MSIX min API level is 19, so we can't use Configuration.getLocales() to obtain them and we have to use the deprecated attribute Configuration.locale. We should support returning multiple languages for devices were it is supported and only one when is not possible.
Also add documentation on the README about Android support and removed expecting always $ANDROID_HOME as an environment variable by adding a new switch on CMake that expects the SDK path.
There isn't a problem in building a jar with a higher API level and then run it on a lower API level device. However, there is a problem in building the native lib on a higher API level than one of the device. This is why the distinction has to be made between the NDK and SDK level. In less words, the NDK minimum is 19 and the SDK minimum is 24.
Related work items: #17634105
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