Canonical Voices

Posts tagged with 'article'

David Callé

Are you involved in Ubuntu phone, desktop, cloud or IoT development? Voice your opinion on what factors contribute to your choice of developing on Ubuntu by getting involved in the biggest developer survey yet.

Vision Mobile have launched their 9th edition developer economics survey today, covering developer sentiment across platforms, revenues, apps, tools, APIs, segments and regions. This ambitious survey covers everything from mobile, desktop, cloud and IoT. Key insights from the survey will be provided as a free download in late July, and a free chapter from one of VisionMobile’s premium paid reports will also be given immediately upon completion, taking a close look at app profits & costs.

Tell us your thoughts about the latest developer trends, take the 10 minute survey now - some amazing prizes are up for grabs including the BQ Aquaris E4.5 Ubuntu Edition, Apple Sports Watch, iPhone 6, Oculus Rift Dev Kit + many more gadgets!

Read more
April Wang

Mark Shuttleworth昨晚揭晓了Ubuntu 15.10 的版本代号 Wily Werewolf。Wily在英文中一般用于描述易于适应环境锐敏足智的角色人物,而Werewolf则是传说中的一种神秘物种,小说中常常以人形出现但会在满月之日变成狼性的狼人 


Ubuntu 15.10 将会在今年10月份发布,而它的代码名也是至今为止Ubuntu版本名中第二个被重复的字母 (另外一组曾被重复使用的字母为H,相关版本名分别为Hardy Heron和Hoary Hedgehog)


为了昨晚有错过直播的筒子们另外再献上 , Mark现场的几段精彩keynote,致即将到来的Pocket PC!


“We [the Linux desktop] were always five, ten years behind. Always copying the other guy. Here, for the first time, we have this vision at the same time,” he said.

“It doesn’t matter [who had the idea first]. We’re living in a world where, if we make a great experience, all the applications that run on a Windows converged experience might also run on a Ubuntu converged experience.”

“I’d like us to rise above kind of saying ‘you’re copying our ideas’. We didn’t patent those ideas. We spoke very publicly about that vision because we wanted it to be true. I think it’s exciting for everybody that [it now is].”

配图源自:http://itsfoss.com/

顺便提一下,Ubuntu手机开发培训本周六落地南京,附近的小伙伴们别忘了立即报名啊。

Read more
Loïc Molinari

A magnifying glass in QML

To create sharp visual components, we need to make sure our renderings look good at the pixel level. This is a common task and the terms precision and pixel-perfectness have become ubiquitous in discussions among programmers and designers at Canonical. In the last years, the industry started to increase the pixel density of screens, again (remember the CRT era), resulting in a higher number of pixels within a specified space (see Retina Display for instance). A consequence is that jaggies are less visible than before because we are reaching the point where the pixels are small enough that the eye is not able to detect them. In an idealized world of high density screens that would completely remove the need of anti-aliasing algorithms to smooth edges, but the fact of the matter is that we are not there yet and we will still have to thoroughly inspect the quality of anti-aliasing algorithms for a while.

Handheld magnifying glass

At a previous job, a colleague of mine used to keep a handheld magnifying glass on his desk. I was quite amused to see him glued to his screen validating the visual quality of commits with this thing. As the graphics engine programmer, I barely remember the reason for which I never proposed the inclusion of a software magnifier, it could be because of the overloaded backlog we had to deal with at the time but I guess it actually was just out of sheer mischief. Most desktop environments include a software magnifier, but depending on its quality (efficiency and ease of use), it often makes sense to integrate a custom magnifier directly in the application being developed (it makes less sense to ship it in release builds though...). This article explains how to implement an efficient one with QML using offscreen framebuffers and shaders.

Offscreen framebuffers (exposed as FBOs in OpenGL), vertex shaders and fragment shaders are now widely available in mobile and mid-range GPUs allowing the creation of interesting real-time post-processing effects for most devices on the market. Magnification, or to be more precise zooming & panning (magnification solely being the process of rendering an image at a higher scale), is one of it. In low-level graphics programming terms, all it takes is to do a first pass that renders the scene in a FBO and a second pass that renders a texture mapped quad to the default framebuffer reading the FBO as a texture. Image zooming and panning is a basic 2D scale and translate transformation that can be efficiently implemented by tweaking the texture coordinates used to sample the FBO at the second pass. The vertex shader, executed for the 4 vertices making our quad, will easily take care of it using a single multiply-add op (transformed_coords = scale * coords + translation) and the hardware accelerated rasterizer and texture units will make the actual rendering very efficient. In order to clearly distinguish the magnified pixels, it is important to use a simple nearest neighbour filter. These low-level bits are nicely exposed to QML through the ShaderEffectSource and  ShaderEffect items. The former allows to render a given Item to a FBO and the latter provides support for quads rendered using custom vertex and fragment shaders.

Here is the QML code of the magnifier:

import QtQuick 2.4

