Skip to content

Commit f882df9

Browse files
Improve buildscript to allow for custom selection of apps/watchfaces (#2429)
1 parent ad73e1b commit f882df9

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

doc/buildWithDocker.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,9 @@ Here's an example for `pinetime-app`:
8787
```sh
8888
docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime-build /opt/build.sh pinetime-app
8989
```
90+
91+
If you want to change the apps and/or watchfaces built in the project, you can pass `ENABLE_USERAPPS` and `ENABLE_WATCHFACES` as environment variables like so:
92+
93+
```sh
94+
docker run --rm -it -v ${PWD}:/sources -e ENABLE_USERAPPS="Apps::Alarm,Apps::Timer,Apps::Steps,Apps::HeartRate,Apps::Music,Apps::Navigation" infinitime-build
95+
```

docker/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,19 @@ GetNrfSdk() {
7777
}
7878

7979
CmakeGenerate() {
80+
CMAKE_ARGS=()
81+
[ -n "$ENABLE_USERAPPS" ] && CMAKE_ARGS+=("-DENABLE_USERAPPS=$ENABLE_USERAPPS")
82+
[ -n "$ENABLE_WATCHFACES" ] && CMAKE_ARGS+=("-DENABLE_WATCHFACES=$ENABLE_WATCHFACES")
83+
8084
cmake -G "Unix Makefiles" \
8185
-S "$SOURCES_DIR" \
8286
-B "$BUILD_DIR" \
8387
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
8488
-DARM_NONE_EABI_TOOLCHAIN_PATH="$TOOLS_DIR/$GCC_ARM_PATH" \
8589
-DNRF5_SDK_PATH="$TOOLS_DIR/$NRF_SDK_VER" \
8690
-DBUILD_DFU=1 \
87-
-DBUILD_RESOURCES=1
91+
-DBUILD_RESOURCES=1 \
92+
${CMAKE_ARGS[@]}
8893
}
8994

9095
CmakeBuild() {

0 commit comments

Comments
 (0)