(→Add Qt Simulator target) |
|||
| (17 intermediate revisions not shown) | |||
| Line 4: | Line 4: | ||
[[Category:application-developer]] | [[Category:application-developer]] | ||
[[Category:windows]] | [[Category:windows]] | ||
| + | |||
| + | '''This page is depreciated. The recent page can be found at http://wiki.meego.com/SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Windows. | ||
'''Note: MeeGo 1.2 SDK has not been released yet. This page contains instructions for downloading and installing the preview version. ''' | '''Note: MeeGo 1.2 SDK has not been released yet. This page contains instructions for downloading and installing the preview version. ''' | ||
| Line 24: | Line 26: | ||
* '''QEMU runtimes and targets''': The following pre-defined targets and runtimes are the only ones which have been verified on Windows: | * '''QEMU runtimes and targets''': The following pre-defined targets and runtimes are the only ones which have been verified on Windows: | ||
** Targets: | ** Targets: | ||
| - | *** meego-handset-ia32-1.1.2 | + | *** meego-handset-ia32-1.1.2-4.7.1 |
| - | *** meego-netbook-ia32-1.1.2 | + | *** meego-netbook-ia32-1.1.2-4.7.1 |
*** meego-core-armv7l-1.1.2 | *** meego-core-armv7l-1.1.2 | ||
** Runtimes: | ** Runtimes: | ||
| Line 65: | Line 67: | ||
<li>''Version name:'' '''meego-handset'''</li> | <li>''Version name:'' '''meego-handset'''</li> | ||
<li>''qmake location:'' '''<MEEGO_SDK>\MADDE\targets\<target name>\bin\qmake.exe'''<br/> | <li>''qmake location:'' '''<MEEGO_SDK>\MADDE\targets\<target name>\bin\qmake.exe'''<br/> | ||
| - | Replace <MEEGO_SDK> with the directory where you installed MeeGo SDK; the default is <code>C:\MeeGoSDK_1. | + | Replace <MEEGO_SDK> with the directory where you installed MeeGo SDK; the default is <code>C:\MeeGoSDK_1.2</code>; replace <target_name> with the name of the target (for example, '''meego-handset-ia32-w32-1.1''').</li> |
<li>Once added, select the new entry and click on the ''Rebuild'' button (bottom right) to build the debugging helper for this Qt version. This enables you to use debugging from Qt Creator.</li> | <li>Once added, select the new entry and click on the ''Rebuild'' button (bottom right) to build the debugging helper for this Qt version. This enables you to use debugging from Qt Creator.</li> | ||
</ul> | </ul> | ||
| Line 188: | Line 190: | ||
<li> Launch terminal inside the device, and run command "xhost +" in it. </li> | <li> Launch terminal inside the device, and run command "xhost +" in it. </li> | ||
<li> Click "Run" or "Debug" on the lower left corner of Qt Creator to run or debug your application on the configured Device.</li> | <li> Click "Run" or "Debug" on the lower left corner of Qt Creator to run or debug your application on the configured Device.</li> | ||
| + | </ol> | ||
| + | * '''Note: If the image of an earlier version prior to 1.2 is used, the mad-developer should be installed on device manually before the application is deployed. The following two approaches are alternative.''' | ||
| + | <ol> | ||
| + | <li> Download the repo file from http://download.meego.com/live/Trunk/standard/Trunk.repo to /etc/zypp/repos.d. Then install mad-developer</li> | ||
| + | sudo zypper ref | ||
| + | sudo zypper install utfs-client | ||
| + | sudo zypper install mad-developer | ||
| + | <li> Download the rpm package from http://download.meego.com/live/Trunk/standard/i586/mad-developer-2.0-4.2.i586.rpm (OR http://download.meego.com/live/Trunk/standard/armv7l/mad-developer-2.0-4.4.armv7l.rpm for arm.). Then install rpm package.</li> | ||
| + | rpm -i mad-developer-2.0-4.2.i586.rpm | ||
</ol> | </ol> | ||
=== Build an app for Qt Simulator, and run it with Qt Simulator=== | === Build an app for Qt Simulator, and run it with Qt Simulator=== | ||
* '''Note: MTF apps cannot be built with simulator currently, while Qt apps can be built.''' | * '''Note: MTF apps cannot be built with simulator currently, while Qt apps can be built.''' | ||
| - | * Microsoft C++ Compiler is required to build apps for Qt Simulator. | + | * Microsoft C++ Compiler is required to build apps for Qt Simulator. To meet this requirement, you can install one of the following software: |
| + | ** Microsoft Visio C++ 2008 Express Edition (http://www.microsoft.com/express/Downloads/#2008-Visual-CPP). | ||
| + | ** Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en). This is for Windows 7 only. | ||
| + | [[File:Untitled2.png|600px]] | ||
==== Add Qt Simulator target ==== | ==== Add Qt Simulator target ==== | ||
| Line 198: | Line 212: | ||
* Go to Tools->Options->Qt4->Qt Versions | * Go to Tools->Options->Qt4->Qt Versions | ||
* Click the "+" to add a new "Qt Version" | * Click the "+" to add a new "Qt Version" | ||
| - | * In "Version name", provide a name. | + | * In "Version name", provide a name, e.g, "Simulator - MSVC". |
| - | * In "qmake | + | * In "qmake location:", browse and select qmake location: ''<MEEGO_SDK>\Simulator\Qt\msvc2008\bin\qmake.exe''. Replace <MEEGO_SDK> with the directory where you installed MeeGo SDK; the default is C:\MeeGoSDK_1.2. |
| + | * In "Toolchain:", browse and select "Microsoft Visual C++ Compilers 9.0 (x86)" if you installed "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1", or select "Microsoft Visual C++ Compilers 8.0 (x86)" if you installed "Microsoft Visio C++ 2008 Express Edition". | ||
* Build | * Build | ||
| - | * To use the simulator, please refer to http://doc.qt.nokia.com/qtsimulator-1.1/simulator-starting.html for more information. | + | * To use the simulator, please refer to http://doc.qt.nokia.com/qtsimulator-1.1/simulator-starting.html for more information. If the simulator cannot be load automatically from Qt Creator, you can launch it once manually by double clicking the icon of "<MEEGO_SDK>\Simulator\Application\simulator.exe" in Explorer. |
| + | An alternative approach to add a new "Qt Version" is to use libraries of MinGW. Note, the component "''Simulator Qt 4.7.2 - MinGW 4.4''" should be installed firstly when installation or maintenance. | ||
| + | * In "Version name", provide a name, e.g, "Simulator - MinGW". | ||
| + | * In "qmake location:", browse and select qmake location: ''<MEEGO_SDK>\Simulator\Qt\mingw\bin\qmake.exe''. | ||
| + | * In "MinGW directory:", browse and select ''<MEEGO_SDK>\mingw'' if you installed the component of "''Miscellaneous\MinGW''". | ||
| + | * If debug is needed furthermore, in Options->Debugger->Gdb, Click the "+" to add a new GDB tool. Browse and select gdb tool: ''<MEEGO_SDK>\mingw\bin\gdb.exe'' and then check "MinGW" option. | ||
==== Install Debugging Tools for Windows==== | ==== Install Debugging Tools for Windows==== | ||
This page is depreciated. The recent page can be found at http://wiki.meego.com/SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Windows.
Note: MeeGo 1.2 SDK has not been released yet. This page contains instructions for downloading and installing the preview version.
This page describes how to install and configure the MeeGo 1.2 SDK on your Windows development system. For more information about MeeGo SDK for Windows, check SDK/MeeGo_SDK_for_Windows.
Contents |
| File | Description | Size |
|---|---|---|
| http://download3.meego.com/MeeGoSDK/1.2/meego-1.2-sdk-offline-installer-0127.exe | MeeGo SDK Windows installer | ~400MB |
.exe file and follow the prompts to install the SDK.C:\MeeGoSDK_1.2; replace <target_name> with the name of the target (for example, meego-handset-ia32-w32-1.1).Go to the menu: File -> New File or Project -> Qt Application Project -> Meego Touch Framework Application.
In "Project setup" dialog, choose "meego-handset".
"Shadow build” should be disabled before build an app. To do that, select “Projects” button in the left side of Qt Creator, and uncheck “Shadow build” in “Build Settings”.
Notice: The kqemu could only be used on 32-bit Windows. 64-bit Windows could not work with kqemu. You can not use emulator on 64-bit Windows. Use real device instead.
Download package from http://wiki.qemu.org/download/kqemu-1.4.0pre1.tar.gz
Get the kqemu.inf and kqemu.sys files from above package
For Windows XP system, right click the kqemu.inf file and select "install".
For Windows 7 or Windows Vista system, edit the kqemu.inf file to do below changes, and then right click the kqemu.inf, select "install".
[DefaultInstall.NT] --> [DefaultInstall] [DefaultInstall.NT.Services] --> [DefaultInstall.Services] [Uninstall.NT] --> [Uninstall] [Uninstall.NT.Services] --> [Uninstall.Services]
Start the kqemu manually. Select Start > All Programs > Accessories, click right mouse button over Command Prompt, and select "Run as administrator". In Command Prompt, run the following command:
net start kqemu
You need to start kqemu again after you reboot the system.
Get to the menu: Tools -> Options -> Projects -> MeeGo Device Configurations. Click "Add" button to add a runtime for emulator. Set "Device type" to "MeeGo emulator"; set "Authentication type" to "Password"; set "Username" to "root"; set "Password" to "meego".
Click "Projects" again on the left side. Select "Run" in the MeeGo Build/Run box at the top. Make sure that the "Device configuration" is set to "MeeGo Emulator". This will ensure that QEMU is started when you run your application. You can now launch the QEMU MeeGo emulator. Click the "Start Meego emulator" icon near the bottom left corner of Qt Creator (circled in red in the screenshot below).
Note: You can also start the Qemu from MADDE terminal. For that you need to go to Start->Programs->MeeGoSDK->MADDE Terminal. In the terminal type:
mad list
to see the runtime and target names, and then type:
mad remote -r <runtime> poweron
After QEMU starts, click the "Run" icon to run your application. Qt Creator will package and deploy your application to QEMU and start it on the target. You can see the window of your application in QEMU.
You can also debug the application by clicking the "Debug" icon. Setting breakpoints and stepping are the same as local applications.
Anytime MeeGo is running in QEMU, you can use SSH to connect to the image from another terminal on the host system.
$ ssh meego@127.0.0.1 -p 6666
Two user accounts are available in the MeeGo images:
User: meego Password: meego
User: root Password: meego
sleep 5 # new added line shopt -s execfail
rm -rf /etc/ssh/*key*
The QEMU images for SDK on Linux could be built from the kick start file by using mic-image-creator tool (command to run the mic-image-creator could be found in each ks file). Ideally the images are host platform independent. However, due to the booting time and some other issues with kqemu, minor changes were done on the images obtained from ks file so that they could boot up successfully on Windows. Suppose you have had a raw image, say abc.raw, built from kick start file in hand, below are the changes needed:
1, mount into the image
sudo mount -o loop,offset=512 abc.raw /mnt
2, edit /mnt/usr/sbin/meego-dm to add "sleep 5" to solve bug #10412: mouse udev not ready before starting X server while running handset image on QEMU windows
sleep 5 # new added line shopt -s execfail
3, edit /mnt/boot/extlinux/extlinux.conf to add kernel option "intel_idle.max-cstate=0" to solve bug #10149: Home screen can't show up after starting emulator from Qt Creator on Windows7 32bit
append ro root=/dev/sda1 vga=current intel_idle.max-cstate=0 quiet
4, unmount the image
sudo umount /mnt
sudo zypper ref sudo zypper install utfs-client sudo zypper install mad-developer
rpm -i mad-developer-2.0-4.2.i586.rpm
An alternative approach to add a new "Qt Version" is to use libraries of MinGW. Note, the component "Simulator Qt 4.7.2 - MinGW 4.4" should be installed firstly when installation or maintenance.
You need to install Debugging Tools for Windows for debugging apps with simulator.
Please refer to SDK/Docs/1.1/Troubleshooting.