Item {
    // Public properties.
    property Item scene: null
    property MouseArea area: null

    id: root
    visible: scene != null
    property real __scaling: 1.0
    property variant __translation: Qt.point(0.0, 0.0)

    // The FBO abstraction handling our first offscreen pass.
    ShaderEffectSource {
        id: effectSource
        anchors.fill: parent
        sourceItem: scene
        hideSource: scene != null
        visible: false
        smooth: false  // Nearest neighbour texture filtering.
    }

    // The shader abstraction handling our second pass with the
    // translation and scaling in the vertex shader and the simple
    // texturing from the FBO in the fragment shader.

    ShaderEffect {
            id: effect
            anchors.fill: parent
            property real scaling: __scaling
            property variant translation: __translation
            property variant texture: effectSource

            vertexShader: "
                uniform highp mat4 qt_Matrix;
                uniform mediump float scaling;
                uniform mediump vec2 translation;
                attribute highp vec4 qt_Vertex;
                attribute mediump vec2 qt_MultiTexCoord0;
                varying vec2 texCoord;
                void main() {
                    texCoord =

                        qt_MultiTexCoord0 * vec2(scaling)
                        + translation;
                    gl_Position = qt_Matrix * qt_Vertex;
                }"

            fragmentShader: "
                uniform sampler2D texture;
                uniform lowp float qt_Opacity;
                varying mediump vec2 texCoord;
                void main() {
                    gl_FragColor =

                        texture2D(texture, texCoord) * qt_Opacity;
                }"

    }

    // Mouse handling.
    Connections {
        target: scene != null ? area : null
        [...]
     }
}

 

And here is how to use it:

import QtQuick 2.4

Item {
    id: root

    Item {
        id: scene
        anchors.fill: parent
    }

    ZoomPan {
        id: zoomPan
        anchors.fill: parent
        scene: scene
        area: mouseArea
    }

    MouseArea {
        id: mouseArea
        anchors.fill: parent
        enabled: true
        hoverEnabled: true
        acceptedButtons: Qt.AllButtons
    }
}

 

Mouse handling has been snipped off the code for conciseness but it can be studied directly from the code repository. One important point to notice is that for zooming to be a pleasant experience, it has to be implemented using a logarithmic scale as opposed to a linear scale. Each scale value at a zooming level is the previous one multiplied by the desired scale factor, so a scale factor of 2 and a zooming level n give a scale value of 2n. Another point is that to scale an image up, the range of its texture coordinates must be scaled down, this explains why the actual scaling is inverted. So a scale value of 2n would give an actual scaling of 2-n. A bit counterintuitive at first…

We’re done with the theory. Let’s have a look at the final result:

 

This technique helped me in the making of several visual elements, I would be glad if other programmers find it useful too. Zooming and panning is a very common feature in image viewers, the technique could be adapted for that use case too (with potentially some tweaks to support tiling of big pictures). Maybe that would be a good addition to the Ubuntu UI toolkit, don’t hesitate to ask if you would like official support for it.

The source code is available on launchpad:

Read more
Zoltán Balogh

14.04 - 1.0 release

The 1.0 release of the UITK was built mostly for demonstrative purposes, but works well to a certain extent, it is the LTS release after all. Available from the Trusty archive (0.1.46+14.04.20140408.1-0ubuntu1) and from the SDK PPA (0.1.46+14.10.20140520-0ubuntu1~0trusty2). The “demonstrative purpose” in this context is a pretty serious thing. This release was the ultimate proof of concept that the Qt (5.2 by then) and QML technology with our design and components provides a framework for a charmingly beautiful and killing fast user interface. Obviously there is no commercial touch device with this UITK release, but it is good to make a simple desktop application with the UX of a mobile app. If your desktop PC is running 14.04 LTS Ubuntu and you have installed the Ubuntu SDK then the IDE is using this release of the UITK.

The available components and features are documented either online https://developer.ubuntu.com/api/qml/sdk-14.04/Ubuntu.Components/ or offline under the file:///usr/share/ubuntu-ui-toolkit/doc/html local directory if the ubuntu-ui-toolkit-doc is installed.


14.10 - 1.1 release

It was the base for the first real Ubuntu phone. Most mission critical components and toolkit features were shipped with this edition.  The highlights of the goodies you can see on the Utopic edition of the UITK (version 1.1.1279+14.10.20141007-0ubuntu1):

  • Settings API

  • Ubuntu.Web

  • ComboButton

  • Header replaces bottom toolbar

  • PullToRefresh

  • Ubuntu.DownloadManager

  • Ubuntu.Connectivity

The focus of the UITK development was to complete the component set and achieve superb performance. It is important to note that these days, this exact version you can find only on very few community ported Ubuntu Touch devices, and even those early adaptations should be updated to 15.04.  The most common place to meet this edition of the UITK is the 14.10 Ubuntu desktop. This UITK can be indeed used to build pretty nice looking desktop applications. The Ubuntu specific UI extensions of the QtCreator IDE are built on our very own UITK. So, the UITK is ported and available for desktop app development with some limitations since 14.04.


14.09  - the RTM release

The development of the RTM (Ready To Market) branch of the UITK  was focusing on bugfixes and final polishing of the components. Dozens of functional, visual and performance related issues were tackled and closed in this release.

A few of relevant changes in the RTM branch:

  • Internationalization related improvements

  • Polishing the haptics feedback of components

  • Fixes in the ActivityIndicator

  • UX improvements of the TextField/TextArea

  • Dialog component improvements

This extended 1.1 release of the UITK is what is shipped with the bq Aquaris E4.5 devices. This is pretty serious stuff. Providing the very building rocks for the user experience is a big responsibility. During the development of this  release one of the most significant changes happened behind the scenes. The release process of the UITK was renewed and we have enforced very strict rules for accepting any changes.

To make sure that with the continuous development of the UITK we do not introduce functional problems and do not cause regressions we not only force to run about 400 autopilot test cases on the UITK, but an automatic test script validates all core and system apps with the release candidates. It means running thousands of  automatic functional tests before each release.


15.04 - 1.2 release

