Compare commits

...

6 Commits

@ -11,7 +11,7 @@ before_install:
- yes | sdkmanager "platforms;android-27" # accept android licenses - yes | sdkmanager "platforms;android-27" # accept android licenses
install: install:
- nvm install 6 # build with nodejs 6, as this is what FDroid uses (debian stretch backports) - nvm install 12
- npm install -g ionic cordova - npm install -g ionic cordova
- npm install - npm install

@ -47,22 +47,18 @@ export ANDROID_HOME=$ANDROID_SDK
export PATH=$PATH:$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$ANDROID_SDK/tools/bin:$ANDROID_SDK/platform-tools:$ANDROID_SDK/build-tools/28.0.3 export PATH=$PATH:$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$ANDROID_SDK/tools/bin:$ANDROID_SDK/platform-tools:$ANDROID_SDK/build-tools/28.0.3
``` ```
To create a signed release build, add a file `platform/android/release-signing.properties` following this template.
You need a keystore with a valid signing key!
```properties
storeFile=../../reedu-android.keystore
storeType=jks
keyAlias=reedu-android
keyPassword=xxxxxxxxxxxxxxxxxxxxxxxxx
storePassword=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
To build & deploy on an emulator or device use the `android:*` build commands defined in `package.json` (some only work on linux), for example: To build & deploy on an emulator or device use the `android:*` build commands defined in `package.json` (some only work on linux), for example:
```bash ```bash
npm run android:dev # build debug build & deploy to connected device & restart app npm run android:dev # build debug build & deploy to connected device & restart app
``` ```
###### release signing
You need a keystore with a valid signing key!
```
zipalign -p 4 blockly-unsigned.apk blockly-aligned.apk
apksigner sign -ks reedu-android.keystore --in blockly-aligned.apk --out blockly-signed.apk
```
### updating blockly ### updating blockly
Blockly is included as a submodule, linking to <https://github.com/sensebox/ardublockly-1>. Blockly is included as a submodule, linking to <https://github.com/sensebox/ardublockly-1>.
To update it, just pull in the commit you want, and commit the change in this repository: To update it, just pull in the commit you want, and commit the change in this repository:

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="de.sensebox.blockly" version="1.1.3" android-versionCode="10103" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="de.sensebox.blockly" version="1.1.4" android-versionCode="10104" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Blockly for senseBox</name> <name>Blockly for senseBox</name>
<description>graphical programming &amp; OTA upload for senseBox MCU</description> <description>graphical programming &amp; OTA upload for senseBox MCU</description>
<author email="kontakt@reedu.de" href="https://reedu.de/">re:edu</author> <author email="kontakt@reedu.de" href="https://reedu.de/">re:edu</author>

1469
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
{ {
"name": "blockly-sensebox", "name": "blockly-sensebox",
"version": "1.1.3", "version": "1.1.4",
"author": "Reedu GmbH", "author": "Reedu GmbH",
"homepage": "https://reedu.de/", "homepage": "https://reedu.de/",
"private": true, "private": true,
@ -51,7 +51,7 @@
"zone.js": "0.8.26" "zone.js": "0.8.26"
}, },
"devDependencies": { "devDependencies": {
"@ionic/app-scripts": "3.2.3", "@ionic/app-scripts": "^3.2.4",
"typescript": "~2.6.2" "typescript": "~2.6.2"
}, },
"description": "OpenSenseApps by IfGI 2018 App-Dev course.", "description": "OpenSenseApps by IfGI 2018 App-Dev course.",

@ -1 +1 @@
Subproject commit 9d69d61a213ea2d79f3d5cf5fb4d551149bc2efa Subproject commit cc464a6466c2e6b2648e93e386d574d526cd3f40

@ -21,7 +21,10 @@ const handleLog = (req, res) => {
req.on('end', () => { req.on('end', () => {
try { try {
const msg = JSON.parse(body) const msg = JSON.parse(body)
msg.useragent = req.headers['user-agent'] msg.logclient = {
ip: req.connection.remoteAddress,
ua: req.headers['user-agent']
}
fileStream.write(JSON.stringify(msg)) fileStream.write(JSON.stringify(msg))
fileStream.write('\n') fileStream.write('\n')
@ -49,7 +52,10 @@ const requestHandler = (req, res) => {
} }
} }
const fileStream = fs.createWriteStream(logfile, 'utf-8') const fileStream = fs.createWriteStream(logfile, {
encoding: 'utf-8',
flags: 'a', // append
})
const server = http.createServer(requestHandler) const server = http.createServer(requestHandler)
server.listen(port, err => { server.listen(port, err => {

Loading…
Cancel
Save