Bundling libraries in Maemo packages for Ovi store
(Created page with 'Category:Qt for Maemo When submitting packages to the Ovi store, they cannot depend on libraries or other content from other repositories, only the packages found in the offi…') |
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot update - Add ArticleMetadata) |
||
| (8 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| − | [[ | + | {{ArticleMetaData <!-- v1.2 --> |
| − | When submitting packages to the Ovi store, they cannot depend on libraries or other content from other repositories, only the packages found in the official firmware. If you need such libraries, you will have to bundle them with your project in the following manner ( | + | |sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --> |
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') --> | ||
| + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) --> | ||
| + | |platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later --> | ||
| + | |devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) --> | ||
| + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> | ||
| + | |signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase --> | ||
| + | |language= <!-- Language category code for non-English topics - e.g. Lang-Chinese --> | ||
| + | |translated-by= <!-- [[User:XXXX]] --> | ||
| + | |translated-from-title= <!-- Title only --> | ||
| + | |translated-from-id= <!-- Id of translated revision --> | ||
| + | |review-by= <!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp= <!-- After re-review: YYYYMMDD --> | ||
| + | |update-by= <!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp= <!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate= 20101231 | ||
| + | |author= [[User:Achipa]] | ||
| + | }} | ||
| + | [[Category:Maemo]][[Category:Qt]] | ||
| + | == Introduction== | ||
| + | When submitting packages to the Ovi store, they cannot depend on libraries or other content from other repositories, only the packages found in the official firmware. If you need such libraries, you will have to bundle them with your project in the following manner (in this example we'll use [http://maemo.org/packages/package_instance/view/fremantle_extras_free_armel/libvorbisidec1/1.2.0-1.svn20080906.tk1/ libvorbisidec1] package from Extras): | ||
| − | + | == Acquire the necessary library files == | |
You can either build them yourself in scratchbox, or simply download them from their repository | You can either build them yourself in scratchbox, or simply download them from their repository | ||
| Line 10: | Line 33: | ||
Make sure that you get the right architecture binaries (i.e. ARM for the Maemo target or X86 for the Simulator or Desktop builds) | Make sure that you get the right architecture binaries (i.e. ARM for the Maemo target or X86 for the Simulator or Desktop builds) | ||
| − | + | == Copy to project == | |
| − | + | After extracting the files from the package, copy them to a directory under your project, for example ''lib'' | |
| + | |||
| + | == Install folder == | ||
| + | |||
| + | Declare the ''lib'' folder as an [http://doc.trolltech.com/4.7/qmake-environment-reference.html#installs installable] in your .pro file: | ||
myproject.pro | myproject.pro | ||
... | ... | ||
| − | vorbislibs.path = /opt/myproject/lib | + | maemo5 { |
| − | + | vorbislibs.path = /opt/myproject/lib | |
| − | + | vorbislibs.files = lib/* | |
| + | INSTALLS += vorbislibs | ||
| + | } | ||
... | ... | ||
| − | + | == Define library path == | |
| + | |||
| + | The previous step will install the libs, but the OS will not find them upon launching the executable so the Exec line in the ''myproject.desktop'' file (under ''Other files'' in your project) needs to be altered to temporarily reference this library path. | ||
Other files/myproject.desktop | Other files/myproject.desktop | ||
| Line 36: | Line 67: | ||
X-Osso-Type=application/x-executable | X-Osso-Type=application/x-executable | ||
| − | After this, your package will be build with the lib included and used by your package. Please note that you will have to fulfill any 3rd party license requirements of the included content or libraries yourself. | + | After this, your package will be build with the lib included and used by your package. Please note that you will have to fulfill any 3rd party license requirements of the included content or libraries yourself.[[Category:MeeGo Harmattan]] [[Category:Symbian]] |
Revision as of 09:54, 19 July 2012
Article Metadata
Contents |
Introduction
When submitting packages to the Ovi store, they cannot depend on libraries or other content from other repositories, only the packages found in the official firmware. If you need such libraries, you will have to bundle them with your project in the following manner (in this example we'll use libvorbisidec1 package from Extras):
Acquire the necessary library files
You can either build them yourself in scratchbox, or simply download them from their repository
Make sure that you get the right architecture binaries (i.e. ARM for the Maemo target or X86 for the Simulator or Desktop builds)
Copy to project
After extracting the files from the package, copy them to a directory under your project, for example lib
Install folder
Declare the lib folder as an installable in your .pro file:
myproject.pro
...
maemo5 {
vorbislibs.path = /opt/myproject/lib
vorbislibs.files = lib/*
INSTALLS += vorbislibs
}
...
Define library path
The previous step will install the libs, but the OS will not find them upon launching the executable so the Exec line in the myproject.desktop file (under Other files in your project) needs to be altered to temporarily reference this library path.
Other files/myproject.desktop
[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=false Name=MyProject Exec=LD_LIBRARY_PATH=/opt/myproject/lib /opt/usr/bin/myproject Icon=myproject X-Window-Icon= X-HildonDesk-ShowInToolbar=true X-Osso-Type=application/x-executable
After this, your package will be build with the lib included and used by your package. Please note that you will have to fulfill any 3rd party license requirements of the included content or libraries yourself.


