Skip to content

Commit 1afc174

Browse files
committed
Move digital watchface to resources
1 parent cd0d64f commit 1afc174

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

src/displayapp/screens/WatchFaceDigital.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
using namespace Pinetime::Applications::Screens;
77

8-
WatchFaceDigital::WatchFaceDigital(AppControllers& controllers) : Pawn(controllers, std::make_unique<Pawn::HeatshrinkFile>(std::make_unique<Pawn::ConstFile>(watchface_digital, watchface_digital_len))) {
8+
WatchFaceDigital::WatchFaceDigital(AppControllers& controllers) : Pawn(controllers, std::make_unique<Pawn::LfsFile>(controllers.filesystem, "/apps/watchface_digital.amx")) {
99
}

src/resources/apps.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@
44
"overlays": false,
55
"target_path": "/apps/",
66
"extension": ".amx"
7+
},
8+
"watchface_digital": {
9+
"source": "apps/watchface_digital.p",
10+
"overlays": true,
11+
"target_path": "/apps/",
12+
"extension": ".amx"
713
}
814
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include "infinitime"
21
#include "symbols"
32

43
var lv_obj: label_time

src/resources/generate-apps.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ def main():
2626
if not os.path.exists(source):
2727
source = os.path.join(os.path.dirname(sys.argv[0]), source)
2828

29-
args = [args.pawncc, "-p" + os.path.join(args.include, "infinitime.inc"), "-i" + args.include]
29+
ccargs = [args.pawncc, "-p" + os.path.join(args.include, "infinitime.inc"), "-i" + args.include]
3030
if not app.get("debug", False):
31-
args.append("-O3")
32-
args.append("-d0")
31+
ccargs.append("-O3")
32+
ccargs.append("-d0")
3333
if app.get("overlays", False):
34-
args.append("-V" + str(OVERLAY_SIZE))
35-
args.append("-S" + str(app.get("stack_size", DEFAULT_STACK_SIZE)))
34+
ccargs.append("-V" + str(OVERLAY_SIZE))
35+
ccargs.append("-S" + str(app.get("stack_size", DEFAULT_STACK_SIZE)))
3636

37-
args.append(source)
37+
ccargs.append(source)
3838

39-
subprocess.check_call(args) # The output will be written to the current directory with the ".amx" extension
39+
subprocess.check_call(ccargs) # The output will be written to the current directory with the ".amx" extension
4040

4141
sourcePath = pathlib.Path(source)
4242
shutil.move(sourcePath.stem + ".amx", sourcePath.stem + ".bin")

0 commit comments

Comments
 (0)