(→Removing components) |
m (→Install MeeGo Runtime) |
||
| Line 134: | Line 134: | ||
</ol> | </ol> | ||
| - | == | + | == 安装MeeGo运行时环境 == |
| - | + | ''运行时环境''指的是在主机系统上调试应用时运行在QEMU中的MeeGo操作系统映像.如果你是在硬件设备上直接调试你的应用,那么你无需安装MeeGo运行时环境。它是一个可通过MADDE下载的.bz文件,大小约为650MB 。在你开始配置Qt Creator之前,运行时环境不会被用到。然而,鉴于下载这个文件得多花点时间,所以还是建议你在开始下面的步骤之前就开始在后台下载安装运行时环境。 | |
| - | + | 可参考 [http://wiki.meego.com/SDK/Docs/1.1/Configuring_QEMU_runtimes 下载运行时环境和使用QEMU] | |
== Configuring Qt Creator to use the MeeGo toolchain(s) == | == Configuring Qt Creator to use the MeeGo toolchain(s) == | ||
本文介绍如何在Linux系统中安装和配置MeeGo 1.1 SDK。
Contents |
/etc/apt/sources.list.d/meego-sdk.list中.deb http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/ /
$ gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A $ gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -
$ sudo apt-get update
$ apt-cache policy madde
$ cd /etc/yum.repos.d/
$ sudo wget http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
$ sudo rpm --import http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/repodata/repomd.xml.key
$ sudo yum update
$ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
$ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
$ sudo apt-get install meego-sdk
$ sudo yum install meego-sdk
$ sudo zypper install meego-sdk
只装ARM版本的:
$ sudo apt-get install meego-sdk-armv7l
$ sudo yum install meego-sdk-armv7l
$ sudo zypper install meego-sdk-armv7l
只装IA32版本的:http://wiki.meego.com/SDK/Docs/1.1/Configuring_QEMU_runtimes
$ sudo apt-get install meego-sdk-ia32
$ sudo yum install meego-sdk-ia32
$ sudo zypper install meego-sdk-ia32
所谓 目标机交叉编译环境是用于编译MeeGo程序所需要的交叉编译工具和开发库(sysroot). 下载下来后是一个很大的(大约250MB).bz2格式的文件. MADDE (MeeGo应用开发和调试环境的缩写,(background)) 是一个用于帮助下载和安装目标交叉编译环境的工具集。"mad-admin"是MADDE的一个命令行工具. 你可以安装多个目标机交叉编译环境(比如针对arm的和针对x86的)并在Qt Creator中切换它们(会在后头介绍).
-f flag instructs MADDE to download the Target tarball (bz2) first.
$ sudo mad-admin create -f <target>
If you encounter problems, check the Troubleshooting page
$ mad -t <target> pscreate -t qt-simple qthello $ cd qthello $ mad -t <target> qmake $ mad -t <target> make
Note: Running qmake will print "-unix is deprecated" This is not an error with the compilation. You can safely ignore this for now.
$ file build/qthello
运行时环境指的是在主机系统上调试应用时运行在QEMU中的MeeGo操作系统映像.如果你是在硬件设备上直接调试你的应用,那么你无需安装MeeGo运行时环境。它是一个可通过MADDE下载的.bz文件,大小约为650MB 。在你开始配置Qt Creator之前,运行时环境不会被用到。然而,鉴于下载这个文件得多花点时间,所以还是建议你在开始下面的步骤之前就开始在后台下载安装运行时环境。
可参考 下载运行时环境和使用QEMU
Start Qt Creator by selecting Applications > Programming > Qt Creator.
Configure Qt Creator to use the MeeGo toolchain(s):
usr/lib/madde/linux-i686/targets/<target>/bin/qmake.
It is also possible to use Qt Creator without a MeeGo toolchain. This option can be useful if you don't need to cross-compile your software: for example, if you are doing QML development with no use of C++.
The steps are the same as above, but the qmake location is set to the qmake installed with the meego-sdk-qt libraries. The usual location for this on Linux is:
/opt/meego/meego-sdk-qt/bin/qmake
Note: On Ubuntu 10.10, you may need to install g++ in order for this step to work. If necessary, do this:
$ sudo apt-get install g++
如果你刚刚接触MeeGo SDK,那么hello world 开发指南 是一个不错的起步教程.
该指南涵盖了如何创建一个工程,并进行打包和部署到设备上的各个方面的知识。(这里提到的设备包括真实的设备或者是QEMU运行环境中的一个虚拟设备).
觉得MeeGo SDK没什么好玩的,你可以按如下方法删除或卸载安装的内容。
要删除已安装的软件包,请运行:
$ sudo apt-get remove --purge meego-sdk-qtcreator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu meego-sdk-qt
要删除安装这些包时安装的依赖包,请运行:
$ sudo apt-get autoremove
要删除整个MADDE目录(在卸载"madde"包的时候,该目录不会被完全删除),请运行:
$ sudo rm -rf /usr/lib/madde
To remove the packages from your local repository (/var/cache/apt/archives/), run:
$ sudo apt-get clean
要删除已安装的软件包,请运行:
$ sudo yum remove meego-sdk-qt-creator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu
要删除整个MADDE目录:
$ sudo rm -rf /usr/lib/madde
要删除已安装的软件包,请运行:
$ sudo zypper remove -u meego-sdk-qt-creator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu
要删除整个MADDE目录:
$ sudo rm -rf /usr/lib/madde