Commit 30bfb428 authored by Niklas Postulart's avatar Niklas Postulart

Updated Build Information

parent 69254dca
build
.DS_Store
.lock-waf_darwin_build
...@@ -87,6 +87,11 @@ ...@@ -87,6 +87,11 @@
"name": "ICON_PLAYER", "name": "ICON_PLAYER",
"type": "png" "type": "png"
}, },
{
"file": "images/player_alpha.png",
"name": "ICON_PLAYER_ALPHA",
"type": "png"
},
{ {
"file": "images/power.png", "file": "images/power.png",
"name": "ICON_POWER", "name": "ICON_POWER",
...@@ -149,12 +154,16 @@ ...@@ -149,12 +154,16 @@
} }
] ]
}, },
"sdkVersion": "2", "sdkVersion": "3",
"shortName": "Rockodi", "shortName": "Rockodi",
"uuid": "77495959-66fe-4db1-ab4b-368369babb00", "uuid": "77495959-66fe-4db1-ab4b-368369babb00",
"versionCode": 1, "versionCode": 1,
"versionLabel": "0.1", "versionLabel": "0.1",
"watchapp": { "watchapp": {
"watchface": false "watchface": false
} },
"targetPlatforms": [
"aplite",
"basalt"
]
} }
\ No newline at end of file
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
# #
import os.path import os.path
try:
from sh import CommandNotFound, jshint, cat, ErrorReturnCode_2
hint = jshint
except (ImportError, CommandNotFound):
hint = None
top = '.' top = '.'
out = 'build' out = 'build'
...@@ -20,38 +15,27 @@ def options(ctx): ...@@ -20,38 +15,27 @@ def options(ctx):
def configure(ctx): def configure(ctx):
ctx.load('pebble_sdk') ctx.load('pebble_sdk')
global hint
if hint is not None:
hint = hint.bake(['--config', 'pebble-jshintrc'])
def build(ctx): def build(ctx):
if False and hint is not None:
try:
hint([node.abspath() for node in ctx.path.ant_glob("src/**/*.js")], _tty_out=False) # no tty because there are none in the cloudpebble sandbox.
except ErrorReturnCode_2 as e:
ctx.fatal("\nJavaScript linting failed (you can disable this in Project Settings):\n" + e.stdout)
# Concatenate all our JS files (but not recursively), and only if any JS exists in the first place.
ctx.path.make_node('src/js/').mkdir()
js_paths = ctx.path.ant_glob(['src/*.js', 'src/**/*.js'])
if js_paths:
ctx(rule='cat ${SRC} > ${TGT}', source=js_paths, target='pebble-js-app.js')
has_js = True
else:
has_js = False
ctx.load('pebble_sdk') ctx.load('pebble_sdk')
build_worker = os.path.exists('worker_src')
binaries = []
for p in ctx.env.TARGET_PLATFORMS:
ctx.set_env(ctx.all_envs[p])
ctx.set_group(ctx.env.PLATFORM_NAME)
app_elf='{}/pebble-app.elf'.format(ctx.env.BUILD_DIR)
ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c'), ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c'),
target='pebble-app.elf') target=app_elf)
if os.path.exists('worker_src'): 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'), ctx.pbl_worker(source=ctx.path.ant_glob('worker_src/**/*.c'),
target='pebble-worker.elf') target=worker_elf)
ctx.pbl_bundle(elf='pebble-app.elf',
worker_elf='pebble-worker.elf',
js='pebble-js-app.js' if has_js else [])
else: else:
ctx.pbl_bundle(elf='pebble-app.elf', binaries.append({'platform': p, 'app_elf': app_elf})
js='pebble-js-app.js' if has_js else [])
ctx.set_group('bundle')
ctx.pbl_bundle(binaries=binaries, js=ctx.path.ant_glob('src/js/**/*.js'))
#
# This file is the default set of rules to compile a Pebble project.
#
# Feel free to customize this to your needs.
#
import os.path
try:
from sh import CommandNotFound, jshint, cat, ErrorReturnCode_2
hint = jshint
except (ImportError, CommandNotFound):
hint = None
top = '.'
out = 'build'
def options(ctx):
ctx.load('pebble_sdk')
def configure(ctx):
ctx.load('pebble_sdk')
global hint
if hint is not None:
hint = hint.bake(['--config', 'pebble-jshintrc'])
def build(ctx):
if False and hint is not None:
try:
hint([node.abspath() for node in ctx.path.ant_glob("src/**/*.js")], _tty_out=False) # no tty because there are none in the cloudpebble sandbox.
except ErrorReturnCode_2 as e:
ctx.fatal("\nJavaScript linting failed (you can disable this in Project Settings):\n" + e.stdout)
# Concatenate all our JS files (but not recursively), and only if any JS exists in the first place.
ctx.path.make_node('src/js/').mkdir()
js_paths = ctx.path.ant_glob(['src/*.js', 'src/**/*.js'])
if js_paths:
ctx(rule='cat ${SRC} > ${TGT}', source=js_paths, target='pebble-js-app.js')
has_js = True
else:
has_js = False
ctx.load('pebble_sdk')
ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c'),
target='pebble-app.elf')
if os.path.exists('worker_src'):
ctx.pbl_worker(source=ctx.path.ant_glob('worker_src/**/*.c'),
target='pebble-worker.elf')
ctx.pbl_bundle(elf='pebble-app.elf',
worker_elf='pebble-worker.elf',
js='pebble-js-app.js' if has_js else [])
else:
ctx.pbl_bundle(elf='pebble-app.elf',
js='pebble-js-app.js' if has_js else [])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment