jamulussoftware / jamulussoftware/jamulus
Android: Jamulus.pro relies on git and Linux
Nessuno ha ancora preso questa issue.
- Lingua principale
- C
- Stelle
- 1.1k
- Fork
- 248
- Merge medio
- 2g 3h
- PR unite (30g)
- 9
Descrizione
**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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Esamina la generazione della versione Android e la configurazione di qmake in Jamulus.pro, quindi riproduci la build Android con qmake utilizzando sia il checkout git sia il tarball del codice sorgente su Linux e Windows. Il lavoro è completato quando gli ambienti di build supportati non falliscono più perché git o wc non è disponibile, mentre i nomi delle versioni e i codici versione Android rimangono validi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, git, linux
- Ambito
- build-system, mobile
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 58/100