After the 14.09 aka RTM release was found good and the bq devices started to leave the factory lines the UITK development started to focus on two major areas. First of all we brought back to the development trunk all the fixes and improvements landed on the RTM branch and we merged back the whole RTM branch to the main line. The second area was to open the 1.2 queue of the toolkit and release the new features:

  • ListItem

  • New UbuntuShape rendering properties

  • New Header

Releasing the 1.2 UITK makes the first big iteration of the toolkit development complete.  In the last three cycles the Ubuntu application framework went through three minor Qt upgrades (5.2 - 5.3 - 5.4) and continuously adapted to the improving design and platform.


15.10 - 1.3 release

The upcoming cycle the focus is on convergence. We have shipped a super cool UI Toolkit for touch environment, now it is time to make it offer as complete and as fast toolkit for other form factors and for devices with other capabilities. The emphasis here is on capability. Not only form factor or device mode. The next release (1.3) of the UITK will adopt to the host environment according to its capabilities. Like input capabilities, size and others.

The highlights of the upcoming features:

  • Resolution independence

  • Improve visual rendering (pixel perfectness at any device ratio)

  • Improve performance (CPU and GPU wise)

  • Convergence

    • Tooltips

    • Key navigation - Tab/Shift+Tab

    • Date and Time Pickers

    • Menus

      • Application and

      • context menus

  • Support Sub-theming

  • Support of ListItem expansion

  • Text input magnification on selection

  • Simplified Popovers

  • Text input context menu

  • Deprecate Dialer (Ubuntu.Components.Pickers)

  • Deprecate PopupBase (Ubuntu.Components.Popups)

  • Focused component highlight

  • Support for OSK to keep the focus component above the key rectangle

  • Integrate scope toolkit from Unity with the UI Toolkit

The 1.3 version of the UITK will be the first with the promise that application developers can create both fully functional desktop and phone applications. In practice it means that the runtime UITK will be the same as in the build environment.


16.04 - 2.0 release

Looking forward to our next LTS release our ambition is to polish together all the features and tune the UI Toolkit for the next major release. This edition of the toolkit will serve app developers for long time. The 2.0 will be the “mission completed”.  We expect few features to move from our original 15.10 plans to the 16.04:

  • Clean up deprecated components

  • Rename ThemeSettings to Theme

  • Toolbars for convergence

  • Modal Dialogs

  • Device mode (aka capability) detection

  • Complete scopes support

  • Backend for Alarm services

  • Separate service components from UI components

Read more
Benjamin Zeller

Inner workings of the SDK

From time to time app developers ask how to manually build click packages from their QMake or CMake projects. To understand the answer to that question, knowing about how the SDK does things internally and the tools it uses helps a lot.

First we have to know about the click command. It is one of the most important tools we are about to use, because it provides ways to:

  • create a build environment
  • maintain the build environment
  • execute commands in the build environment
  • build click packages
  • review click packages
  • query click packages

Issuing click --help will show a complete list of options. The click command is not only used on the development machines but also on the device images, as it is also responsible for installing/removing click packages and to provide informations about the frameworks a device has to offer.

Assuming that the project source is already created, probably from a SDK template, and ready to be packed up in ~/myproject, creating a click package requires the following steps:

  1. Create a build target for the device that should be targeted
    click chroot -a armhf -f ubuntu-sdk-15.04 create
  2. Run qmake/cmake on the project to create the Makefiles
    mkdir ~/myproject-build
    cd ~/myproject-build
    click chroot -a armhf -f ubuntu-sdk-15.04 run cmake ../myproject #for cmake
    click chroot -a armhf -f ubuntu-sdk-15.04 run qt5-qmake-arm-linux-gnueabihf ../myproject #for qmake
  3. Run make to compile the project and run custom build steps
    click chroot -a armhf -f ubuntu-sdk-15.04 run make
  4. Run make install to collect all required files in a deploy directory
    rm -rf /tmp/deploy-myproject #make sure the deploy dir is clean
    click chroot -a armhf -f ubuntu-sdk-15.04 run make DESTDIR=/tmp/deploy-myproject install #for cmake
    click chroot -a armhf -f ubuntu-sdk-15.04 run make INSTALL_ROOT=/tmp/deploy-myproject install #for qmake
  5. Run click build on the deploy directory
    click build /tmp/deploy-myproject

We will look into each step at a greater detail and explain the tools behind it starting with:

Creating a build chroot and what exactly is that:

When building applications for a different architecture as the currently used development machine , for example x86 host vs armhf device, cross build toolchains are required. However toolchains are not easy to maintain and it requires a good deal of effort to make them work correctly. So our decision is to use "build chroots" to ease the maintenance of those toolchains. A build chroot is in fact nothing else as the normal Ubuntu you are using on your host machine. Probably its a different version, but it is still coming from the archive. That means we can make sure the toolchains, libraries and tools that are used to build click packages are well tested and receive the same updates as the ones on the device images.

To create a build chroot the following command is used:

click chroot -a armhf -f ubuntu-sdk-15.04 create

Grab a coffee while this is running, it will take quite some time. After the chroot was created for the first time, it is possible to keep it up to date with:

click chroot -a armhf -f ubuntu-sdk-15.04 upgrade

But how exactly does this work? A chroot environment is another complete Ubuntu root filesystem put inside a directory. The "chroot" command makes it possible to treat exactly this directory as the "root directory" for a login shell. Commands running inside that environment can not access the outer filesystem and do not know they are actually inside a virtualized Ubuntu installation. That makes sure your host file system can not be tainted by anything that is done inside the chroot.

