|
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:
- [[Category:Qt]][[Category:MeeGo Harmattan]][[Category:Lang-Chinese]]
- {{Abstract|本文介绍如何在后台静默安装deb包}}
- {{ArticleMetaData
- |sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
- |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
- |devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
- |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
- |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: [[User:username]] -->
- |review-timestamp=<!-- After re-review: YYYYMMDD -->
- |update-by=<!-- After significant update: [[User:username]]-->
- |update-timestamp=<!-- After significant update: YYYYMMDD -->
- |creationdate= <!-- Format YYYYMMDD -->
- |author= <!-- Display as link [[User:username]] -->
- }}
- == 介绍 ==
- 程序有升级版本后,将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>
- == 示例 ==
- *[[media:SilentInstall.zip‎]]
- == 相关链接 ==
- *[[Meego开发]]<br>
- *[[Qt Mobility 开发]]<br>
- *[[Qt Quick (Chinese)]]<br>
复制代码 |
|