From 5ace1e0ac7bcd026697d9c0949ed5c1650bb616e Mon Sep 17 00:00:00 2001 From: Laura Enria Date: Mon, 25 Mar 2019 09:36:39 +0000 Subject: [PATCH] Style: Make CTAs bold and unbold everything else All text used to be bold which made it difficult to understand what the task was at any point. Resolve this by making only the call-to-actions bold and the rest of the text regular. Also add documentation for Linux installation. --- README.md | 220 +++++++++++++++++- debian/changelog | 7 + .../Tactile/Components/instruction_text.qml | 5 +- res/ui/Tactile/flow.js | 56 +++-- 4 files changed, 256 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 9553791..a9ee097 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Install the Build-Depends as listed in debian/control file: Add Qt5 build tools to your PATH: -``` +```bash echo 'export PATH=$PATH:/usr/local/qt5/bin' >> $HOME/.bashrc source $HOME/.bashrc ``` @@ -41,7 +41,7 @@ You should be able to call `qmake` from a terminal shell. Next, comes the fun part - compiling all other dependencies. Clone the following repos and have the following structure: -``` +```bash containingFolder |-- tactile |-- kano-qt-sdk @@ -50,7 +50,7 @@ containingFolder Compile libparson and symlink its header files: -``` +```bash cd ~/Kano/kano-toolset/libs/parson sudo mkdir -p /usr/local/include/parson sudo ln -s `pwd`/* /usr/local/include/parson @@ -60,7 +60,85 @@ sudo ln -s `pwd`/release/libparson.dylib /usr/local/lib Compile libkano_logging and symlink its header files: +```bash +cd ~/Kano/kano-qt-sdk +sudo mkdir -p /usr/local/include/kano/kano_logging +sudo ln -s `pwd`/lib/kano_logging/includes/* /usr/local/include/kano/kano_logging +qmake +make +sudo ln -s `pwd`/lib/build/* /usr/local/lib +``` + +### Linux + +NB This linux README is incomplete (installation issue not solved) + +First update your system + ``` +sudo apt-get update +``` + +- Install [QtCreator 5.11](https://www.lucidar.me/en/dev-c-cpp/how-to-install-qt-creator-on-ubuntu-18-04/) or higher running these commands: + +```bash +sudo apt install build-essential + +sudo apt install qtcreator +``` + +If you want Qt 5 to be the default Qt version to be used when using development binaries like qmake, install the following package: + +```bash +sudo apt install qt5-default +sudo apt install qt5-doc +sudo apt install qt5-doc-html qtbase5-doc-html +sudo apt install qtbase5-examples +``` + +You dont need to set the PATH, linux will do it for you! + +If get the error: *cannot find feature `kano_i18n`* then clone the following +repository and have the following structure: + +```bash +containingFolder + |-- tactile + |-- kano-qt-sdk + |-- kano-toolset + +``` + +Commands: + +```bash +mkdir containingFolder + +mv tactile/ containingFolder/ + +``` + +Clone inside `containingFolder` the repo [kano-qt-sdk](https://github.com/KanoComputing/kano-qt-sdk) and the repo [kano-toolset](https://github.com/KanoComputing/kano-toolset) + +Compile `libparson` and symlink its header files: + +```bash +cd ~/Kano/kano-toolset/libs/parson +sudo mkdir -p /usr/local/include/parson +sudo ln -s `pwd`/* /usr/local/include/parson +make +``` + +On mac we have `libparson.dylib` that in Linux is called `libparson.so`. You +have to replace them: + +```bash +sudo ln -s `pwd`/release/libparson.so /usr/local/lib +``` + +Compile libkano_logging and symlink its header files: + +```bash cd ~/Kano/kano-qt-sdk sudo mkdir -p /usr/local/include/kano/kano_logging sudo ln -s `pwd`/lib/kano_logging/includes/* /usr/local/include/kano/kano_logging @@ -69,16 +147,148 @@ make sudo ln -s `pwd`/lib/build/* /usr/local/lib ``` +If you get an error on `make` command + +```bash +Project ERROR: Unknown module(s) in QT: qml quick +``` + +You need to install **qml** and **quick** + +```bash +sudo apt-get install qtdeclarative5-dev +``` + +NB You could find `parson.h` in => `/usr/local/include/parson/lib` + +If you run in this error `fatal error: parson/parson.h: No such file or directory` is because `user/local/include` in not in the path + +You could do momentarily a local fix + +```bash +cd kano-qt-sdk + +open => features/kano_build_options.prf + +``` + +And modify the file + +```diff +-macx { +- LIBS += -L/usr/lib -L/usr/local/lib +- INCLUDEPATH += /usr/include /usr/local/include +-} ++ ++LIBS += -L/usr/lib -L/usr/local/lib ++INCLUDEPATH += /usr/include /usr/local/include ++ +``` + +Eventually you should run: + +```bash +run qmake +``` + +## Alternative way for linux to pass files to the Kano-kit + +Enter in kano-kit server and copy the path that you need + +1. You can find the path with the command: `dpkg-query -L ` => Example: `dpkg-query -L tactile` + +NOTE: `dpkg-query -L | grep ` + +NB This method won't work for a new file, use the install.file instead + +2. You can find the path using the install file in the debian folder +NB You must complete manually the path + +```bash +tactile + |-- bin + |-- build + |-- debian + |--tactile.install + +``` + +Example `res/ui` is inside the kano-kit => `/usr/share/tactile` + +Example path `/usr/share/tactile/` + +Use this command to login inside the kano-kit's server + +Syntax `ssh user@ip` => Example: `ssh laura@172.16.254.180` + +**NB** You can find your kano-kit ip in the wifi's icon in the kano-kit itself + +Now you can syncronize your local file with the kano kit file + +**NB** You must exit the kano-kit server and use **root** as **user** run before to run this command + +`rsync -avi root@172.16.254.180:/path/Where I going copy to/` => `rsync -av ui root@172.16.254.180:/usr/share/tactile/` + +NOTE: `-n` it's gonna tell you the output without running the command for async + +#### Faster approach + +This command is just going to print the output + +`rsync -avinr res/ui/* root@172.16.254.180:/usr/share/tactile/ui/` + +See if it's ok then run the same command without the -n flag + +`rsync -avir res/ui/* root@172.16.254.180:/usr/share/tactile/ui/` + +If you see multiple file being update on your terminal: + +```bash + tactile (4.3.0-0) + +```bash + +tactile (4.3.0-0) unstable; urgency=low + + * Change default text formatting to normal + + -- Team Kano Tue, 12 Mar 2019 15:35:00 +0000 + +tactile (4.2.0-0) unstable; urgency=low + + * Fixed minor spelling errors + ... + +``` + + If in the changelog file there are already changes with the next version you should just update it. + +**You may be doing something wrong!** + ## Building After setting up the environment on your platform of choice, you should be able -to build the project in the same way as in the debian/rules file. +to build the project in the same way as in the `debian/rules` file. ### Raspberry Pi Straightforwardly, compiling Tactile now is just: -``` +```bash qmake && make -j `nproc` ``` diff --git a/debian/changelog b/debian/changelog index ff424d8..9a56f3e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +tactile (4.3.0-0) unstable; urgency=low + + * Change default text formatting to normal + * Style call-to-action strings in bold + + -- Team Kano Tue, 13 Wed 2019 14:29:00 +0000 + tactile (4.2.0-0) unstable; urgency=low * Fixed minor spelling errors diff --git a/res/ui/Tactile/Components/instruction_text.qml b/res/ui/Tactile/Components/instruction_text.qml index fd89146..dd5d41a 100644 --- a/res/ui/Tactile/Components/instruction_text.qml +++ b/res/ui/Tactile/Components/instruction_text.qml @@ -1,7 +1,7 @@ /** * instruction_text.qml * - * Copyright (C) 2018 Kano Computing Ltd. + * Copyright (C) 2018-2019 Kano Computing Ltd. * License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 * * Styled text @@ -15,8 +15,9 @@ import QtQuick 2.0 Text { font.family: "Bariol" font.pointSize: 25 - font.weight: Font.Bold + font.weight: Font.Normal color: "white" wrapMode: Text.WordWrap + textFormat: Text.StyledText height: contentHeight } diff --git a/res/ui/Tactile/flow.js b/res/ui/Tactile/flow.js index 1378dd8..5712b53 100644 --- a/res/ui/Tactile/flow.js +++ b/res/ui/Tactile/flow.js @@ -1,7 +1,7 @@ /** * flow.js * - * Copyright (C) 2018 Kano Computing Ltd. + * Copyright (C) 2018-2019 Kano Computing Ltd. * License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 * * A succession of scenes and steps stringed together for the app. @@ -50,9 +50,9 @@ function create_steps() { new_step(function(scene) { scene.bg_image = 'Wires/touchscreen.png'; scene.instructions = qsTr( - "There are amazing things hidden inside your screen...\n" + + "

There are amazing things hidden inside your screen...\n

" + "\n" + - "Swipe to see them" + "Swipe to see them" ); // Prevent accidental tapping from previous scene skipping instructions scene.timer.sleep(2000); @@ -77,15 +77,16 @@ function create_steps() { new_scene(Tactile.Wires.TouchAWire); new_step(function(scene) { scene.prompt( - qsTr("Each wire is filled with electric charges."), { - bg_enabled: true - }); + qsTr("Each wire is filled with electric charges." + ), { + bg_enabled: true + }); scene.timer.sleep(10000); }, Tactile.Sleep.signals.wait_over); new_step(function(scene) { scene.prompt(qsTr( "But so is your finger!\n" + - "Touch the wire to see what happens..." + "Touch the wire to see what happens..." ), { bg_enabled: true }); @@ -120,13 +121,14 @@ function create_steps() { new_step(function(scene) { scene.prompt(qsTr( "Each wire keeps an eye out for your finger\n" + - "Touch the screen again" + "Touch the screen again" ), { bg_enabled: true }); scene.timer.sleep(10000); }, Tactile.Sleep.signals.wait_over); new_step(function(scene) { + // pass }, Tactile.Wires.TouchAGrid.signals.touch); new_step(function(scene) { scene.prompt(qsTr( @@ -163,7 +165,7 @@ function create_steps() { new_scene(Tactile.Wires.TouchPoints); new_step(function(scene) { scene.prompt(qsTr( - "Touch with 5 fingers to see the secret messages!" + "Touch with 5 fingers to see the secret messages!" ), { bg_enabled: true }); @@ -203,7 +205,7 @@ function create_steps() { scene.instructions = qsTr( "Did you see those points of light?\n" + "\n" + - "Swipe to chase them into your screen" + "Swipe to chase them into your screen" ); // Prevent accidental tapping from previous scene skipping instructions scene.timer.sleep(2000); @@ -327,33 +329,36 @@ function create_steps() { }, Tactile.Sleep.signals.wait_over); new_step(function(scene) { scene.prompt( - qsTr("Swipe up and down to change the color"), { - bg_enabled: true - }); + qsTr("Swipe up and down to change the color"), { + bg_enabled: true + }); scene.timer.sleep(10000); }, Tactile.Sleep.signals.wait_over); new_step(function(scene) { - scene.prompt(qsTr( - "The red, green and blue lights can work together to make any " + - "color!" - ), { - bg_enabled: true - }); + scene.prompt( + qsTr( + "The red, green and blue lights can work together to make " + + "any color!" + ), { + bg_enabled: true + } + ); scene.timer.sleep(10000); }, Tactile.Sleep.signals.wait_over); new_step(function(scene) { scene.set_target(0.95, 0.4, 0.1); scene.prompt( qsTr("Can you try to make orange?"), { - bg_enabled: true - }); + bg_enabled: true + }); }, Tactile.Pixels.SubpixelSimulator.signals.color_matched); new_step(function(scene) { scene.prompt( qsTr("Nice work!"), { - bg_enabled: true, - button_text: qsTr('Next') - }); + bg_enabled: true, + button_text: qsTr('Next') + } + ); }, Tactile.Pixels.SubpixelSimulator.signals.done); /** @@ -364,13 +369,14 @@ function create_steps() { new_step(function(scene) { scene.prompt(qsTr( "Pixels can work together to make images...\n" + - "Tap the screen to see this happen" + "Tap the screen to see this happen" ), { bg_enabled: true }); scene.timer.sleep(2000); }, Tactile.Sleep.signals.wait_over); new_step(function(scene) { + // pass }, Tactile.Pixels.PixelDivider.signals.touch); new_step(function(scene) { scene.prompt(qsTr("Keep tapping!"), {