3 Replies Latest reply on Nov 17, 2009 5:56 AM by injpix

    Ant build fails silently

    injpix Level 3

      I have an Ant script thats derived from here, when I do an Ant build I get a BUILD SUCCESSFUL in FlashBuidler's console window.  However when I install or run the application, it never shows up.  When I go to Task Manager, I can see that its running, but again, no visible application.

       

      Has anyone else ran into this problem and/or any suggestions?

        • 1. Re: Ant build fails silently
          injpix Level 3

          I think I am getting closer to the problem.  I believe that I am not including all of my sources files.  My project has its own source files and is linking another projects source files.

           

          So in Ant, how can I link to another source directory?  My current target is below and in it I may be linking the external source.  This is correct?

          <target name="releasecompile" depends="move"> 
               
                      <java jar="${MXMLC.JAR}" fork="true" failonerror="true"> 
                           
                           <arg value="-source-path=${COMMON_APPLICATION_ROOT}/src"/>
                           <arg value="-source-path+=${AIR_APPLICATION_ROOT}/src"/>
                           <arg value="-external-library-path=${COMMON_APPLICATION_ROOT}/libs"/>
                           
                    <arg value="-debug=false"/> 
                          <arg value="+flexlib=${SDK_HOME}/frameworks"/> 
                          <arg value="+configname=air"/>
                          <arg value="-file-specs=${AIR_APPLICATION_ROOT}/src/main.mxml"/> 
                    <arg value="-output=${build}/main.swf"/> 
                           
                           <jvmarg line="-Xmx1024m"/>
               </java>
          </target
          
          • 2. Re: Ant build fails silently
            injpix Level 3

            Well it seems that all source files are being linked.  I used the following between the java tags above:

             

            <arg value="-link-report=${build}/linkreport.xml"/>

             

            And that generates an output file, which I can see all sources files.

             

            So my problem still exists, the application runs with no visible window.

            • 3. Re: Ant build fails silently
              injpix Level 3

              I found a solution. Instead of using <java> tags inside of the target, I ended up using the <mxmlc> tags.  Below is what I have.  So the problem seemed highly that I wasnt using the <java> correctly.

               

                   <target name="releasecompile" depends="move"> 
              
                       <mxmlc      file="${AIR_APPLICATION_ROOT}/src/main.mxml" 
                                 debug="false" 
                                 optimize="true"
                                 fork="true"
                                 configname="air"
                                 locale="en_US"
                                 compiler.show-binding-warnings="false" 
                                 link-report="${build}/report.xml"
                                 output="${build}/main.swf" >
              
              
                            <compiler.context-root>/main.swf</compiler.context-root>
              
                            <source-path path-element="${COMMON_APPLICATION_ROOT}/src" />
                            <source-path path-element="${AIR_APPLICATION_ROOT}/src" />
                            
                            <library-path dir="${SDK_HOME}/frameworks/libs" append="true">
                                 <include name="*.swc" />
                            </library-path>
                            
                            <library-path dir="${SDK_HOME}/frameworks/libs/air" append="true">
                                 <include name="*.swc" />
                            </library-path>
                            
                            <library-path dir="${SDK_HOME}/frameworks/locale" append="true">
                                 <include name="{locale}" />
                            </library-path>
                            
                            <library-path dir="${COMMON_APPLICATION_ROOT}/libs" append="true">
                                 <include name="*.swc" />
                            </library-path>
                            
                            <jvmarg line="-Xms512m -Xmx1012m -XX:MaxPermSize=1012m -XX:PermSize=512m" />
                            
                       </mxmlc>
                        
                   </target>