Skip to content

Commit

Permalink
Adding Ant build file to build SWF and SWC files.
Browse files Browse the repository at this point in the history
  • Loading branch information
gimite committed Aug 7, 2011
1 parent cf1ad53 commit 7346250
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test.html
WebSocket.swc
Binary file modified WebSocketMain.swf
Binary file not shown.
1 change: 1 addition & 0 deletions flash-src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build.properties
2 changes: 2 additions & 0 deletions flash-src/build.properties.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Point this to your Flex SDK directory.
FLEX_HOME=/usr/local/share/flex_sdk_4
2 changes: 2 additions & 0 deletions flash-src/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

# A script to build WebSocketMain.swf and WebSocketMainInsecure.zip.

# You need Flex 4 SDK:
# http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

Expand Down
65 changes: 65 additions & 0 deletions flash-src/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!--
Ant build file which provides Yet another way (other than build.sh) to build SWF files.
You need to copy build.properties.sample to build.properties and change FLEX_HOME
for your environment.
-->

<?xml version="1.0" encoding="utf-8"?>
<project name="ant" basedir="." default="swf">

<property file="build.properties" /><!-- set sdk -->
<echo message="Using SDK version: ${FLEX_HOME}" />
<!-- do not change next 2 lines, it adds needed task to ant -->
<property name="FLEXTASKS" value="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<taskdef resource="flexTasks.tasks" classpath="${FLEXTASKS}"/>

<target name="swf">
<delete file="../WebSocketMain.swf"/>
<mxmlc file="net/gimite/websocket/WebSocketMain.as"
output="../WebSocketMain.swf"
incremental="false"
strict="true"
accessible="false"
fork="true"
static-link-runtime-shared-libraries="true">
<optimize>true</optimize>
<target-player>10</target-player>
<raw-metadata></raw-metadata>
<source-path path-element="."/>
</mxmlc>
</target>

<target name="swfInsecure">
<delete file="../WebSocketMainInsecure.swf" />
<mxmlc file="net/gimite/websocket/WebSocketMainInsecure.as"
output="../WebSocketMainInsecure.swf"
incremental="false"
strict="true"
accessible="false"
fork="true"
static-link-runtime-shared-libraries="true">
<optimize>true</optimize>
<target-player>10</target-player>
<raw-metadata></raw-metadata>
<source-path path-element="."/>
</mxmlc>
</target>

<target name="swc" ><!-- for pure .as -->
<delete file="../WebSocket.swc" />
<compc output="../WebSocket.swc"
incremental="false"
strict="true"
accessible="false"
fork="true"
static-link-runtime-shared-libraries="true">
<optimize>true</optimize>
<raw-metadata></raw-metadata>
<include-sources dir="." includes="**/*.as"/>
<source-path path-element="."/>
</compc>
</target>

</project>

0 comments on commit 7346250

Please sign in to comment.