0.11.1: dist-apk packs native libraries as the Android Gradle plugin does; dist-appimage takes an SVG icon - #27
Merged
Conversation
…does; dist-appimage takes an SVG icon A HuxerUI application packed by dist-apk and by Gradle differed in its native libraries: dist-apk shipped them with their symbol tables and debug information (libhuxerui.so 8.1 MB against 5.5 MB, the NDK's libc++_shared.so 9.1 MB against 1.3 MB), and always compressed, so a manifest stating android:extractNativeLibs="false" produced a package the platform refuses. Each native library is now written by an `llvm-strip --strip-unneeded` action with the build's own tool, beside the compiler mcpp::toolchain_dir() reports; options::keep_debug_symbols packs them as staged. A manifest stating extractNativeLibs="false" gets lib/ stored uncompressed and aligned to 16 KB pages; one stating nothing is packed compressed as before. dist-appimage's options::icon may be an SVG: the staged icon keeps the supplied extension, a stale file of the other format is removed, any other format is refused through mcpp::warning, and the payload floor ignores the SVG. Tests: check-apk-features.sh (k) stripped, compressed by default, stored and 16 KB-aligned when loaded in place; (l) keep_debug_symbols. appimage-consumer packs an SVG icon and refuses a .jpg.
This was referenced Sep 15, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A project packed with
dist-apkand with the Android Gradle plugin should give its users the same APK, and an AppImage should carry the icon a project states. Comparing a HuxerUI application built both ways showed three places where they differ:mcpp packstrips the program it builds, but the staged Android tree reached the APK unstripped:libhuxerui.sowas 8.1 MB against Gradle's 5.5 MB, and the NDK'slibc++_shared.so9.1 MB against 1.3 MB.android:extractNativeLibs="false", which the Gradle plugin writes from minSdk 23). The platform can only map an entry stored uncompressed on a page boundary, so such a package fails to install.dist-apkllvm-strip --strip-unneededaction. This keeps the dynamic symbols the loader reads. The tool is the build's own, beside the compilermcpp::toolchain_dir()reports, which on this row is the NDK's. Without one, the member warns and packs the libraries as staged.options::keep_debug_symbols = truepacks them as staged.<application>statesandroid:extractNativeLibs="false",lib/is added uncompressed andzipalignaligns it to 16 KB pages (-P 16);apksigner signkeeps the same alignment by default.check-apk-features.sh(a) still compares the level-0 manifest byte-for-byte.dist-appimageoptions::iconmay be an SVG. The staged file keeps the supplied extension, because the desktop entry names the icon without one and appimagetool and a desktop's icon lookup find it by the file's.mcpp::warningas well, because the engine discards stderr when the build program exits 0.Tests
tests/apk-consumer,check-apk-features.sh:.symtaband no.debug_*section, andANativeActivity_onCreateis still in.dynsym. With no manifest statement it is compressed. Withmanifest-template-in-place.xmlit is stored, passeszipalign -c -P 16 4, and the linked manifest statesextractNativeLibs=false.keep_debug_symbolskeeps the.symtab.tests/appimage-consumer: withAPPIMAGE_CONSUMER_ICONset to an SVG, the extracted image carriesAppimageConsumer.svgbyte-identical to the source, no.png, andIcon=AppimageConsumer. A.jpgis refused with its message.Version 0.11.1 (
mcpp.toml,mcpp::plugins::version); README rows for both members.