Merge lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-export-script-improvement into lp:ubuntu-ui-toolkit/staging

Proposed by Loïc Molinari
Status: Work in progress
Proposed branch: lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-export-script-improvement
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 130 lines (+63/-16)
5 files modified
README (+11/-9)
export_modules_dir.sh (+1/-5)
gallery.sh (+4/-1)
run_tests.sh (+3/-1)
uitk_shell.sh (+44/-0)
To merge this branch: bzr merge lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-export-script-improvement
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
PS Jenkins bot continuous-integration Needs Fixing
Benjamin Zeller Approve
Zsombor Egri Pending
Review via email: mp+278028@code.launchpad.net

Commit message

Added a script to spawn a dedicated UITK shell.

The script exports all the needed environment variables for developers working on the toolkit by reusing the existing export_modules_dir.sh script.

Description of the change

Added a script to spawn a dedicated UITK shell.

The script exports all the needed environment variables for developers working on the toolkit by reusing the existing export_modules_dir.sh script.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :

FAILED: Autolanding.
Approved revid is not set in launchpad. This is most likely a launchpad issue and re-approve should fix it. There is also a chance (although a very small one) this is a permission problem of the ps-jenkins bot.
https://jenkins.ubuntu.com/ubuntu-sdk/job/ubuntu-ui-toolkit-autolanding/9/
Executed test runs:
    None: https://jenkins.ubuntu.com/ubuntu-sdk/job/generic-land-mp/9/console

review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :

FAILED: Autolanding.
Approved revid is not set in launchpad. This is most likely a launchpad issue and re-approve should fix it. There is also a chance (although a very small one) this is a permission problem of the ps-jenkins bot.
https://jenkins.ubuntu.com/ubuntu-sdk/job/ubuntu-ui-toolkit-autolanding/24/
Executed test runs:
    None: https://jenkins.ubuntu.com/ubuntu-sdk/job/generic-land-mp/24/console

review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) :
review: Approve (continuous-integration)

Unmerged revisions

1725. By Loïc Molinari

Fixed typo in the README.

1724. By Loïc Molinari

Updated README.

1723. By Loïc Molinari

Do not override LD_LIBRARY_PATH.

1722. By Loïc Molinari

Made uitk shell and env var export scripts compatible.

1721. By Loïc Molinari

Added script spawning a new shell with all the needed env vars.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2015-01-14 15:18:05 +0000
+++ README 2015-11-23 11:20:56 +0000
@@ -27,21 +27,23 @@
27----------------27----------------
2828
29You need Qt5 installed to proceed. To build this repository, run29You need Qt5 installed to proceed. To build this repository, run
30$ qmake30 $ qmake
31$ make31 $ make
3232
33View the components gallery by running33View the components gallery by running
34$ ./gallery.sh34 $ ./gallery.sh
3535
36To install these components, run36To install these components, run
37$ make install37 $ make install
38You may need to be root for this command to succeed.38You may need to be root for this command to succeed.
3939
40To use these components in QML without installing them, you need to set the 40To use these components uninstalled, you need to have some environment
41QML2_IMPORT_PATH environment variable. This is done by running41variables correctly set. This is done by either running a dedicated
42$ source export_modules_dir.sh42(recursive) shell with
43from the root directory of this repository, but is lost when you close your 43 $ ./uitk_shell.sh
44shell.44or by exporting the variables in the current shell session with
45 $ source export_modules_dir.sh
46Note that qmake must be run before.
4547
4648
47Documentation49Documentation
4850
=== modified file 'export_modules_dir.sh'
--- export_modules_dir.sh 2015-11-06 08:09:05 +0000
+++ export_modules_dir.sh 2015-11-23 11:20:56 +0000
@@ -19,8 +19,4 @@
19export QML_IMPORT_PATH=$BUILD_DIR/qml19export QML_IMPORT_PATH=$BUILD_DIR/qml
20export QML2_IMPORT_PATH=$BUILD_DIR/qml20export QML2_IMPORT_PATH=$BUILD_DIR/qml
21export UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml21export UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml
22export LD_LIBRARY_PATH=$BUILD_DIR/lib22export LD_LIBRARY_PATH=$BUILD_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
23/sbin/initctl set-env --global QML_IMPORT_PATH=$BUILD_DIR/qml
24/sbin/initctl set-env --global QML2_IMPORT_PATH=$BUILD_DIR/qml
25/sbin/initctl set-env --global UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml
26/sbin/initctl set-env --global LD_LIBRARY_PATH=$BUILD_DIR/lib
2723
=== modified file 'gallery.sh'
--- gallery.sh 2015-08-11 15:42:46 +0000
+++ gallery.sh 2015-11-23 11:20:56 +0000
@@ -15,7 +15,10 @@
15# along with this program. If not, see <http://www.gnu.org/licenses/>.15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16#16#
1717
18source export_modules_dir.sh18if [ -z ${UITK_SHELL+x} ]
19then
20 source export_modules_dir.sh
21fi
1922
20if [ "$1" == "--autopilot" ]23if [ "$1" == "--autopilot" ]
21then24then
2225
=== modified file 'run_tests.sh'
--- run_tests.sh 2015-01-30 11:58:40 +0000
+++ run_tests.sh 2015-11-23 11:20:56 +0000
@@ -15,7 +15,9 @@
15# along with this program. If not, see <http://www.gnu.org/licenses/>.15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16#16#
1717
18source $PWD/export_modules_dir.sh18if [ -z ${UITK_SHELL+x} ]; then
19 source $PWD/export_modules_dir.sh
20fi
1921
20if [ ! -e $QML2_IMPORT_PATH/Ubuntu/Layouts/libUbuntuLayouts.so ]; then22if [ ! -e $QML2_IMPORT_PATH/Ubuntu/Layouts/libUbuntuLayouts.so ]; then
21 echo You need to build UITK before you can run Autopilot test cases!23 echo You need to build UITK before you can run Autopilot test cases!
2224
=== added file 'uitk_shell.sh'
--- uitk_shell.sh 1970-01-01 00:00:00 +0000
+++ uitk_shell.sh 2015-11-23 11:20:56 +0000
@@ -0,0 +1,44 @@
1#!/bin/bash -i
2#
3# Copyright (C) 2015 Canonical Ltd.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation; version 3.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17# This script spawns a new Bash shell with all the environment variables needed
18# to run apps based on the local source tree uninstalled. Note that qmake must
19# be run before in order to have the build_paths.inc file generated:
20#
21# $ qmake
22# $ ./uitk_shell.sh
23# $ make
24# $ qmlscene uitk_based_file.qml
25
26NAME='uitk'
27
28source `dirname $0`/export_modules_dir.sh
29
30export UITK_SHELL=1
31
32TEMP_FILE=`mktemp -t bashrc.XXXXXXXX`
33echo source $HOME/.bashrc >> $TEMP_FILE
34echo PS1=\'[$NAME] $PS1\' >> $TEMP_FILE
35SHELL_OPTIONS="--init-file $TEMP_FILE"
36
37echo Entering $NAME shell.
38$SHELL $SHELL_OPTIONS
39echo Leaving $NAME shell. Have a nice day!
40
41if test ! -z "$TEMP_FILE"
42then
43 rm $TEMP_FILE
44fi

Subscribers

People subscribed via source and target branches