【问题标题】:Reducing the size of a playbook app that is using QT减小使用 QT 的 playbook 应用程序的大小
【发布时间】:2012-04-05 06:04:42
【问题描述】:

我正在尝试使用 rim 最近发布的 QT 库构建一个剧本应用程序。

如果我使用默认的 bar-descriptor.xml,应用程序可以正常构建和部署,但 bar 文件的大小约为 80MB。我想减小尺寸。我尝试使用修改后的 bar-descriptor.xml,它只包含所需的库,但我得到了

 Failed to load platform plugin "blackberry". Available platforms are: 
 Minimal

原来的bar-descriptor.xml文件是

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
<id>ID</id>
<name>QTMediaPlayer</name>
<versionNumber>1.0.0</versionNumber>
<description>DESCRIPTION</description>

<initialWindow>
    <systemChrome>none</systemChrome>
    <transparent>false</transparent>
    <autoOrients>true</autoOrients>
    <aspectRatio>landscape</aspectRatio>
</initialWindow>

<env var="QML_IMPORT_PATH" value="app/native/imports"/>
<env var="QT_PLUGIN_PATH" value="app/native/plugins"/>
<env var="LD_LIBRARY_PATH" value="app/native/lib"/>
<arg>-platform</arg>
<arg>blackberry</arg>

<action system="true">run_native</action>
<asset entry="true" path="QTMediaPlayer" type="Qnx/Elf">QTMediaPlayer</asset>

<asset path="splashscreen.png">splashscreen.png</asset>
<asset path="icon.png">icon.png</asset>
<asset path="qml">qml</asset>

<!-- These values will be replaced when deploying in Qt Creator -->
<asset path="%QT_INSTALL_LIBS%">lib</asset> 
<asset path="%QT_INSTALL_PLUGINS%">plugins</asset>
<asset path="%QT_INSTALL_IMPORTS%">imports</asset>

<icon><image>icon.png</image></icon>
<splashscreen>splashscreen.png</splashscreen>
</qnx>

修改后的版本是

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
<id>ID</id>
<name>QTMediaPlayer</name>
<versionNumber>1.0.0</versionNumber>
<description>DESCRIPTION</description>

<initialWindow>
    <systemChrome>none</systemChrome>
    <transparent>false</transparent>
    <autoOrients>true</autoOrients>
    <aspectRatio>landscape</aspectRatio>
</initialWindow>

<env var="QML_IMPORT_PATH" value="app/native/imports"/>
<env var="QT_PLUGIN_PATH" value="app/native/plugins"/>
<env var="LD_LIBRARY_PATH" value="app/native/lib"/>
<arg>-platform</arg>
<arg>blackberry</arg>

<action system="true">run_native</action>
<asset entry="true" path="QTMediaPlayer" type="Qnx/Elf">QTMediaPlayer</asset>

<asset path="splashscreen.png">splashscreen.png</asset>
<asset path="icon.png">icon.png</asset>
<asset path="qml">qml</asset>

<!-- These values will be replaced when deploying in Qt Creator -->
<asset path="%QT_INSTALL_LIBS%">lib</asset>
<asset path="%QT_INSTALL_LIBS%/libQtCore.so.4.8.1" type="Qnx/Elf">lib/libQtCore.so.4</asset>
<asset path="%QT_INSTALL_LIBS%/libQtDeclarative.so.4.8.1">lib/libQtDeclarative.so.4</asset>
<asset path="%QT_INSTALL_LIBS%/libQtScript.so.4">lib/libQtScript.so.4</asset>
<asset path="%QT_INSTALL_LIBS%/libQtGui.so.4">lib/libQtGui.so.4</asset>
<asset path="%QT_INSTALL_LIBS%/libQtNetwork.so.4">lib/libQtNetwork.so.4</asset>
<asset path="%QT_INSTALL_LIBS%/libQtXmlPatterns.so.4">lib/libQtXmlPatterns.so.4</asset>
<asset path="%QT_INSTALL_LIBS%/libQtSql.so.4">lib/libQtSql.so.4</asset>
<asset path="%QT_INSTALL_LIBS%/libQtSvg.so.4">lib/libQtSvg.so.4</asset>
<asset path="%QT_INSTALL_LIBS%/pkgconfig">lib/pkgconfig</asset>
<asset path="%QT_INSTALL_LIBS%/fonts">lib/fonts</asset>

<asset path="%QT_INSTALL_PLUGINS%">plugins</asset>
<asset path="%QT_INSTALL_IMPORTS%">imports</asset>

<icon><image>icon.png</image></icon>
<splashscreen>splashscreen.png</splashscreen>
</qnx>

【问题讨论】:

  • 您能否提供一个指向说明如何执行此操作的来源的链接?

标签: qt blackberry-playbook qt-quick playbook


【解决方案1】:

尝试添加

<asset path="${QNX_TARGET}/../target-override/armle-v7/usr/lib/qt4/plugins/platforms/libblackberry.so" type="Qnx/Elf">lib/platforms/libblackberry.so</asset>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-04
    • 1970-01-01
    • 1970-01-01
    • 2021-01-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多