Skip to content

Android: Jamulus.pro relies on git and Linux #3087

Open
@pljones

Description

@pljones

Describe the bug

When building the Android version of Jamulus, Jamulus.pro currently relies on the git commit count to generate the ANDROID_VERSION_CODE.

Currently, the | wc -l used to generate the count limits the build to running on a Linux-based machine. This command fails on Windows (hence #3083).

The git log --oneline introduces a dependency on

  • git being installed
  • the build being run against the git repo rather than the source tarball

To Reproduce

  1. Working example using git repo and Linux:
git checkout main
# Switched to branch 'main'
# Your branch is up-to-date with 'origin/main'.
qmake Jamulus.pro -spec android-clang ANDROID_ABIS="armeabi-v7a arm64-v8a x86 x86_64"
# Project MESSAGE: building version "3.9.1dev-f47b6a7a" (intermediate in git repository)
# Project MESSAGE: Setting ANDROID_VERSION_NAME=3.9.1dev-f47b6a7a ANDROID_VERSION_CODE=5471

where 5471 is the result of git log --oneline | wc -l.

  1. Failure case no. 1
  • Use the source tarball on Linux
  • Run the qmake command as above
  • The git log --oneline will fail, causing the qmake to error out
  1. Failure case no. 2
  • Use the git repo on a Windows machine
  • Run the qmake command as above
  • The wc -l command will fail, causing the qmake to error out

Expected behavior

The ANDROID_VERSION_CODE is used by Google Play Store to distinguish versions of an application. Each version should have a higher number than any it is intended to supercede, hence:

  • any build intended to be distributed via Google Play Store should be able to be built from any supported build platform
  • other versions should also be able to be built on any supported build platform.

From #3083 (comment)

The VERSION variable should be independent of a git install if possible

That is, any environment Android Qt build environment should be able to build Jamulus, either for Google Play Store or not, from the source tarball.

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidAndroid runtime issuebugSomething isn't workingtoolingChanges to the automated build system

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions