How To Program Unity Scope and Tips

  1. start from official tutorial http://developer.ubuntu.com/scopes/tutorial/

    1. implement search function

    2. implement preview function

    3. modify data/XXXX.scope

    4. modify data/unity-scope-XXXX.service.in

    5. modify XXXX.pro

    6. build executable file, and dbus service file out

    7. install executable file, scope file and service file.

    8. killall unity-scope-home to restart the Home scope so that it loads the new scope

  2. what’s scope? what’s master scope?

    1. Scope

The search engine itself, talking to a web service or a local database. It can be exposed to the user in two ways in the Dash: as a standalone scope or as part of a master scope.

  1. Master scope

The architecture used to merge multiple scopes in the same Dash view.

  1. how to debug?

    1. use libunity-tool -g

  2. My first scope project

    1. lp:~sangshuduo/+junk/scope500px

 

  1. BKMs and tips

    1. recommend C language to programming scope for performance although python and vala still working

      1. http://askubuntu.com/questions/310669/what-programming-languages-are-scopes-written-in

    2. Ubuntu SDK do not show Unity Scope project in project list

      1. apt-get remove all QT related packages and reinstall Ubuntu SDK

    3. dbus name limitation

      1. https://bugs.launchpad.net/libunity/+bug/1269256

    4. unreliable libunity-tool

      1. sometime libunity-tool can’t list all running scopes’ dbus name. we can fill its group name and unique name manually

      2. use master scope to list all results.

    5. manually add headers path and libraries to link

      1. XXXX.pro

    6. check name matched in all place

      1. config.h

      2. data/XXXX.scope

      3. data/unity-scope-XXXX.service.in

    7. who familiar Unity API

      1. Michal Hruby (mhr3)

    8. build and install. some files will be not installed if only run ‘sudo make install’

      1. qmake

      2. make

      3. sudo make install

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>