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…') |
|||
| Line 1: | Line 1: | ||
[[Category:Qt for Maemo]] | [[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 official firmware. If you need such libraries, you will have to bundle them with your project in the following manner ( | + | 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): |
1. Acquire the necessary library files | 1. Acquire the necessary library files | ||
| Line 10: | Line 10: | ||
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) | ||
| − | 2. After extracting the files from the package, copy them to a directory under your project, | + | 2. After extracting the files from the package, copy them to a directory under your project, for example ''lib'' |
3. Declare the ''lib'' folder as an [http://doc.trolltech.com/4.7/qmake-environment-reference.html#installs installable] in your .pro file: | 3. Declare the ''lib'' folder as an [http://doc.trolltech.com/4.7/qmake-environment-reference.html#installs installable] in your .pro file: | ||
| Line 16: | Line 16: | ||
myproject.pro | myproject.pro | ||
... | ... | ||
| − | vorbislibs.path = /opt/myproject/lib | + | maemo5 { |
| − | + | vorbislibs.path = /opt/myproject/lib | |
| − | + | vorbislibs.files = lib/* | |
| + | INSTALLS += vorbislibs | ||
| + | } | ||
... | ... | ||
Revision as of 22:32, 31 December 2010
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):
1. 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)
2. After extracting the files from the package, copy them to a directory under your project, for example lib
3. Declare the lib folder as an installable in your .pro file:
myproject.pro
...
maemo5 {
vorbislibs.path = /opt/myproject/lib
vorbislibs.files = lib/*
INSTALLS += vorbislibs
}
...
4. Step 3 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.


