Skip to content

Commit b70592c

Browse files
committed
initial version
0 parents  commit b70592c

29 files changed

+2115
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build
2+
.lock-waf_linux2_build
3+
.idea/workspace.xml
4+
5+
node_modules/

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyleSettings.xml

+38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/redshift.iml

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required(VERSION 3.2)
2+
project(redshift)
3+
4+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
5+
6+
set(SOURCE_FILES
7+
src/redshift.c
8+
src/redshift.h
9+
src/config.h
10+
src/settings.c
11+
src/settings.h
12+
src/ui-util.c
13+
src/ui-util.h
14+
src/ui.c
15+
src/ui.h)
16+
17+
add_executable(redshift ${SOURCE_FILES})
18+
19+
include_directories(~/.pebble-sdk/SDKs/4.0.1/sdk-core/pebble/basalt/include)
20+
include_directories(~/dev/projects/redshift/node_modules/pebble-fctx/dist/include)

LICENCE.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See licences/apache-2.txt

Makefile

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
REDSHIFT_CONFIG=""
3+
REDSHIFT_FILE="out"
4+
5+
# platform
6+
P="emery"
7+
8+
VERSION=$(shell cat package.json | grep version | grep -o "[0-9]*\.[0-9]*")
9+
10+
all: build install_emulator
11+
12+
deploy: install_deploy
13+
14+
build:
15+
# copy fonts
16+
cp resources/fonts/nupe2.ttf config/fonts/nupe2.ttf
17+
pebble build
18+
19+
build_quiet:
20+
@scripts/build_quiet.sh
21+
22+
config:
23+
pebble emu-app-config --emulator $(P)
24+
25+
log:
26+
pebble logs --emulator $(P)
27+
28+
travis_build:
29+
yes | ~/pebble-dev/${PEBBLE_SDK}/bin/pebble build
30+
31+
install_emulator:
32+
pebble install --emulator $(P)
33+
34+
install_deploy: build
35+
pebble install --phone 192.168.1.6
36+
37+
menu_icon:
38+
$(MAKE) write_header REDSHIFT_CONFIG="SCREENSHOT_MENU_ICON"
39+
$(MAKE) build
40+
$(MAKE) install_emulator
41+
$(MAKE) clean_header
42+
43+
resources:
44+
scripts/assemble_resources.sh
45+
46+
screenshots: screenshot_config
47+
pebble kill
48+
$(MAKE) screenshot REDSHIFT_CONFIG="SCREENSHOT_MAIN" REDSHIFT_FILE="main"
49+
scripts/assemble_screenshots.sh
50+
scripts/assemble_resources.sh
51+
pebble kill
52+
53+
screenshot_config:
54+
rm -f screenshots/aplite/config.png
55+
rm -f screenshots/basalt/config.png
56+
rm -f screenshots/chalk/config.png
57+
phantomjs scripts/capture-settings-screenshot.js TODO?platform=chalk&version=$(VERSION)
58+
sleep 2
59+
pngcrush -q -rem time tmp.png screenshots/chalk/config.png
60+
rm tmp.png
61+
62+
screenshot: write_header build_quiet
63+
scripts/take_screenshot.sh $(REDSHIFT_FILE)
64+
65+
write_header:
66+
@echo "#define $(REDSHIFT_CONFIG)" > src/config.h
67+
68+
clean: clean_header
69+
pebble clean
70+
71+
clean_header:
72+
echo "" > src/config.h
73+
74+
updated_config:
75+
src/scripts/updated_config.sh
76+
77+
font_build:
78+
node_modules/pebble-fctx-compiler/fctx-compiler.js -r "[A-Ia-jz]" resources/fonts/nupe2.svg
79+
node_modules/pebble-fctx-compiler/fctx-compiler.js -r "[0-9a-zA-Z.:\-/° ,]" resources/fonts/OpenSans-CondensedBold.svg
80+
81+
.PHONY: all deploy build build_quiet config log resources install_emulator install_deploy menu_icon screenshots screenshot screenshot_config write_header clean clean_header

