Merge lp:~zeller-benjamin/ubuntu-sdk-ide/fix_ap_and_dev_shell into lp:ubuntu-sdk-ide

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 95
Merged at revision: 98
Proposed branch: lp:~zeller-benjamin/ubuntu-sdk-ide/fix_ap_and_dev_shell
Merge into: lp:ubuntu-sdk-ide
Diff against target: 82 lines (+47/-2)
2 files modified
CMakeLists.txt (+5/-2)
ubuntu-sdk-shell.in (+42/-0)
To merge this branch: bzr merge lp:~zeller-benjamin/ubuntu-sdk-ide/fix_ap_and_dev_shell
Reviewer Review Type Date Requested Status
Zoltan Balogh Approve
Review via email: mp+278584@code.launchpad.net

Commit message

* Use trunk of AP plugin
* Create and install a helper script to spawn a development shell

Description of the change

* Use trunk of AP plugin
* Create and install a helper script to spawn a development shell

To post a comment you must log in.
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-11-10 09:05:17 +0000
3+++ CMakeLists.txt 2015-11-25 12:57:34 +0000
4@@ -28,6 +28,7 @@
5 set (QT_SOURCE_DIR "${CMAKE_BINARY_DIR}/qt-build/qt-everywhere-opensource-src-5.4.2")
6 set (QT_KIT_PREFIX "${CMAKE_BINARY_DIR}/qt-api-build")
7 set (QT_KIT_SOURCE_DIR "${QT_KIT_PREFIX}/qt-everywhere-opensource-src-ubuntu")
8+set (QT_KIT_INSTALL_PREFIX "/usr/ubuntu-sdk-dev")
9 set (QT_BUILD_DIR "${CMAKE_BINARY_DIR}/qt-build/build")
10 set (QT_INSTALL_DIR "${CMAKE_BINARY_DIR}/qt")
11
12@@ -129,7 +130,7 @@
13 SOURCE_DIR "${QTCREATOR_AP_PREFIX}/qtcreator-plugin-autopilot"
14 BINARY_DIR "${QTCREATOR_AP_PREFIX}/build"
15 INSTALL_DIR "${QTCREATOR_AP_PREFIX}/ubuntu-sdk-ide"
16- DOWNLOAD_COMMAND sh -c "bzr branch lp:~zeller-benjamin/qtcreator-plugin-autopilot/qtc35x ${QTCREATOR_AP_PREFIX}/qtcreator-plugin-autopilot -Ossl.cert_reqs=none --use-existing-dir"
17+ DOWNLOAD_COMMAND sh -c "bzr branch lp:qtcreator-plugin-autopilot ${QTCREATOR_AP_PREFIX}/qtcreator-plugin-autopilot -Ossl.cert_reqs=none --use-existing-dir"
18 CONFIGURE_COMMAND sh -c "env QTC_BUILD=\"${QTC_BUILD}\" QTC_SOURCE=\"${QTC_SOURCE}\" ${QT_INSTALL_DIR}/bin/qmake -r ${QTCREATOR_AP_PREFIX}/qtcreator-plugin-autopilot"
19 BUILD_COMMAND sh -c "env QTC_BUILD=\"${QTC_BUILD}\" QTC_SOURCE=\"${QTC_SOURCE}\" QT_PRIVATE_HEADERS=${QT_INSTALL_DIR} LD_LIBRARY_PATH=${QT_INSTALL_DIR}/lib make ${GENERATED_MAKE_FLAGS}"
20 #there is no install step required, the plugin is built directly into the installed plugins dir
21@@ -152,7 +153,7 @@
22 DOWNLOAD_COMMAND sh -c "cd ${QT_KIT_SOURCE_DIR} && ${CMAKE_SOURCE_DIR}/get_qt_sources.py"
23 UPDATE_COMMAND sh -c "exit 0" #nothing to update
24 PATCH_COMMAND sh -c "cp ${CMAKE_SOURCE_DIR}/desktop_kit_qt.pro ${QT_KIT_SOURCE_DIR}/qt.pro && cp ${CMAKE_SOURCE_DIR}/desktop_kit_configure ${QT_KIT_SOURCE_DIR}/configure"
25- CONFIGURE_COMMAND sh -c "${QT_KIT_SOURCE_DIR}/configure -prefix /usr/ubuntu-sdk-dev `cat ${CMAKE_SOURCE_DIR}/kit_config`"
26+ CONFIGURE_COMMAND sh -c "${QT_KIT_SOURCE_DIR}/configure -prefix ${QT_KIT_INSTALL_PREFIX} `cat ${CMAKE_SOURCE_DIR}/kit_config`"
27 BUILD_COMMAND sh -c "make ${GENERATED_MAKE_FLAGS}"
28 INSTALL_COMMAND sh -c "${QT_KIT_INSTALL_SCRIPT}"
29 )
30@@ -169,3 +170,5 @@
31 BUILD_COMMAND sh -c "cp ${EXTRAS_PREFIX}/ubuntu-sdk-qmake-extras/*.prf ${QT_KIT_PREFIX}/qt/usr/ubuntu-sdk-dev/mkspecs/features"
32 INSTALL_COMMAND sh -c "cd ${CMAKE_BINARY_DIR} && ${CMAKE_SOURCE_DIR}/create_sdk.sh"
33 )
34+
35+configure_file(${CMAKE_SOURCE_DIR}/ubuntu-sdk-shell.in ${QT_KIT_PREFIX}/qt/usr/ubuntu-sdk-dev/bin/ubuntu-sdk-shell @ONLY)
36
37=== added file 'ubuntu-sdk-shell.in'
38--- ubuntu-sdk-shell.in 1970-01-01 00:00:00 +0000
39+++ ubuntu-sdk-shell.in 2015-11-25 12:57:34 +0000
40@@ -0,0 +1,42 @@
41+#!/bin/bash -i
42+#
43+# Copyright (C) 2015 Canonical Ltd.
44+#
45+# This program is free software; you can redistribute it and/or modify
46+# it under the terms of the GNU Lesser General Public License as published by
47+# the Free Software Foundation; version 3.
48+#
49+# This program is distributed in the hope that it will be useful,
50+# but WITHOUT ANY WARRANTY; without even the implied warranty of
51+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52+# GNU Lesser General Public License for more details.
53+#
54+# You should have received a copy of the GNU Lesser General Public License
55+# along with this program. If not, see <http://www.gnu.org/licenses/>.
56+
57+# This script spawns a new Bash shell with all the environment variables needed
58+# to run apps based on a specific Ubuntu SDK installation, as well as use the
59+# dev tools from it.
60+
61+NAME='ubuntu-sdk-dev'
62+INSTALL_PREFIX='@QT_KIT_INSTALL_PREFIX@'
63+
64+export PATH=${INSTALL_PREFIX}/bin${PATH:+:$PATH}
65+export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
66+export QML2_IMPORT_PATH=${INSTALL_PREFIX}/qml${QML2_IMPORT_PATH:+:$QML2_IMPORT_PATH}
67+export UBUNTU_UI_TOOLKIT_THEMES_PATH=${INSTALL_PREFIX}/qml${UBUNTU_UI_TOOLKIT_THEMES_PATH:+:$UBUNTU_UI_TOOLKIT_THEMES_PATH}
68+export PYTHONPATH=${INSTALL_PREFIX}/lib/python3/dist-packages${PYTHONPATH:+:$PYTHONPATH}
69+
70+TEMP_FILE=`mktemp -t bashrc.XXXXXXXX`
71+echo source $HOME/.bashrc >> $TEMP_FILE
72+echo PS1=\'[$NAME] $PS1\' >> $TEMP_FILE
73+SHELL_OPTIONS="--init-file $TEMP_FILE"
74+
75+echo Entering $NAME shell.
76+bash $SHELL_OPTIONS
77+echo Leaving $NAME shell. Have a nice day!
78+
79+if test ! -z "$TEMP_FILE"
80+then
81+ rm $TEMP_FILE
82+fi

Subscribers

People subscribed via source and target branches