×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    40

    How to package my app. that can automatically install other necessary app. or lib

    How to package a .deb file that can automatically install the libraries or components which are included in the main program, that is, the codes can check libraries in the phone and install the necessary one or ones?

    ex : My application are based on "mbarcode"(it can install by N900's app manager), how do I packing my application that can automatically install the "mbarcode" or some necessary lib?

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327

    Re: How to package my app. that can automatically install other necessary app. or li

    You need to specify the dependant library in the debian/control file:

    Code:
    Package: mypythonapp
    Architecture: any
    Depends: python2.5
    Description: Short desc
      Detailed desc
      that spans
      multiple lines
    Note that the Ovi store does not accept packages with external dependencies for Maemo, you can only submit those to the community repository.

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to package my app. that can automatically install other necessary app. or li

    Add to the Source section of debian/control dependency to the library
    Build-Depends: your_library-dev

  4. #4
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327

    Re: How to package my app. that can automatically install other necessary app. or li

    Build-Depends is something different - it is related only to the compile/bulid part of the app's life cycle - just in itself it will not guarantee what the OP wants - the installation of missing libs/components on the device (unless you pair it with shlibs, but that's a different story).

  5. #5
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to package my app. that can automatically install other necessary app. or li

    Quote Originally Posted by achipa View Post
    Build-Depends is something different - it is related only to the compile/bulid part of the app's life cycle - just in itself it will not guarantee what the OP wants - the installation of missing libs/components on the device (unless you pair it with shlibs, but that's a different story).
    pscreate template has ${shlibs:Depends} macro specifically to ensure that nothing like that is needed. The only thing what is required from developer is to fill Build-Depends: properly.

  6. #6
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327

    Re: How to package my app. that can automatically install other necessary app. or li

    No. As I said, shlibs is a different story. It will NOT guarantee the inclusion of all packages you want it to depend on, only ones you directly link to or add (a subtle, but distinct difference, especially important if the packages you want to depend on are modules/plugins or simply not libraries). Additionally, the OP did not specify what tooling he is using (Nokia Qt SDK or Maemo 5 SDK).

  7. #7
    Registered User
    Join Date
    Feb 2010
    Posts
    40

    Re: How to package my app. that can automatically install other necessary app. or li

    Add Build-Depends
    Package: myapp
    Section: user/hidden
    Priority: optional
    Version: 1.0.0
    Architecture: all
    Maintainer: myapp <myapp@gmail.edu.tw>
    Build-Depends: libzbar-dev
    Depends: libzbar-dev
    Description: myapp System
    But it return an warning messasge
    [sbox-FREMANTLE_ARMEL: ~] > dpkg -b myapp
    warning, 'myapp/DEBIAN/control' contains user-defined field 'Build-Depends'
    dpkg-deb: building package 'myapp' in 'myapp.deb'
    dpkg-deb: ignoring 1 warnings about the control file(s)
    It still build a .deb file but it still can not automatically install other lib

  8. #8
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to package my app. that can automatically install other necessary app. or li

    Content of debian/control created for Qt application
    Code:
    Source: qthello
    Section: user/hidden
    Priority: extra
    Maintainer: Chuck Norris <gmail@chucknorris.com>
    Build-Depends: debhelper (>= 5), libzbar-dev
    Standards-Version: 3.7.3
    Homepage: <insert the upstream URL, if relevant>
    
    Package: qthello
    Architecture: any
    Depends: ${shlibs:Depends}, ${misc:Depends}
    Description: <insert up to 60 chars description>
     <insert long description, indented with spaces>
    # XB-Maemo-Icon-26 field contains the application icon file encoded in
    # base64. This is the icon that is shown in the Application Manager,
    # next to the package name. To perform this encoding use following mad
    # command: $ mad base64 <48x48 icon file name>
    # For example following XB-Maemo-Icon-26 field content is an output
    # from command: $ mad base64 qthello/src/data/48x48/qthello.png
    XB-Maemo-Icon-26:
     iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A
     /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBGQ0SFuv48p0AAAAZdEVYdENv
     bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAACp0lEQVRo3u2Yz0tVURDHv08dK4r2GUmWELSI
     sMCCSHdluS0QIWtXVIt20Z/QPm1R0D5a92OnRAqKllRkP6BFEQhZSIr1wffazIXD9d5nT6+ZdL4w
     3HNn7vnOmTk/3rwjRUREREQUCeA8UHHpK4Av4eoJdD2Jfi0CGA6cPiswgA+AAY3eLiSAupSzA5KO
     SHoh6bWko64LB5LIG6BtOVuATZIuujRWCbQCLACjwLEc/hngcla2+oFpoBnYD8wBt1IkJ4Aub4/X
     YOtz7mngXN4MAPXAIbe/T3GcAfZ5e1aSSkHHbZI+S9qe4pyV1CTpR5DJkqQFSZhZYzCQarZ6SWOS
     KpIOSypLkpmV3P8VSdckNUtq8D4VM6sLOBrMbDF5N7NSQzDQHh/8kJl1OOmgpONuS9ARLL1XqWBz
     bWZWltQWJCyd/JuStkg66M/hMMHOsVhts4351PQGul7XjWWsw6kqe2CJLW/NB+/Xga9prpxvaz8A
     qnVasyOx1lMoIiJi5Rt5vRA38YZdQsBO4D7wLaXfAzz0OmoOeAS01FSU/aUAnvr7VaAx+GYko7Ab
     Wa4oWylKtQaQFFHAL0kmaauZzQff4MVYtcJuSVG2Hpt41J8XAAv040Fh1+ntiT8uyv7iEtoFPAC+
     p/StwGNg3uUJsLewoiwiIiJiQ5UONzKOvi5g3O9uFoAJoPuf8+MEnzKIZ1zXFtzfzKxi8KvyU5dD
     2irpnqSzGeZ3/iwndzuSpjI4brvT00C3tweK9pOXlZfApZxfzxbgbeoKZXcGhwFDwBeXwVTJUYif
     5S5ks+5oJjOmdjKHpz3o374WfjKXkJmVEgl13mwKpjbJ2I6MwW2WNCDpo0u/6wr1U/P/YOAU8Bz4
     6TIBnMzodxcoA50uZeBO0X4iIiIiIv5v/AZU3LjyjeB2pwAAAABJRU5ErkJggg==
    
    Package: qthello-dbg
    Section: text
    Architecture: any
    Depends: qthello (= ${binary:Version})
    Description: <insert up to 60 chars description> debug symbols
     <insert long description, indented with spaces> debug symbols
    It was already 300 times said that you don't use dpkg -b to produce the package, but use only
    dpkg-buildpackage -i -rfakeroot -D
    http://wiki.forum.nokia.com/index.ph...Source_Package
    Last edited by divanov; 2010-10-01 at 11:24.

  9. #9
    Registered User
    Join Date
    Feb 2010
    Posts
    40

    Re: How to package my app. that can automatically install other necessary app. or li

    I have try dpkg-buildpackage -i -rfakeroot -D to package the .deb file,
    but when I install it to N900 it still just tell me "Application packages missing: libqtm-systeminfo".

    It still can not install libqtm-systeminfo automatically .

    PS: In this case ,my app have use some qt-mobility api. When I install my application I want it can automatically install qt-mobility api(libqtm-systeminfo).

    This is my debian/control file:
    Source: myapp
    Section: user/hidden
    Priority: optional
    Maintainer: myapp <myapp@gmail.com>
    Build-Depends: debhelper (>> 3.0.0), libqt4-dev | libqt4-maemo5-dev, libqtm-systeminfo
    Standards-Version: 1.0.5

    Package: myapp
    Architecture: any
    Depends: ${shlib\: Depends}
    Description: myapp.


    Package: myapp-dbg
    Section: text
    Architecture: any
    Depends: myapp(= ${binary:Version})
    Description: myapp.
    After "dpkg-buildpackage -i -rfakeroot -D" it will generate a new control file in DEBIAN\control
    This is the DEBIAN\control file
    Package: myapp
    Version: 1.0.5
    Section: user/hidden
    Priority: optional
    Architecture: armel
    Depends: libc6 (>= 2.5.0-1), libdbus-1-3 (>= 1.1.4), libdbus-glib-1-2 (>= 0.76), libgcc1 (>= 1:4.2.1), libglib2.0-0 (>= 2.20.0), libmafw0 (>= 0.1.2009.38), libosso1 (>= 2.23), libqt4-core (>= 4.6.2~git20100401), libqt4-dbus (>= 4.6.2~git20100401), libqt4-gui (>= 4.6.2~git20100401), libqt4-network (>= 4.6.2~git20100401), libqt4-phonon (>= 4.6.2~git20100401), libqt4-webkit (>= 4.6.2~git20100401), libqt4-xml (>= 4.6.2~git20100401), libqt4-xmlpatterns (>= 4.6.2~git20100401), libqtm-systeminfo, libsqlite3-0 (>= 3.6.14), libstdc++6 (>= 4.2.1)
    Installed-Size: 184
    Maintainer: myapp <myapp@ncnu.edu.tw>
    Description: myapp.

  10. #10
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to package my app. that can automatically install other necessary app. or li

    Quote Originally Posted by hpbrother View Post
    but when I install it to N900 it still just tell me "Application packages missing: libqtm-systeminfo".
    Debian (and Maemo) has 2 installation tools. dpkg - low level utility installing local Debian packages and apt - high level utility for installation of Debian packages from Debian repository. dpkg is not installing depenencies needed for your application. apt, however, does.

    You can solve your case by running two sequential commands:
    Code:
    apt-get install libqtm-*
    dpkg -i myapp_0.0.1_armel.deb
    Quote Originally Posted by hpbrother View Post
    It still can not install libqtm-systeminfo automatically.
    You would need to place your Debian package into any Debian repository and possibly configure apt on the device to use it, if not already.

    Could you also describe what are you trying to achieve in general?

  11. #11
    Registered User
    Join Date
    Feb 2010
    Posts
    40

    Re: How to package my app. that can automatically install other necessary app. or li

    After packing my app. I put it on the web. If I want to install the app. I just open N900's browser and go to the website (ex: http://xxxx/myapp.deb). Then the app. can install to my N900.

    But my new application have used Qt-Moblity-API. If I want to install my new app. on N900. I have to install qt-mobility-example from N900's "app. manager" before my new application.

    Now I want to package my new app. that If open the N900's browser and go to the my application's website. It can automatically install Qt-Mobility-API before my new application.

    If I want to do this What should I do???

  12. #12
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to package my app. that can automatically install other necessary app. or li

    If uploading to Extras-devel repository is not an option for you, you can create your own Debian repository containing your package.
    http://www.debian.org/doc/manuals/re...pository-howto
    Then you can install package by opening .install file in Maemo Web Browser
    http://repository.maemo.org/extras-d...sample.install

Similar Threads

  1. Replies: 4
    Last Post: 2010-08-04, 07:22
  2. Replies: 3
    Last Post: 2009-06-16, 15:57
  3. Not able to install App & remove App in N73 ME
    By venki5star in forum General Development Questions
    Replies: 12
    Last Post: 2009-04-08, 14:43
  4. Replies: 4
    Last Post: 2008-08-29, 20:11
  5. How to debug j2me app in NetBeans 5.0 with mobility pack 5.5
    By madsum in forum Mobile Java General
    Replies: 5
    Last Post: 2007-01-23, 06:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×