Editing MADDE/QtCreator integration for linux

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:
{{MADDE}}
{{MADDE}}
 +
 +
= QtCreator and MADDE on Linux =
This is a guide on how to enable MADDE in QtCreator. This is part of the technology preview. After following this guidance you are able to build your sources within QtCreator for your device, and deploy, run and debug your applications with few mouse clicks from your Linux installation (Ubuntu was used for this tutorial).
This is a guide on how to enable MADDE in QtCreator. This is part of the technology preview. After following this guidance you are able to build your sources within QtCreator for your device, and deploy, run and debug your applications with few mouse clicks from your Linux installation (Ubuntu was used for this tutorial).
 +
Requires:
Requires:
Line 9: Line 12:
  sudo apt-get install make
  sudo apt-get install make
 +
 +
 +
 +
== Install latest QtCreator on your Linux computer ==
== Install latest QtCreator on your Linux computer ==
Line 15: Line 22:
http://qt.nokia.com/developer/qt-snapshots
http://qt.nokia.com/developer/qt-snapshots
 +
 +
 +
== Add Qt for Maemo5 ==
== Add Qt for Maemo5 ==
 +
You can change the configuration of the Qt-version in your QtCreator installation by clicking:
You can change the configuration of the Qt-version in your QtCreator installation by clicking:
Line 23: Line 34:
'''Tip:''' If you do not see any Qt version by default here, you most likely haven't installed the needed Qt libraries to compile your Qt application for your Linux environment.
'''Tip:''' If you do not see any Qt version by default here, you most likely haven't installed the needed Qt libraries to compile your Qt application for your Linux environment.
 +
In the next step you have to add the Qt version for Maemo5 to the configuration of QtCreator. It is needed to compile your sources for your Maemo device. Click on the "+" in the upper-right corner. The configuration form will ask you to enter a "Version name" and to locate "qmake". You can find it in your MADDE installation folder under:
In the next step you have to add the Qt version for Maemo5 to the configuration of QtCreator. It is needed to compile your sources for your Maemo device. Click on the "+" in the upper-right corner. The configuration form will ask you to enter a "Version name" and to locate "qmake". You can find it in your MADDE installation folder under:
 +
  <MADDE_folder>/targets/<target_name>/bin
  <MADDE_folder>/targets/<target_name>/bin
 +
For the '''standard installation''' it would be for example:
For the '''standard installation''' it would be for example:
Line 32: Line 46:
  Version name: Maemo Qt4.5
  Version name: Maemo Qt4.5
  qmake Location: /home/<username>/.madde/0.6.14/targets/fremantle-qt-0951/bin/qmake
  qmake Location: /home/<username>/.madde/0.6.14/targets/fremantle-qt-0951/bin/qmake
 +
 +
'''Tip:''' You cannot find the folder if you click on "Choose...", as it is hidden. But after entering "/home/<username>/.madde/" in the text-field "qmake Location" you can select the rest via the "Choose..." button.
'''Tip:''' You cannot find the folder if you click on "Choose...", as it is hidden. But after entering "/home/<username>/.madde/" in the text-field "qmake Location" you can select the rest via the "Choose..." button.
[[Image:01_linux_qtcreator_add_qmake.png|300px]]  [[Image:02_linux_qtcreator_select_qmake.png|300px]]
[[Image:01_linux_qtcreator_add_qmake.png|300px]]  [[Image:02_linux_qtcreator_select_qmake.png|300px]]
 +
Now you will see Qt for Maemo as a new Qt Version in Qt Creator. But first you will see the red cross next to the Qt Version in the column "Debugging Helper". The last step you have to do now is clicking on "Rebuild" and after a while (you can follow the status in the QtCreator main window) it should look like this:
Now you will see Qt for Maemo as a new Qt Version in Qt Creator. But first you will see the red cross next to the Qt Version in the column "Debugging Helper". The last step you have to do now is clicking on "Rebuild" and after a while (you can follow the status in the QtCreator main window) it should look like this:
Line 47: Line 64:
* what to install on device, and
* what to install on device, and
* how to set-up your Linux machine
* how to set-up your Linux machine
 +
 +
 +
