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

New Developer
Posts: 14
Registered: ‎09-17-2012
My Device: Playbook - 32gig
My Carrier: NA

Packaging a project - how to create shared directories and upload files to Playbook, using bar-descriptor file.


I'm using Momentics N-SDK, to build a custom DOSbox, and using that to run an APL interpreter's

runtime package, to allow some APL workspaces I developed many years back, to now run on the

Playbook.  Got the prototype working, and have built the app in "device-release" mode, and

find I am unable to use the "blackberry-tablet.xml" file (now called "bar-descriptor.xml" in latest

NDK release, I believe), to move various directories to the shared directory area, on the Playbook.

That area is, of course: "/accounts/1000/shared/misc".    As part of the "device-release" upload of

the application from my development computer to the Playbook, I need to copy several

directories into the common directory "/accounts/1000/shared/misc"  on the Playbook.  I've tried the

"Run Configurations" / "Upload" method, and also tweaked the "blackberry-tablet.xml" file directly.

But I can't get the needed directories and files to copy to the shared/misc area, as part of the

application launch.   Any suggestions?

Where can I find the specific syntax of the "blackberry-tablet.xml" file?  Thanx ..

- Rus

New Developer
Posts: 14
Registered: ‎09-17-2012
My Device: Playbook - 32gig
My Carrier: NA

Re: Packaging a project - how to create shared directories and upload files to Playbook, using bar-descriptor file.

Hi. Let me make my question more specific. I found and read the IDE Developers Guide, and found a note that the application cannot write to anything outside of the "sandbox" area.  Fine, but what about the .bar descriptor file?  Mine is called "blackberry-tablet.xml".   As part of loading my app onto the Playbook, I need to create some directories in
 "/accounts/1000/shared/misc" area.   I can do this easily from Windows, via a wireless link to the "\\Playbook-xxx2\media" area, right?  No problem.  I can mount the Playbook's shared directory as disk, and I can read and write to it from anything running anywhere. 

All I need to do, is create some sub-directories on the "/accounts/1000/shared/misc" area, as part of loading my application onto the Playbook.  This should be doable via the .XML code in the "blackberry-tablet.xml" file.  I have tried several variants, and nothing works.

The .XML code I am using:


   <asset path="icon.png">icon.png</asset>
   <asset path="sdl-controls.xml">sdl-controls.xml</asset>
   <asset path="${workspace_loc:/TouchControlOverlay/Device-Release/libTouchControlOverlay.so}" type="Qnx/Elf">lib/libTouchControlOverlay.so</asset>
   <asset path="3rdparty/SDL_sound/Device-Release/libSDL_sound.so" type="Qnx/Elf">lib/libSDL_sound.so</asset>
   <asset path="${workspace_loc:/vorbis/Device-Release/libvorbis.a}">libvorbis.a</asset>
   <asset path="${workspace_loc:/SDL12/Device-Release/libSDL12.so}" type="Qnx/Elf">lib/libSDL12.so</asset>
   <asset path="C:/bbdev/bbprod/aplv5/apl387r.exe">/accounts/1000/shared/misc/aplv5/apl387r.exe</asset>
   <asset path="C:/bbdev/bbprod/aplv5/config.apl">/accounts/1000/shared/misc/aplv5/config.apl</asset>
   <asset path="C:/bbdev/bbprod/aplv5/beginhx.bat">/accounts/1000/shared/misc/aplv5/beginhx.bat</asset>
   <asset path="C:/bbdev/bbprod/aplv5/aplfont.com">/accounts/1000/shared/misc/aplv5/aplfont.com</asset>
   <asset path="C:/bbdev/bbprod/aplv5/hurstprx.ws">/accounts/1000/shared/misc/aplv5/hurstprx.ws</asset>
   <asset path="C:/bbdev/bbprod/misc/dosbox-0.74.conf">/accounts/1000/shared/misc/dosbox/dosbox-0.74.conf</asset>
   <asset path="C:/bbdev/bbprod/market/data/timesr1.sf">/accounts/1000/shared/misc/market/data/timesr1.sf</asset>

Ok, so the first six "<asset path=..." lines work perfectly.  I get an internal DOSbox, complete with icon and libraries installed correctly.   But I cannot seem to get lines 7 to 13 to do anything at all.   I can't even get the "dosbox-0.74.conf" setup file to be installed to its "shared/misc/dosbox" directory.  This is a *very* big deal for me.    If the app cannot setup the common areas on the /shared/misc part of the file system, then I am seriously pooched.


I understand from reading the IDE Guide that apps cannot write to the shared areas.   That  is a curious assertion, and is provably false, as the DOSbox app will create a standard config file in the \accounts\1000\shared\misc\dosbox directory, if one does not exist at startup time.    But  I don't need this to load my app.  I just need the .bar file app upload process to migrate files to the shared-files area on the Playbook.   This is easy to do manually, and I need it to be done as part of application deployment.   Either as an upload from my development machine for testing, and then later, as download from Appworld, as part of loading an Appworld app.   My app is a great bundle of stuff, but it all works, and simply needs specific files to be installed in specific directories as part of its install process.


Can I use .XML syntax in the .bar descriptor file to package and deploy my files to directories on the shared-files area on the Playbook????

Anyone who knows the answer to this, please enlighten me, ok?  Thx.

- Rus


Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: Packaging a project - how to create shared directories and upload files to Playbook, using bar-descriptor file.

Hi there,


You mention you are having difficulties starting on the 6th line of your posted code. This is the first line involving the shared directory.


Have you enabled this from the bar-descriptor file by uncommenting the following line?

   <!--  <action>access_shared</action> -->