Editing Developer FAQ
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This is a list of frequently asked questions related to developing applications for the Maemo platform or working on the platform itself. This is in constant evolution, and new questions and answers are welcome. | This is a list of frequently asked questions related to developing applications for the Maemo platform or working on the platform itself. This is in constant evolution, and new questions and answers are welcome. | ||
- | + | === What can I do if my question is not mentioned here? === | |
- | + | ||
- | == What can I do if my question is not mentioned here? == | + | |
# Look if it is discussed already in one of the mailing lists or in [http://talk.maemo.org talk.maemo.org] | # Look if it is discussed already in one of the mailing lists or in [http://talk.maemo.org talk.maemo.org] | ||
# If not post your question in the developer mailing list or in talk | # If not post your question in the developer mailing list or in talk | ||
# If you find the answer and you think it could be interesting for others as well post it here, so that we just have to point on this page in the future if the question pops up again. | # If you find the answer and you think it could be interesting for others as well post it here, so that we just have to point on this page in the future if the question pops up again. | ||
+ | |||
== Maemo SDK and Scratchbox == | == Maemo SDK and Scratchbox == | ||
Line 33: | Line 32: | ||
Enter the following lines in the Scratchbox: | Enter the following lines in the Scratchbox: | ||
- | eval $(dbus-launch --sh-syntax) | + | X86: ~] > eval $(dbus-launch --sh-syntax) |
- | export | + | X86: ~] > export BUS_SESSION_BUS_ADDRESS |
- | export DBUS_SESSION_BUS_PID | + | X86: ~] > export DBUS_SESSION_BUS_PID |
Then run the dbus-monitor command and it should work fine! | Then run the dbus-monitor command and it should work fine! | ||
Line 42: | Line 41: | ||
'''Error messages''' | '''Error messages''' | ||
- | + | [config/dbus] couldn't take over org.x.config: org.freedesktop.DBus.Error.AccessDenied (Connection ":1.310" is not allowed to own the service "org.x.config.display2" due to security policies in the configuration file) | |
'''Solution''' | '''Solution''' | ||
Line 48: | Line 47: | ||
You need to edit the following file: | You need to edit the following file: | ||
- | + | /etc/dbus-1/system.d/xorg-server.conf | |
- | Add the following three lines in the " | + | Add the following three lines in the "<policy context="default"> group |
- | + | <allow own="org.x.config.display2"/> | |
- | <allow own="org.x.config.display2"/> | + | <allow send_destination="org.x.config.display2"/> |
- | <allow send_destination="org.x.config.display2"/> | + | <allow send_interface="org.x.config.display2"/> |
- | <allow send_interface="org.x.config.display2"/ | + | |
- | + | ||
- | Basically you should have one for each display you plan on using, by default display 0 and display 1 are in the file. If you are planning on using a different display number for Xephyr than :2 make sure you use its number rather than "display2" when you add these lines. | + | Basically you should have one for each display you plan on using, by default display 0 and display 1 are in the file. If you are planning on using a different display number for Xephyr than :2 make sure you use its number rather than "display2" when you add these lines. |
=== How can I avoid "qemu" error messages of "af-sb-init start" in ARMEL target? === | === How can I avoid "qemu" error messages of "af-sb-init start" in ARMEL target? === | ||
Line 79: | Line 76: | ||
The ARMEL target should not be used for application testing and just for cross compiling. The target is not meant to support this. Please use for any other use than cross-compiling the X86 target. | The ARMEL target should not be used for application testing and just for cross compiling. The target is not meant to support this. Please use for any other use than cross-compiling the X86 target. | ||
+ | |||
+ | |||
+ | |||
=== Why do I get "command not found" even though I follow the instructions in the documentation? === | === Why do I get "command not found" even though I follow the instructions in the documentation? === | ||
+ | |||
'''Error messages''' | '''Error messages''' | ||
Line 93: | Line 94: | ||
After running the installation script you have to install some closed-source packages to have a full installation of the SDK. Most likely these are not installed. Have a look [http://maemo.org/development/sdks/maemo_5_beta_2_sdk_installation/#32bitinstall here] - the last point under installation instructions - how to do that. | After running the installation script you have to install some closed-source packages to have a full installation of the SDK. Most likely these are not installed. Have a look [http://maemo.org/development/sdks/maemo_5_beta_2_sdk_installation/#32bitinstall here] - the last point under installation instructions - how to do that. | ||
- | |||
+ | |||
+ | |||
+ | === How to resolve "Scratchbox devkit debian-etch not found" issue? === | ||
Sometimes while running the install-script of the SDK this error occurs and produces a message like the following: | Sometimes while running the install-script of the SDK this error occurs and produces a message like the following: | ||
+ | |||
'''Error messages''' | '''Error messages''' | ||
Line 102: | Line 106: | ||
E: Please complete scratchbox installation first. | E: Please complete scratchbox installation first. | ||
E: Specify an alternative installation path using '-s PATH' option. | E: Specify an alternative installation path using '-s PATH' option. | ||
+ | |||
'''Solution''' | '''Solution''' | ||
The problem can be resolved like this (with thanks to Frank Banul in the developer list): | The problem can be resolved like this (with thanks to Frank Banul in the developer list): | ||
- | + | 1) add "deb http://scratchbox.org/debian/ maemo5-sdk main" to /etc/apt/sources.list | |
- | + | ||
- | add | + | 2) run: |
- | + | sudo apt-get remove scratchbox-devkit-debian | |
- | + | sudo apt-get install scratchbox-devkit-debian | |
- | run: | + | sudo apt-get remove scratchbox-devkit-perl |
- | + | sudo apt-get install scratchbox-devkit-perl | |
- | sudo apt-get remove scratchbox-devkit-debian | + | |
- | sudo apt-get install scratchbox-devkit-debian | + | |
- | sudo apt-get remove scratchbox-devkit-perl | + | |
- | sudo apt-get install scratchbox-devkit-perl | + | |
- | + | ||
- | + | ||
- | + | ||
- | |||
+ | |||
+ | |||
+ | === Why can I reach an IP-address but no domain inside Scratchbox? === | ||
In some cases this happens because of the following reasons: | In some cases this happens because of the following reasons: | ||
# Network configuration changed on the host-system, after Scratchbox was installed | # Network configuration changed on the host-system, after Scratchbox was installed | ||
Line 128: | Line 128: | ||
#* Manual installation of SDK was not complete | #* Manual installation of SDK was not complete | ||
#* The target was reset | #* The target was reset | ||
+ | |||
+ | |||
'''Error messages''' | '''Error messages''' | ||
Depends on the program, which is used. But here a small test client in python: | Depends on the program, which is used. But here a small test client in python: | ||
- | + | ||
- | import urllib2 | + | import urllib2 |
- | print urllib2.urlopen("http://google.com").read() | + | print urllib2.urlopen("http://google.com").read() |
- | + | ||
Then the following error message will be returned: | Then the following error message will be returned: | ||
urllib2.URLError: <urlopen error (-3, 'Temporary failure in name resolution')> | urllib2.URLError: <urlopen error (-3, 'Temporary failure in name resolution')> | ||
+ | |||
+ | |||
'''Solution''' | '''Solution''' | ||
Line 154: | Line 157: | ||
SBOX> sb-conf in -edFL | SBOX> sb-conf in -edFL | ||
- | This sets the | + | This sets the /scratchbox/etc/resolv.conf as default and ignores the one of the scratchbox. Info about the command you'll find [http://maemo.org/development/sdks/maemo_5_beta_2_sdk_installation/#manualinstall here]. |
These steps should solve the problem. If it still does not work, you could try to replace the entries of the resolv.conf '''within''' the scratchbox with the same entries of the resolv.conf of the '''host''' system by hand. | These steps should solve the problem. If it still does not work, you could try to replace the entries of the resolv.conf '''within''' the scratchbox with the same entries of the resolv.conf of the '''host''' system by hand. | ||
- | + | = Script "af-sb-init.sh start" aborting = | |
- | + | ||
Sometimes it happens, that the script aborts just after starting. A problem might be, that old processes are still active, and cause the error. Indicator that this might be the reason are the following lines after the startup: | Sometimes it happens, that the script aborts just after starting. A problem might be, that old processes are still active, and cause the error. Indicator that this might be the reason are the following lines after the startup: | ||
Line 172: | Line 174: | ||
... | ... | ||
aborting... | aborting... | ||
+ | |||
This shows, that old processes are still running, which might cause problems in starting up the framework again. | This shows, that old processes are still running, which might cause problems in starting up the framework again. | ||
+ | |||
''' Solution ''' | ''' Solution ''' | ||
Line 179: | Line 183: | ||
To solve this stop the framework, kill all old processes and start it again. This can be done by: | To solve this stop the framework, kill all old processes and start it again. This can be done by: | ||
- | + | * stop the framework: | |
- | + | ~] > af-sb-init.sh stop | |
- | + | ||
+ | * kill old processes: | ||
+ | ~] > sb-conf killall | ||
+ | |||
+ | * restart: | ||
+ | ~] > af-sb-init.sh start | ||
+ | |||
=== How to install the SDK+ on a Linux AMD64 platform? === | === How to install the SDK+ on a Linux AMD64 platform? === | ||
- | |||
The Maemo SDK+ package includes scratchbox 2 and Qt, but it will only install on 32-bit platforms. If you're running Debian with a 64-bit kernel, Maemo SDK+ can be installed into a chrooted 32-bit environment that sits on top of your 64-bit platform. | The Maemo SDK+ package includes scratchbox 2 and Qt, but it will only install on 32-bit platforms. If you're running Debian with a 64-bit kernel, Maemo SDK+ can be installed into a chrooted 32-bit environment that sits on top of your 64-bit platform. | ||
Line 190: | Line 199: | ||
[[Maemo_SDK%2B_installation_on_Debian_(AMD64)|This guide]] takes you through all the steps to the point of compilation and running the test. | [[Maemo_SDK%2B_installation_on_Debian_(AMD64)|This guide]] takes you through all the steps to the point of compilation and running the test. | ||
+ | |||
+ | |||
=== QEMU error running cmake in ARMEL target in Fremantle? === | === QEMU error running cmake in ARMEL target in Fremantle? === | ||
Line 196: | Line 207: | ||
qemu: uncaught target signal 11 (Segmentation fault) - core dumped | qemu: uncaught target signal 11 (Segmentation fault) - core dumped | ||
make: *** [cmake_check_build_system] Error 126 | make: *** [cmake_check_build_system] Error 126 | ||
+ | |||
''' Solution ''' | ''' Solution ''' | ||
Check the version of cmake. Using version 2.6.3-2maemo4+0m5 should solve the problem. | Check the version of cmake. Using version 2.6.3-2maemo4+0m5 should solve the problem. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
== Porting to Fremantle == | == Porting to Fremantle == | ||
- | |||
- | This section is intended to consolidate the common errors that occur while trying to port | + | This section is intended to consolidate the common errors that occur while trying to port Diablo applications to Fremantle. Feel free to improve this page and/or add additional information. |
===maemo-select-menu-location: command not found=== | ===maemo-select-menu-location: command not found=== | ||
Line 232: | Line 226: | ||
dpkg: error processing leafpad (--configure): subprocess post-installation script returned error exit status 127 | dpkg: error processing leafpad (--configure): subprocess post-installation script returned error exit status 127 | ||
- | '''Reason''' | + | '''Reason''' |
- | + | ||
+ | maemo-select-menu-location is obsolete. | ||
+ | In Fremantle, there is no submenu like, "Utility", "Extra", "Settings" etc. All installed 3rd party software will be visible under "Applications" by default. | ||
'''Action''' | '''Action''' | ||
- | + | Remove the instance from the post installation script. It is not needed. | |
- | |||
+ | ===Missing dependency: maemo-installer-utils=== | ||
'''Reason''' | '''Reason''' | ||
- | + | ||
+ | The package hildon-application-manager no longer "provides" ''maemo-installer-utils''. The commands ''maemo-confirm-text'', ''maemo-application-running'', ''maemo-list-user-packages'' are still available. | ||
'''Action''' | '''Action''' | ||
- | |||
- | + | Replace the dependency with hildon-application-manager. | |
+ | |||
+ | ===Missing dependency: libhildonhelp0=== | ||
'''Reason''' | '''Reason''' | ||
- | + | ||
+ | libhildonhelp is dropped. | ||
'''Action''' | '''Action''' | ||
- | |||
- | + | Remove the dependency and calls to the help APIs. | |
- | Unlike Diablo | + | |
+ | ===Limitation of Home Area applets=== | ||
+ | Unlike Diablo in Fremantle these applets don't support text input, pannable areas, resizing nor scrolling. | ||
'''Reason''' | '''Reason''' | ||
- | + | ||
+ | Framework limitations. | ||
'''Action''' | '''Action''' | ||
- | |||
- | + | Replace text input fields with dialogs. Use buttons for scrolling. Add resizing options in the settings dialog or adapt the UI of the applet regarding to that. For further information on how to develop those applets, please check the [http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets documentation]. | |
+ | |||
+ | ===What icon size should be used?=== | ||
With Fremantle the size specifications of the icons are different from Diablo: | With Fremantle the size specifications of the icons are different from Diablo: | ||
'''Application Manager''' | '''Application Manager''' | ||
- | * Icon size: | + | * Icon size: HILDON_ICON_SIZE_FINGER. |
* In Gimp or Photoshop: 48x48 pixels | * In Gimp or Photoshop: 48x48 pixels | ||
'''Task Launcher''' | '''Task Launcher''' | ||
- | * Icon size: | + | * Icon size: HILDON_ICON_SIZE_THUMB. |
* In Gimp or Photoshop: 64x64 pixels | * In Gimp or Photoshop: 64x64 pixels | ||
+ | |||
Using icons for the task launcher, please remember to run the following in your postinst file: | Using icons for the task launcher, please remember to run the following in your postinst file: | ||
Line 283: | Line 286: | ||
'''Problem''' | '''Problem''' | ||
- | + | ||
+ | The text in dialog boxes is not formatted correctly (truncated on the right size), when a icon is in place. | ||
'''Action''' | '''Action''' | ||
- | + | ||
+ | In general icons should not be used in dialogs in Fremantle. Remove the icon and the text will be formatted correctly. | ||
===Initialisation scripts=== | ===Initialisation scripts=== | ||
'''Problem''' | '''Problem''' | ||
- | + | ||
+ | Initialisation scripts don't work any more. | ||
'''Reason''' | '''Reason''' | ||
- | |||
- | + | Fremantle has switched to using '''upstart''' for system initialisation. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
'''Action''' | '''Action''' | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | + | Create '''upstart''' job definitions instead of init scripts. Information on writing these can be found on http://upstart.ubuntu.com/getting-started.html. However, be aware that the directory used on Maemo 5 is ''/etc/event.d''. | |
- | + | The job script should be placed in /etc/event,d/''package''. And the package postinst, prerm and postrm should use the ''start --quiet'' and ''stop --quiet'' commands to start and stop the service. Unfortunately there is no debhelper tool to assist with this. | |
== Autobuilder == | == Autobuilder == | ||
Line 330: | Line 313: | ||
=== Localization isn't working === | === Localization isn't working === | ||
- | You are probably using the | + | You are probably using the followin line in configure.ac: |
localedir=`$PKG_CONFIG osso-af-settings --variable=localedir` | localedir=`$PKG_CONFIG osso-af-settings --variable=localedir` | ||
- | This means that you need to add | + | This means that you need to add osso-af-settings to your Build-Depends. |
=== Package gets rejected: REJECTED: The same or newer version is already in extras-devel === | === Package gets rejected: REJECTED: The same or newer version is already in extras-devel === | ||
Line 342: | Line 325: | ||
=== Build failed: No such file or directory in log file === | === Build failed: No such file or directory in log file === | ||
- | You probably forgot to specify the correct Build-Depends in | + | You probably forgot to specify the correct Build-Depends in debian/control. The autobuilder starts every build with a clean SDK image. If you need any application during building which is not available in the default SDK image, you need to specify it specifically. |
You may verify that your Build-Depends field in debian/control is complete by running | You may verify that your Build-Depends field in debian/control is complete by running | ||
Line 348: | Line 331: | ||
dpkg-depcheck -m dpkg-buildpackage -rfakeroot -b | dpkg-depcheck -m dpkg-buildpackage -rfakeroot -b | ||
- | in the source tree. (You'll need to | + | in the source tree. (You'll need to <code>fakeroot apt-get install devscripts</code> for this to work). |
=== Build failed, works in my own scratchbox === | === Build failed, works in my own scratchbox === | ||
Line 355: | Line 338: | ||
== Extras == | == Extras == | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
=== How do I request upload rights for Extras === | === How do I request upload rights for Extras === | ||
Line 368: | Line 343: | ||
You can [https://garage.maemo.org/extras-assistant/index.php?target=invitation_request request an invitation] via the Extras Assistant. | You can [https://garage.maemo.org/extras-assistant/index.php?target=invitation_request request an invitation] via the Extras Assistant. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
[[Category:Development]] | [[Category:Development]] | ||
[[Category:Scratchbox]] | [[Category:Scratchbox]] | ||
[[Category:Fremantle]] | [[Category:Fremantle]] |
Learn more about Contributing to the wiki.