[flexcoders] Air Ant build script error

2010-03-08 Thread Ritesh
i am using ant build script for the air application .. getting following
error:

* [java] could not load keystore file (password may be incorrect)*
**
my setting for the ADT target as follows

--
java jar=${SDK_HOME}/lib/adt.jar dir=. fork=true failonerror=true
 arg line=-certificate -cn sample 1024-RSA ${build}/data.p12 /
 /java

java jar=${SDK_HOME}/lib/adt.jar dir=src fork=true
failonerror=true
arg line=-package -storetype pkcs12 -keystore ${build} data.p12 -storepass
 ${app.name}.air AntAir-app-modified.xml ./
/java
--

Any idea on about this error

rty


[flexcoders] AIR Ant Build Script

2009-10-30 Thread seanmcmonahan
So I posted a question about Ant build scripts for AIR a few weeks ago and got 
some great answers, so here's another one.

I have an Ant build script that I'm using to build my AIR project.  It builds 
everything and packages the application just fine.  The app runs with no 
noticeable problems until you try to do any serialization with a class we have: 
ElasticDictionary.  This class merely extends flash.utils.Dictionary with some 
convenience methods (like length() -- code is below).  

I have the [RemoteObject] metadata and this works flawlessly when the project 
is run from the Flex Builder debugger.  It also works perfectly when the 
release build is exported via the Flex Builder Export Release Build... dialog.

So my question is: what am I missing in my Ant build script that Flex Builder 
does for me?  The class, ElasticDictionary, is in the project's src folder and 
I'm using the 3.4 SDK.

Relevant (at least what I *think* is relevant) code below.  Thanks in advance 
for your help!

Ant Build Script:

exec
executable=${MXMLC}
failonerror=true

arg value=-debug=false/
arg value=+flexlib=${SDK_HOME}/frameworks/
arg value=+configname=air/
arg value=-file-specs=${MAIN_SOURCE_FILE}/
arg value=-output=${BUILD_DIR}/${APP_ROOT_FILE}/
arg value=-keep-as3-metadata+=RemoteClass/


arg 
value=-library-path+=${SDK_HOME}/frameworks/libs/
arg 
value=-library-path+=${SDK_HOME}/frameworks/libs/air/

arg 
value=-include-libraries=${LIBS_DIR}/applicationupdater.swc/
arg 
value=-include-libraries=${LIBS_DIR}/Degrafa_Beta3.1_Flex3.swc/
arg value=-locale=en_US,fr_FR,de_DE/
arg value=-source-path=${LOC_DIR}/{locale}/
arg value=-source-path=${PROP_DIR}/

/exec

SDK_HOME refers to the location of the Flex 3.4 SDK.  LIBS_DIR points to the 
project's SWC's.  LOC_DIR to localization files; PROP_DIR to properties 
(.properties) files. 

---

The ElasticDictionary class: 

/**
* Used instead of ordinary dictionaries so that their data type can be 
preserved when saving in a serailized format 
*/
package com.project.utils {

import flash.utils.Dictionary;

[Bindable]
[RemoteClass]
public dynamic class ElasticDictionary extends Dictionary {

public function ElasticDictionary(weakKeys:Boolean=false) {
super(weakKeys);
}


public function get length():uint {
return getKeys().length;
}

public function getKeys():Array {
var keys:Array = new Array();
for(var key:Object in this) {
keys.push(key);
}
return keys;
}

public function getValues():Array {
var values:Array = new Array();
for(var key:Object in this) {
values.push(this[key]);
}
return values;
}

}
}