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

Web and WebWorks Development

Reply
New Contributor
LilKamisen
Posts: 9
Registered: ‎09-10-2010
My Device: Z10
My Carrier: SFR
Accepted Solution

bbwp creates infinite folders tree

[ Edited ]

Hi,

 

I'm new to BB10 development and justr trying to compile and run the 'Hello world' sample located at https://developer.blackberry.com/html5/documentation/package_your_bb10_app_with_ww_sdk_2008473_11.ht...

 

When running the command 'bbwp C:\myapp -o C:\myapp\output' under Windows 7 32 bits I get an folder tree looking like this:

c:\myapp\ouput\src\ouput\src\ouput\src\ouput\src\ouput\src\ouput\src\ouput\src\ouput\src... etc.


This only stops because I CTRL+C to stop the process.

 

If I choose a different path like 'bbwp C:\myapp -o C:\myappOutput' (i.e. not a subfolder) then everything is fine.

 

This is not a big issue as there is a workaround.

 

Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: bbwp creates infinite folders tree

Each time you run bbwp, it packages the entire contents of the /myapp folder.  The first time you run it, I'd expect it to create the /output subfolder containing all your application assets.  if you run it again - and the /output folder still exists  - then it will include those assets as well.  Subsequent calls will result in seeing the long subfolder structure you have listed.

 

However, if you are seeing this 'infinite folder' this when you run bbwp the very first time, then that's not right..  I have not heard others reporting this yet, so I'm not sure if its an environmental behavior, or a bug in the bbwp packager.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
New Contributor
LilKamisen
Posts: 9
Registered: ‎09-10-2010
My Device: Z10
My Carrier: SFR

Re: bbwp creates infinite folders tree

Yes it seems like a bug because I just ran the command once and the loop was on.

When moving the 'output' folder out of the source folder, it worked.

It makes sense for me that this may happen because you are not supposed to put the 'output' folder under the source folder if the tool is exploring every file in the folder. However if so:

- the tool should warn the user not to use a sub path

- the 'hello world' example on the website should not advise it either...

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: bbwp creates infinite folders tree

Hello LilKamisen,

 

You are correct, things are known to go wrong if you try setting the output folder as a sub-folder of your project folder. Generally it is recommended to keep them separate as you have found. Also agreed that the behaviour / warning could be improved. I'll make a note of this as feedback for the tooling teams. I'll also look to have the website example updated.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Contributor
kenyee
Posts: 28
Registered: ‎02-14-2012
My Device: developer
My Carrier: developer

how do you delete the damned tree?

My command was this:

J:\Win32Dev\SenchaBBWebWorks10\bbwp -g I:\INetPub\wwwroot\SenchaJrX -o F:\Releases\BB10WebWorksPackaging\JrXBuddy

 

So the theory about saving to the source directory causing this mangled mess is incorrect.  If the tool expects the output directory to be blank, it should delete it first :-P

 

I ran it twice and it generated a nested directory tree.

But when I try to delete it, I this this error from Windows: "Source Path Too Long".  Apparently, you can screw up the file system enough the even windows explorer can't delete it.  I've tried all the command line stuff from here too:

  http://social.technet.microsoft.com/Forums/windows/en-US/00493939-079c-481b-9999-a82ac680dcab/cant-d...

 

FIX BBWP!

And if anyone knows how to get rid of this directory structure from hell, please let me know :-(

 

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 820
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: how do you delete the damned tree?

I've done that a few times by accident.

 

The way to get rid of it, is to change the name of the folder to be a single character, and keep doing that to all the folders. Then you can delete them.

 

There's also a way to write a batch script to do it, but I don't have an example anymore. This is a common enough Windows problem that you can find examples of it online pretty easily.

 

My recommendation to avoid all this and improve your build cycle speed is to use our Ant Build Script:

https://github.com/blackberry/BB10-WebWorks-Community-Samples/tree/master/Ant-Build-Script

Tim Windsor
Application Development Advisor II
Please use plain text.
Contributor
kenyee
Posts: 28
Registered: ‎02-14-2012
My Device: developer
My Carrier: developer

Re: how do you delete the damned tree?


twindsor wrote:

I've done that a few times by accident.

The way to get rid of it, is to change the name of the folder to be a single character, and keep doing that to all the folders. Then you can delete them.



 

I've been at the renaming to a single character thing for a Friggin Hour! and hitting the bottom and it still has stuff you can't delete.  I then shared it and deleted a bunch more and now I'm renaming over the shared directory but I still can't delete stuff at the bottom.

 

I recommend public stoning and castration for whomever wrote this buggy script :-P

 

I'll give the Ant script a try whenever I get done cleaning this drive up...maybe tomorrow :-(

 

Please use plain text.
Contributor
kenyee
Posts: 28
Registered: ‎02-14-2012
My Device: developer
My Carrier: developer

Re: how do you delete the damned tree?

Finally gave up and I'm trying the Robocopy way:

http://mireille.it/delete-really-long-paths-and-nested-directories-in-windows-using-a-robocopy-one-l...

 

it's scrolling ridiculously huge pathnames across the terminal window...paths take up over a page on the screen after I did that hour or renaming :-P

 

Please use plain text.
Contributor
kenyee
Posts: 28
Registered: ‎02-14-2012
My Device: developer
My Carrier: developer

Re: how do you delete the damned tree?

So much better....

 

               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :         1         0         0         0         0     11078
   Files :         0         0         0         0         0     34685
   Bytes :         0         0         0         0         0  15.564 g
   Times :   0:17:36   0:00:00                       0:00:00   0:17:36
   Ended : Friday, August 16, 2013 3:25:49 PM

 

35K files even after I deleted a few thousand files by hand :-O

 

Please use plain text.