How to use Adobe AIR with Flex 4.6 SDK? - actionscript-3

I've been trying to use Adobe AIR 3.1 that comes with Flex 4.6 for my project. I have been receiving the error application descriptor not found.
My descriptor file looks like this inside D:/Test/.
<?xml version="1.0" encoding="utf-8"?>
<!-- D:/Test/AIR.xml -->
<application xmlns="http://ns.adobe.com/air/application/3.1">
<id>Test</id>
<versionNumber>1.0</versionnumber>
<filename>Main</filename>
<initialWindow>
<content>Main.swf</content>
<visible>true</visible>
<width>800</width>
<height>600</height>
</initialWindow>
</application>
I build my swf with the following command while Main.mxml is in the /src subdirectory.
D:/Flex/bin/mxmlc.exe -debug=true -swf-version=14 D:/Test/src/Main.mxml
Then the SWF is moved to the /bin subdirectory.
I try using AIR with the following command in the directory D:/Test/.
D:/Flex/bin/adl.exe AIR.xml /bin/
My directory tree looks something like this:
D:/
- Flex/
-- bin/
--- adl.exe
- Test/
-- AIR.xml
-- bin/
--- Main.swf
-- src/
--- Main.mxml

I didn't CamelCase the closing tag: </versionnumber>. It is actually </versionNumber>.
Also, to run AIR, this is the proper command: D:/Flex/bin/adl.exe AIR.xml
And finally the content tags now hold this: <content>bin/Main.swf</content>

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.

How to include/copy static files inside final docker image using fabric8 tools

I'm using the Fabric8 Maven tool chain to build and deploy my Camel app on top of Openshift. I'm using the Camel Boot approach... My Mvn profile perform the following goals: clean install docker:build fabric8:json fabric8:appl.
Everything is ok! Except that I'm serving a static file (index.html) using Jetty as part of Camel route app. That file is located in $MY_PROJECT_DIR/src/main/resources. So, it goes to the app's classpath after a normal mvn build. But when using fabric8 build workflow, My app (Camel route) can't find that static content on filesystem classpath?
How can I specify fabric8 plugins to copy my static content inside /deployments of th final build image? Thus my camel endpoints ca refer to it on filesystem. I'm looking for something like maven-resources-plugin.
Well, digging into the src code I discovery you have two option to achieve this...
hawt-app-maven-plugin
if you are using hawt-app-maven-plugin [1], like me, you can use the hawt-app.source config property
during the package/build process all the contents of directory (which defaults to src/main/hawt-app) specified in hawt-app.source will be copied to the ${project.build.directory}/hawt-app/.
docker-maven-plugin
using the fabric8's docker-maven-plugin assembly configuration [2], you can pass a custom maven assembly descriptor. Like this one:
project's pom.xml
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
<configuration>
<images>
<image>
<name>${docker.image}</name>
<build>
<from>${docker.from}</from>
<assembly>
<basedir>/deployments</basedir>
<!-- descriptorRef>hawt-app</descriptorRef -->
<descriptor>${project.basedir}/src/main/resources/hawt-app-custom-assembly.xml</descriptor>
</assembly>
hawt-app-custom-assembly.xml
<assembly ...>
<id>hawt-app</id>
<fileSets>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<directory>${project.build.directory}/hawt-app</directory>
<outputDirectory>.</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<includes>
<include>lib/*</include>
</includes>
<directory>${project.build.directory}/hawt-app</directory>
<outputDirectory>.</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
<!-- assembly extention... -->
<fileSet>
<includes>
<include>static-content/*</include>
</includes>
<directory>${project.basedir}/src/main/resources</directory>
<outputDirectory>.</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
</fileSets>
</assembly>
[1] https://github.com/fabric8io/fabric8/tree/master/hawt-app-maven-plugin
[2] https://maven.fabric8.io/#fabric8:build
[3] http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html

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?

Unable to add include ANE File in ANT Script

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>

Adobe Air - Update not compatible error

I'm trying to update an AIR 2.5 app. (Packed as Windows .exe)
This error pops up bei updating:
Application namespace and update descriptor namespace are not
compatible
My .xml file:
<?xml version="1.0" encoding="utf-8"?>
<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">
<version>1.1</version>
<url>http://www.example.com/updater/my-app.exe</url>
<description><![CDATA[New version
]]></description>
</update>
Can somebody tell my what I did wrong?
Thanks
Uli
A bit has changed since AIR 2.5. Mainly, change version to versionNumber, and add versionLabel. Here is an example from: http://www.adobe.com/devnet/air/articles/air_update_framework.html
<?xml version="1.0" encoding="utf-8"?>
<update xmlns="http://ns.adobe.com/air/framework/update/description/2.5">
<versionNumber>0.9.2</versionNumber>
<versionLabel>Beta 2</versionLabel>
<url>http://localhost/updater/AIRUpdater.air</url>
<description><![CDATA[
This version has fixes for the following knowns issues:
*First issue
*Second issue
]]></description>
</update>
Not you are wrong, you cannot use the updater IF you package your application with native installer.
Documentation here : http://help.adobe.com/fr_FR/FlashPlatform/reference/actionscript/3/flash/desktop/Updater.html