To make things a bit easier, /home and /tmp directories are mounted into the chroot. That means those paths are the same inside and outside the chroot. No need to copy files around. But that also means projects can only be in /home by default. It is possible to change that but thats not in the scope of this blog post (hint: check /etc/schroot/default/fstab).

Run qmake/cmake on the project to create the Makefiles

In order to compile the project, CMake or QMake need to create a Makefile from the project description files. The SDK IDE always uses a builddirectory to keep the source clean. That is the recommended way of building projects.

Now that we have a chroot created, we need a way to actually execute commands inside the virtual environment. It is possible to log into the chroot or just run single commands. The click chroots have 2 different modes, one of them is the production mode and one is the  maintenance mode.

Everything that is changed on the chroot filesystem in production mode will be reverted when the active session is closed to make sure the chroot is always clean. The maintenance mode can be used to install build dependencies, but its the job of the user to make sure those dependencies are available on the phone images as well. Rule of thumb is, if something is not installed in the chroot by default it is probably not officially supported and might go away anytime.


click chroot -a armhf -f ubuntu-sdk-15.04 run  #production
click chroot -a armhf -f ubuntu-sdk-15.04 maint #maintenance

Running one of these commands without specifying which command should be executed inside the chroot will open a login shell inside the chroot environment. If multiple successive commands should be executed it is faster to use a login shell, because the chroot is mounted/unmounted every time a session is opened/closed.

For QMake projects usually the IDE takes care of selecting the correct QMake binary, however in manual mode the user has to call the qt5-qmake-arm-linux-gnueabihf in armhf chroots instead of the plain qmake command. The reason for this is that qmake needs to be compiled in a special way for cross build targets and the "normal" qmake can not be used.

Run make to compile the project and run custom build steps

This step does not need much explanations, it triggers the actual build of the project and needs to be executed inside the chroot again of course.

Run make install to collect all required files in a deploy directory

Now that the project build was successful, step 4 collects all the required files for the click package and installs them into a deploy directory. When building with the IDE the directory is located in the current build dir and is named ".ubuntu-sdk-deploy".

It is a good place to check if all files were put into the right place or check if the manifest file is correct.

In order for that step to work correctly all files that should be in the click package need to be put into the INSTALL targets. The app templates in the SDK should give a good hint on how this is to be done.

The deploy directory now contains the directory structure of the final click package.

Run click build on the deploy directory

The last step now is to build the actual click package. This command needs to be executed outside the chroots, simply because of the fact that the click command is not installed by default inside the chroots. What will happen now is that all files inside /tmp/deploy-myproject will be put inside the click package and a click review is executed. The click review will tell if the click package is valid and can be uploaded to the store.


If all went well, the newly created click package should show up in the directory where click was executed, it can now be uploaded to the store or installed on a device.

Read more
Tim Peeters

Return of the Ubuntu UI Toolkit

Next month will be the release of Ubuntu 15.04 (Vivid Vervet) for desktop, and this version of Ubuntu will soon become the version that will be installed on Ubuntu phones as well. With the release of 15.04, we also release a new version of our UI toolkit: Ubuntu.Components 1.2. Below are some of the new features that it will have.

Hasta la vista, toolbar!

In Ubuntu.Components 1.1, the bottom-edge toolbar was replaced by a new header that can be used for navigating the app and trigger actions. Actions that used to be in the  toolbar were automatically moved to the header, and a useDeprecatedToolbar property was added to the MainView for developers that liked to keep the toolbar. In 1.2, the toolbar and useDeprecatedToolbar property are definitely gone which enabled us to clean up the MainView and header code, so that we can give you a fresh new visual design and more control over the looks and behavior of the header very soon.

One ListItem to rule them all

ListItem leading actions

There are many different list items in Ubuntu.Components.ListItems, but they are not always easy to customize and the performance when you use thousands of them in your app is not optimal. Therefore, we now introduce the all-new ListItem component. It replaces all of the old list items, is super-fast (even when you have ten thousands of them), you can swipe them left and right to reveal actions, they offer selection mode (to quickly select a subset of all the list items), and the user can re-order the items in a list. Awesome :)

 

Ubuntu Shape up (doo doo doo)

Image with transparent background in UbuntuShape

The UbuntuShape is now in the best shape ever! It has been refactored to optimize performance (for example, the rendering is now "batched" so even a lot of them can be rendered fast), semi-transparent images and colored backgrounds are supported, you can use all the fill modes and tiling that the Image component supports, there is 2D transformation support, and the implementation was made extensible so that new features can be added more easily.

Here is the code for the app that was used for the two screenshots above:

import QtQuick 2.4
import Ubuntu.Components 1.2

MainView {
    width: units.gu(40)
    height: units.gu(50)
    //useDeprecatedToolbar: false // terminated

    Page {
        title: "Return of the UITK"

        ListItemActions {
            id: exampleLeadingActions
            actions: [
                Action {
                    iconName: "tick"
                },
                Action {
                    iconName: "delete"
                }
            ]
        }

        ListView {
            anchors.fill: parent
            model: 10
            delegate: ListItem {
                id: listItem
                Label {
                    anchors {
                        left: parent.left
                        leftMargin: units.gu(2)
                        verticalCenter: parent.verticalCenter
                    }
                    text: "List item "+index
                }
                leadingActions: exampleLeadingActions

                UbuntuShape {
                    anchors {
                        right: parent.right
                        top: parent.top
                        bottom: parent.bottom
                        margins: units.gu(0.5)
                    }
                    backgroundMode: listItem.highlighted ?
                                        UbuntuShape.VerticalGradient :
                                        UbuntuShape.SolidColor
                    backgroundColor: listItem.highlighted ?
                                         UbuntuColors.blue :
                                         UbuntuColors.lightGrey
                    secondaryBackgroundColor: UbuntuColors.green
                    source: Image {
                        source: "logo.png"
                    }
                    sourceFillMode: UbuntuShape.PreserveAspectFit
                }
            }
        }
    }
}

