Skip to content

Improvements for developer builds#4

Open
jeanparpaillon wants to merge 7 commits into
bdbcat:masterfrom
jeanparpaillon:fix-build
Open

Improvements for developer builds#4
jeanparpaillon wants to merge 7 commits into
bdbcat:masterfrom
jeanparpaillon:fix-build

Conversation

@jeanparpaillon

@jeanparpaillon jeanparpaillon commented Jul 16, 2026

Copy link
Copy Markdown

Hi Dave.
Thank you for your work on OpenCPN. I also live on my boat is this is of great value :)
This is the beginning of contributions I'd like you to review.
The first goal is to ease the build of OpenCPN Android app fotr developpers.

I'm looking forward to contribute to the core code onbce this is fixed.

Don't hesitate to share your thoughts on that and discuss strategies for improving the contribution process.

jeanparpaillon and others added 5 commits July 15, 2026 19:45
app/build.gradle staged everything through absolute paths into one
developer's home directory (/home/dsr/Projects/...), so the APK could only
be assembled on that machine. Drive the staging from properties instead:

    OCPN_SRC, OCPN_BUILD_ARMHF, OCPN_BUILD_ARM64, QT_ARMHF, QT_ARM64,
    NDK_SYSROOT

passed with -P, defaulting to a side-by-side checkout layout so a bare
./gradlew still works. OpenCPN-builder supplies them for its container.

Two of these are not just renamed paths:

  * source and build tree are now separate properties. OCPN_Base served as
    both, which only works when the build directory sits inside the source
    tree, as it did there but does not in general.

  * ${Qt_Base}/${Qt_Build}/qtbase collapses to one property per ABI. The
    qtbase level is an artifact of building Qt from source in-tree; it does
    not exist in an installed Qt.

Alongside that, the parts of the staging that no longer resolve:

  * src/bitmaps moved to resources/bitmaps in OpenCPN.

  * The wxstd.mo lines are dropped: nothing stages wx's own translations,
    and a Copy of a missing file is silent, so they only looked like they
    worked. wx's stock strings stay untranslated until they are staged.

  * Every task reaching into /home/dsr for a third-party plugin (draw,
    oesenc, o-charts, celestial, watchdog, vdr, pypilot, weather_routing,
    statusbar) is removed -- they are separate projects and several are not
    redistributable. copySERVERFiles32/64 mattered: they were *enabled* and
    silently copying nothing, so the oexserverd they promise was never in
    the APK anyway.

  * The x86 tasks go with them; abiFilters covers armeabi-v7a and
    arm64-v8a only.

libc++_shared.so now comes from NDK_SYSROOT rather than the copy committed
here. libgorp.so has it as DT_NEEDED and libs.xml loads it first, so it has
to match the NDK that built the lib; the committed one predates it.

Also: drop jcenter(), which is shut down; drop ':afilechooser' from
settings.gradle, which has no directory and no dependents; and stop
ignoring google-services.json -- OpenCPN-builder drops a placeholder there
for dev builds, and committing either that or the real credentials would
make a production build silently use whatever was checked in.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The debug build installs alongside a stock OpenCPN via a ".debug"
applicationIdSuffix, but that only works if nothing declares a device-global
resource under a fixed name. materialfilemanager registers four providers with
hardcoded authorities (bms.ocpnfilemanager.{bookmarks,search,search.suggest,
filemanager}); provider authorities must be unique across the whole device, so
installing next to stock fails with INSTALL_FAILED_CONFLICTING_PROVIDER.

Make them ${applicationId}-relative so the merger substitutes each variant's
final applicationId, keeping debug and stock distinct. This is inert beyond the
uniqueness: nothing resolves against these authorities — the Java CONTENT_URIs
point at the unrelated bms.myfilemanager.*/com.veniosg.dir.* strings, so the
providers were already dead registrations.

Companion to ccecb0b, which fixed the app's own FileProvider authority the same
way; this covers the library providers that surfaced on the next install.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jeanparpaillon jeanparpaillon changed the title Homogeneize sdk version amongst components Improvevements for developer builds Jul 16, 2026
@jeanparpaillon jeanparpaillon changed the title Improvevements for developer builds Improvements for developer builds Jul 16, 2026
jeanparpaillon and others added 2 commits July 16, 2026 20:28
When developing, we don't need firebase, so add AndroidManifest override fur debug env,
with firebaseInitProvider disabled
Drive ndk.abiFilters and the per-arch copy tasks (core lib, Qt libs,
libc++_shared, plugin .so) from a single OCPN_ABIS property, defaulting
to both ABIs so a bare ./gradlew still builds a fat APK. This lets
OpenCPN-builder build a single arch for faster dev cycles without the
build reaching for a tree it never built.

Also source the arch-independent translation .mo files from a dedicated
OCPN_BUILD_ALL tree instead of the armhf build, so the APK's languages
no longer depend on which arch was built.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant