Unable to add include ANE File in ANT Script - actionscript-3

I wanted to create an ANT Script to create build in one click for my Flex Mobile Project.
My app using some native extension file (.ane file). When I tried to run the ANT script it saying -
An implementation for native extension 'com.example.mobile.extensions.NativeFeature' required by the application was not found for the target platform
I'm using the following code to include ane file in ANT Script.
<compiler.external-library-path dir="${basedir}/ane" append="true">
<include name="**/*.ane"/>
</compiler.external-library-path>
Also added the same extensionId in myApp-app.xml file which I used in my extension.xml file.

Solved this problem. Basically I need to add -extdr argument in ADT command. By adding -extdir ${basedir}/ane in ADT command I am able to resolve the problem. Added sample code below.
<target name="package.android" >
<echo message="Packaging for Android"/>
<exec executable="${ADT}" dir="${build.dir}/android">
<arg line="-package
-target apk
-storetype ${build.storetype}
-keystore ${android.cert}
-storepass ${android.cert.password}
${app.name}
${app.name}-app.xml
${app.name}.swf
-extdir ${basedir}/ane
"/>
</exec>
</target>

Related

Where to put "dotnet bundle" in .NET Core project (project.json replaced with *.csproj file)

Since the most recent .NET Core (I am actually using AspNetCore 1.1.2) has replace the project.json file with *.csproj it is still not clear to me where to put the "dotnet bundle", precompile option.
"scripts": {
"precompile": ["dotnet bundle"]
}
Prior the above block of json was found in the project.json file. Any clue where this goes? Is it already in some other configuration file? Below is a link that explains this change, and shows what the *.csproj file equivalent is to the project.json file:
https://learn.microsoft.com/en-us/dotnet/core/tools/project-json-to-csproj
As always, apologies for any incorrect vernacular here, .NET Core is new to me.
You can use Target and Exec to accomplish this in .csproj:
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command=”bower install” EnvironmentVariables=”Path=$(ExternalToolsPath)” />
<Exec Command="dotnet bundle" />
</Target>
See this answer on how to get dotnet bundle to work with new .csproj format.

FlashBuildeC native extension 'InputMethodContext' required by the application was not found

I am working on an existing Flex project and I am using FlashBuilder. I would like to use FlashBuilderC and fb.exportReleaseBuild ant task to schedule nightly builds.
It seems I have a problem with native extensions.
fb.exportReleaseBuild] com.adobe.air.InvalidInputException: An implementation f
or native extension 'InputMethodContext' required by the application was not fou
nd for the target platform
Using Flash Builder GUI, I can successfully build and package the project
This is my build.xml
<?xml version="1.0"?>
<project default="main">
<target name="main">
<fb.exportReleaseBuild project="myproject" />
</target>
</project>
And this is the script I use
set WORKSPACE=path_to_my_workspace
REM works with either FlashBuilderC.exe or eclipsec.exe
"C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\FlashBuilderC.exe" ^
--launcher.suppressErrors ^
-noSplash ^
-configuration C:\flashbuilderconf ^
-application org.eclipse.ant.core.antRunner ^
-data "%WORKSPACE%" ^
-file "%cd%\build.xml"
Am I missing anything?

Error: unable to open AIRSDK/frameworks/libs/player/11.1/playerglobal.swc

I get the following error intermittently when compiling a swc using compc:
[exec] Using AIR SDK: /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK
[exec] Loading configuration: /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/flex-config.xml
[exec]
[exec] /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/flex-config.xml:47
[exec] Error: unable to open '/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/libs/player/11.1/playerglobal.swc'.
[exec] /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/flex-config.xml (line: 47)
[exec] </external-library-path>
[exec]
[exec]
I can't seem to find any reason why this would happen. The directory /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK is setup as AIR SDK 3.7 and as I said the error is intermittent, if I keep building it will eventually go away.
Another thing that seems weird is this:
[exec] Loading configuration: /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/flex-config.xml
So I am baffled why it would ever attempt to look for 11.1/playerglobal.swc. As it works sometimes, it seems like everything is setup correctly but I haven't been able to figure out what causes the script to wig out.
This step is from an ant script. The ant script is as follows:
<exec executable="${COMPC}" failonerror="true">
<env key="FLEX_HOME" value="${FLEX_HOME}"/>
<env key="AIR_SDK_HOME" value="${AIR_SDK_HOME}"/>
<arg line="-source-path ${SRC_DIR}"/>
<arg line="-output ${BIN_DIR}/${OUTPUT_FILENAME}"/>
<arg line="-swf-version ${SWF_VERSION}"/>
<arg line="-external-library-path+="${FLEX_HOME}/frameworks/libs/air/airglobal.swc""/>
<arg line="-define+=CONFIG::LOGLEVEL,4"/>
<arg line="--keep-as3-metadata+=TypeHint,EditorData,Embed,Inject,PostInject"/>
<arg line="-inline"/>
<arg line="-include-classes ${classes}"/>
</exec>
-swf-version is being passed in as 20, I have an echo right before this task executes to verify it doesn't change.
The AIR_SDK_HOME and FLEX_HOME values are being set as such:
<property name="FLEX_HOME" value="/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK" />
<property name="AIR_SDK_HOME" value="${FLEX_HOME}" />
ADDITIONAL NOTES:
Usually when this error happens it continues to happen until the terminal window is closed and restarted.
Another thing I am starting to notice is that it happens more frequently (or perhaps only happens) immediately after a failed build within the same terminal window.
Any help or advice is appreciated! Thanks!
I resolved this problem such a way:
- manualy create folder: AIRSDK_HOME\frameworks\libs\player\11.1\
- copy actual version 'playerglobal.swc' ( I have from AIRSDK_HOME\frameworks\libs\player\15.0\ to AIRSDK_HOME\frameworks\libs\player\11.1\ )

