×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Regular Contributor
    Join Date
    Jun 2010
    Posts
    73

    Exclamation How to set App Icon (to be shown in App Menu on Maemo)

    Hi
    I am struggling since 5 hours on trying to set an icon for my app. The icon should show up in the app menu on the N900. I am just not able to figure out in which file I can set it.

    Thanks for any help, Luki

  2. #2
    Registered User
    Join Date
    Sep 2007
    Location
    Belarus, Minsk
    Posts
    15

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    Quote Originally Posted by lukiluuk View Post
    Hi
    I am struggling since 5 hours on trying to set an icon for my app. The icon should show up in the app menu on the N900. I am just not able to figure out in which file I can set it.

    Thanks for any help, Luki
    Hello Luki.
    You need to prepare png icon with 48x48 dimentions.
    It should be placed in /usr/share/icons/hicolor/48x48/apps/ folder on device.
    Then also <appname>.desktop file should be prepared with similar content:

    [Desktop Entry]
    Encoding=UTF-8
    Version=0.1
    Type=Application
    Name=Fifteen
    Exec=/usr/bin/fifteen
    Icon=fifteen
    X-Window-Icon=fifteen
    X-Window-Icon-Dimmed=fifteen
    X-Osso-Service=com.companyname.games.fifteen
    X-Osso-Type=application/x-executable


    and placed into /usr/share/applications/hildon folder on device.

    After .deb file installation maybe restart of device is needed to update icons cache.

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

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    Also take into account this bug causing need to reboot device to see an actual icon
    https://bugs.maemo.org/show_bug.cgi?id=6931

  4. #4
    Regular Contributor
    Join Date
    Jun 2010
    Posts
    73

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    Hey Guys
    You are great. Now I see a nice logo. But I wasn't able to put the logo in the /usr/share/icons/hicolor/48x48/apps/ directory automatically, but had to copy it there by hand. How to do this automatically during install of the package? And another nasty problem I do have. I am not able to change the version number of my .deb package. The package always has the name <appname_0.1_armel.deb>. Where do I set the app version? If I set it in the .pro file, it has no effect on the package name..

    Thanks and cheers, Luki

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

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    Package version can be modified with dch utility or manually by editing debian/changelog. All files placed into Debian package are installed automatically.
    Check a sample package
    http://wiki.forum.nokia.com/index.ph...mple-0.0.1.zip
    or consult a wiki article
    http://wiki.maemo.org/Packaging_a_Qt_application

  6. #6
    Registered User
    Join Date
    Aug 2010
    Posts
    14

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    Hi guys,

    well i have a little different problem... ^^
    I can see the icon on the menu but the application are not launched when i click on it so i think it is a problem from my target variable on the .pro and the EXEC= in the .desktop but i can't find the solution...

    here is my .pro
    Code:
    QT       += core gui
    
    TARGET = locationApp
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
            pti.cpp
    
    HEADERS  += pti.h
    
    FORMS    += pti.ui
    
    CONFIG += mobility
    MOBILITY = 
    
    CONFIG += link_pkgconfig
    PKGCONFIG += glib-2.0 liblocation hildon-1
    
    INCPT = C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-1030-slim\usr\include
    
    LIBS +=  C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-1030-slim\usr\lib\liblocation.so
    INCLUDEPATH += $$INCPT\glib-2.0
    INCLUDEPATH += $$INCPT\glib-2.0\gio
    INCLUDEPATH += $$INCPT\glib-2.0\glib
    INCLUDEPATH += $$INCPT\glib-2.0\gobject
    INCLUDEPATH += C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-1030-slim\usr\lib\glib-2.0\include\
    
    INSTALLS    += target
    target.path  = /opt/usr/bin/
    
    INSTALLS    += desktop
    desktop.path  = /usr/share/applications/hildon
    desktop.files  = data/locationapp.desktop
    
    INSTALLS    += icon48
    icon64.path  = /usr/share/icons/hicolor/48x48/apps
    icon64.files  = data/48x48/locationapp.png
    
    
    INSTALLS    += icon64
    icon64.path  = /usr/share/icons/hicolor/64x64/apps
    icon64.files  = data/64x64/locationapp.png
    
    #
    # Targets for debian source and binary package creation
    #
    debian-src.commands = dpkg-buildpackage -S -r -us -uc -d
    debian-bin.commands = dpkg-buildpackage -b -r -uc -d
    debian-all.depends = debian-src debian-bin
    
    #
    # Clean all but Makefile
    #
    compiler_clean.commands = -$(DEL_FILE) $(TARGET)
    
    QMAKE_EXTRA_TARGETS += debian-all debian-src debian-bin compiler_clean
    
    
    symbian {
        TARGET.UID3 = 0xe4ce97ca
        # TARGET.CAPABILITY += 
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }
    and here is my .desktop
    Code:
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Name=Location 2
    Exec=/usr/bin/locationApp
    Icon=locationapp
    X-HildonDesk-ShowInToolbar=true
    X-Window-Icon=locationapp
    X-Window-Icon-Dimmed=locationapp
    X-Osso-Type=application/x-executable
    X-Osso-Service=com.nokia.locationapp
    thx

  7. #7
    Nokia Developer Champion
    Join Date
    Sep 2007
    Location
    Bhavnagar
    Posts
    928

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    The thing is working in my case but the only difference that I find is in the one of the line in your .desktop file.

    Code:
    Exec=/usr/local/bin/testapp
    I am not it is the problem exactly but may be you can try with changing this line. Hope it will helps you.
    Jajal Mehul

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

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    In desktop file you say that your binary is /usr/bin/locationApp and in project file you place your binary to /opt/usr/bin/locationApp.

  9. #9
    Registered User
    Join Date
    Aug 2010
    Posts
    14

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    I don't know what to think... i have tried to put the same path in the .desktop and the .pro but still don't work....
    Other thing really odd when i launch the application (with the PC ) and i switch to the menu, if i click on the icon i jump to the application and when i launch it by clicking i just have the spinner and nothing then... it crash after few seconds... does anybody experience it too one time??

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

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    Please, provide updated project and desktop files.

  11. #11
    Registered User
    Join Date
    Aug 2010
    Posts
    14

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    sorry ^^

    .desktop:
    Code:
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Name=Location test
    Exec=/usr/local/bin/locationApp
    Icon=locationapp
    X-HildonDesk-ShowInToolbar=true
    X-Window-Icon=locationapp
    X-Window-Icon-Dimmed=locationapp
    X-Osso-Type=application/x-executable
    .pro:

    Code:
    QT       += core gui
    
    TARGET = locationApp
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
            pti.cpp
    
    HEADERS  += pti.h
    
    FORMS    += pti.ui
    
    CONFIG += mobility
    MOBILITY = 
    
    CONFIG += link_pkgconfig
    PKGCONFIG += glib-2.0 liblocation hildon-1
    
    INCPT = C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-1030-slim\usr\include
    
    LIBS +=  C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-1030-slim\usr\lib\liblocation.so
    INCLUDEPATH += $$INCPT\glib-2.0
    INCLUDEPATH += $$INCPT\glib-2.0\gio
    INCLUDEPATH += $$INCPT\glib-2.0\glib
    INCLUDEPATH += $$INCPT\glib-2.0\gobject
    INCLUDEPATH += C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-1030-slim\usr\lib\glib-2.0\include\
    
    INSTALLS    += target
    target.path  = /usr/local/bin/
    
    INSTALLS    += desktop
    desktop.path  = /usr/share/applications/hildon
    desktop.files  = data/locationapp.desktop
    
    INSTALLS    += icon48
    icon48.path  = /usr/share/icons/hicolor/48x48/apps
    icon48.files  = data/48x48/locationapp.png
    
    
    INSTALLS    += icon64
    icon64.path  = /usr/share/icons/hicolor/64x64/apps
    icon64.files  = data/64x64/locationapp.png
    
    #
    # Targets for debian source and binary package creation
    #
    debian-src.commands = dpkg-buildpackage -S -r -us -uc -d
    debian-bin.commands = dpkg-buildpackage -b -r -uc -d
    debian-all.depends = debian-src debian-bin
    
    #
    # Clean all but Makefile
    #
    compiler_clean.commands = -$(DEL_FILE) $(TARGET)
    
    QMAKE_EXTRA_TARGETS += debian-all debian-src debian-bin compiler_clean

  12. #12
    Registered User
    Join Date
    Aug 2010
    Posts
    14

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    Do you have like a .launch in the target path after your application installed on the device?? because while i was browsing this folder i have seen some .launch files and i have just a file (non empty) called locationApp in mine

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

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    On Maemo it's better to use /opt/usr/bin/locationApp than /usr/local/bin/locationApp.
    Please, provide and output of
    Code:
    dpkg -L your_debian_package_name
    .launch files belong to applications using maemo-launcher.
    And what happens if you start your application from the XTerm with a command
    Code:
    /usr/local/bin/locationApp

  14. #14
    Registered User
    Join Date
    Aug 2010
    Posts
    14

    Re: How to set App Icon (to be shown in App Menu on Maemo)

    well i have put the folder you said and now it seems to work but i still don't understand why it wasn't before because all the links were good... anyway thanks a lot for your advises and one more question do you think it is possible to launch 2 applications with one icon ?

Similar Threads

  1. Replies: 6
    Last Post: 2007-04-02, 11:52
  2. Replies: 0
    Last Post: 2007-03-13, 07:02
  3. Replies: 0
    Last Post: 2007-03-13, 06:44
  4. Replies: 0
    Last Post: 2007-03-13, 06:44
  5. Replies: 3
    Last Post: 2004-07-16, 04:01

Posting Permissions

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