Besides these new features, we fixed a whole bunch of bugs and we are working hard on the next version of the UI toolkit that we will be blogging about in the near future, so stay tuned for more good stuff!

 

Read more
Zoltán Balogh

So if you are new to QtCreator the first thing that freaks you out will be the concept of Kits. Yes it does look complicated, big and you might want to ask why do I need this.

Right, let’s take few steps back and look at the bigger picture.

Most programmers start their hobby or carrier with basic (not that one) pc programming. You have the compiler and libraries on your machine, you start hacking around with your code and once you think it will pass at least the syntax check you go to the terminal, compile the code and be happy when you see the binary executable. If it runs without segfaults then you start to gain confidence and you are the happiest kid on Earth once the program does what you coded it for.

That is a fairly simple and common scenario, still it has all the components what actually make an SDK. And i guess you know that in the SDK, the K stands for Kit.

Let’s continue with this thinking. You want to show the program to your friends. That is nothing strange, even coders are social beings. If your program is using dynamically linked libraries from the system then your friends need a bit of luck to have the very same system libraries on their machine as you have on yours. Not to mention that you compiled your program for one specific processor architecture and nothing guarantees that your friends have the same architecture as you had.

So, we are safe and good as long our program stays on our computer but trouble with libraries, binary compatibility and processor architecture will pop up when we want to move our program around without recompiling it again. And imagine, we are still talking about PC to PC porting. Let’s raise the bar.

How does it go when you want to write an application for a mobile device? Most likely your computer is an x86 based PC and these days most mobile devices have some sort of ARM processor. So, here we go, our native local compiler what made us so happy just few paragraphs back is now obsolete and we will need a compiler what can produce an ARM binary for the specific device. It could be armv6, armv7 or whatever exotic ARM processor your target device is built with. Good, we now have a compiler but our code is still using a bunch of libraries. In the Ubuntu world and specially with the ultimate convergence on our roadmap this part of the story is a bit easier and will get even better soon. But still if your PC is running the LTS Ubuntu release (14.04 right now) you do not necessarily expect the same libraries and header files being present on your machine as on a target device what is on 15.04 or even newer.

I guess at this point many would say with a disappointed tone that after you learned that your good old compiler is obsolete now all your locally installed development libraries and header files are useless too. Think of Borat saying “nice”.

Okay, so we are left without compiler, libraries and header files. But they should come from somewhere, right?

And that is where the Kits come into the picture. The official definition of the QtCreator Kits sure sounds a bit academic and dry, so let’s skip it. In short, Kits are the set of values that define one environment, such as a device, compiler, Qt version, debugger command, and some metadata.

I love bicycling so I use cycling analogies whenever it is possible. Imagine that you are in the mood to have a ride downhill in the forest. You will take your mountain bike, knee and elbow pad, lots of water, some snacks and your clothes what take dirt better, a massive helmet and your camera. If you just cycle to your office you take your city bike, lighter helmet and you put on regular street wear. Different target, different set of equipment. How cool it would be just to snap your finger and say out loud “ride to the city”  and all the equipment would just appear in front of you.

 

That is exactly what happens when you have Kits set up in your QtCreator and you are building your application for and running them on different targets.

QtCreator is an IDE and developers who choose to work with IDEs do expect a certain level of comfort. For example we do not want to resolder and rewire our environment just because we want to build our project for a different target. We want to flip a switch and expect that the new binaries are made with a different compiler against a different set of libraries and headers. That is what QtCreator’s target selector is for. You simply change from the LTS Desktop Kit to the 15.04 based armhf target and you have a whole different compiler toolchain and API set at your service.

At this point Kits looks pretty and easy. You might ask what is the catch then. Why IDEs and SDKs do not come with such cool and well integrated Kits? Well there is a price for every cool feature.  At this moment each Kit in ready for action state is about 1.7GB. So kits are big and the SDK does not know what Kits you want to use. What means is that if we want to install all kits you might use the SDK would be 8-10GB easily.

Why kits are so big and can they be made smaller?

That is a fair question I got very often. First of all, the kits are fully functional chroots in the case of the Ubuntu SDK. It means that other than the compiler toolchain we have all the bells and whistles one needs when entering a chroot. Just enter the click chroot and issue the dpkg -l command to see that yes, we do have a full blown Ubuntu under the hood. In our SDK model the toolchain and the native developer tools live in the click chroots and these chroots are bootstrapped just as any other chroot. It means that each library, development package and API is installed as if it were installed on a desktop Ubuntu. And that means pulling in a good bunch of dependencies you might not need ever. Yes, we are working on making the Kits smaller and we are considering to support static kits next to the present dynamic bootstrapped kits.

Alright, so far we have covered what Kits are, what they contain. The most important question is do you need to care about all of these? Do you need to to configure and set up these kits yourself. Luckily the answer to these questions is no.

