jamulussoftware / jamulussoftware/jamulus
Android: Jamulus.pro relies on git and Linux
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 248
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 9
Description
**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`.
2. 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
3. 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 https://github.com/jamulussoftware/jamulus/pull/3083#issuecomment-1593565446
> 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.
Contributor guide
Research direction
Inspect the Android version generation and qmake configuration in Jamulus.pro, then reproduce the qmake Android build using both the git checkout and source tarball on Linux and Windows. Done means supported build environments no longer fail because git or wc is unavailable, while Android version names and version codes remain valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, git, linux
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100