3 Replies Latest reply on Dec 16, 2009 8:27 AM by cdman522

    Compiling large projects with mxmlc.exe

    cdman522 Level 1

      Hi all,

       

      I'm working on a large project that I would like to compile with mxmlc.exe.

      This project is split into about 10 sub projects which each are compiled separately and then the bin folders are included in the source path for the main project.
      When the main project is compiled it copies all the stuff from the bin folders of all the included projects into it's bin folder and creates the main air file that can be run.

       

      I need some help figuring out how to use mxmlc or amxmlc to compile my air app and include all it's dependencies in the output. I've been searching google, the fourms and the Adobe Resource Center, and I can't find anything but basic examples that show how to use mxmlc with one file or one project.

      Any help or some direction toward a forum or site that talks about using mxmlc on large multi-project apps would be great.

       

      I'm not sure if this is how it's supposed to work so maybe someone can let me know.

      I'm able to compile with amxmlc and then I can copy manually the files in the bin folders of the other projects.

      After that do I need to run adt to create an air app that will work or is there some step I'm missing or some easier way to do this.

       

      The end goal is to create some scripts that can be used for a CI system.

       

      Thanks.

        • 1. Re: Compiling large projects with mxmlc.exe
          GordonSmith Level 4

          You would normally write Ant scripts, using the <mxmlc> and <compc> Ant tasks that we provide, to coordinate complicated builds. Each invocation of mxmlc can only produce one SWF and each invocation of compc can only produce one SWC. But with an Ant script you can pretty much do anything you want. For example, look at the build.xml files in opensource repository for the Flex SDK.

           

          Gordon Smith

          Adobe Flex SDK Team

          1 person found this helpful
          • 2. Re: Compiling large projects with mxmlc.exe
            GordonSmith Level 4

            I believe Flash Builder 4 will also make it possible to do "headless" builds of multiple projects, which you could script.

             

            Gordon Smith

            Adobe Flex SDK Team

            • 3. Re: Compiling large projects with mxmlc.exe
              cdman522 Level 1

              So If I understand correctly, I have to do an ant script, or some other type of script, that calls mxmlc for each project I want to compile to a swf?

              Where can I find more info about creating an ant script that does multiple builds like that with mxmlc?

              Also, can mxmlc copy non embeded files to the export dir with the swf? Or would I have to indicate in the script which files to copy?

               

              Thanks