In the Ubuntu SDK these Kits are created on the first start of the SDK and set up automatically when a new emulator is deployed or a new device is plugged in. Of course you can visit the builder chroots under the Ubuntu and Build & Run sections in the dialog what opens with the Tools->Options… menu. But most of the application developers can be productive without knowing anything about these. Of course understanding what they are is good and if you are into development tools and SDKs then it is fun to look behind the curtains a bit.

Read more
David Callé

Announcing the Ubuntu Porting guide 2.0

In the last few weeks, Ubuntu has reached a major milestone with the first flash sales of the BQ Aquarius - Ubuntu Edition. This is only the beginning of seeing Ubuntu on a wider selection of phones and tablets, and thanks to an incredibly enthusiast porting community, more devices have been part of that show. Some of these skilled porters have even set up their own image server to provide updates over-the-air!

To ease the porting process, the Porting Guide has been updated to reflect the current procedure of enabling new devices. From setting up your dev environment, to configuring the kernel and debugging AppArmor, it covers the main points of making a fully working port. Currently focusing on AOSP ports, it will be extended in due time to detail CyanogenMod-specific processes.

If you are interested in porting, please make sure you provide feedback on any issues and roadblocks that could arise, either on Launchpad or on the ubuntu-phone mailing-list.

Thank you and good work, fellow devices adventurers!

Read more
David Planella

This is a guest post from Jordi Allue, Senior SW Architect at Tuso technologies
 
In September 2014, Ubuntu invited Tuso Technologies to be one of the first Ubuntu Phone OS developers with a version of Fiabee’s Cloud-Mobile Collaboration, Synchronisation and Sharing App for the new Ubuntu Phone OS. We jumped at the opportunity because it was in line with Tuso Technologies’ cross-platform compatibility strategy and found it to be an interesting challenge. The process was far simpler and faster than we originally expected, and the results exceeded our expectations.

Fiabee is a carrier-grade, enterprise caliber, cloud-mobile Collaboration, Synchronization and Sharing Software-as-a-Service (SaaS). With Fiabee, Telecom Operators, Internet Service Providers and other Managed Service Providers generate new revenues and reduce churn by taking market share away from large OTT App (Over The Top Application) providers.

Ubuntu Phone Apps are created natively or in HTML5 within a WebApp. Fiabee’s existing HTML5 app, which includes CSS3 and Javascript, was the ideal match for Ubuntu Phone.

We started the process by installing Ubuntu’s Software Development Kit (SDK) and making ourselves familiar with it. The installation was straight forward with a simple "apt-get install ubuntu-sdk" instruction. Although we had no prior experience with Ubuntu’s Integration Development Environment (IDE), based on Qt Creator, the tutorials available on Ubuntu’s website helped us create our first HTML5 trial app. Next we tested the app directly on an Ubuntu Phone, getting familiar with Ubuntu’s Operating System (OS) and IDE was the most challenging of the tasks. That said, it only took us a few days to prepare the infrastructure to develop our own app. For those who don’t have an Ubuntu Phone, Ubuntu’s SDK provides a mobile device emulator.

From there on, it was easy to adapt Fiabee’s web application to Ubuntu’s environment. With the help of the SDK instructions and manuals, we integrated the Web app into the development project, ran it on the device and created the deployment package. After configuration, we adapted the visual appearance and operation to Ubuntu’s standards.

We were amazed to find that the functions of Fiabee’s App which are often difficult to adapt were almost automatic with Ubuntu Phone, such as accessing the phone’s file system, interacting with third party Apps or opening documents downloaded from the cloud. This demonstrates that Ubuntu OS is truly “open”. During the last steps of creating the package and uploading it to the Ubuntu App Directory, we had a minor problem with the definition of the App’s security policies but that was quickly resolved with the help of Ubuntu’s App Directory Tech Support team.

From our perspective, bringing Fiabee to Ubuntu Phones was a piece of cake. It was a quicker and an easier experience than we’ve had with other platforms, despite it being new and notably different from the others with its App interaction menu. We were able to carry over all the functionalities of the Fiabee App without losing any, as was the case with other platforms, and without having to invest re-development time. It was as simple as tweeking Fiabee’s existing web app. With Fiabee’s App for Ubuntu Phones, we continue to deliver a good user experience to Fiabee users with a further extended range of mobile devices with which to access our service.

About Tuso technologies SL. Founded in late 2008, with offices in Barcelona, Spain, and Palo Alto, USA, Tuso Technologies develops carrier-grade, enterprise-caliber, cloud-mobile Value-Added-Services (VAS), including Fiabee, Locategy & Open API, selected by leading Mobile Network Operators, ISV and corporations such as Telefonica (Movistar), France Telecom (Orange) , Ono (Vodafone), R Cable, Panda Security, Applus+ among others.

Read more
XiaoGuo, Liu

为Ubuntu Scope创建online account

有许多的Web services需要登陆个人用户账号才可以访问自己账号里的数据。在文章“如何使用online account来创建微博Scope”中,它详细地介绍了如何在Scope中使用Ubuntu平台所提供的online account来访问微博的个人数据,并展示该数据。该文章中,有一个简单的例程显示从微博个人账号中获取的图片及信息并展示。

 

       

Read more
niemeyer

This post provides the background for a deliberate and important decision in the design of gopkg.in that people often wonder about: while the service does support full versions in tag and branch names (as in “v1.2″ or “v1.2.3″), the URL must contain only the major version (as in “gopkg.in/mgo.v2″) which gets mapped to the best matching version in the repository.

