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
Contributor
Posts: 47
Registered: ‎02-18-2011
My Device: Not Specified

How do you compile your app with WebWorks?

Very new to the app game, but I am looking to start creating some apps for the Playbook. First, I need to know how to compile them. My WebWorks is at the default locations, but everytime I move the .zip into the bbwp, the cmd promt pops up and closes within seconds not leaving me a .bar.

 

ANY help would be greatly appreciated.

Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: How do you compile your app with WebWorks?

 

Hi

 

 

I'm not 100% clear what exactly you are doing - can you provide more detail ?

 

You should call something like:

 

 

C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks Packager for PlayBook\bbwp>bbwp c:\Projects\sketch\sketchPadStandard.zip /v

 

 

and on successful build deploy like:

 

 

c:
cd "C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks Packager for PlayBook\bbwp\blackberry-tablet-sdk\bin"

blackberry-deploy -installApp -password mysecretpass -device 192.168.193.130 -package D:\Projects\sketch\bin\sketchPadStandard.bar

 

.Heiko

 

 

 

 

 

 

 

 

Contributor
Posts: 47
Registered: ‎02-18-2011
My Device: Not Specified

Re: How do you compile your app with WebWorks?

I got up to doing the .bar, however, it tells me that 'blackberry-deploy' is not recognized as an internal or external commands, operable program or batch file.

Contributor
Posts: 47
Registered: ‎02-18-2011
My Device: Not Specified

Re: How do you compile your app with WebWorks?

i now did it in the \bin directory as instructed...and it tellsme that 'java' is not recognized...etc

Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: How do you compile your app with WebWorks?

[ Edited ]

Have you got Java runtime installed

 

If you type:

 

java -version 

 and it returns a proper version then you should hopefully be ok

 

If not, you need to install Java SDK or Runtime, and/or configure path.

(Might be that path is set by java installer, or after reboot .., I had initially added it to my batch files, but also works without now )

 

Eg. try adding the following or simlar to your batch files if its doesn't find your java runtime (note paths are for my 64bit system):

 

@set path=%PATH%;"C:\Program Files (x86)\Java\jre6\bin"

 

or

 

@set path=%PATH%;C:\PROGRA~2\Java\jre6\bin

 

.H

 

 

 

 

 

 

 

Contributor
Posts: 47
Registered: ‎02-18-2011
My Device: Not Specified

Re: How do you compile your app with WebWorks?

If I open a new CMD window and type java -version is tells me... 

 

if I am within /bin it doesnt work.

Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: How do you compile your app with WebWorks?

Then if you just installed java, maybe reboot and see if it adds it to your user environment.

 

If not, you can either add it to your environment variables, or just to the path in the current console, or in a batch file.

 

Will attach an example in a mo.

 

.H

Contributor
Posts: 47
Registered: ‎02-18-2011
My Device: Not Specified

Re: How do you compile your app with WebWorks?

I have had Java.

Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: How do you compile your app with WebWorks?

Here's a sample batch file - I tried to simplify mine a bit - so hope its still not too confusing (I've got a bit more in mine, and also variables that get replaced for different projects, etc.)

 

 

:: ---------------------------------------------
setlocal 


:: ---------------------------------------------
:: Set path to include blackberry java sdk/runtime .. 
:: ---------------------------------------------

:: Standard Java include - "long name"
@set path=%PATH%;C:\Program Files (x86)\Java\jre6\bin

:: Standard Java include - "shortname"
::@set path=%PATH%;C:\PROGRA~2\Java\jre6\bin


:: Blackberry Java include - "long name"
::@set path=%PATH%;"C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks Packager for PlayBook\jre\bin"

:: Blackberry Java include - "short name"
::@set path=%PATH%;C:\PROGRA~2\RESEAR~2\BLACKB~1\jre\bin


:: ---------------------------------------------
:: ZIP Source
:: ---------------------------------------------

::
:: Some other stuff here
::

pause

:: ---------------------------------------------
:: Compile
:: ---------------------------------------------
c:
cd "C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks Packager for PlayBook\bbwp"
bbwp.exe D:\Projects\Playbook\dev\APP_FOLDER_NAME\APP_NAME.zip

pause


:: ---------------------------------------------
:: Deploy
:: ---------------------------------------------

c:
cd "C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks Packager for PlayBook\bbwp\blackberry-tablet-sdk\bin"

blackberry-deploy -installApp -password MYPASS -device MYIPADDRESS -package D:\Projects\Playbook\APP_FOLDER_NAME\bin\APP_NAME.bar

pause


:: ---------------------------------------------
:exit


endlocal

 

 

 Note that the path's point to my PC setup so you will need to replace with your relevant paths.

 

You can set java path to where your java is installed, or to the java jre that gets installed with the WebSDK, both worked for me.

 

Note, I prefer to use the short paths when appending to environment variables

 

.H

 

New Developer
Posts: 7
Registered: ‎09-15-2010
My Device: Not Specified

Re: How do you compile your app with WebWorks?

I found that my JAVA_HOME Environment Variable was already set - when I unset it, things started to work Smiley Happy