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: 33
Registered: ‎02-24-2011
My Device: Not Specified

Re: BlackBerry WebWorks Plug-in v2.5.1

Here it is, from the system-level version installed in "C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks Packager":

 

<?xml version="1.0" encoding="UTF-8"?>
<wcp>
	<additional>-quiet</additional>
	<extension_repository>ext</extension_repository>
	<jar>lib\net_rim_api.jar</jar>
	<java>C:\Program Files (x86)\Java\jdk1.6.0_26</java>
	<rapc>bin\rapc.exe</rapc>
	<wcp_template>device_templates</wcp_template>
</wcp>

 

And from the version that Eclipse uses in in "C:\Program Files (x86)\BlackBerry WebWorks Plug-in Eclipse\plugins\net.rim.browser.tools.wcpc_1.5.1.201010291444-22\wcpc":

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wcp>
	 <rapc>bin\rapc.exe</rapc>
     <jar>lib\net_rim_api.jar</jar>
     <wcp_template>device_templates</wcp_template>
     <java/>
	 <additional>-quiet</additional>
</wcp>

 Here's what I get if I copy the contents of the Eclipse SDK's file into the system SDK's file, and run the system SDK's bbwp.exe from the command line (seems like it's the removal of the 'extension_repository' element that makes the difference):

 

[INFO]                  Parsing command line options
[INFO]                  Parsing bbwp.properties
[INFO]                  Validating application archive
[INFO]                  Parsing config.xml
[INFO]                  Validating config.xml
[INFO]                  Validating application version
[INFO]                  Validating the <name> element
[INFO]                  Validating the <author> element
[INFO]                  Populating application source
[FATAL]                 null

 I haven't found where the Visual Studio plugin stores its version, yet.

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: BlackBerry WebWorks Plug-in v2.5.1

The Visual Studio Plug-in doesn't actually use a different bundle like Eclipse does.  VS.NET detects where the WebWorks SDK is installed and uses that instance.

 

Eclipse bundles it differently for two reasons:

1) So that it can be downloaded from the Eclipse update site

2) Eclipse has its own Java Compiler that it uses which is why the <java> element is empty

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 33
Registered: ‎02-24-2011
My Device: Not Specified

Re: BlackBerry WebWorks Plug-in v2.5.1

Makes sense... but why am I getting the same error (apparently) in VS and Eclipse, which is different from when I run it from the command line?

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: BlackBerry WebWorks Plug-in v2.5.1

can you post up the command line that you're using.. I don't think I saw it in your previous posts

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Highlighted
Contributor
Posts: 33
Registered: ‎02-24-2011
My Device: Not Specified

Re: BlackBerry WebWorks Plug-in v2.5.1

It's a Python script. It calls bbwp with the same arguments as Eclipse uses, except I also added the /v arg:

 

import subprocess

packager_exe = r'C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks Packager\bbwp'

zip_file = r'E:\[REDACTED]Client\build\[REDACTED]Client.zip'
output_arg = "/o"
verbose_arg = "/v"
build_dir = r'E:\[REDACTED]Client\build'

subprocess.check_call(
    [packager_exe, zip_file, output_arg, build_dir, verbose_arg],
    stderr=subprocess.STDOUT)