File tree 2 files changed +56
-0
lines changed
2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ [Desktop Entry]
2
+ Encoding =UTF-8
3
+ Version =1.0
4
+ Type =Application
5
+ Terminal =false
6
+ Path =/home/phablet/src/gopkg.in/qml.v0/examples/particle/
7
+ Exec =./particle
8
+ Icon =properties
9
+ Name =Particle Example
10
+ X-Ubuntu-Touch =true
11
+ X-Ubuntu-StageHint =SideStage
12
+
13
+ # Copy this file to:
14
+ #
15
+ # ~phablet/.local/share/applications/gopkg.in.qml.particle-example.desktop
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ if [ $UID != 0 ]; then
6
+ echo " This script must be run as root."
7
+ exit 1
8
+ fi
9
+
10
+ echo " Remounting root as read-write ------------------------------------------------"
11
+
12
+ mount -o remount,rw /
13
+
14
+ echo " Installing Go and dependencies -----------------------------------------------"
15
+
16
+ apt-get update
17
+ apt-get install -y \
18
+ golang-go g++ git pkg-config \
19
+ qtbase5-private-dev qtdeclarative5-private-dev libqt5opengl5-dev
20
+ apt-get clean
21
+
22
+ echo " Setting up enviornment for phablet user --------------------------------------"
23
+
24
+ echo ' export GOPATH=$HOME' >> ~ phablet/.bash_profile
25
+
26
+ echo " Fetching the qml package -----------------------------------------------------"
27
+
28
+ su -l phablet -c " go get gopkg.in/qml.v0"
29
+
30
+ echo " Installing the .desktop file for the particle example ------------------------"
31
+
32
+ APP_ID=gopkg.in.qml.particle-example
33
+ cp ~ phablet/src/gopkg.in/qml.v* /cmd/ubuntu-touch/particle.desktop ~ phablet/.local/share/applications/$APP_ID .desktop
34
+
35
+ echo " Building and launching particle example ----------------------------------------------------"
36
+
37
+ su -l phablet -c " go build gopkg.in/qml.v0/examples/particle"
38
+
39
+ echo " Launching particle example ---------------------------------------------------"
40
+
41
+ su -l phablet -c " upstart-app-launch $APP_ID "
You can’t perform that action at this time.
0 commit comments