MADDE/QtCreator integration for Mac
MADDE is currently a technology preview. These instructions are liable to change as development progresses. If some of the components do not work as expected, please add your question to the MADDE talk thread and follow up the discussion. tablets-dev.nokia.com is down, see MADDE#Installation for alternatives. |
Contents |
[edit] QtCreator and MADDE on Mac OS X
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 OS X installation.
Requires:
- MADDE installed on your Mac
- If you want to compile your code natively then you have to have XCode installed on your machine
[edit] Install latest QtCreator on your Mac
You cannot use the latest official QtCreator for this. The version has to be >= 1.3.80! For these instructions the version of the 2010-03-04 is used! Find the latest build of QtCreator for Mac OS X here:
http://qt.nokia.com/developer/qt-snapshots
[edit] Add Qt for Maemo5
You can change the configuration of the Qt-version in your QtCreator installation by clicking:
QtCreator -> Preferences -> Qt4 -> Qt Versions
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 Mac.
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
For the standard installation it would be for example:
Version name: Maemo Qt4.5 qmake Location: /Users/<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 "/Users/<username>/.madde/" in the text-field "qmake Location" you can select the rest via the "Choose..." button.
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:
[edit] Configure device run-time in Qt Creator
After setting up the connection between your Mac and your device, you will be able to compile, deploy, test and debug your application with a single mouse-click. The description shows the configuration for USB-networking and WLAN and is for each divided into two parts. It shows:
- what to install on device, and
- how to set-up your Mac
[edit] General device set-up
Please find the instructions on how to set up the device runtime from here:
[edit] Connect via USB-networking
[edit] Device configuration
The following guide shows you, what to do on your device to set up the USB connection. This has to be done before you connect your device with the Mac:
[edit] Mac configuration
Connect the device with your mac, open the network configurations out of the upcoming dialog and enter the following details. Finally click on "Apply". Then the connection should be established.
Possible connection problem:
In some versions of Mac OS X < 10.5.8, the system selects the wrong interface by default, so that you won't be able to connect your device as a network component with the Mac via USB. OS X detects the N900 in those cases as a modem and not as a network device. Follow these instructions to install the necessary driver information:
http://bugcommunity.com/wiki/index.php/Start_Guide_Mac_OS_X_10.5
After installing the patch, you can connect the device and configure the network interface as shown in the screen-shot above.
[edit] Connect via WLAN
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.
[edit] Device configuration
Please open the mad-developer application. If you are connected already to the wireless network, you can find the IP address in the initial window of the application:
[edit] Mac configuration
Please just make sure, that your Mac and device are connected to the same network.
[edit] QtCreator Configuration
After the connection between your PC and the device is set up, you can configure QtCreator to deploy and run the built applications on device. You can add your device in the configuration. You will find it in:
QtCreator -> Preferences -> Projects -> 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.
[edit] Instructions for USB-network
Add the password and all the data you see in the screenshot below. Check the box, that you want to use the password as the authentication method. After that click on "test" and see if the connection can be set up.
[edit] Instructions for WLAN
If your device is using the WLAN interface, please enter the IP address you can see in the mad-developer application on device.
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.
[edit] Use Maemo5 build settings
Now all the configuration is done and you can select Maemo as a build configuration. If you have a project, which you want to compile for Maemo, then click on the project button in the menu of the left side. Now you should seen a screen, like in the screen shot below. If you have the Qt libraries installed, then you will have the "Desktop" as the default option selected.
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".
- If you start a new project you can add the Maemo build-configuration at the beginning:
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 Device". After that you will find a new build-configuration:
Now click there on "Run" and select your device, which you have configured before. In the example it was called Maemo5 Device.
Finally you can now set in the down left corner, which build configuration you want to use:
Now you can click on the run button, and your application will be automatically compiled for the Maemo device, delpoyed, and started.
- This page was last modified on 3 March 2011, at 09:50.
- This page has been accessed 29,368 times.