The Artima Developer Community
Sponsored Link

Web Buzz Forum
Ubuntu Component Store, redux 2

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Stuart Langridge

Posts: 2006
Nickname: aquarius
Registered: Sep, 2003

Stuart Langridge is a web, JavaScript, and Python hacker, and sometimes all three at once.
Ubuntu Component Store, redux 2 Posted: Jan 1, 2015 3:06 PM
Reply to this message Reply

This post originated from an RSS feed registered with Web Buzz by Stuart Langridge.
Original Post: Ubuntu Component Store, redux 2
Feed Title: as days pass by
Feed URL: http://feeds.feedburner.com/kryogenix
Feed Description: scratched tallies on the prison wall
Latest Web Buzz Posts
Latest Web Buzz Posts by Stuart Langridge
Latest Posts From as days pass by

Advertisement

A couple of months ago I came up with a proposal for how an Ubuntu Component Store could work to be a place where people could upload self-contained components for Ubuntu SDK apps, after a long discussion with nik90 about it all. However, it requires a server which maintains accounts and so on, and that’s hassle. So, an alternative idea, which is a bit more limited but also quite a bit more doable, I think.

We still go with core, curated, and community components as in the above proposal, and this is only about community components. They are still called username/componentname as before. But now, they must be hosted on Launchpad.

What you do, to build a component, is you push a branch to Launchpad. That branch must have the following things in it:

  • /ubuntu_component_store.json - a JSON manifest describing your component. More on this later.
  • /ubuntu_component_store - a folder in which all the bits of your component live
  • /ubuntu_component_store/bin/arm-linux-gnueabihf/$COMPONENTNAME.o
  • /ubuntu_component_store/bin/i386-linux-gnu/$COMPONENTNAME.o
  • /ubuntu_component_store/bin/x86_64-linux-gnu/$COMPONENTNAME.o - any compiled parts of your component go in bin/$arch/ as binary compiled files
  • /ubuntu_component_store/qml/$WHATEVER.qml - any QML files for your component (and any external files that they depend on, such as images) go in qml/

Obviously if your component is only a binary QML plugin then it won’t have a qml folder, and if it’s pure QML then it won’t have a bin folder. Note that bin contains compiled plugins, not source. You should have a way of letting people get the source for your component, especially if they want to change it or improve it, but that’s not what this is about: ucs install gets a working binary thing. It does not get the source so that you compile it yourself, because it’s aimed at people who don’t want to do compilation at all. (In particular, a pure QML project won’t have any of the cmake stuff even set up, and it should not have to have.)

The binary arch stuff is designed to fit in with fat packages properly.

You then submit the component to the server, with ucs submit lp:~username/project/branch, passing the LP URL for the branch you pushed. The server fetches ubuntu_component_store.json from the root of that branch and parses it for metadata; it may also check that the branch looks validly like a component. The server then updates community_components.json, which is a file listing all metadata for all the community components, and uploads it back to Launchpad. (It’s a bit like a Debian Packages file.)

Then a developer decides to use your component, so they ucs install name/yourcomponent. This fetches community_components.json from Launchpad and gets the details of your component from it: in particular, it gets the LP branch URL. It then downloads the ubuntu_component_store/bin and/or ubuntu_component_store/qml folders from your LP branch and puts them somewhere appropriate in the current project folder so that they’ll work and can be referenced from your code.

ucs search <something> searches community_components.json locally.

This different approach means that the server is stateless; when it receives a ucs submit request, it updates the big metadata file with the new details, but the server is not part of the normal app developer process; it’s only used by component developers, and only for submissions. This makes the server much, much easier to write.

Read: Ubuntu Component Store, redux 2

Topic: Nifty Things for Week 2 Jan 2015 Previous Topic   Next Topic Topic: Enabling the devtools inspector when using Oxide in an Ubuntu SDK QML app

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use