[build] Display on boarding app only with make PLATFORM=device

ON_BOARDING=1

Change-Id: Iada91f419d8e083326cf146b6cf3b6fa8c029486
This commit is contained in:
Émilie Feral
2017-05-23 16:42:45 +02:00
parent dee5f315a9
commit d9f2604926
6 changed files with 14 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ app_objs += $(addprefix apps/,\
variable_box_leaf_cell.o\
)
apps/apps_container.o: SFLAGS += -DON_BOARDING=$(ON_BOARDING)
app_images += apps/exam_icon.png
# Tracking which source file uses which image is painful. But we need to ensure

View File

@@ -6,6 +6,10 @@ extern "C" {
#include <assert.h>
}
#ifndef ON_BOARDING
#error This file expects ON_BOARDING to be defined
#endif
using namespace Shared;
AppsContainer::AppsContainer() :
@@ -152,7 +156,11 @@ void AppsContainer::switchTo(App::Snapshot * snapshot) {
}
void AppsContainer::run() {
#if ON_BOARDING
switchTo(onBoardingAppSnapshot());
#else
switchTo(appSnapshotAtIndex(0));
#endif
Container::run();
switchTo(nullptr);
}

View File

@@ -1,3 +1,4 @@
TOOLCHAIN ?= afl
USE_LIBA ?= 0
EXE = bin
ON_BOARDING ?= 0

View File

@@ -5,6 +5,7 @@ TOOLCHAIN = arm-llvm
endif
USE_LIBA = 1
EXE = elf
ON_BOARDING ?= !DEBUG
%_flash: %.bin
dfu-util -i 0 -a 0 -s 0x08000000:leave -D $<

View File

@@ -1,3 +1,4 @@
TOOLCHAIN = emscripten
USE_LIBA = 0
EXE = html
ON_BOARDING ?= 0

View File

@@ -1,3 +1,4 @@
TOOLCHAIN ?= host-clang
USE_LIBA = 0
EXE = elf
ON_BOARDING ?= 0