As will be detailed, there are multiple reasons for that behavior. The critical one is ensuring all packages in a build tree that depend on the same API of a given dependency (different majors means different APIs) may use the exact same version of that dependency. Without that, an application might easily get multiple copies unnecessarily and perhaps incorrectly.

Consider this example:

  • Application A depends on packages B and C
  • Package B depends on D 3.0.1
  • Package C depends on D 3.0.2

Under that scenario, when someone executes go get on application A, two independent copies of D would be embedded in the binary. This happens because both B and C have exact control of the version in use. When everybody can pick their own preferred version, it’s easy to end up with multiple of these.

The current gopkg.in implementation solves that problem by requiring that both B and C necessarily depend on the major version which defines the API version they were coded against. So the scenario becomes:

  • Application A depends on packages B and C
  • Package B depends on D 3.*
  • Package C depends on D 3.*

With that approach, when someone runs go get to import the application it would get the newest version of D that is still compatible with both B and C (might be 3.0.3, 3.1, etc), and both would use that one version. While by default this would just pick up the most recent version, the package might also be moved back to 3.0.2 or 3.0.1 without touching the code. So the approach in fact empowers the person assembling the binary to experiment with specific versions, and gives package authors a framework where the default behavior tends to remain sane.

This is the most important reason why gopkg.in works like this, but there are others. For example, to encode the micro version of a dependency on a package, the import paths of dependent code must be patched on every single minor release of the package (internal and external to the package itself), and the code must be repositioned in the local system to please the go tool. This is rather inconvenient in practice.

It’s worth noting that the issues above describe the problem in terms of minor and patch versions, but the problem exists and is intensified when using individual source code revision numbers to refer to import paths, as it would be equivalent in this context to having a minor version on every single commit.

Finally, when you do want exact control over what builds, godep may be used as a complement to gopkg.in. That partnership offers exact reproducibility via godep, and gives people stable APIs they can rely upon over longer periods with gopkg.in. Good match.

Read more
Alan Pope ㋛

Year End Core Apps Hack Days

As we come to the end of 2014, looking forward to new devices running Ubuntu in our immediate future, it’s time for one last set of Hack Days of the year.

Next week, from Monday 8th December till Friday 12th we’re going to be having another set of Core Apps Hack Days. We’ve had a few of these this year which have been a great way to focus attention on specific applications and their dependent components in the platform. They’re also a nice gateway for getting new people into the Core Apps project and Ubuntu development in general.

The Core Apps are community maintained Free Software applications which were created for Ubuntu devices, but also work on the Ubuntu desktop. We welcome new developers, testers, autopilot writers, artists and translators to get involved in these exciting projects.

The schedule

As with previous hack days we’re going to focus on specific apps on each day, which we run from 9:00 UTC until 21:00 UTC. In summary our schedule looks like this:-

Monday 8th – Calculator, Terminal & Clock

Tuesday 9th – File Manager & Calendar

Wednesday 10th – Music & Document Viewer – QA Day Workshop: writing tests for the core apps (18:00UTC)

Thursday 11th – Shorts & Reminders

Friday 12th – Weather & Dekko (email)

A QA treat

Creating core apps involves close coordination between developers and designers to provide the right set of features, high usability and appealing visuals. All these would be nothing without a suite of automated tests that are run to ensure the features are rock-solid and that no regressions are introduced with new development.

All core apps include Autopilot and QML tests that we are constantly expanding to increase test coverage. Writing tests for core apps is a nice way to get started contributing. All you’ll need is some Python knowledge for Autopilot tests or QML for QML tests. Our quality man, Nicholas Skaggs will be running a live video workshop on Wednesday Dec 10th, at 18:00UTC, as an on-ramp to learn how to create tests.

Join the fest

The Hack Days will be happening live at the #ubuntu-app-devel IRC channel on Freenode

The QA Workshop will be happening also live on Ubuntu On Air. You can watch the video and ask your questions on the same IRC channel.

We’ll blog more details about the apps each day next week with links to specific bugs, tasks and goals, so stay tuned!

As always we greatly appreciate all contributions to the Core Apps project during the Hack Days, but welcome community efforts all year round, so if this week doesn’t work for you, feel free to drop by #ubuntu-app-devel on Freenode any time and speak to me, popey.

Read more
Alan Pope

Ubuntu Core Apps
As we come to the end of 2014, looking forward to new devices running Ubuntu in our immediate future, it’s time for one last set of Hack Days of the year.

Next week, from Monday 8th December till Friday 12th we’re going to be having another set of Core Apps Hack Days. We’ve had a few of these this year which have been a great way to focus attention on specific applications and their dependent components in the platform. They’re also a nice gateway for getting new people into the Core Apps project and Ubuntu development in general.

The Core Apps are community maintained Free Software applications which were created for Ubuntu devices, but also work on the Ubuntu desktop. We welcome new developers, testers, autopilot writers, artists and translators to get involved in these exciting projects.

The schedule

As with previous hack days we’re going to focus on specific apps on each day, which we run from 9:00 UTC until 21:00 UTC. In summary our schedule looks like this:-

  • Monday 8th – Calculator, Terminal & Clock
  • Tuesday 9th – File Manager & Calendar
  • Wednesday 10th – Music & Document Viewer – QA Day Workshop: writing tests for the core apps (18:00UTC)
  • Thursday 11th – Shorts & Reminders
  • Friday 12th – Weather & Dekko (email)

A QA treat