Enabling console output for ant tasks in Flash Builder

I am using Flash Builder 4.6 and I am trying to setup up and Ant task to build and run my Flash application. I can get the Ant task to both build and run my application, but it doesn't trace to the console and breakpoints don't work.
I followed the advice of this Stack Overflow post but I keep getting the error:
[exec] Another Flash debugger is probably running; please close it. Details: 'Unrecognized Windows Sockets error: 0: JVM_Bind'.
I also followed this post's advice to properly configure my Ant script in Flash Builder but it doesn't seem to make a difference.
My AS file:
package
{
import flash.display.Sprite;
import flash.text.TextField;
public class HelloAnt extends Sprite
{
public function HelloAnt()
{
var label : TextField = new TextField();
label.text = "Hello World!";
addChild(label);
trace ("Hello World!");
}
}
}
My ANT script:
<?xml version="1.0" encoding="utf-8"?>
<project name="HelloAnt" basedir=".">
<property name="FLEX_HOME" value="C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0"/>
<property name="src" value="${basedir}\src"/>
<property name="bin" value="${basedir}\bin"/>
<property name="application" value="${bin}\swf\HelloAnt.swf" />
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="run">
<echo file="${basedir}/build/.fdbinit">
run ${application}
</echo>
<exec executable="${FLEX_HOME}/bin/fdb.exe" spawn="false" dir="build">
<arg line="-unit"/>
</exec>
</target>
<target name="build">
<mxmlc output="${application}"
file="${src}/HelloAnt.as"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="false"
optimize="true"
fork="true"
debug="true"
maxmemory="1024m"
static-link-runtime-shared-libraries="true">
<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${src}" />
</mxmlc>
</target>
<target name="build-run">
<sequential>
<antcall target="build" />
<antcall target="run" />
</sequential>
</target>
</project>
I am out of ideas. Does anybody have any insight?
If you are using FDB to debug your application then the output will be sent to the terminal window FDB is running in. You can open FDB in Terminal (on Mac) and type "run /path/to/your/application" to connect. Using ANT to call FDB the way you are doing it now, I would think it would run the command and then immediately disconnect. You would need to keep FDB open or debug through Flash Builder (to use it's console).
I'm still checking if there's a way to connect the output to Eclipse's console.
You can see a list of commands available if you double click on fdb in terminal and type help.
More info on FDB here http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ffb.html#WS2db454920e96a9e51e63e3d11c0bf62063-7ff3

phing with phpdoc2 doesn't run

So I have a jenkins job to update a copy of my code and generate the phpdoc for my library, this is all done with phing
When I use these line in de build.xml it generates jsut fine (but with phpdocumentor 1.4.4)
<target name="phpdoc">
<echo msg="PHP Documentor..." />
<phpdoc title="API Documentation"
destdir="/var/www/corelib"
sourcecode="yes"
output="HTML:Smarty:PHP">
<fileset dir="./library/Core">
<include name="**/*.php" />
</fileset>
</phpdoc>
</target>
I want to use the new version of phpdocumentor so i installed it with pear
pear install phpdoc/phpDocumentor-alpha
But when I run this command (I found this in the phing docs), jenkins prints "PHP documentor" and then directly marks the build as failed
<target name="phpdoc">
<echo msg="PHP Documentor..." />
<phpdoc2 title="API Documentation" destdir="/var/www/corelib" template="responsive">
<fileset dir="./library/Core">
<include name="**/*.php" />
</fileset>
</phpdoc2>
</target>
I have zendserver installed on this server but that can't be a problem because phpdoc 1.4.4 runs fine
So how do i solve this?
Ok i found the solution, so i post it for future reference
With some help of the people on the irc channel of phpdocumentor
so this a bug with the latest build of phing in combination with the latest version of phpdocumentor. To fix this problem just revert the instalation of phpdocumentor2 to this version
phpDocumentor 2.0.0a3
This will fix the problem with phing and the documentation gets generated with no problem