README.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Redshift [![Build status](https://travis-ci.org/stefanheule/redshift.svg?branch=master)](https://travis-ci.org/stefanheule/redshift)
2+
3+
Available in the Pebble App Store:
4+
5+
[![Available on the Pebble App Store](http://pblweb.com/badge/55ee57da2b0b31132c00008b/black/small)](https://apps.getpebble.com/applications/55ee57da2b0b31132c00008b)
6+
7+
## Overview
8+
9+
## Screenshots (Pebble Time and Pebble Time Steel)
10+
11+
## FAQ
12+
13+
**No weather information is displayed**
14+
15+
There are many possible causes:
16+
17+
- Make sure weather is turned on in the settings.
18+
- Ensure that your phone is connected to the internet.
19+
- Make sure the color for the weather information is different from the background color.
20+
- If you use darksky.net or wunderground.com as a weather source, make sure the API key is correct.
21+
- If you use a custom location, make sure it is a valid location.
22+
23+
**What does it mean when the degree sign is missing for the weather?**
24+
25+
In this case, the last attempt to update the weather failed. This can be for any number of reasons (see above). Obsidian will keep displaying the previous weather information until it expires.
26+
27+
## Changelog
28+
29+
**Version 1.0**
30+
31+
- Initial version
32+
33+
## Building from Source
34+
35+
The project can be build using the command `make build`. The `Makefile` also includes various other targets, such as ones to install the watchface in an emulator or on the Pebble watch. There are also targets to automatically take the screenshots that are part of this distribution.
36+
37+
### Versioning
38+
39+
The watchface itself uses relatively arbitrary version numbers of MAJOR.MINOR. In addition to that, the configuration format (the JavaScript config object) is versioned, too, using a single integer. Different version of the watchface may share the same configuration format.
40+
41+
| Watchface version | Configuration version |
42+
|------------------:|----------------------:|
43+
| 1.0 | 1 |
44+
45+
## Contributing
46+
47+
Pull requests are welcome.
48+
49+
## License
50+
51+
Copyright 2016 Stefan Heule
52+
53+
Licensed under the Apache License, Version 2.0 (the "License");
54+
you may not use this file except in compliance with the License.
55+
You may obtain a copy of the License at
56+
57+
http://www.apache.org/licenses/LICENSE-2.0
58+
59+
Unless required by applicable law or agreed to in writing, software
60+
distributed under the License is distributed on an "AS IS" BASIS,
61+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
62+
See the License for the specific language governing permissions and
63+
limitations under the License.
64+

before_install.sh

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
# source: https://github.com/sGerli/pBuild
4+
5+
npm install npm@3 -g
6+
7+
set -e
8+
echo 'pBuild 1.4'
9+
echo 'Installing Pebble SDK and its Dependencies...'
10+
11+
cd ~
12+
13+
mkdir -p ~/pebble-dev
14+
mkdir -p ~/.pebble-sdk
15+
touch ~/.pebble-sdk/ENABLE_ANALYTICS
16+
17+
# Get the Pebble SDK and toolchain
18+
if [ ! -d $HOME/pebble-dev/${PEBBLE_SDK} ]; then
19+
wget https://s3.amazonaws.com/assets.getpebble.com/pebble-tool/${PEBBLE_SDK}.tar.bz2
20+
wget http://assets.getpebble.com.s3-website-us-east-1.amazonaws.com/sdk/arm-cs-tools-ubuntu-universal.tar.gz
21+
22+
# Extract the SDK
23+
tar -jxf ${PEBBLE_SDK}.tar.bz2 -C ~/pebble-dev/
24+
# Extract the toolchain
25+
tar zxf arm-cs-tools-ubuntu-universal.tar.gz -C ~/pebble-dev/${PEBBLE_SDK}
26+
27+
# Install the Python library dependencies locally
28+
cd ~/pebble-dev/${PEBBLE_SDK}
29+
virtualenv --no-site-packages .env
30+
source .env/bin/activate
31+
pip install -r requirements.txt
32+
deactivate
33+
fi

0 commit comments

Comments
 (0)