Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)
My Carrier: Singtel
Accepted Solution

Fail to copy necessary Qt/QML library to .bar file when deploying to Playbook

I am using Qt 4.8.3 with ndk 2.1.0 for Playbook. I following the instruction through

1. http://supportforums.blackberry.com/t5/Native-Development/How-to-port-your-Qt-Projects-to-Playbook/t...

2. http://qt-project.org/wiki/Building_and_Deploying_Qt_Applications_to_the_Playbook

 

But the library files are not copied to .bar file. This is my .pro file

TEMPLATE = app

# Please do not modify the following line.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =

TARGET = samegame

# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp

OTHER_FILES += \
    qml/samegame/samegame.qml \
    qml/samegame/highscores/scores.php \
    qml/samegame/highscores/score_style.xsl \
    qml/samegame/highscores/score_data.xml \
    qml/samegame/highscores/README \
    qml/samegame/SamegameCore/qmldir \
    qml/samegame/SamegameCore/samegame.js \
    qml/samegame/SamegameCore/Dialog.qml \
    qml/samegame/SamegameCore/Button.qml \
    qml/samegame/SamegameCore/BoomBlock.qml \
    qml/samegame/SamegameCore/pics/yellowStone.png \
    qml/samegame/SamegameCore/pics/star.png \
    qml/samegame/SamegameCore/pics/redStone.png \
    qml/samegame/SamegameCore/pics/redStar.png \
    qml/samegame/SamegameCore/pics/greenStone.png \
    qml/samegame/SamegameCore/pics/greenStar.png \
    qml/samegame/SamegameCore/pics/blueStone.png \
    qml/samegame/SamegameCore/pics/blueStar.png \
    qml/samegame/SamegameCore/pics/background.png \
    bar-descriptor.xml \
    qmlapplicationviewer/qmlapplicationviewer.pri

QMAKE_LFLAGS += '-Wl,-rpath,\'./app/native/lib\''

package.target = $${TARGET}.bar
package.depends = $$TARGET
package.commands = blackberry-nativepackager \
    -devMode -debugToken /Users/zhu_qichao/Desktop/Research In Motion/playbook/debugtoken1.bar \
    -package $${TARGET}.bar -arg -platform -arg blackberry \
    bar-descriptor.xml $$TARGET \
    -e $$[QT_INSTALL_LIBS]/libQtCore.so.4 lib/libQtCore.so.4 \
    -e $$[QT_INSTALL_LIBS]/libQtGui.so.4 lib/libQtGui.so.4 \
    -e $$[QT_INSTALL_LIBS]/libQtOpenGL.so.4 lib/libQtOpenGL.so.4 \
    -e $$[QT_INSTALL_LIBS]/libQtNetwork.so.4 lib/libQtNetwork.so.4 \
    -e $$[QT_INSTALL_LIBS]/libQtDeclarative.so.4 lib/libQtDeclarative.so.4 \
    -e $$[QT_INSTALL_PLUGINS]/platforms/libblackberry.so plugins/platforms/libblackberry.so \
    -e $$[QT_INSTALL_IMPORTS]/Qt/labs/particles/libqmlparticlesplugin.so imports/Qt/labs/particles/libqmlparticlesplugin.so

QMAKE_EXTRA_TARGETS += package

 The compiled .bar file are less than 1M. I check the sandbox in playbook through QNX IDE. There is no library file. Can anyone help? Thanks.

 

Please use plain text.
Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)
My Carrier: Singtel

Re: Fail to copy necessary Qt/QML library to .bar file when deploying to Playbook

And the following is my project configuration "Run"

屏幕快照 2012-12-13 下午11.37.44.png

Please use plain text.
Developer
noahhuang
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: Fail to copy necessary Qt/QML library to .bar file when deploying to Playbook

I have the same issue to migrate my application from beta 4 to Gold
Please use plain text.
Trusted Contributor
pigling
Posts: 104
Registered: ‎02-05-2012
My Device: Bold 9900 (primary) Z10 LE (secondary)
My Carrier: Singtel

Re: Fail to copy necessary Qt/QML library to .bar file when deploying to Playbook

I finally find the reason. 

1. DON'T USE "SPACE" IN YOUR FOLDER. IT CAN'T BE RECOGNIZED CORRECTLY BY SHELL SCRIPT.

2. Disable "Create Package" step in Project->Run configuration.

 

Please use plain text.