Building for Playbook, please can someone help?

Hi,

I’ve developed a game for the past couple of months using cocos2d-2.1beta3-x-2.1.0 on OSX. I basically deleted the code from the SimpleGame project and did my development inside that project. I’ve been testing it on the iPhone simulator as I developed it (I’m used to using cocos2d (objective c flavour) but decided to try out cocos2d-x for this project so I could build for my playbook too.

I’ve got key signing set up and working (I’ve developed some apps using cocos2d-x and marmalade and publishing worked fine) but was getting a bunch of issues on the marmalade deployment (sounds were not great etc) so would like to skip marmalade.

Anyways, I’ve followed as many guides as I could find online for deploying via QNX Momentics but have so far lost around 2 days trying to publish even a debug build to my device.

What I’ve tried so far

I’ve managed to get TestCPP imported, built and deployed onto the device.

I’ve copied the SimpleGame folder (with all my modified code and assets) from samples to the root dir and used terminal to run ./create-blackberry-project.sh I then entered SimpleGame as project name and it created the blackberry.proj.

I imported this into Momentics and built for debug. Initialy it couldn’t find *~~lcocos2dx* so I went to Properties > C/C++ Build > Settings > QCC Linker > Libraries and added :
“${workspace_loc:/cocos2dx/Device-Debug}”
Then it complained about **lCocosDenshion* so I repeated this and added :
“${workspace_loc:/CocosDenshion/Device-Debug}”
Then it complained about
lgrskia so I added:
**“${workspace_loc:/cocos2dx/platform/third_party/blackberry/libraries/armle-v7}”*

After this I managed to get it building successfully.
Then I choose Run as Blackberry OS C++ Tablet Application from the right click menu, the download and installation takes place but as soon as the app opens it closes with the error
ldd:FATAL: Could not load library libCocosDenshion.so

I’m really pulling my hair out at this stage~~ it would be really appreciated if anyone could help me get this on the device, I’ve spent a lot of time on it and am getting depressed :frowning:

If I’ve messed up some steps along the way I’d be glad to hear. Ideally, if you could give the steps to go from having:

  1. A clean install of cocos2d-2.1beta3-x-2.1.0 on OSX
  2. Opening the SimpleGame sample and playing a sample with CocosDenshion (I don’t need code for this, but I do have the dependency)
  3. <What I do now to see it running on my playbook, assuming I have the SDK installed, IDE set up and key signing done>

I will love you forever if you can help - I’m sure there are many others that are struggling with this if my recent googling has anything to go by.

Kind regards,

Bryn

Make sure to add the custom libs (.SO files) into bar manifest xml.
I had to do this manually since QNX Momentics was failing to do it properly.

Romain TISSERAND wrote:

Make sure to add the custom libs (.SO files) into bar manifest xml.
I had to do this manually since QNX Momentics was failing to do it properly.

Thanks for taking the time to reply!

Could you please give me an example of how to do this?

I have this currently:

x86 lib/CocosDenshion.so SimpleGame

but it still gives the error :S

Something’s wrong, x86 for device config ??
Also, please note bar-manifest.xml does not resolve workspace_loc for some weird reason (QNX Momentics bug ?)

Here is mine, hope it helps :
@

armle-v7
lib/libgrskia.so
YourGame

@
@

armle-v7
lib/libgrskia.so
YourGame

@
@

x86
lib/libgrskia.so
YourGame

@

Romain TISSERAND wrote:

Something’s wrong, x86 for device config ??
Also, please note bar-manifest.xml does not resolve workspace_loc for some weird reason (QNX Momentics bug ?)
>
Here is mine, hope it helps :
@

armle-v7
lib/libgrskia.so
YourGame

@
@

armle-v7
lib/libgrskia.so
YourGame

@
@

x86
lib/libgrskia.so
YourGame

@

Here is mine, hope it helps :
@

armle-v7
lib/libgrskia.so
YourGame

@
@

Hadn’t spotted the architecture, oops!
Well I changed that this morning and set my path to:

armle-v7 lib/libCocosDenshion.so SimpleGame

But still it can’t find it on the device. Is it possible I missed a step whilst linking to the library? I can see it in the SimpleGame project (libCocosDenshion.so) the same as I can see SimpleGame.so (along with the Classes folder and Resources folder).

Thanks for your time!

I am also facing the problem to include cocosdenshion in playbook Project…
I have tried from seeing Tests sample to include references to Cocosdenshion still it is not working…

Viraj Dasondi wrote:

I am also facing the problem to include cocosdenshion in playbook Project…
I have tried from seeing Tests sample to include references to Cocosdenshion still it is not working…

Viraj,

I’m not sure how I corrected it eventually but I managed to get it to link to cocosdenshion by having a path starting /…/…/ that led to the disk path and then (for whatever reason) it eventually picked it up. On the same path I had 3 days ago…

Hopefully your problems will end there - no such luck here. I had cocosdenshion linking finally and my code replying when I suddenly get crap about mp3 filenames. Looks like only .ogg is supported: lame, but alright, I’ll play along.

Nope, I get a sigAbort on first fully linked run - no stack trace, no clue what happened. I’ve literally spent two months working on an app that I can’t deploy without Marmalade (and I shouldn’t need to pay do deploy this code?).

There is very little documentation, very little support and if you are English native you are pretty much screwed if you want to use Cocos2d-x. I’’m scrapping it and going back to cocos2d/vanilla OpengL for my gaming needs. I’ve wasted enough time - if I want to release on playbook I’ll probably use Adobe Air (and it comes to something when Adobe is the better choice).

If you still need it, give me a shout and I will help you link cocosdenshion - but be prepared that it won’t bloody work anyway once it links.

Without sounding too harsh, an absolute mess of a project every step of the way. Deprecations that I can’t find remedies for, build instructions that plain don’t work… I’ll not be using it for a real project…