aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2015-02-26 21:55:13 +0100
committerVictor Häggqvist <[email protected]>2015-05-29 13:04:37 +0200
commite88500c8afe2fe6f6875ef4dc5ad6ccd143ddc21 (patch)
treec3dae614d82e89e0fe1cef714ec792c520dbac78
parentea25d51c71950d8a908899e52c836d880f990293 (diff)
sdk 3 convertion
-rw-r--r--appinfo.json21
-rw-r--r--wscript23
2 files changed, 32 insertions, 12 deletions
diff --git a/appinfo.json b/appinfo.json
index 510b60a..32a272f 100644
--- a/appinfo.json
+++ b/appinfo.json
@@ -11,12 +11,17 @@
"appKeys": {},
"resources": {
"media": [
- {
- "type": "png",
- "file": "icon.png",
- "menuIcon": true,
- "name": "ICON"
- }
+ {
+ "type": "png",
+ "file": "icon.png",
+ "menuIcon": true,
+ "name": "ICON"
+ }
]
- }
-}
+ },
+ "targetPlatforms": [
+ "aplite",
+ "basalt"
+ ],
+ "sdkVersion": "3"
+} \ No newline at end of file
diff --git a/wscript b/wscript
index 0554dc8..e9657e5 100644
--- a/wscript
+++ b/wscript
@@ -5,6 +5,8 @@
# Feel free to customize this to your needs.
#
+import os.path
+
top = '.'
out = 'build'
@@ -17,8 +19,21 @@ def configure(ctx):
def build(ctx):
ctx.load('pebble_sdk')
- ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c'),
- target='pebble-app.elf')
+ build_worker = os.path.exists('worker_src')
+ binaries = []
+
+ for p in ctx.env.TARGET_PLATFORMS:
+ ctx.set_env(ctx.all_envs[p])
+ app_elf='{}/pebble-app.elf'.format(ctx.env.BUILD_DIR)
+ ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c'),
+ target=app_elf)
+
+ if build_worker:
+ worker_elf='{}/pebble-worker.elf'.format(ctx.env.BUILD_DIR)
+ binaries.append({'platform': p, 'app_elf': app_elf, 'worker_elf': worker_elf})
+ ctx.pbl_worker(source=ctx.path.ant_glob('worker_src/**/*.c'),
+ target=worker_elf)
+ else:
+ binaries.append({'platform': p, 'app_elf': app_elf})
- ctx.pbl_bundle(elf='pebble-app.elf',
- js=ctx.path.ant_glob('src/js/**/*.js'))
+ ctx.pbl_bundle(binaries=binaries, js=ctx.path.ant_glob('src/js/**/*.js'))