流星悟语 发表于 2014-2-1 12:09:32

View source for 如何在Meego上静默安装deb包

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in one of the groups: Users, techwriter.

You can view and copy the source of this page:

[][][]
{{Abstract|本文介绍如何在后台静默安装deb包}}


{{ArticleMetaData
|sourcecode= <!-- Link to example source code e.g. [] -->
|installfile= <!-- Link to installation file (e.g. []) -->
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
|sdk= <!-- SDK(s) built and tested against (e.g. ) -->
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
|signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
|capabilities=<!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
|id= <!-- Article Id (Knowledge base articles only) -->
|language=<!-- Language category code for non-English topics - e.g. Lang-Chinese -->
|review-by=<!-- After re-review: [] -->
|review-timestamp=<!-- After re-review: YYYYMMDD -->
|update-by=<!-- After significant update: []-->
|update-timestamp=<!-- After significant update: YYYYMMDD -->
|creationdate= <!-- Format YYYYMMDD -->
|author= <!-- Display as link [] -->
}}

== 介绍 ==

程序有升级版本后,将deb包下载到本地目录,然后可以通过以下方法调用meego命令:

<code>
pkgmgr install-file –f /home/user/MyDocs/my_0_0_1_armel.deb
</code>

== 操作==
通过 QProcess 可以调用上面的代码

<code>
    QProcess p;
    p.start( QString("pkgmgr"),QStringList() <<"install-file" <<"-f"<<"/home/user/MyDocs/i18nmeego_0_0_1_armel.deb");

    p.waitForFinished();
    qDebug() << "DPKG OUTPUT:" << p.exitCode() << p.errorString() << p.readAllStandardError() << p.readAllStandardOutput();
</code>

== 示例 ==
*[]

== 相关链接 ==
*[]<br>
*[]<br>
*[]<br>

ixmqip19 发表于 2014-2-1 12:10:22


页: [1]
查看完整版本: View source for 如何在Meego上静默安装deb包