The class files are enough but if you wish to build your own jar, you
may try these steps:

#ant jar

To build the red5.jar file in case it is not already built.

You may use the ant build file attached with this email; just change
target from red5java.jar to that of your application. Put this
build.xml
file inside WEB-INF folder. Then

#cd /your-application/WEB-INF
#ant jar

Also change source and target to 1.5 in case you aren't using java 1.6

More details on this post:
http://www.mail-archive.com/[email protected]/msg05548.html

1) We are using 0.6 rc2 and been trying to create our own application Jars in
it. We noticed that the 0.6 rc2 solution is somewhat different from the
tutorial on flashextensions, you do not put everything in red5.jar instead
you create separate jars. We had some success modifying the demo application
(e.g. oflademo) but can not seem to create our own jars from scratch. Is
there any kind of decumentation for 0.6 rc2 that describe how to do this?
With the Jars we create we keep getting a simple Connection Refused error.



--
C is forever.
<?xml version="1.0"?>
<project name="Red5 Webapps Compile" basedir="." default="build">
	
	<!-- project properties -->
	<property name="root.dir" value="../../../"/>
	<property name="src.dir" value="src"/>
	<property name="classes.dir" value="classes"/>
	<property name="lib.dir" value="lib"/>
	<property name="dist.dir" value="dist"/>
	<property name="target.jar" value="red5java.jar"/>
	<property name="root.bin.dir" value="../../../bin"/>
	<property name="root.conf.dir" value="../../../conf"/>
		
	<!-- Put you the location of the spring and red5.jar here (depending on where the call to red5 #ant jar), put it. -->
	<path id="full.classpath">
		<fileset dir="${root.dir}/lib" includesfile="${root.dir}/lib/library.properties" />
	    <fileset dir="${root.dir}/lib" includesfile="${root.dir}/lib/script.properties" />
		<fileset dir="${root.dir}">
			<filename name="red5.jar"/>
		</fileset>
	</path>
		
	<target name="build">
		<javac
			sourcepath=""
			srcdir="${src.dir}"
			destdir="${classes.dir}"
			classpathref="full.classpath"
		    optimize="true" 
		    verbose="false" 
		    fork="true" 
		    nowarn="true"
		    deprecation="false"
		    debug="true"
		    compiler="modern"
		    source="1.6"
		    target="1.6" 
		/>
	</target>
	
	<target name="prepare">
		<mkdir dir="${classes.dir}"/>
		<mkdir dir="${lib.dir}"/>
	</target>

	<target name="clean">
		<delete dir="${classes.dir}"/>
		<delete dir="${lib.dir}"/>
	</target>
		
	<target name="jar" description="Make Archive" depends="build">
	   	
		<tstamp prefix="build">
	    	<format property="TODAY" pattern="d-MMMM-yyyy" locale="en" />
		</tstamp>

		<!-- Load the library props files to generate a class-path for the jar -->
		<loadfile
		    property="library.jars"
		    srcFile="${root.dir}/lib/library.properties">
		    <filterchain>
			    <tokenfilter>
		    		<trim/>
			    	<ignoreblank/>
			    </tokenfilter>
			    <striplinecomments>
			    	<comment value="#"/>
			    </striplinecomments>
		        <prefixlines prefix=" lib/"/>
	            <striplinebreaks/>
		    </filterchain>
		</loadfile>

		<loadfile
			property="script.jars"
			srcFile="${root.dir}/lib/script.properties">
	        <filterchain>
		        <tokenfilter>
		        	<trim/>
                    <ignoreblank/>
                </tokenfilter>
                <striplinecomments>
                    <comment value="#"/>
                </striplinecomments>
                <prefixlines prefix=" lib/"/>
	                <striplinebreaks/>
            </filterchain>
        </loadfile>

		<echo message="Jar launch classpath: conf/${library.jars} ${script.jars}" />   
		
		<mkdir dir="${root.bin.dir}/conf"/>  
        <mkdir dir="${root.bin.dir}/conf"/>   
	    <copy todir="${root.bin.dir}/conf">
	        <fileset dir="${root.conf.dir}"/>
	    </copy>        
			        
		<jar destfile="${lib.dir}/${target.jar}">
			<fileset dir="${classes.dir}">
				<include name="**"/>
			</fileset>
		</jar>
		
	</target>
		
</project>
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to