Creating core apps involves close coordination between developers and designers to provide the right set of features, high usability and appealing visuals. All these would be nothing without a suite of automated tests that are run to ensure the features are rock-solid and that no regressions are introduced with new development.

All core apps include Autopilot and QML tests that we are constantly expanding to increase test coverage. Writing tests for core apps is a nice way to get started contributing. All you’ll need is some Python knowledge for Autopilot tests or QML for QML tests. Our quality man, Nicholas Skaggs will be running a live video workshop on Wednesday Dec 10th, at 18:00UTC, as an on-ramp to learn how to create tests.

Join the fest

The Hack Days will be happening live at the #ubuntu-app-devel IRC channel on Freenode

The QA Workshop will be happening also live on Ubuntu On Air. You can watch the video and ask your questions on the same IRC channel.

We’ll blog more details about the apps each day next week with links to specific bugs, tasks and goals, so stay tuned!

As always we greatly appreciate all contributions to the Core Apps project during the Hack Days, but welcome community efforts all year round, so if this week doesn’t work for you, feel free to drop by #ubuntu-app-devel on Freenode any time and speak to me, popey.

Read more
David Planella

image-phone-naturallyneat-medium

The 5 weeks after the Ubuntu Scopes Showdown announcement are coming to an end, it’s time to start putting the pencils down and submitting your scopes for the judges to do their reviews.

While you’ve still got two days to fix some bugs and do some final polish, the 3rd of December is the last day for submissions to be accepted for the Showdown. Remember that to qualify, you’ll need to:

  • Register your scope for the contest
  • Submit your scope to the Ubuntu Software Store

Registering your scope

To register your scope for the judges’ review, you’ll simply need a couple of minutes to fill in the registration form. It might be worth filling it in advance, even if you are planning to upload your app at the last minute.

You can submit the form now and still upload new revisions of your app until the 3rd of December.

Register your scope for participation

Submitting your scope

Submitting your scope to the store should also be quick and easy. The upload workflow is exactly the same as for apps, and with automated reviews it takes just a few minutes from upload to your scope being available for everyone on the Ubuntu Software Store.

To ensure your scope is discoverable and looks good, you might want to check out the scope upload tips ›

And when you’re ready to start the upload, you can follow the 5-step process to get it published ›

Need help?

If you need help with any of the above, feel free to reach out in any of the channels below:

Looking forward to seeing your scopes in the store!

Read more
David Callé

Now that your scope is in a working state, it’s time to get it ready for publication. In this tutorial you will learn how to make your scope look good when the user is browsing the store or the list of scopes installed on the phone.

In the next steps, we are going to prepare a few graphics, edit the <scope>.ini file located in the data directory of your project and package the scope for the store.

Read…

scope_prev_all

Read more
David Callé

 
Now that your scope is in a working state, it’s time to get it ready for publication. In this tutorial you will learn how to make your scope look good when the user is browsing the store or the list of scopes installed on the phone.
 
In the next steps, we are going to prepare a few graphics, edit the <scope>.ini file located in the data directory of your project and package the scope for the store.

 

 

Read more
David Planella

.tg {border-collapse:collapse;border-spacing:0;border-color:#ccc;margin:20px auto;width:680px !important;} .tg td{font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;} .tg th{font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;} .tg .tg-4eph{background-color:#f9f9f9}

image-phone-naturallyneat-medium

This is a week full of exciting events in the Ubuntu world! Following on the series of Ubuntu Scopes Workshops for the Ubuntu Scopes Showdown, we’re thrilled to announce more Scopes Workshops sessions as part of the Ubuntu Online Summit.

Scopes workshops: learn more and ask your questions

In order to support participants of the Scope Showdown, we’re organizing a series of workshops around different topics on writing scopes. These will be 1 hour hands-on sessions where the presenter will be demonstrating the topic live on video, with real code and using the Ubuntu SDK.

These are also meant to be interactive, so during and after the session the presenter will be answering the questions posted in real time by developers on the chat widget on each session page. Here’s the schedule for the workshops:

Workshop Time Presenter
Online Accounts for Scopes Developers Thursday, 13th Nov at 14:00UTC Alberto Mardegan
Scope Development How-Tos Thursday, 13th Nov at 15:00UTC Thomas Strehl & the Unity API Team

In a nutshell:

  • WHAT: Scopes workshops at the Ubuntu Online Summit
  • WHEN: Thursday, 13th November, starting at 14:00 UTC
  • WHERE: At the Ubuntu Online Summit

Looking forward to seeing you there!

Read more
David Callé

Departments are a way for the user to navigate the data source exposed by a scope. A music scope can use them to allow browsing by genre, a Youtube scope could list channels and playlists, a news scope could use them for listing topics, etc. Departments can also display a full hierarchy of sub-departments.

In this tutorial, you are going to learn how to create and add them to your scope.

Read…

scope_dep8 scope_dep9

Read more
David Planella

More content coming up for app and scope developers targeting Ubuntu on devices: this time around Online Accounts!

Learn the concepts on how to write account providers for online services using the Ubuntu Online Accounts API (UOA), and let the API take care of all the complexity and security for you, so that you can concentrate on your code.

Go to the Online Accounts Developer Guide >

Read more
Daniel Holbach

New developer guide: Online Accounts

More content coming up for app and scope developers targeting Ubuntu on devices: this time around Online Accounts!

Learn the concepts on how to write account providers for online services using the Ubuntu Online Accounts API (UOA), and let the API take care of all the complexity and security for you, so that you can concentrate on your code.

Go to the Online Accounts Developer Guide >

Read more