diff --git a/doc/buildWithDocker.md b/doc/buildWithDocker.md index db9bfcfc98..513df83136 100644 --- a/doc/buildWithDocker.md +++ b/doc/buildWithDocker.md @@ -87,3 +87,9 @@ Here's an example for `pinetime-app`: ```sh docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime-build /opt/build.sh pinetime-app ``` + +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: + +```sh +docker run --rm -it -v ${PWD}:/sources -e ENABLE_USERAPPS="Apps::Alarm,Apps::Timer,Apps::Steps,Apps::HeartRate,Apps::Music,Apps::Navigation" infinitime-build +``` diff --git a/docker/build.sh b/docker/build.sh index b7637f4990..04963ea0ab 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -77,6 +77,10 @@ GetNrfSdk() { } CmakeGenerate() { + CMAKE_ARGS=() + [ -n "$ENABLE_USERAPPS" ] && CMAKE_ARGS+=("-DENABLE_USERAPPS=$ENABLE_USERAPPS") + [ -n "$ENABLE_WATCHFACES" ] && CMAKE_ARGS+=("-DENABLE_WATCHFACES=$ENABLE_WATCHFACES") + cmake -G "Unix Makefiles" \ -S "$SOURCES_DIR" \ -B "$BUILD_DIR" \ @@ -84,7 +88,8 @@ CmakeGenerate() { -DARM_NONE_EABI_TOOLCHAIN_PATH="$TOOLS_DIR/$GCC_ARM_PATH" \ -DNRF5_SDK_PATH="$TOOLS_DIR/$NRF_SDK_VER" \ -DBUILD_DFU=1 \ - -DBUILD_RESOURCES=1 + -DBUILD_RESOURCES=1 \ + ${CMAKE_ARGS[@]} } CmakeBuild() {