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

Java Development

Reply
Developer
bloobi
Posts: 42
Registered: ‎11-30-2009
My Device: Not Specified

Ant and Blackberry_App_Descriptor.xml

Hello,

Is there a way to get Version, AppName, Autostartup located in Blackberry_app_Descriptor.xml file. From Ant?

I saw that's there was property files before but how can we do now?

Actually I have to edit my AntTarget to build with correct version, and I would prefer to edit My app Descriptor.

 

Thanks.

Please use plain text.
Trusted Contributor
vijaytabhatt
Posts: 146
Registered: ‎03-22-2010
My Device: Not Specified

Re: Ant and Blackberry_App_Descriptor.xml

did you find solution for this?

i also want the same

Please use plain text.
Developer
rakesh86shankar
Posts: 1,003
Registered: ‎05-22-2009
My Device: Not Specified

Re: Ant and Blackberry_App_Descriptor.xml

[ Edited ]
<target name = "build" depends="build-xxx">
		<rapc destdir="release\5.0" output="MyApp" defines="NOT_JDE_4_5;JDE_5_0">
			<jdp  title="App" 
				type="cldc"
				description="MyApp"
				runonstartup="true"
				systemmodule="true"
				StartupTier="7"
				vendor="MyApp"
				version="1.0">
				<entry title="MyApp"
					description="MyApp"
					icon="../../res/images/icon.png"
					
					/>
			</jdp>
			<src>
				<fileset dir="${src.dir}">
					<include name="**/*.java" />
					<include name="**/*.png" />
					<include name="**/*.gif" />
					<include name="**/*.bin" />
				</fileset>
				<fileset dir="res\images">
					<include name="**/*.java" />
					<include name="**/*.png" />
					<include name="**/*.gif" />
					<include name="**/*.bin" />
				</fileset>
				
				<fileset dir="${lib.dir}">
					<include name="**/App.jar" />
				</fileset>	
			</src>
			
		</rapc>
	</target>

 Will it be useful?

 

Regards

Rakesh Shankar.P

Please use plain text.
Trusted Contributor
vijaytabhatt
Posts: 146
Registered: ‎03-22-2010
My Device: Not Specified

Re: Ant and Blackberry_App_Descriptor.xml

no i already have script woking fine just want to access version from App_Descriptor.xml

Please use plain text.
Developer
simon_hain
Posts: 16,113
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Ant and Blackberry_App_Descriptor.xml

bb-ant-tools have a beta version with support for the app-descriptor
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Trusted Contributor
vijaytabhatt
Posts: 146
Registered: ‎03-22-2010
My Device: Not Specified

Re: Ant and Blackberry_App_Descriptor.xml

can you please provide me any link or the other for the same?

Please use plain text.
New Developer
Teamghost
Posts: 16
Registered: ‎08-04-2011
My Device: Z10 9800
My Carrier: all

Re: Ant and Blackberry_App_Descriptor.xml

Any news here?

 

I also want to add the version of my App automatically by my revision system.

This shoudn't be such a problem within a software development environment, or? ;-)

 

Regards from the sunny Germany

Das Leben ist wie eine Lawine: Mal rauf mal runter
Please use plain text.
Trusted Contributor
vijaytabhatt
Posts: 146
Registered: ‎03-22-2010
My Device: Not Specified

Re: Ant and Blackberry_App_Descriptor.xml

no :smileysad: i used regular expressions to parse the xml file and then get the version number

 

if you get any solution please post it here

Please use plain text.
New Developer
CobiRic
Posts: 21
Registered: ‎03-31-2011
My Device: Developer
My Carrier: none

Re: Ant and Blackberry_App_Descriptor.xml

You can use the XmlProperty task in Ant.

 

e.g.

<!-- import BlackBerry app descriptor file from Eclipse -->
<!-- creates properties of the form [Properties.General.Version] etc -->
<xmlproperty file="BlackBerry_App_Descriptor.xml" keepRoot="true" collapseAttributes="true" />

 

Then you can access your properties like:

  • ${Properties.General.Version}
  • ${Properties.General.Title}

Run Ant with parameter -d and it will output for you all the properties that it is setting.

 

www.cobiinteractive.com
www.madmob.co.za
Please use plain text.