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
Visitor
Posts: 1
Registered: ‎03-10-2012
My Device: Playbook
My Carrier: Que?

Large projects

Hi, sorry if this has been covered somewhere but I can't seem to find any information about it.

 

I have several large projects (games) I would like to port to the playbook. Large as in a few hundred MB of data (graphics, audio, etc). 

 

What is the best way of handling this? I hope I don't have to deploy all that data every time I deploy another build to my device? Is the deploy system sophisticated enough to only copy files that have changed? How about for the simulator?

 

Cheers,

Daniel

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Large projects

If you're using Momentics, there are some settings that are supposed to let you upload less than the complete package. I find them inadequately fine-grained so far, but your mileage may vary.

For that feature, look under your Run/Debug Settings, on the Upload tab.
In my case, I'm experimenting with just transferring some of the large files to the shared/misc folder over WiFi or USB, and adjusting my app to find things there rather than requiring them to be in the app/ folder.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Retired
Posts: 36
Registered: ‎10-26-2011
My Device: RIM Developer
My Carrier: Rogers

Re: Large projects

Hey djkat.

 

What IDE has atm is the ability to deploy your assets on the first run and then change to uploading binary only on consequtive runs.

 

Let me know if you have further questions/issues/suggestions on this topic.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Large projects

dtomilovskiy, is there any documentation on the details of that? Mainly how it distinguishes between "assets" and "binary"?

I tried using it with a Qt app, where I hoped the stuff under native/lib would be uploaded only once, but other things repeatedly.

As far as I could tell, the things under native/qml were not being uploaded with later installs, so I wasn't able to use this as I'd hoped, with quick turnaround for edits to just the QML files.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Large projects

There are docs about "patching" the installation but it only covers basic topics.

If you want to transfer files in app folder you have to make sure app installed in app dev mode

(in IDE if you just "run" it will be in this mode)

Then you have few options:

- if this is only binary that changes, you can use Upload tab checkbox

- you can transfer any file using Target File System Naigator view in IDE (drag & drop)

- create Qnx File Transfer launch configuration, and will tranfer select set of files on "launch"

- if you do it very often you can combine file transfer & regular run launch into Group launch configuration

 

If you use command line tools you can either use scp tool or blackberry-deploy -putFile 

Retired
Posts: 36
Registered: ‎10-26-2011
My Device: RIM Developer
My Carrier: Rogers

Re: Large projects

Hey peter9477.

 

So, assets are generally things that are listed under Assets tab in your bar-descriptor.xml. Something like this in the source code of your bar-descriptor :

 

<asset path="Assets/10-level-block-normal.png">10-level-block-normal.png</asset>

 

Now, in terms of a QT app. Do you link it statically? If so, you will loose time every time you upload the qt binary.

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Large projects

Ah, unfortunately the Qt libraries are (must be?) currently itemized as <assets> so unless there's an alternative to using that tag in the bar-descriptor.xml it looks like that simple option isn't going to be suitable.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Retired
Posts: 36
Registered: ‎10-26-2011
My Device: RIM Developer
My Carrier: Rogers

Re: Large projects

Well, this solves our problem then.

 

The idea behind "upload binary only" is to leave the "assets" unchanged and not copy them over every time as assets are typically your biggest files.

 

So, in case of Qt libraries - once you deploy them once, there is no need to change them. Hence what you can do in your case - (and say you have a clean device or you had to manually wipe the app) selec "Install application from a BAR file" on your first run, and then set it to "Only upload binary into existing installation".

 

Let me know if you have further issues with this.

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Large projects

The problem is that the QML files are also included using <asset>, in this case as an entire subtree to be included...

If the "upload binary only" feature is using the bar-descriptor.xml <asset> elements as the distinguishing item, I think we'd need to leave the QML out of there, but find a way to include it in the .bar anyway. I don't know how we could do that other than through the command line right now... but maybe this is what Elena's QNX File Transfer launch configuration is about.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Retired
Posts: 36
Registered: ‎10-26-2011
My Device: RIM Developer
My Carrier: Rogers

Re: Large projects

Yes, my apologies, I missed this point.

 

Let me check with my collegues tomorrow - there should be a place on the system where we can place the Qt libraries and modify your path. This way you'll be able to upload the assets without reuploading the libraries.

 

This will be a tempraray workaround though. At some point Qt libraries should be available at usr/lib.