=== General device set-up ===
=== General device set-up ===
Line 53: Line 73:
* [[MADDE/QtCreator_integration_for_windows#Install_the_client | Install the client]]
* [[MADDE/QtCreator_integration_for_windows#Install_the_client | Install the client]]
 +
 +
 +
=== Connect via USB-networking ===
=== Connect via USB-networking ===
 +
==== Device configuration ====
==== Device configuration ====
Line 61: Line 85:
* [[MADDE/QtCreator_integration_for_windows#Configure_the_client_for_USB | Configure the client for USB networking]]
* [[MADDE/QtCreator_integration_for_windows#Configure_the_client_for_USB | Configure the client for USB networking]]
 +
 +
 +
==== Linux configuration ====
==== Linux configuration ====
Line 73: Line 100:
[[Image:05_linux_network.png|400px]]
[[Image:05_linux_network.png|400px]]
 +
2. Change the method from "DHCP" to "Manual" and enter the details as shown in the screen-shot:
2. Change the method from "DHCP" to "Manual" and enter the details as shown in the screen-shot:
[[Image:06_linux_configure_usb.png|400px]]
[[Image:06_linux_configure_usb.png|400px]]
 +
After you have done this your connection should be established and the set-up ready to be used with QtCreator.
After you have done this your connection should be established and the set-up ready to be used with QtCreator.
Line 83: Line 112:
If both devices are connected to the same wireless network the configuration is a bit easier, but be aware that the IP address might not be the same all the time. This effects the set up of your QtCreator configuration.
If both devices are connected to the same wireless network the configuration is a bit easier, but be aware that the IP address might not be the same all the time. This effects the set up of your QtCreator configuration.
 +
 +
==== Device configuration ====
==== Device configuration ====
Line 89: Line 120:
[[Image:10_mac_mad-dev_wlan.png|300px]]
[[Image:10_mac_mad-dev_wlan.png|300px]]
 +
 +
==== Linux configuration ====
==== Linux configuration ====
Please just make sure, that your Linux computer and device are connected to the same network.
Please just make sure, that your Linux computer and device are connected to the same network.
 +
 +
 +
 +
 +
 +
=== QtCreator Configuration ===
=== QtCreator Configuration ===
Line 99: Line 138:
  QtCreator -> Preferences -> Qt4 -> Maemo Device Configurations
  QtCreator -> Preferences -> Qt4 -> Maemo Device Configurations
 +
First get the password from the Mad Developer application. You get it by clicking on "Developer Password" in the main view. '''Be aware''' that each time you click on the button, a new password will be created and that the password is only valid for the time it is shown in the application.  
First get the password from the Mad Developer application. You get it by clicking on "Developer Password" in the main view. '''Be aware''' that each time you click on the button, a new password will be created and that the password is only valid for the time it is shown in the application.  
[[Image:04_b_client_ready.png|300px]] [[Image:05_client_pw.png|300px]]  
[[Image:04_b_client_ready.png|300px]] [[Image:05_client_pw.png|300px]]  
 +
 +
 +
 +
====Instructions for USB-network====
====Instructions for USB-network====
Line 109: Line 153:
[[Image:07_linux_qtcreator_usb.png|300px]]
[[Image:07_linux_qtcreator_usb.png|300px]]
 +
 +
 +
====Instructions for WLAN====
====Instructions for WLAN====
Line 115: Line 162:
[[Image:08_linux_qtcreator_wlan.png|300px]]
[[Image:08_linux_qtcreator_wlan.png|300px]]
 +
 +
 +
'''Tip''' You can use your ssh key for the connection. Click on "Deploy Key ..." and select your key. If the other settings are correct the key will be automatically deployed on your device, so that you don't have to worry about the passwords anymore.
'''Tip''' You can use your ssh key for the connection. Click on "Deploy Key ..." and select your key. If the other settings are correct the key will be automatically deployed on your device, so that you don't have to worry about the passwords anymore.
 +
 +
=== Deploy SSH key ===
=== Deploy SSH key ===
If you have already created a key for other purposes you don't have to create a new one and you can ignore the description on how to create the key and just continue with the deployment of the key.  
If you have already created a key for other purposes you don't have to create a new one and you can ignore the description on how to create the key and just continue with the deployment of the key.  
 +
 +
==== Create a key ====
==== Create a key ====
Line 131: Line 185:
[[Image:09_linux_keygen.png|400px]]
[[Image:09_linux_keygen.png|400px]]
 +
 +
 +
==== Deploy the key from QtCreator ====
==== Deploy the key from QtCreator ====
Line 144: Line 201:
'''Note: ''' For these steps your device has to be connected to the PC and the password has to be valid. By clicking "Test" button, you can check if that is the case.
'''Note: ''' For these steps your device has to be connected to the PC and the password has to be valid. By clicking "Test" button, you can check if that is the case.
 +
Now you click on "Deploy..." and select the public key you have created before.  
Now you click on "Deploy..." and select the public key you have created before.  
Line 154: Line 212:
Now click on "Apply" and your QtCreator installation is set up to connect to the device via SSH key.
Now click on "Apply" and your QtCreator installation is set up to connect to the device via SSH key.
 +
 +
 +
 +
 +
== Use Maemo5 build settings ==
== Use Maemo5 build settings ==
Line 160: Line 223:
[[Image:12_linux_initial_config.png]]
[[Image:12_linux_initial_config.png]]
 +
 +
'''Tip:'''  
'''Tip:'''  
* It might be that you don't see the "Desktop" widget in your project configuration. In this case it might be that the configuration of the MADDE is not correct, or that a little bug prevents the widget from showing up. In this case click on "Dependencies" and then go back to "Build".
* It might be that you don't see the "Desktop" widget in your project configuration. In this case it might be that the configuration of the MADDE is not correct, or that a little bug prevents the widget from showing up. In this case click on "Dependencies" and then go back to "Build".
 +
 +
 +
* If you start a new project you can add the Maemo build-configuration at the beginning:
* If you start a new project you can add the Maemo build-configuration at the beginning:
:[[Image:13_linux_start_new_project.png|300px]]
:[[Image:13_linux_start_new_project.png|300px]]
 +
 +
Now press the plus in the widget, which shows, that "Desktop" is selected as default. This should open a new dialog, where you select "Maemo". After that you will find a new build-configuration. Now click in "Maemo" on "Run" and select your device, which you have configured before. In the example it was called Maemo 5.
Now press the plus in the widget, which shows, that "Desktop" is selected as default. This should open a new dialog, where you select "Maemo". After that you will find a new build-configuration. Now click in "Maemo" on "Run" and select your device, which you have configured before. In the example it was called Maemo 5.
 +
[[Image:14_linux_select_device.png]]
[[Image:14_linux_select_device.png]]
 +
 +
 +
 +
 +
Finally you can now set in the down left corner, which build configuration you want to use:
Finally you can now set in the down left corner, which build configuration you want to use:
[[Image:15_linux_select_runtime.png]]
[[Image:15_linux_select_runtime.png]]
 +
Now you can click on the run button, and your application will be automatically compiled for the Maemo device, delpoyed, and started.
Now you can click on the run button, and your application will be automatically compiled for the Maemo device, delpoyed, and started.
[[Category:Development]]
[[Category:Development]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)

Templates used on this page: