Skip to content

ANT snippet for packaging and debugging on Samsung Smart TV

In my previous post I suggested writing ANT script for packaging debug builds for Samsung Smart TVS, but the solution wasn’t that great.

Problem came with unpacking / packing AIR file, so instead of doing that I now have a standard flash project and
package it up with ADT.

Here is what I do:

1. Create packageTemplate dir in your flash project
2. Drop config.xml
3. Drop

Run ANT script:

Script will copy your descriptor and the swf from bin-debug, package it with ADT and copy the file to your localhost.

Only thing to do is Sync from the telly, launch Debug configuration from my previous post and launch the app on the telly.

I am not attaching .properties, it is pretty self expanatory

<?xml version="1.0" encoding="utf-8"?>
<project name="ProjectName" basedir="." default="Main">
        <description>Build for ProjectName</description>

        <property file=""
            description="properities for builds" />

    <target name="Main">
        <antcall target="copy"/>
        <antcall target="package"/>
        <antcall target="move"/>
    <target name="copy">
        <copy todir="${basedir}/packageTemplate">
        <fileset file="bin-debug/YourProjectDescriptor-app.xml" />
        <fileset file="bin-debug/YourProjectSwf.swf" />
    <target name="package">
          <exec executable="java" failonerror="true" dir="packageTemplate">
                    <arg value="-Xms128m"/>
                    <arg value="-Xmx1024m"/>
                    <arg value="-jar"/>
                    <arg value="${FLEX_HOME}/lib/adt.jar"/>
                    <arg value="-package"/>
                    <arg value="-storetype"/>
                    <arg value="pkcs12"/>
                    <arg value="-keystore"/>
                    <arg value="${basedir}/certFile.p12"/>
                    <arg value="YourOutPutFileName" />
                    <arg value="YourProjectDescriptor-app.xml"/>
                    <arg value="YourProjectSwf.swf"/>
                    <arg value="config.xml"/>
                    <arg value=""/>
                    <!-- This handles the prompt for 'password' from the command line. -->
                    <redirector inputstring="yourCertPassword"/>
        <echo>Package complete</echo>
    <target name="move">
            tofile="D:/xampp\htdocs/widgets/" />

Posted in development.

Tagged with , , , , , , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.