Commit ed28a6b7 authored by Filippo Scognamiglio's avatar Filippo Scognamiglio

Initial reboot commit.

parents
CMakeLists.txt.user
project(com.ubuntu.terminal C CXX)
cmake_minimum_required(VERSION 2.8.9)
find_program(INTLTOOL_MERGE intltool-merge)
find_program(INTLTOOL_EXTRACT intltool-extract)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra -fPIC")
# Standard install paths
include(GNUInstallDirs)
option(INSTALL_TESTS "Install the tests on make install" on)
option(CLICK_MODE "Installs to a contained location" on)
set(APP_NAME terminal)
set(DESKTOP_FILE "${PROJECT_NAME}.desktop")
set(APP_HARDCODE ubuntu-terminal-app)
set(MAIN_QML ubuntu-terminal-app.qml)
set(ICON_FILE terminal64.png)
set(AUTOPILOT_DIR ubuntu_terminal_app)
set(EXEC "${APP_NAME}")
set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
if(CLICK_MODE)
if(NOT DEFINED BZR_SOURCE)
set(BZR_SOURCE "lp:${APP_HARDCODE}")
message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
endif(NOT DEFINED BZR_SOURCE)
# Find out the architecture for package building
# to determine the plugin's installation path
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
OUTPUT_VARIABLE ARCH_TRIPLET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(CMAKE_INSTALL_PREFIX /)
set(CMAKE_INSTALL_BINDIR /)
set(DATA_DIR /)
set(DESKTOP_DIR ${DATA_DIR})
set(ICON ${ICON_FILE})
set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
set(BIN_DIR /lib/${ARCH_TRIPLET}/bin)
if(NOT BZR_REVNO)
set(BZR_REVNO "latest")
endif(NOT BZR_REVNO)
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_ARCH
OUTPUT_VARIABLE CLICK_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json terminal.apparmor DESTINATION ${CMAKE_INSTALL_PREFIX})
# make the click files visible in qtcreator
file(GLOB CLICK_FILES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
*.json *.json.in *.apparmor)
add_custom_target(com_ubuntu_terminal_CLICKFiles ALL SOURCES ${CLICK_FILES})
else(CLICK_MODE)
execute_process(
COMMAND qmake -query QT_INSTALL_QML
OUTPUT_VARIABLE QT_IMPORTS_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_NAME})
set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE})
set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
endif(CLICK_MODE)
file(GLOB_RECURSE I18N_SRC_FILES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po
*.qml *.js *.cpp *.h)
list(APPEND I18N_SRC_FILES ${DESKTOP_FILE}.in.in.h)
list(SORT I18N_SRC_FILES)
file(GLOB SRC_FILES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
*.qml *.js *.png *.js)
install(FILES ${SRC_FILES}
DESTINATION ${DATA_DIR})
configure_file(${DESKTOP_FILE}.in.in ${DESKTOP_FILE}.in)
add_custom_target(${DESKTOP_FILE} ALL
COMMENT "Merging translations into ${DESKTOP_FILE}..."
COMMAND LC_ALL=C ${INTLTOOL_MERGE} -d -u ${CMAKE_SOURCE_DIR}/po ${DESKTOP_FILE}.in ${DESKTOP_FILE}
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}
DESTINATION ${DESKTOP_DIR})
# Tests
enable_testing()
add_subdirectory(po)
add_subdirectory(tests)
add_subdirectory(src)
This diff is collapsed.
# Ubuntu Terminal
A terminal app for desktop and mobile devices. It provides access to terminal
sessions and is based on KDE's Konsole plugin.
The current plugin consists of:
- KTerminal: offers access to terminal session from qml
- KSessions: offers access to pty(s) from C++ layer
## Building the app
### For the desktop
Install the following build dependencies:
sudo apt-get install libpam0g-dev
Then open the CMakeLists.txt file in Qt Creator, and ensure that the kit
selected on the left sidebar (just above the green "Run" button) is "Desktop"
### For a device
If you don't have one already, you'll need to create an armhf chroot to
cross-compile the app. Here's how:
1. In Qt Creator, open the CMakeLists.txt file
2. Go to Tools > Options > Ubuntu > Click
2. Click on Create Click Target
3. Follow the prompts to generate the chroot. You will be asked for your sudo
password
4. Once created, you'll need to add the build dependencies for the app:
- Click on the Maintain button on your chroot
- On the terminal prompt that is started, type
apt-get install libpam0g-dev:armhf
- Close the terminal when the installation finishes
5. Now you can either do a clean checkout and wait to be prompted by Qt Creator
to add the armhf kit, or alternatively:
6. Go to the Projects tab > Add kit and then select the UbuntuSDK armhf kit
Additionally, you'll have to tell Qt Creator that you are doing a build for a
device to ultimately create a click package for installation:
1. In Qt Creator, go to the Projects tab on the sidebar
2. Click on the "Build" subtab of the "UbuntuSDK for armhf..." tab
3. Then go to the "CMake arguments" text field and add "-DCLICK_MODE=on"
without the quotes
Before starting the build make sure to select the "UbuntuSDK" kit on Qt
Creator's left sidebar (just above the green "Run" button).
### Doing the build
Ensure you've selected the kit you want for your build and press the build
button on Qt Creator's left sidebar (or alternatively Ctrl+B).
## Running the app
### On the desktop
No additional steps are required before running the app on the desktop.
### On a device
Due to Qt Creator's bug #1312094 in launchpad.net, there needs to be a manual
workaround done before the app can run on the device:
1. Modify the desktop.in file: change the Exec line to read:
Exec=lib/arm-linux-gnueabihf/bin/@EXEC@
Remember to revert this temporary change if you are building a click package or
if you're making other changes to be committed to the code!
### Starting the app
Ensure you've selected the kit you want for your build and press the run
button on Qt Creator's left sidebar (or alternatively Ctrl+R).
If the app hasn't been built yet, or if there are pending changes that require
a build, the app will automatically be built first before running.
If you're starting the app on a device, the build will be copied over and the
code will run unconfined.
## Building a click package
There are two alternative ways of building a click package.
### Using Qt Creator
1. Ensure you've selected the UbuntuSDK for armhf kit on Qt Creator's sidebar
2. Click on Publish on the sidebar
3. Click on "Create package"
4. If all goes well, you'll find the final click package in the build directory
Notes:
- You can see the output of the click build if you click on Edit on the sidebar
and then "Application Output" at the bottom. This is useful to identify any
failures during the build
- Run `sudo apt-get install click-reviewers-tools` to enable click package
validation in Qt Creator. You might need to restart Qt Creator after you've
installed them for it to detect them
### Using click-buddy
1. Install phablet-tools: `sudo apt-get install phablet-tools`
2. Run click-buddy in your source tree:
click-buddy --dir . --arch armhf --framework ubuntu-sdk-14.04
3. Once finished, click-buddy will tell you the location of your source package
## Installing a click package
First of all, ensure you've got a working Ubuntu device attached over USB to
your host computer
### Manually
Run the following commands to manually install the click package (replace 0.1
with the version of your package):
adb push /home/phablet com.ubuntu.terminal_0.1_armhf.click
adb shell
sudo -H -u phablet pkcon install-local /home/phablet/com.ubuntu.terminal_0.1_armhf.click
### Using click-buddy
You can add the --provision argument to the previous command to install the
click package on the device.
### Starting the app
1. Either kill unity8 with `pkill unity8` or restart the system for the Apps
(click) scope to pick up your newly installed click package
2. Search for Reminders in the Apps scope and tap on its icon to start it
3. You'll find the runtime logs at ~/.cache/upstart/application-click/
## Uninstalling a click package
Run the following commands, replacing the version of the click package you want
to uninstall:
adb shell
sudo -iu phablet
sudo click unregister com.ubuntu.terminal 0.1
## Run the autopilot tests
Once the app has been built, you can go to the build directory and run:
cd tests/autopilot
autopilot run ubuntu_terminal_app
# Updating translations
Translations for the Terminal app happen in [Launchpad Translations][] and
are automatically committed daily on the trunk branch in the po/ folder.
They are then built and installed as part of the package build, so that
developers don't really need to worry about them.
However, there is one task that needs to be taken care of: exposing new
translatable messages to translators. So whenever you add new translatable
messages in the code, make sure to follow these steps:
1. Run click-buddy retaining the build directory:
`click-buddy --dir . --no-clean`
2. Commit and push the branch and send a merge proposal as usual
And that's it, once the branch lands Launchpad should take care of all the rest!
# Behind the scenes
Behind the scenes, whenever the po/*.pot file (also known as translations template)
is committed to trunk Launchpad reads it and updates the translatable strings
exposed in the web UI. This will enable translators to work on the new strings.
The translations template contains all translatable strings that have been
extracted from the source code files.
Launchpad will then store translations in its database and will commit them daily
in the form of textual po/*.po files to trunk. The PO files are also usually
referred to as the translations files. You'll find a translation file for each
language the app has got at least a translated message available for.
Translations for core apps follow the standard [gettext format][].
[Launchpad Translations]: https://translations.launchpad.net/ubuntu-terminal-app
[gettext format]: https://www.gnu.org/software/gettext/
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=@EXEC@
Icon=@ICON@
_Name=Terminal
X-Ubuntu-Touch=true
X-Ubuntu-Default-Department-ID=accessories
ubuntu-terminal-app (0.5ubuntu2) trusty; urgency=medium
[ Alan Pope ]
* Add -qt5 command line option (LP: #1288885)
[ David Planella ]
* Merge konsole plugin into the app's repo.
-- David Planella <david.planella@ubuntu.com> Sun, 27 Apr 2014 12:08:04 +0200
ubuntu-terminal-app (0.5) raring; urgency=low
* Added landscape mode
* Fixed click effect on Circle Menu
-- Dmitry Zagnoyko <hiroshidi@gmail.com> Fri, 24 May 2013 19:07:40 +0300
ubuntu-terminal-app (0.4) raring; urgency=low
* Widget uses only available space
* Widget scrolling replaced with swipe gestures
* Added double tap for autocomplete
* Added circle menu (test ver., aliases for CTRL+<key>)
-- Dmitry Zagnoyko <hiroshidi@gmail.com> Mon, 20 May 2013 12:52:01 +0300
ubuntu-terminal-app (0.3) raring; urgency=low
* Added swipe gesture
* Added extra keys panels
* Sync with latest plugin revision
-- Michael Hall <mhall119@ubuntu.com> Mon, 06 May 2013 16:52:17 -0400
ubuntu-terminal-app (0.2) raring; urgency=low
* Use Konsole plugin
* Add Settings tab for color scheme and font size
-- Michael Hall <mhall119@ubuntu.com> Tue, 30 Apr 2013 21:28:16 -0400
ubuntu-terminal-app (0.1) raring; urgency=low
* Initial release
-- Michael Hall <mhall119@ubuntu.com> Mon, 11 Feb 2013 16:04:00 -0500
Source: ubuntu-terminal-app
Priority: extra
Maintainer: Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>
Build-Depends: cmake,
debhelper (>= 9),
python3-all,
gettext,
intltool,
libpam0g-dev,
qtbase5-dev,
qtdeclarative5-dev,
qt5-default,
Standards-Version: 3.9.5
Section: misc
Homepage: https://launchpad.net/ubuntu-terminal-app
Vcs-Bzr: https://code.launchpad.net/~ubuntu-terminal-dev/ubuntu-terminal-app/trunk
Package: ubuntu-terminal-app
Section: misc
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
qtdeclarative5-konsole-qml-plugin (>= 0.1.1),
qtdeclarative5-localstorage-plugin,
qtdeclarative5-pamauthentication0.1,
qtdeclarative5-qtquick2-plugin,
qtdeclarative5-ubuntu-ui-toolkit-plugin,
Description: Terminal application
Core Terminal application
Package: qtdeclarative5-konsole-qml-plugin
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${shlibs:Depends},
${misc:Pre-Depends},
Description: KDE Konsole QML plugin - qml terminal plugin
Konsole is a terminal emulator from KDE. This is a ported
version for the Ubuntu Terminal app and does not require KDE.
.
This package contains the Konsole terminal emulator plugin
for Qt Qml, which offers access to terminal by KTerminal and
KSession elements. KTerminal is used for displaying information
given by KSession.
Package: qtdeclarative5-pamauthentication0.1
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${shlibs:Depends},
${misc:Pre-Depends},
Description: PAM authentication QML plugin
This package contains a plugin that enables QML apps to do
password authentication via the PAM API.
Package: ubuntu-terminal-app-autopilot
Architecture: all
Depends: ${misc:Depends},
libautopilot-qt,
libqt5test5,
python3-autopilot,
ubuntu-terminal-app (>= ${source:Version}),
ubuntu-ui-toolkit-autopilot,
Description: Autopilot tests for Terminal Application
This package contains the autopilot tests for the Terminal
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ubuntu-terminal-app
Source: https://launchpad.net/ubuntu-terminal-app
Files: *
Copyright: 2013 Canonical Ltd.
2013 Dmitry Zagnoyko <hiroshidi@gmail.com>
2013 Omer Akram <om26er@ubuntu.com>
2013 Paolo Rotolo <paolorotolo@ubuntu.com>
2013 Riccardo Padovani <rpadovani@ubuntu-it.org>
2013 Sam Hewitt <snwh@ubuntu.com>
License: GPL-3
Files: debian/*
Copyright: 2013 Canonical Ltd.
License: LGPL-3
License: GPL-3
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License can be found in "/usr/share/common-licenses/GPL-3".
License: LGPL-3
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-3".
usr/lib/*/qt5/qml/org/kde/konsole/
usr/lib/*/qt5/qml/com/ubuntu/PamAuthentication/
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- -DCLICK_MODE=OFF
usr/lib/*/dist-packages/ubuntu_terminal_app/
{
"description": "Terminal application",
"framework": "ubuntu-sdk-14.10-dev2",
"architecture": "@CLICK_ARCH@",
"hooks": {
"terminal": {
"apparmor": "terminal.apparmor",
"desktop": "com.ubuntu.terminal.desktop"
}
},
"icon": "terminal64.png",
"maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",
"name": "com.ubuntu.terminal",
"title": "Terminal",
"version": "0.5.@BZR_REVNO@",
"x-source": {
"vcs-bzr": "@BZR_SOURCE@",
"vcs-bzr-revno": "@BZR_REVNO@"
},
"x-test": {
"autopilot": "@AUTOPILOT_DIR@"
}
}
include(FindGettext)
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
set(DOMAIN ${PROJECT_NAME})
set(POT_FILE ${DOMAIN}.pot)
file(GLOB PO_FILES *.po)
add_custom_target(${POT_FILE} ALL
COMMENT "Generating translation template..."
COMMAND ${INTLTOOL_EXTRACT} --update --type=gettext/ini
--srcdir=${CMAKE_SOURCE_DIR} ${DESKTOP_FILE}.in.in
COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} -o ${POT_FILE}
-D ${CMAKE_CURRENT_SOURCE_DIR}
-D ${CMAKE_CURRENT_BINARY_DIR}
--from-code=UTF-8
--c++ --qt --add-comments=TRANSLATORS
--keyword=tr --keyword=tr:1,2 --keyword=N_
--package-name='${PROJECT}'
--copyright-holder='Canonical Ltd.'
${I18N_SRC_FILES}